module Stratosphere.SageMaker.ModelCard.SourceAlgorithmProperty (
SourceAlgorithmProperty(..), mkSourceAlgorithmProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SourceAlgorithmProperty
=
SourceAlgorithmProperty {SourceAlgorithmProperty -> ()
haddock_workaround_ :: (),
SourceAlgorithmProperty -> Value Text
algorithmName :: (Value Prelude.Text),
SourceAlgorithmProperty -> Maybe (Value Text)
modelDataUrl :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (SourceAlgorithmProperty -> SourceAlgorithmProperty -> Bool
(SourceAlgorithmProperty -> SourceAlgorithmProperty -> Bool)
-> (SourceAlgorithmProperty -> SourceAlgorithmProperty -> Bool)
-> Eq SourceAlgorithmProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SourceAlgorithmProperty -> SourceAlgorithmProperty -> Bool
== :: SourceAlgorithmProperty -> SourceAlgorithmProperty -> Bool
$c/= :: SourceAlgorithmProperty -> SourceAlgorithmProperty -> Bool
/= :: SourceAlgorithmProperty -> SourceAlgorithmProperty -> Bool
Prelude.Eq, Int -> SourceAlgorithmProperty -> ShowS
[SourceAlgorithmProperty] -> ShowS
SourceAlgorithmProperty -> String
(Int -> SourceAlgorithmProperty -> ShowS)
-> (SourceAlgorithmProperty -> String)
-> ([SourceAlgorithmProperty] -> ShowS)
-> Show SourceAlgorithmProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SourceAlgorithmProperty -> ShowS
showsPrec :: Int -> SourceAlgorithmProperty -> ShowS
$cshow :: SourceAlgorithmProperty -> String
show :: SourceAlgorithmProperty -> String
$cshowList :: [SourceAlgorithmProperty] -> ShowS
showList :: [SourceAlgorithmProperty] -> ShowS
Prelude.Show)
mkSourceAlgorithmProperty ::
Value Prelude.Text -> SourceAlgorithmProperty
mkSourceAlgorithmProperty :: Value Text -> SourceAlgorithmProperty
mkSourceAlgorithmProperty Value Text
algorithmName
= SourceAlgorithmProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), algorithmName :: Value Text
algorithmName = Value Text
algorithmName,
modelDataUrl :: Maybe (Value Text)
modelDataUrl = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SourceAlgorithmProperty where
toResourceProperties :: SourceAlgorithmProperty -> ResourceProperties
toResourceProperties SourceAlgorithmProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SourceAlgorithmProperty -> ()
algorithmName :: SourceAlgorithmProperty -> Value Text
modelDataUrl :: SourceAlgorithmProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
algorithmName :: Value Text
modelDataUrl :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SageMaker::ModelCard.SourceAlgorithm",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"AlgorithmName" 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..= Value Text
algorithmName]
([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
"ModelDataUrl" (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)
modelDataUrl]))}
instance JSON.ToJSON SourceAlgorithmProperty where
toJSON :: SourceAlgorithmProperty -> Value
toJSON SourceAlgorithmProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SourceAlgorithmProperty -> ()
algorithmName :: SourceAlgorithmProperty -> Value Text
modelDataUrl :: SourceAlgorithmProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
algorithmName :: Value Text
modelDataUrl :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"AlgorithmName" 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..= Value Text
algorithmName]
([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
"ModelDataUrl" (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)
modelDataUrl])))
instance Property "AlgorithmName" SourceAlgorithmProperty where
type PropertyType "AlgorithmName" SourceAlgorithmProperty = Value Prelude.Text
set :: PropertyType "AlgorithmName" SourceAlgorithmProperty
-> SourceAlgorithmProperty -> SourceAlgorithmProperty
set PropertyType "AlgorithmName" SourceAlgorithmProperty
newValue SourceAlgorithmProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SourceAlgorithmProperty -> ()
algorithmName :: SourceAlgorithmProperty -> Value Text
modelDataUrl :: SourceAlgorithmProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
algorithmName :: Value Text
modelDataUrl :: Maybe (Value Text)
..}
= SourceAlgorithmProperty {algorithmName :: Value Text
algorithmName = PropertyType "AlgorithmName" SourceAlgorithmProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
modelDataUrl :: Maybe (Value Text)
haddock_workaround_ :: ()
modelDataUrl :: Maybe (Value Text)
..}
instance Property "ModelDataUrl" SourceAlgorithmProperty where
type PropertyType "ModelDataUrl" SourceAlgorithmProperty = Value Prelude.Text
set :: PropertyType "ModelDataUrl" SourceAlgorithmProperty
-> SourceAlgorithmProperty -> SourceAlgorithmProperty
set PropertyType "ModelDataUrl" SourceAlgorithmProperty
newValue SourceAlgorithmProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SourceAlgorithmProperty -> ()
algorithmName :: SourceAlgorithmProperty -> Value Text
modelDataUrl :: SourceAlgorithmProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
algorithmName :: Value Text
modelDataUrl :: Maybe (Value Text)
..}
= SourceAlgorithmProperty
{modelDataUrl :: Maybe (Value Text)
modelDataUrl = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ModelDataUrl" SourceAlgorithmProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
algorithmName :: Value Text
haddock_workaround_ :: ()
algorithmName :: Value Text
..}