packages feed

jsaddle-dom-0.10.0.0: src/JSDOM/Generated/AuthenticationExtensionsLargeBlobOutputs.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.AuthenticationExtensionsLargeBlobOutputs
       (newAuthenticationExtensionsLargeBlobOutputs, setSupported, getSupported, getSupportedUnsafe, getSupportedUnchecked, setBlob, getBlob, getBlobUnsafe, getBlobUnchecked, setWritten, getWritten, getWrittenUnsafe, getWrittenUnchecked, AuthenticationExtensionsLargeBlobOutputs(..), gTypeAuthenticationExtensionsLargeBlobOutputs)
       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-authenticationextensionslargebloboutputs AuthenticationExtensionsLargeBlobOutputs specification>
newAuthenticationExtensionsLargeBlobOutputs :: (MonadDOM m) => m AuthenticationExtensionsLargeBlobOutputs
newAuthenticationExtensionsLargeBlobOutputs = liftDOM ((((new (jsg "Object") () >>= \o -> P.return o)) >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-supported AuthenticationExtensionsLargeBlobOutputs.supported specification>
setSupported :: (MonadDOM m) => AuthenticationExtensionsLargeBlobOutputs -> Bool -> m ()
setSupported self val = liftDOM (void (self ^. jss "supported" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-supported AuthenticationExtensionsLargeBlobOutputs.supported specification>
getSupported :: (MonadDOM m) => AuthenticationExtensionsLargeBlobOutputs -> m (Maybe Bool)
getSupported self = liftDOM (((self ^. js "supported") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-supported AuthenticationExtensionsLargeBlobOutputs.supported specification>
getSupportedUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsLargeBlobOutputs -> m Bool
getSupportedUnsafe self = liftDOM ((((self ^. js "supported") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-supported AuthenticationExtensionsLargeBlobOutputs.supported specification>
getSupportedUnchecked :: (MonadDOM m) => AuthenticationExtensionsLargeBlobOutputs -> m Bool
getSupportedUnchecked self = liftDOM (((self ^. js "supported") >>= valToBool))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-blob AuthenticationExtensionsLargeBlobOutputs.blob specification>
setBlob :: (MonadDOM m, IsArrayBuffer val) => AuthenticationExtensionsLargeBlobOutputs -> val -> m ()
setBlob self val = liftDOM (void (self ^. jss "blob" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-blob AuthenticationExtensionsLargeBlobOutputs.blob specification>
getBlob :: (MonadDOM m) => AuthenticationExtensionsLargeBlobOutputs -> m (Maybe ArrayBuffer)
getBlob self = liftDOM (((self ^. js "blob") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-blob AuthenticationExtensionsLargeBlobOutputs.blob specification>
getBlobUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsLargeBlobOutputs -> m ArrayBuffer
getBlobUnsafe self = liftDOM ((((self ^. js "blob") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-blob AuthenticationExtensionsLargeBlobOutputs.blob specification>
getBlobUnchecked :: (MonadDOM m) => AuthenticationExtensionsLargeBlobOutputs -> m ArrayBuffer
getBlobUnchecked self = liftDOM (((self ^. js "blob") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-written AuthenticationExtensionsLargeBlobOutputs.written specification>
setWritten :: (MonadDOM m) => AuthenticationExtensionsLargeBlobOutputs -> Bool -> m ()
setWritten self val = liftDOM (void (self ^. jss "written" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-written AuthenticationExtensionsLargeBlobOutputs.written specification>
getWritten :: (MonadDOM m) => AuthenticationExtensionsLargeBlobOutputs -> m (Maybe Bool)
getWritten self = liftDOM (((self ^. js "written") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-written AuthenticationExtensionsLargeBlobOutputs.written specification>
getWrittenUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsLargeBlobOutputs -> m Bool
getWrittenUnsafe self = liftDOM ((((self ^. js "written") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-written AuthenticationExtensionsLargeBlobOutputs.written specification>
getWrittenUnchecked :: (MonadDOM m) => AuthenticationExtensionsLargeBlobOutputs -> m Bool
getWrittenUnchecked self = liftDOM (((self ^. js "written") >>= valToBool))