ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/AuthenticationExtensionsClientInputsJSON.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from webauthn-4 (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.AuthenticationExtensionsClientInputsJSON
(js_newAuthenticationExtensionsClientInputsJSON, js_setAppid, js_getAppid, js_setAppidExclude, js_getAppidExclude, js_setCredProps, js_getCredProps, js_setPrf, js_getPrf, js_setLargeBlob, js_getLargeBlob, js_setRemoteClientDataJSON, js_getRemoteClientDataJSON, newAuthenticationExtensionsClientInputsJSON, setAppid, getAppid, getAppidUnsafe, getAppidUnchecked, setAppidExclude, getAppidExclude, getAppidExcludeUnsafe, getAppidExcludeUnchecked, setCredProps, getCredProps, getCredPropsUnsafe, getCredPropsUnchecked, setPrf, getPrf, getPrfUnsafe, getPrfUnchecked, setLargeBlob, getLargeBlob, getLargeBlobUnsafe, getLargeBlobUnchecked, setRemoteClientDataJSON, getRemoteClientDataJSON, getRemoteClientDataJSONUnsafe, getRemoteClientDataJSONUnchecked, AuthenticationExtensionsClientInputsJSON(..), gTypeAuthenticationExtensionsClientInputsJSON)
where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import GHCJS.Types (JSVal, JSString)
import GHCJS.Foreign (jsUndefined, jsNull)
import GHCJS.DOM.Types
import qualified GHCJS.DOM.Types as Types
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import GHCJS.DOM.JSFFI.Generated.Enums
foreign import javascript safe "(() => { return ({}); })"
js_newAuthenticationExtensionsClientInputsJSON :: IO AuthenticationExtensionsClientInputsJSON
-- | <https://w3c.github.io/webauthn/#dictdef-authenticationextensionsclientinputsjson AuthenticationExtensionsClientInputsJSON specification>
newAuthenticationExtensionsClientInputsJSON :: (MonadDOM m) => m AuthenticationExtensionsClientInputsJSON
newAuthenticationExtensionsClientInputsJSON = liftDOM ((js_newAuthenticationExtensionsClientInputsJSON))
foreign import javascript safe "(($1, $2) => { $1[\"appid\"] = $2; })"
js_setAppid :: AuthenticationExtensionsClientInputsJSON -> JSString -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-appid AuthenticationExtensionsClientInputsJSON.appid specification>
setAppid :: (MonadDOM m, ToJSString val) => AuthenticationExtensionsClientInputsJSON -> val -> m ()
setAppid self val = liftDOM (void ((js_setAppid (self) (toJSString val))))
foreign import javascript unsafe "(($1) => { return $1[\"appid\"]; })"
js_getAppid :: AuthenticationExtensionsClientInputsJSON -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-appid AuthenticationExtensionsClientInputsJSON.appid specification>
getAppid :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m (Maybe result)
getAppid self = liftDOM (((fromMaybeJSString . Nullable) <$> (js_getAppid (self))))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-appid AuthenticationExtensionsClientInputsJSON.appid specification>
getAppidUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m result
getAppidUnsafe self = liftDOM ((((fromMaybeJSString . Nullable) <$> (js_getAppid (self))) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-appid AuthenticationExtensionsClientInputsJSON.appid specification>
getAppidUnchecked :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m result
getAppidUnchecked self = liftDOM ((pFromJSVal <$> (js_getAppid (self))))
foreign import javascript safe "(($1, $2) => { $1[\"appidExclude\"] = $2; })"
js_setAppidExclude :: AuthenticationExtensionsClientInputsJSON -> JSString -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-appidexclude AuthenticationExtensionsClientInputsJSON.appidExclude specification>
setAppidExclude :: (MonadDOM m, ToJSString val) => AuthenticationExtensionsClientInputsJSON -> val -> m ()
setAppidExclude self val = liftDOM (void ((js_setAppidExclude (self) (toJSString val))))
foreign import javascript unsafe "(($1) => { return $1[\"appidExclude\"]; })"
js_getAppidExclude :: AuthenticationExtensionsClientInputsJSON -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-appidexclude AuthenticationExtensionsClientInputsJSON.appidExclude specification>
getAppidExclude :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m (Maybe result)
getAppidExclude self = liftDOM (((fromMaybeJSString . Nullable) <$> (js_getAppidExclude (self))))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-appidexclude AuthenticationExtensionsClientInputsJSON.appidExclude specification>
getAppidExcludeUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m result
getAppidExcludeUnsafe self = liftDOM ((((fromMaybeJSString . Nullable) <$> (js_getAppidExclude (self))) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-appidexclude AuthenticationExtensionsClientInputsJSON.appidExclude specification>
getAppidExcludeUnchecked :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m result
getAppidExcludeUnchecked self = liftDOM ((pFromJSVal <$> (js_getAppidExclude (self))))
foreign import javascript safe "(($1, $2) => { $1[\"credProps\"] = $2; })"
js_setCredProps :: AuthenticationExtensionsClientInputsJSON -> Bool -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-credprops AuthenticationExtensionsClientInputsJSON.credProps specification>
setCredProps :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> Bool -> m ()
setCredProps self val = liftDOM (void ((js_setCredProps (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"credProps\"]; })"
js_getCredProps :: AuthenticationExtensionsClientInputsJSON -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-credprops AuthenticationExtensionsClientInputsJSON.credProps specification>
getCredProps :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> m (Maybe Bool)
getCredProps self = liftDOM (((js_getCredProps (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-credprops AuthenticationExtensionsClientInputsJSON.credProps specification>
getCredPropsUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientInputsJSON -> m Bool
getCredPropsUnsafe self = liftDOM ((((js_getCredProps (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-credprops AuthenticationExtensionsClientInputsJSON.credProps specification>
getCredPropsUnchecked :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> m Bool
getCredPropsUnchecked self = liftDOM ((pFromJSVal <$> (js_getCredProps (self))))
foreign import javascript safe "(($1, $2) => { $1[\"prf\"] = $2; })"
js_setPrf :: AuthenticationExtensionsClientInputsJSON -> AuthenticationExtensionsPRFInputsJSON -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-prf AuthenticationExtensionsClientInputsJSON.prf specification>
setPrf :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> AuthenticationExtensionsPRFInputsJSON -> m ()
setPrf self val = liftDOM (void ((js_setPrf (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"prf\"]; })"
js_getPrf :: AuthenticationExtensionsClientInputsJSON -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-prf AuthenticationExtensionsClientInputsJSON.prf specification>
getPrf :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> m (Maybe AuthenticationExtensionsPRFInputsJSON)
getPrf self = liftDOM (((js_getPrf (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-prf AuthenticationExtensionsClientInputsJSON.prf specification>
getPrfUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientInputsJSON -> m AuthenticationExtensionsPRFInputsJSON
getPrfUnsafe self = liftDOM ((((js_getPrf (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-prf AuthenticationExtensionsClientInputsJSON.prf specification>
getPrfUnchecked :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> m AuthenticationExtensionsPRFInputsJSON
getPrfUnchecked self = liftDOM ((pFromJSVal <$> (js_getPrf (self))))
foreign import javascript safe "(($1, $2) => { $1[\"largeBlob\"] = $2; })"
js_setLargeBlob :: AuthenticationExtensionsClientInputsJSON -> AuthenticationExtensionsLargeBlobInputsJSON -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-largeblob AuthenticationExtensionsClientInputsJSON.largeBlob specification>
setLargeBlob :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> AuthenticationExtensionsLargeBlobInputsJSON -> m ()
setLargeBlob self val = liftDOM (void ((js_setLargeBlob (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"largeBlob\"]; })"
js_getLargeBlob :: AuthenticationExtensionsClientInputsJSON -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-largeblob AuthenticationExtensionsClientInputsJSON.largeBlob specification>
getLargeBlob :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> m (Maybe AuthenticationExtensionsLargeBlobInputsJSON)
getLargeBlob self = liftDOM (((js_getLargeBlob (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-largeblob AuthenticationExtensionsClientInputsJSON.largeBlob specification>
getLargeBlobUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientInputsJSON -> m AuthenticationExtensionsLargeBlobInputsJSON
getLargeBlobUnsafe self = liftDOM ((((js_getLargeBlob (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-largeblob AuthenticationExtensionsClientInputsJSON.largeBlob specification>
getLargeBlobUnchecked :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> m AuthenticationExtensionsLargeBlobInputsJSON
getLargeBlobUnchecked self = liftDOM ((pFromJSVal <$> (js_getLargeBlob (self))))
foreign import javascript safe "(($1, $2) => { $1[\"remoteClientDataJSON\"] = $2; })"
js_setRemoteClientDataJSON :: AuthenticationExtensionsClientInputsJSON -> JSString -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-remoteclientdatajson AuthenticationExtensionsClientInputsJSON.remoteClientDataJSON specification>
setRemoteClientDataJSON :: (MonadDOM m, ToJSString val) => AuthenticationExtensionsClientInputsJSON -> val -> m ()
setRemoteClientDataJSON self val = liftDOM (void ((js_setRemoteClientDataJSON (self) (toJSString val))))
foreign import javascript unsafe "(($1) => { return $1[\"remoteClientDataJSON\"]; })"
js_getRemoteClientDataJSON :: AuthenticationExtensionsClientInputsJSON -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-remoteclientdatajson AuthenticationExtensionsClientInputsJSON.remoteClientDataJSON specification>
getRemoteClientDataJSON :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m (Maybe result)
getRemoteClientDataJSON self = liftDOM (((fromMaybeJSString . Nullable) <$> (js_getRemoteClientDataJSON (self))))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-remoteclientdatajson AuthenticationExtensionsClientInputsJSON.remoteClientDataJSON specification>
getRemoteClientDataJSONUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m result
getRemoteClientDataJSONUnsafe self = liftDOM ((((fromMaybeJSString . Nullable) <$> (js_getRemoteClientDataJSON (self))) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-remoteclientdatajson AuthenticationExtensionsClientInputsJSON.remoteClientDataJSON specification>
getRemoteClientDataJSONUnchecked :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m result
getRemoteClientDataJSONUnchecked self = liftDOM ((pFromJSVal <$> (js_getRemoteClientDataJSON (self))))