packages feed

jsaddle-dom-0.10.0.0: src/JSDOM/Generated/AuthenticationExtensionsClientInputsJSON.hs

{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from webauthn-4 (webref). Do not edit.
module JSDOM.Generated.AuthenticationExtensionsClientInputsJSON
       (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 Control.Lens.Operators ((^.))
import Language.Javascript.JSaddle (JSM, JSVal, JSString, toJSVal, valToBool, valToNumber, js, jss, jsf, jsg, new, function, asyncFunction, jsUndefined, jsNull)
import JSDOM.Types
import qualified JSDOM.Types as Types
import JSDOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import JSDOM.Generated.Enums

-- | <https://w3c.github.io/webauthn/#dictdef-authenticationextensionsclientinputsjson AuthenticationExtensionsClientInputsJSON specification>
newAuthenticationExtensionsClientInputsJSON :: (MonadDOM m) => m AuthenticationExtensionsClientInputsJSON
newAuthenticationExtensionsClientInputsJSON = liftDOM ((((new (jsg "Object") () >>= \o -> P.return o)) >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-appid AuthenticationExtensionsClientInputsJSON.appid specification>
setAppid :: (MonadDOM m, ToJSString val) => AuthenticationExtensionsClientInputsJSON -> val -> m ()
setAppid self val = liftDOM (void (self ^. jss "appid" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-appid AuthenticationExtensionsClientInputsJSON.appid specification>
getAppid :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m (Maybe result)
getAppid self = liftDOM (((self ^. js "appid") >>= fromMaybeJSString))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-appid AuthenticationExtensionsClientInputsJSON.appid specification>
getAppidUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m result
getAppidUnsafe self = liftDOM ((((self ^. js "appid") >>= fromMaybeJSString) >>= 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 (((self ^. js "appid") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-appidexclude AuthenticationExtensionsClientInputsJSON.appidExclude specification>
setAppidExclude :: (MonadDOM m, ToJSString val) => AuthenticationExtensionsClientInputsJSON -> val -> m ()
setAppidExclude self val = liftDOM (void (self ^. jss "appidExclude" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-appidexclude AuthenticationExtensionsClientInputsJSON.appidExclude specification>
getAppidExclude :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m (Maybe result)
getAppidExclude self = liftDOM (((self ^. js "appidExclude") >>= fromMaybeJSString))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-appidexclude AuthenticationExtensionsClientInputsJSON.appidExclude specification>
getAppidExcludeUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m result
getAppidExcludeUnsafe self = liftDOM ((((self ^. js "appidExclude") >>= fromMaybeJSString) >>= 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 (((self ^. js "appidExclude") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-credprops AuthenticationExtensionsClientInputsJSON.credProps specification>
setCredProps :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> Bool -> m ()
setCredProps self val = liftDOM (void (self ^. jss "credProps" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-credprops AuthenticationExtensionsClientInputsJSON.credProps specification>
getCredProps :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> m (Maybe Bool)
getCredProps self = liftDOM (((self ^. js "credProps") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-credprops AuthenticationExtensionsClientInputsJSON.credProps specification>
getCredPropsUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientInputsJSON -> m Bool
getCredPropsUnsafe self = liftDOM ((((self ^. js "credProps") >>= 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 (((self ^. js "credProps") >>= valToBool))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-prf AuthenticationExtensionsClientInputsJSON.prf specification>
setPrf :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> AuthenticationExtensionsPRFInputsJSON -> m ()
setPrf self val = liftDOM (void (self ^. jss "prf" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-prf AuthenticationExtensionsClientInputsJSON.prf specification>
getPrf :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> m (Maybe AuthenticationExtensionsPRFInputsJSON)
getPrf self = liftDOM (((self ^. js "prf") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-prf AuthenticationExtensionsClientInputsJSON.prf specification>
getPrfUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientInputsJSON -> m AuthenticationExtensionsPRFInputsJSON
getPrfUnsafe self = liftDOM ((((self ^. js "prf") >>= 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 (((self ^. js "prf") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-largeblob AuthenticationExtensionsClientInputsJSON.largeBlob specification>
setLargeBlob :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> AuthenticationExtensionsLargeBlobInputsJSON -> m ()
setLargeBlob self val = liftDOM (void (self ^. jss "largeBlob" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-largeblob AuthenticationExtensionsClientInputsJSON.largeBlob specification>
getLargeBlob :: (MonadDOM m) => AuthenticationExtensionsClientInputsJSON -> m (Maybe AuthenticationExtensionsLargeBlobInputsJSON)
getLargeBlob self = liftDOM (((self ^. js "largeBlob") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-largeblob AuthenticationExtensionsClientInputsJSON.largeBlob specification>
getLargeBlobUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientInputsJSON -> m AuthenticationExtensionsLargeBlobInputsJSON
getLargeBlobUnsafe self = liftDOM ((((self ^. js "largeBlob") >>= 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 (((self ^. js "largeBlob") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-remoteclientdatajson AuthenticationExtensionsClientInputsJSON.remoteClientDataJSON specification>
setRemoteClientDataJSON :: (MonadDOM m, ToJSString val) => AuthenticationExtensionsClientInputsJSON -> val -> m ()
setRemoteClientDataJSON self val = liftDOM (void (self ^. jss "remoteClientDataJSON" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-remoteclientdatajson AuthenticationExtensionsClientInputsJSON.remoteClientDataJSON specification>
getRemoteClientDataJSON :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m (Maybe result)
getRemoteClientDataJSON self = liftDOM (((self ^. js "remoteClientDataJSON") >>= fromMaybeJSString))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientinputsjson-remoteclientdatajson AuthenticationExtensionsClientInputsJSON.remoteClientDataJSON specification>
getRemoteClientDataJSONUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => AuthenticationExtensionsClientInputsJSON -> m result
getRemoteClientDataJSONUnsafe self = liftDOM ((((self ^. js "remoteClientDataJSON") >>= fromMaybeJSString) >>= 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 (((self ^. js "remoteClientDataJSON") >>= fromJSValUnchecked))