packages feed

jsaddle-dom-0.10.0.0: src/JSDOM/Generated/RsaOtherPrimesInfo.hs

{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from webcrypto-2 (webref). Do not edit.
module JSDOM.Generated.RsaOtherPrimesInfo
       (newRsaOtherPrimesInfo, setR, getR, getRUnsafe, getRUnchecked, setD, getD, getDUnsafe, getDUnchecked, setT, getT, getTUnsafe, getTUnchecked, RsaOtherPrimesInfo(..), gTypeRsaOtherPrimesInfo)
       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/webcrypto/#dfn-RsaOtherPrimesInfo RsaOtherPrimesInfo specification>
newRsaOtherPrimesInfo :: (MonadDOM m) => m RsaOtherPrimesInfo
newRsaOtherPrimesInfo = liftDOM ((((new (jsg "Object") () >>= \o -> P.return o)) >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webcrypto/#dom-rsaotherprimesinfo-r RsaOtherPrimesInfo.r specification>
setR :: (MonadDOM m, ToJSString val) => RsaOtherPrimesInfo -> val -> m ()
setR self val = liftDOM (void (self ^. jss "r" (toJSVal val)))

-- | <https://w3c.github.io/webcrypto/#dom-rsaotherprimesinfo-r RsaOtherPrimesInfo.r specification>
getR :: (MonadDOM m, FromJSString result) => RsaOtherPrimesInfo -> m (Maybe result)
getR self = liftDOM (((self ^. js "r") >>= fromMaybeJSString))

-- | <https://w3c.github.io/webcrypto/#dom-rsaotherprimesinfo-r RsaOtherPrimesInfo.r specification>
getRUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => RsaOtherPrimesInfo -> m result
getRUnsafe self = liftDOM ((((self ^. js "r") >>= fromMaybeJSString) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/webcrypto/#dom-rsaotherprimesinfo-r RsaOtherPrimesInfo.r specification>
getRUnchecked :: (MonadDOM m, FromJSString result) => RsaOtherPrimesInfo -> m result
getRUnchecked self = liftDOM (((self ^. js "r") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webcrypto/#dom-rsaotherprimesinfo-d RsaOtherPrimesInfo.d specification>
setD :: (MonadDOM m, ToJSString val) => RsaOtherPrimesInfo -> val -> m ()
setD self val = liftDOM (void (self ^. jss "d" (toJSVal val)))

-- | <https://w3c.github.io/webcrypto/#dom-rsaotherprimesinfo-d RsaOtherPrimesInfo.d specification>
getD :: (MonadDOM m, FromJSString result) => RsaOtherPrimesInfo -> m (Maybe result)
getD self = liftDOM (((self ^. js "d") >>= fromMaybeJSString))

-- | <https://w3c.github.io/webcrypto/#dom-rsaotherprimesinfo-d RsaOtherPrimesInfo.d specification>
getDUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => RsaOtherPrimesInfo -> m result
getDUnsafe self = liftDOM ((((self ^. js "d") >>= fromMaybeJSString) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/webcrypto/#dom-rsaotherprimesinfo-d RsaOtherPrimesInfo.d specification>
getDUnchecked :: (MonadDOM m, FromJSString result) => RsaOtherPrimesInfo -> m result
getDUnchecked self = liftDOM (((self ^. js "d") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webcrypto/#dom-rsaotherprimesinfo-t RsaOtherPrimesInfo.t specification>
setT :: (MonadDOM m, ToJSString val) => RsaOtherPrimesInfo -> val -> m ()
setT self val = liftDOM (void (self ^. jss "t" (toJSVal val)))

-- | <https://w3c.github.io/webcrypto/#dom-rsaotherprimesinfo-t RsaOtherPrimesInfo.t specification>
getT :: (MonadDOM m, FromJSString result) => RsaOtherPrimesInfo -> m (Maybe result)
getT self = liftDOM (((self ^. js "t") >>= fromMaybeJSString))

-- | <https://w3c.github.io/webcrypto/#dom-rsaotherprimesinfo-t RsaOtherPrimesInfo.t specification>
getTUnsafe :: (MonadDOM m, HasCallStack, FromJSString result) => RsaOtherPrimesInfo -> m result
getTUnsafe self = liftDOM ((((self ^. js "t") >>= fromMaybeJSString) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/webcrypto/#dom-rsaotherprimesinfo-t RsaOtherPrimesInfo.t specification>
getTUnchecked :: (MonadDOM m, FromJSString result) => RsaOtherPrimesInfo -> m result
getTUnchecked self = liftDOM (((self ^. js "t") >>= fromJSValUnchecked))