ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/AuthenticationExtensionsLargeBlobInputsJSON.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.AuthenticationExtensionsLargeBlobInputsJSON
(js_newAuthenticationExtensionsLargeBlobInputsJSON, js_setSupport, js_getSupport, js_setRead, js_getRead, js_setWrite, js_getWrite, 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 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_newAuthenticationExtensionsLargeBlobInputsJSON :: IO AuthenticationExtensionsLargeBlobInputsJSON
-- | <https://w3c.github.io/webauthn/#dictdef-authenticationextensionslargeblobinputsjson AuthenticationExtensionsLargeBlobInputsJSON specification>
newAuthenticationExtensionsLargeBlobInputsJSON :: (MonadDOM m) => m AuthenticationExtensionsLargeBlobInputsJSON
newAuthenticationExtensionsLargeBlobInputsJSON = liftDOM ((js_newAuthenticationExtensionsLargeBlobInputsJSON))
foreign import javascript safe "(($1, $2) => { $1[\"support\"] = $2; })"
js_setSupport :: AuthenticationExtensionsLargeBlobInputsJSON -> JSString -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-support AuthenticationExtensionsLargeBlobInputsJSON.support specification>
setSupport :: (MonadDOM m, ToJSString val) => AuthenticationExtensionsLargeBlobInputsJSON -> val -> m ()
setSupport self val = liftDOM (void ((js_setSupport (self) (toJSString val))))
foreign import javascript unsafe "(($1) => { return $1[\"support\"]; })"
js_getSupport :: AuthenticationExtensionsLargeBlobInputsJSON -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-support AuthenticationExtensionsLargeBlobInputsJSON.support specification>
getSupport :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsLargeBlobInputsJSON -> m (Maybe result)
getSupport self = liftDOM (((fromMaybeJSString . Nullable) <$> (js_getSupport (self))))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-support AuthenticationExtensionsLargeBlobInputsJSON.support specification>
getSupportUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => AuthenticationExtensionsLargeBlobInputsJSON -> 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-authenticationextensionslargeblobinputsjson-support AuthenticationExtensionsLargeBlobInputsJSON.support specification>
getSupportUnchecked :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsLargeBlobInputsJSON -> m result
getSupportUnchecked self = liftDOM ((pFromJSVal <$> (js_getSupport (self))))
foreign import javascript safe "(($1, $2) => { $1[\"read\"] = $2; })"
js_setRead :: AuthenticationExtensionsLargeBlobInputsJSON -> Bool -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-read AuthenticationExtensionsLargeBlobInputsJSON.read specification>
setRead :: (MonadDOM m) => AuthenticationExtensionsLargeBlobInputsJSON -> Bool -> m ()
setRead self val = liftDOM (void ((js_setRead (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"read\"]; })"
js_getRead :: AuthenticationExtensionsLargeBlobInputsJSON -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-read AuthenticationExtensionsLargeBlobInputsJSON.read specification>
getRead :: (MonadDOM m) => AuthenticationExtensionsLargeBlobInputsJSON -> m (Maybe Bool)
getRead self = liftDOM (((js_getRead (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-read AuthenticationExtensionsLargeBlobInputsJSON.read specification>
getReadUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsLargeBlobInputsJSON -> m Bool
getReadUnsafe self = liftDOM ((((js_getRead (self)) >>= 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 ((pFromJSVal <$> (js_getRead (self))))
foreign import javascript safe "(($1, $2) => { $1[\"write\"] = $2; })"
js_setWrite :: AuthenticationExtensionsLargeBlobInputsJSON -> JSString -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-write AuthenticationExtensionsLargeBlobInputsJSON.write specification>
setWrite :: (MonadDOM m, ToJSString val) => AuthenticationExtensionsLargeBlobInputsJSON -> val -> m ()
setWrite self val = liftDOM (void ((js_setWrite (self) (toJSString val))))
foreign import javascript unsafe "(($1) => { return $1[\"write\"]; })"
js_getWrite :: AuthenticationExtensionsLargeBlobInputsJSON -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-write AuthenticationExtensionsLargeBlobInputsJSON.write specification>
getWrite :: (MonadDOM m, FromJSString result) => AuthenticationExtensionsLargeBlobInputsJSON -> m (Maybe result)
getWrite self = liftDOM (((fromMaybeJSString . Nullable) <$> (js_getWrite (self))))
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputsjson-write AuthenticationExtensionsLargeBlobInputsJSON.write specification>
getWriteUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => AuthenticationExtensionsLargeBlobInputsJSON -> m result
getWriteUnsafe self = liftDOM ((((fromMaybeJSString . Nullable) <$> (js_getWrite (self))) >>= 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 ((pFromJSVal <$> (js_getWrite (self))))