packages feed

jsaddle-dom-0.10.0.0: src/JSDOM/Generated/AuthenticationExtensionsLargeBlobInputsJSON.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.AuthenticationExtensionsLargeBlobInputsJSON
       (newAuthenticationExtensionsLargeBlobInputsJSON, setSupport, getSupport, getSupportUnsafe, getSupportUnchecked, setRead, getRead, getReadUnsafe, getReadUnchecked, setWrite, getWrite, getWriteUnsafe, getWriteUnchecked, AuthenticationExtensionsLargeBlobInputsJSON(..), gTypeAuthenticationExtensionsLargeBlobInputsJSON)
       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-authenticationextensionslargeblobinputsjson AuthenticationExtensionsLargeBlobInputsJSON specification>
newAuthenticationExtensionsLargeBlobInputsJSON :: (MonadDOM m) => m AuthenticationExtensionsLargeBlobInputsJSON
newAuthenticationExtensionsLargeBlobInputsJSON = liftDOM ((((new (jsg "Object") () >>= \o -> P.return o)) >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-support AuthenticationExtensionsLargeBlobInputsJSON.support specification>
setSupport :: (MonadDOM m, ToJSString val) => AuthenticationExtensionsLargeBlobInputsJSON -> val -> m ()
setSupport self val = liftDOM (void (self ^. jss "support" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-support AuthenticationExtensionsLargeBlobInputsJSON.support specification>
getSupport :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsLargeBlobInputsJSON -> m (Maybe result)
getSupport self = liftDOM (((self ^. js "support") >>= fromMaybeJSString))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-support AuthenticationExtensionsLargeBlobInputsJSON.support specification>
getSupportUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => AuthenticationExtensionsLargeBlobInputsJSON -> m result
getSupportUnsafe self = liftDOM ((((self ^. js "support") >>= fromMaybeJSString) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-support AuthenticationExtensionsLargeBlobInputsJSON.support specification>
getSupportUnchecked :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsLargeBlobInputsJSON -> m result
getSupportUnchecked self = liftDOM (((self ^. js "support") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-read AuthenticationExtensionsLargeBlobInputsJSON.read specification>
setRead :: (MonadDOM m) => AuthenticationExtensionsLargeBlobInputsJSON -> Bool -> m ()
setRead self val = liftDOM (void (self ^. jss "read" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-read AuthenticationExtensionsLargeBlobInputsJSON.read specification>
getRead :: (MonadDOM m) => AuthenticationExtensionsLargeBlobInputsJSON -> m (Maybe Bool)
getRead self = liftDOM (((self ^. js "read") >>= fromJSValUnchecked))

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

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-read AuthenticationExtensionsLargeBlobInputsJSON.read specification>
getReadUnchecked :: (MonadDOM m) => AuthenticationExtensionsLargeBlobInputsJSON -> m Bool
getReadUnchecked self = liftDOM (((self ^. js "read") >>= valToBool))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-write AuthenticationExtensionsLargeBlobInputsJSON.write specification>
setWrite :: (MonadDOM m, ToJSString val) => AuthenticationExtensionsLargeBlobInputsJSON -> val -> m ()
setWrite self val = liftDOM (void (self ^. jss "write" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-write AuthenticationExtensionsLargeBlobInputsJSON.write specification>
getWrite :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsLargeBlobInputsJSON -> m (Maybe result)
getWrite self = liftDOM (((self ^. js "write") >>= fromMaybeJSString))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-write AuthenticationExtensionsLargeBlobInputsJSON.write specification>
getWriteUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => AuthenticationExtensionsLargeBlobInputsJSON -> m result
getWriteUnsafe self = liftDOM ((((self ^. js "write") >>= fromMaybeJSString) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-write AuthenticationExtensionsLargeBlobInputsJSON.write specification>
getWriteUnchecked :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsLargeBlobInputsJSON -> m result
getWriteUnchecked self = liftDOM (((self ^. js "write") >>= fromJSValUnchecked))