ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/AuthenticationExtensionsPRFInputs.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.AuthenticationExtensionsPRFInputs
(js_newAuthenticationExtensionsPRFInputs, js_setEval, js_getEval, js_setEvalByCredential, js_getEvalByCredential, newAuthenticationExtensionsPRFInputs, setEval, getEval, getEvalUnsafe, getEvalUnchecked, setEvalByCredential, getEvalByCredential, getEvalByCredentialUnsafe, getEvalByCredentialUnchecked, AuthenticationExtensionsPRFInputs(..), gTypeAuthenticationExtensionsPRFInputs)
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_newAuthenticationExtensionsPRFInputs :: IO AuthenticationExtensionsPRFInputs
-- | <https://w3c.github.io/webauthn/#dictdef-authenticationextensionsprfinputs AuthenticationExtensionsPRFInputs specification>
newAuthenticationExtensionsPRFInputs :: (MonadDOM m) => m AuthenticationExtensionsPRFInputs
newAuthenticationExtensionsPRFInputs = liftDOM ((js_newAuthenticationExtensionsPRFInputs))
foreign import javascript safe "(($1, $2) => { $1[\"eval\"] = $2; })"
js_setEval :: AuthenticationExtensionsPRFInputs -> AuthenticationExtensionsPRFValues -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsprfinputs-eval AuthenticationExtensionsPRFInputs.eval specification>
setEval :: (MonadDOM m) => AuthenticationExtensionsPRFInputs -> AuthenticationExtensionsPRFValues -> m ()
setEval self val = liftDOM (void ((js_setEval (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"eval\"]; })"
js_getEval :: AuthenticationExtensionsPRFInputs -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsprfinputs-eval AuthenticationExtensionsPRFInputs.eval specification>
getEval :: (MonadDOM m) => AuthenticationExtensionsPRFInputs -> m (Maybe AuthenticationExtensionsPRFValues)
getEval self = liftDOM (((js_getEval (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsprfinputs-eval AuthenticationExtensionsPRFInputs.eval specification>
getEvalUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsPRFInputs -> m AuthenticationExtensionsPRFValues
getEvalUnsafe self = liftDOM ((((js_getEval (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsprfinputs-eval AuthenticationExtensionsPRFInputs.eval specification>
getEvalUnchecked :: (MonadDOM m) => AuthenticationExtensionsPRFInputs -> m AuthenticationExtensionsPRFValues
getEvalUnchecked self = liftDOM ((pFromJSVal <$> (js_getEval (self))))
foreign import javascript safe "(($1, $2) => { $1[\"evalByCredential\"] = $2; })"
js_setEvalByCredential :: AuthenticationExtensionsPRFInputs -> JSVal -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsprfinputs-evalbycredential AuthenticationExtensionsPRFInputs.evalByCredential specification>
setEvalByCredential :: (MonadDOM m) => AuthenticationExtensionsPRFInputs -> (Record JSString JSVal) -> m ()
setEvalByCredential self val = liftDOM (void (((toJSVal val) >>= \a2' -> js_setEvalByCredential (self) a2')))
foreign import javascript unsafe "(($1) => { return $1[\"evalByCredential\"]; })"
js_getEvalByCredential :: AuthenticationExtensionsPRFInputs -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsprfinputs-evalbycredential AuthenticationExtensionsPRFInputs.evalByCredential specification>
getEvalByCredential :: (MonadDOM m) => AuthenticationExtensionsPRFInputs -> m (Maybe (Record JSString JSVal))
getEvalByCredential self = liftDOM (((js_getEvalByCredential (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsprfinputs-evalbycredential AuthenticationExtensionsPRFInputs.evalByCredential specification>
getEvalByCredentialUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsPRFInputs -> m (Record JSString JSVal)
getEvalByCredentialUnsafe self = liftDOM ((((js_getEvalByCredential (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsprfinputs-evalbycredential AuthenticationExtensionsPRFInputs.evalByCredential specification>
getEvalByCredentialUnchecked :: (MonadDOM m) => AuthenticationExtensionsPRFInputs -> m (Record JSString JSVal)
getEvalByCredentialUnchecked self = liftDOM ((pFromJSVal <$> (js_getEvalByCredential (self))))