module Stratosphere.SageMaker.ModelCard.TrainingEnvironmentProperty (
TrainingEnvironmentProperty(..), mkTrainingEnvironmentProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TrainingEnvironmentProperty
=
TrainingEnvironmentProperty {TrainingEnvironmentProperty -> ()
haddock_workaround_ :: (),
TrainingEnvironmentProperty -> Maybe (ValueList Text)
containerImage :: (Prelude.Maybe (ValueList Prelude.Text))}
deriving stock (TrainingEnvironmentProperty -> TrainingEnvironmentProperty -> Bool
(TrainingEnvironmentProperty
-> TrainingEnvironmentProperty -> Bool)
-> (TrainingEnvironmentProperty
-> TrainingEnvironmentProperty -> Bool)
-> Eq TrainingEnvironmentProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TrainingEnvironmentProperty -> TrainingEnvironmentProperty -> Bool
== :: TrainingEnvironmentProperty -> TrainingEnvironmentProperty -> Bool
$c/= :: TrainingEnvironmentProperty -> TrainingEnvironmentProperty -> Bool
/= :: TrainingEnvironmentProperty -> TrainingEnvironmentProperty -> Bool
Prelude.Eq, Int -> TrainingEnvironmentProperty -> ShowS
[TrainingEnvironmentProperty] -> ShowS
TrainingEnvironmentProperty -> String
(Int -> TrainingEnvironmentProperty -> ShowS)
-> (TrainingEnvironmentProperty -> String)
-> ([TrainingEnvironmentProperty] -> ShowS)
-> Show TrainingEnvironmentProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TrainingEnvironmentProperty -> ShowS
showsPrec :: Int -> TrainingEnvironmentProperty -> ShowS
$cshow :: TrainingEnvironmentProperty -> String
show :: TrainingEnvironmentProperty -> String
$cshowList :: [TrainingEnvironmentProperty] -> ShowS
showList :: [TrainingEnvironmentProperty] -> ShowS
Prelude.Show)
mkTrainingEnvironmentProperty :: TrainingEnvironmentProperty
mkTrainingEnvironmentProperty :: TrainingEnvironmentProperty
mkTrainingEnvironmentProperty
= TrainingEnvironmentProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), containerImage :: Maybe (ValueList Text)
containerImage = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TrainingEnvironmentProperty where
toResourceProperties :: TrainingEnvironmentProperty -> ResourceProperties
toResourceProperties TrainingEnvironmentProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: TrainingEnvironmentProperty -> ()
containerImage :: TrainingEnvironmentProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
containerImage :: Maybe (ValueList Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SageMaker::ModelCard.TrainingEnvironment",
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 -> ValueList 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
"ContainerImage" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
containerImage])}
instance JSON.ToJSON TrainingEnvironmentProperty where
toJSON :: TrainingEnvironmentProperty -> Value
toJSON TrainingEnvironmentProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: TrainingEnvironmentProperty -> ()
containerImage :: TrainingEnvironmentProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
containerImage :: Maybe (ValueList 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 -> ValueList 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
"ContainerImage" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
containerImage]))
instance Property "ContainerImage" TrainingEnvironmentProperty where
type PropertyType "ContainerImage" TrainingEnvironmentProperty = ValueList Prelude.Text
set :: PropertyType "ContainerImage" TrainingEnvironmentProperty
-> TrainingEnvironmentProperty -> TrainingEnvironmentProperty
set PropertyType "ContainerImage" TrainingEnvironmentProperty
newValue TrainingEnvironmentProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: TrainingEnvironmentProperty -> ()
containerImage :: TrainingEnvironmentProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
containerImage :: Maybe (ValueList Text)
..}
= TrainingEnvironmentProperty
{containerImage :: Maybe (ValueList Text)
containerImage = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContainerImage" TrainingEnvironmentProperty
ValueList Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}