module Stratosphere.SageMaker.ModelCard.UserContextProperty (
UserContextProperty(..), mkUserContextProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data UserContextProperty
=
UserContextProperty {UserContextProperty -> ()
haddock_workaround_ :: (),
UserContextProperty -> Maybe (Value Text)
domainId :: (Prelude.Maybe (Value Prelude.Text)),
UserContextProperty -> Maybe (Value Text)
userProfileArn :: (Prelude.Maybe (Value Prelude.Text)),
UserContextProperty -> Maybe (Value Text)
userProfileName :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (UserContextProperty -> UserContextProperty -> Bool
(UserContextProperty -> UserContextProperty -> Bool)
-> (UserContextProperty -> UserContextProperty -> Bool)
-> Eq UserContextProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UserContextProperty -> UserContextProperty -> Bool
== :: UserContextProperty -> UserContextProperty -> Bool
$c/= :: UserContextProperty -> UserContextProperty -> Bool
/= :: UserContextProperty -> UserContextProperty -> Bool
Prelude.Eq, Int -> UserContextProperty -> ShowS
[UserContextProperty] -> ShowS
UserContextProperty -> String
(Int -> UserContextProperty -> ShowS)
-> (UserContextProperty -> String)
-> ([UserContextProperty] -> ShowS)
-> Show UserContextProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UserContextProperty -> ShowS
showsPrec :: Int -> UserContextProperty -> ShowS
$cshow :: UserContextProperty -> String
show :: UserContextProperty -> String
$cshowList :: [UserContextProperty] -> ShowS
showList :: [UserContextProperty] -> ShowS
Prelude.Show)
mkUserContextProperty :: UserContextProperty
mkUserContextProperty :: UserContextProperty
mkUserContextProperty
= UserContextProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), domainId :: Maybe (Value Text)
domainId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
userProfileArn :: Maybe (Value Text)
userProfileArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
userProfileName :: Maybe (Value Text)
userProfileName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties UserContextProperty where
toResourceProperties :: UserContextProperty -> ResourceProperties
toResourceProperties UserContextProperty {Maybe (Value Text)
()
haddock_workaround_ :: UserContextProperty -> ()
domainId :: UserContextProperty -> Maybe (Value Text)
userProfileArn :: UserContextProperty -> Maybe (Value Text)
userProfileName :: UserContextProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
domainId :: Maybe (Value Text)
userProfileArn :: Maybe (Value Text)
userProfileName :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SageMaker::ModelCard.UserContext",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DomainId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
domainId,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"UserProfileArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
userProfileArn,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"UserProfileName" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
userProfileName])}
instance JSON.ToJSON UserContextProperty where
toJSON :: UserContextProperty -> Value
toJSON UserContextProperty {Maybe (Value Text)
()
haddock_workaround_ :: UserContextProperty -> ()
domainId :: UserContextProperty -> Maybe (Value Text)
userProfileArn :: UserContextProperty -> Maybe (Value Text)
userProfileName :: UserContextProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
domainId :: Maybe (Value Text)
userProfileArn :: Maybe (Value Text)
userProfileName :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DomainId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
domainId,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"UserProfileArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
userProfileArn,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"UserProfileName" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
userProfileName]))
instance Property "DomainId" UserContextProperty where
type PropertyType "DomainId" UserContextProperty = Value Prelude.Text
set :: PropertyType "DomainId" UserContextProperty
-> UserContextProperty -> UserContextProperty
set PropertyType "DomainId" UserContextProperty
newValue UserContextProperty {Maybe (Value Text)
()
haddock_workaround_ :: UserContextProperty -> ()
domainId :: UserContextProperty -> Maybe (Value Text)
userProfileArn :: UserContextProperty -> Maybe (Value Text)
userProfileName :: UserContextProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
domainId :: Maybe (Value Text)
userProfileArn :: Maybe (Value Text)
userProfileName :: Maybe (Value Text)
..}
= UserContextProperty {domainId :: Maybe (Value Text)
domainId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DomainId" UserContextProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
userProfileArn :: Maybe (Value Text)
userProfileName :: Maybe (Value Text)
haddock_workaround_ :: ()
userProfileArn :: Maybe (Value Text)
userProfileName :: Maybe (Value Text)
..}
instance Property "UserProfileArn" UserContextProperty where
type PropertyType "UserProfileArn" UserContextProperty = Value Prelude.Text
set :: PropertyType "UserProfileArn" UserContextProperty
-> UserContextProperty -> UserContextProperty
set PropertyType "UserProfileArn" UserContextProperty
newValue UserContextProperty {Maybe (Value Text)
()
haddock_workaround_ :: UserContextProperty -> ()
domainId :: UserContextProperty -> Maybe (Value Text)
userProfileArn :: UserContextProperty -> Maybe (Value Text)
userProfileName :: UserContextProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
domainId :: Maybe (Value Text)
userProfileArn :: Maybe (Value Text)
userProfileName :: Maybe (Value Text)
..}
= UserContextProperty {userProfileArn :: Maybe (Value Text)
userProfileArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UserProfileArn" UserContextProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
domainId :: Maybe (Value Text)
userProfileName :: Maybe (Value Text)
haddock_workaround_ :: ()
domainId :: Maybe (Value Text)
userProfileName :: Maybe (Value Text)
..}
instance Property "UserProfileName" UserContextProperty where
type PropertyType "UserProfileName" UserContextProperty = Value Prelude.Text
set :: PropertyType "UserProfileName" UserContextProperty
-> UserContextProperty -> UserContextProperty
set PropertyType "UserProfileName" UserContextProperty
newValue UserContextProperty {Maybe (Value Text)
()
haddock_workaround_ :: UserContextProperty -> ()
domainId :: UserContextProperty -> Maybe (Value Text)
userProfileArn :: UserContextProperty -> Maybe (Value Text)
userProfileName :: UserContextProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
domainId :: Maybe (Value Text)
userProfileArn :: Maybe (Value Text)
userProfileName :: Maybe (Value Text)
..}
= UserContextProperty {userProfileName :: Maybe (Value Text)
userProfileName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UserProfileName" UserContextProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
domainId :: Maybe (Value Text)
userProfileArn :: Maybe (Value Text)
haddock_workaround_ :: ()
domainId :: Maybe (Value Text)
userProfileArn :: Maybe (Value Text)
..}