packages feed

ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/AuthenticationExtensionsLargeBlobOutputs.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.AuthenticationExtensionsLargeBlobOutputs
       (js_newAuthenticationExtensionsLargeBlobOutputs, js_setSupported, js_getSupported, js_setBlob, js_getBlob, js_setWritten, js_getWritten, 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 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_newAuthenticationExtensionsLargeBlobOutputs :: IO AuthenticationExtensionsLargeBlobOutputs
-- | <https://w3c.github.io/webauthn/#dictdef-authenticationextensionslargebloboutputs AuthenticationExtensionsLargeBlobOutputs specification>
newAuthenticationExtensionsLargeBlobOutputs :: (MonadDOM m) => m AuthenticationExtensionsLargeBlobOutputs
newAuthenticationExtensionsLargeBlobOutputs = liftDOM ((js_newAuthenticationExtensionsLargeBlobOutputs))

foreign import javascript safe "(($1, $2) => { $1[\"supported\"] = $2; })"
        js_setSupported :: AuthenticationExtensionsLargeBlobOutputs -> Bool -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-supported AuthenticationExtensionsLargeBlobOutputs.supported specification>
setSupported :: (MonadDOM m) => AuthenticationExtensionsLargeBlobOutputs -> Bool -> m ()
setSupported self val = liftDOM (void ((js_setSupported (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"supported\"]; })"
        js_getSupported :: AuthenticationExtensionsLargeBlobOutputs -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-supported AuthenticationExtensionsLargeBlobOutputs.supported specification>
getSupported :: (MonadDOM m) => AuthenticationExtensionsLargeBlobOutputs -> m (Maybe Bool)
getSupported self = liftDOM (((js_getSupported (self)) >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-supported AuthenticationExtensionsLargeBlobOutputs.supported specification>
getSupportedUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsLargeBlobOutputs -> m Bool
getSupportedUnsafe self = liftDOM ((((js_getSupported (self)) >>= 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 ((pFromJSVal <$> (js_getSupported (self))))

foreign import javascript safe "(($1, $2) => { $1[\"blob\"] = $2; })"
        js_setBlob :: AuthenticationExtensionsLargeBlobOutputs -> ArrayBuffer -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-blob AuthenticationExtensionsLargeBlobOutputs.blob specification>
setBlob :: (MonadDOM m, IsArrayBuffer val) => AuthenticationExtensionsLargeBlobOutputs -> val -> m ()
setBlob self val = liftDOM (void ((js_setBlob (self) (Types.toArrayBuffer val))))

foreign import javascript unsafe "(($1) => { return $1[\"blob\"]; })"
        js_getBlob :: AuthenticationExtensionsLargeBlobOutputs -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-blob AuthenticationExtensionsLargeBlobOutputs.blob specification>
getBlob :: (MonadDOM m) => AuthenticationExtensionsLargeBlobOutputs -> m (Maybe ArrayBuffer)
getBlob self = liftDOM (((js_getBlob (self)) >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-blob AuthenticationExtensionsLargeBlobOutputs.blob specification>
getBlobUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsLargeBlobOutputs -> m ArrayBuffer
getBlobUnsafe self = liftDOM ((((js_getBlob (self)) >>= 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 ((pFromJSVal <$> (js_getBlob (self))))

foreign import javascript safe "(($1, $2) => { $1[\"written\"] = $2; })"
        js_setWritten :: AuthenticationExtensionsLargeBlobOutputs -> Bool -> IO ()
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-written AuthenticationExtensionsLargeBlobOutputs.written specification>
setWritten :: (MonadDOM m) => AuthenticationExtensionsLargeBlobOutputs -> Bool -> m ()
setWritten self val = liftDOM (void ((js_setWritten (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"written\"]; })"
        js_getWritten :: AuthenticationExtensionsLargeBlobOutputs -> IO JSVal
-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-written AuthenticationExtensionsLargeBlobOutputs.written specification>
getWritten :: (MonadDOM m) => AuthenticationExtensionsLargeBlobOutputs -> m (Maybe Bool)
getWritten self = liftDOM (((js_getWritten (self)) >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionslargebloboutputs-written AuthenticationExtensionsLargeBlobOutputs.written specification>
getWrittenUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsLargeBlobOutputs -> m Bool
getWrittenUnsafe self = liftDOM ((((js_getWritten (self)) >>= 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 ((pFromJSVal <$> (js_getWritten (self))))