jsaddle-dom-0.10.0.0: src/JSDOM/Generated/AuthenticationExtensionsLargeBlobInputs.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.AuthenticationExtensionsLargeBlobInputs
(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 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-authenticationextensionslargeblobinputs AuthenticationExtensionsLargeBlobInputs specification>
newAuthenticationExtensionsLargeBlobInputs :: (MonadDOM m) => m AuthenticationExtensionsLargeBlobInputs
newAuthenticationExtensionsLargeBlobInputs = liftDOM ((((new (jsg "Object") () >>= \o -> P.return o)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-support AuthenticationExtensionsLargeBlobInputs.support specification>
setSupport :: (MonadDOM m, ToJSString val) => AuthenticationExtensionsLargeBlobInputs -> val -> m ()
setSupport self val = liftDOM (void (self ^. jss "support" (toJSVal val)))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-support AuthenticationExtensionsLargeBlobInputs.support specification>
getSupport :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsLargeBlobInputs -> m (Maybe result)
getSupport self = liftDOM (((self ^. js "support") >>= fromMaybeJSString))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-support AuthenticationExtensionsLargeBlobInputs.support specification>
getSupportUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => AuthenticationExtensionsLargeBlobInputs -> m result
getSupportUnsafe self = liftDOM ((((self ^. js "support") >>= fromMaybeJSString) >>= 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 (((self ^. js "support") >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-read AuthenticationExtensionsLargeBlobInputs.read specification>
setRead :: (MonadDOM m) => AuthenticationExtensionsLargeBlobInputs -> Bool -> m ()
setRead self val = liftDOM (void (self ^. jss "read" (toJSVal val)))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-read AuthenticationExtensionsLargeBlobInputs.read specification>
getRead :: (MonadDOM m) => AuthenticationExtensionsLargeBlobInputs -> m (Maybe Bool)
getRead self = liftDOM (((self ^. js "read") >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-read AuthenticationExtensionsLargeBlobInputs.read specification>
getReadUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsLargeBlobInputs -> m Bool
getReadUnsafe self = liftDOM ((((self ^. js "read") >>= 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 (((self ^. js "read") >>= valToBool))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-write AuthenticationExtensionsLargeBlobInputs.write specification>
setWrite :: (MonadDOM m, IsBufferSource val) => AuthenticationExtensionsLargeBlobInputs -> val -> m ()
setWrite self val = liftDOM (void (self ^. jss "write" (toJSVal val)))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-write AuthenticationExtensionsLargeBlobInputs.write specification>
getWrite :: (MonadDOM m) => AuthenticationExtensionsLargeBlobInputs -> m (Maybe BufferSource)
getWrite self = liftDOM (((self ^. js "write") >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-write AuthenticationExtensionsLargeBlobInputs.write specification>
getWriteUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsLargeBlobInputs -> m BufferSource
getWriteUnsafe self = liftDOM ((((self ^. js "write") >>= 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 (((self ^. js "write") >>= fromJSValUnchecked))