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