ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/AuthenticationExtensionsLargeBlobInputs.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.AuthenticationExtensionsLargeBlobInputs
(js_newAuthenticationExtensionsLargeBlobInputs, js_setSupport, js_getSupport, js_setRead, js_getRead, js_setWrite, js_getWrite, newAuthenticationExtensionsLargeBlobInputs, setSupport, getSupport, getSupportUnsafe, getSupportUnchecked, setRead, getRead, getReadUnsafe, getReadUnchecked, setWrite, getWrite, getWriteUnsafe, getWriteUnchecked, AuthenticationExtensionsLargeBlobInputs(..), gTypeAuthenticationExtensionsLargeBlobInputs)
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_newAuthenticationExtensionsLargeBlobInputs :: IO AuthenticationExtensionsLargeBlobInputs
-- | <https://w3c.github.io/webauthn/#dictdef-authenticationextensionslargeblobinputs AuthenticationExtensionsLargeBlobInputs specification>
newAuthenticationExtensionsLargeBlobInputs :: (MonadDOM m) => m AuthenticationExtensionsLargeBlobInputs
newAuthenticationExtensionsLargeBlobInputs = liftDOM ((js_newAuthenticationExtensionsLargeBlobInputs))
foreign import javascript safe "(($1, $2) => { $1[\"support\"] = $2; })"
js_setSupport :: AuthenticationExtensionsLargeBlobInputs -> JSString -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-support AuthenticationExtensionsLargeBlobInputs.support specification>
setSupport :: (MonadDOM m, ToJSString val) => AuthenticationExtensionsLargeBlobInputs -> val -> m ()
setSupport self val = liftDOM (void ((js_setSupport (self) (toJSString val))))
foreign import javascript unsafe "(($1) => { return $1[\"support\"]; })"
js_getSupport :: AuthenticationExtensionsLargeBlobInputs -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-support AuthenticationExtensionsLargeBlobInputs.support specification>
getSupport :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsLargeBlobInputs -> m (Maybe result)
getSupport self = liftDOM (((fromMaybeJSString . Nullable) <$> (js_getSupport (self))))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-support AuthenticationExtensionsLargeBlobInputs.support specification>
getSupportUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => AuthenticationExtensionsLargeBlobInputs -> m result
getSupportUnsafe self = liftDOM ((((fromMaybeJSString . Nullable) <$> (js_getSupport (self))) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-support AuthenticationExtensionsLargeBlobInputs.support specification>
getSupportUnchecked :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsLargeBlobInputs -> m result
getSupportUnchecked self = liftDOM ((pFromJSVal <$> (js_getSupport (self))))
foreign import javascript safe "(($1, $2) => { $1[\"read\"] = $2; })"
js_setRead :: AuthenticationExtensionsLargeBlobInputs -> Bool -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-read AuthenticationExtensionsLargeBlobInputs.read specification>
setRead :: (MonadDOM m) => AuthenticationExtensionsLargeBlobInputs -> Bool -> m ()
setRead self val = liftDOM (void ((js_setRead (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"read\"]; })"
js_getRead :: AuthenticationExtensionsLargeBlobInputs -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-read AuthenticationExtensionsLargeBlobInputs.read specification>
getRead :: (MonadDOM m) => AuthenticationExtensionsLargeBlobInputs -> m (Maybe Bool)
getRead self = liftDOM (((js_getRead (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-read AuthenticationExtensionsLargeBlobInputs.read specification>
getReadUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsLargeBlobInputs -> m Bool
getReadUnsafe self = liftDOM ((((js_getRead (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-read AuthenticationExtensionsLargeBlobInputs.read specification>
getReadUnchecked :: (MonadDOM m) => AuthenticationExtensionsLargeBlobInputs -> m Bool
getReadUnchecked self = liftDOM ((pFromJSVal <$> (js_getRead (self))))
foreign import javascript safe "(($1, $2) => { $1[\"write\"] = $2; })"
js_setWrite :: AuthenticationExtensionsLargeBlobInputs -> BufferSource -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-write AuthenticationExtensionsLargeBlobInputs.write specification>
setWrite :: (MonadDOM m, IsBufferSource val) => AuthenticationExtensionsLargeBlobInputs -> val -> m ()
setWrite self val = liftDOM (void ((js_setWrite (self) (Types.toBufferSource val))))
foreign import javascript unsafe "(($1) => { return $1[\"write\"]; })"
js_getWrite :: AuthenticationExtensionsLargeBlobInputs -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-write AuthenticationExtensionsLargeBlobInputs.write specification>
getWrite :: (MonadDOM m) => AuthenticationExtensionsLargeBlobInputs -> m (Maybe BufferSource)
getWrite self = liftDOM (((js_getWrite (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-write AuthenticationExtensionsLargeBlobInputs.write specification>
getWriteUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsLargeBlobInputs -> m BufferSource
getWriteUnsafe self = liftDOM ((((js_getWrite (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-write AuthenticationExtensionsLargeBlobInputs.write specification>
getWriteUnchecked :: (MonadDOM m) => AuthenticationExtensionsLargeBlobInputs -> m BufferSource
getWriteUnchecked self = liftDOM ((pFromJSVal <$> (js_getWrite (self))))