module Stratosphere.SageMaker.ModelCard.TrainingMetricProperty (
        TrainingMetricProperty(..), mkTrainingMetricProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TrainingMetricProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingmetric.html>
    TrainingMetricProperty {TrainingMetricProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingmetric.html#cfn-sagemaker-modelcard-trainingmetric-name>
                            TrainingMetricProperty -> Value Text
name :: (Value Prelude.Text),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingmetric.html#cfn-sagemaker-modelcard-trainingmetric-notes>
                            TrainingMetricProperty -> Maybe (Value Text)
notes :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingmetric.html#cfn-sagemaker-modelcard-trainingmetric-value>
                            TrainingMetricProperty -> Value Double
value :: (Value Prelude.Double)}
  deriving stock (TrainingMetricProperty -> TrainingMetricProperty -> Bool
(TrainingMetricProperty -> TrainingMetricProperty -> Bool)
-> (TrainingMetricProperty -> TrainingMetricProperty -> Bool)
-> Eq TrainingMetricProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TrainingMetricProperty -> TrainingMetricProperty -> Bool
== :: TrainingMetricProperty -> TrainingMetricProperty -> Bool
$c/= :: TrainingMetricProperty -> TrainingMetricProperty -> Bool
/= :: TrainingMetricProperty -> TrainingMetricProperty -> Bool
Prelude.Eq, Int -> TrainingMetricProperty -> ShowS
[TrainingMetricProperty] -> ShowS
TrainingMetricProperty -> String
(Int -> TrainingMetricProperty -> ShowS)
-> (TrainingMetricProperty -> String)
-> ([TrainingMetricProperty] -> ShowS)
-> Show TrainingMetricProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TrainingMetricProperty -> ShowS
showsPrec :: Int -> TrainingMetricProperty -> ShowS
$cshow :: TrainingMetricProperty -> String
show :: TrainingMetricProperty -> String
$cshowList :: [TrainingMetricProperty] -> ShowS
showList :: [TrainingMetricProperty] -> ShowS
Prelude.Show)
mkTrainingMetricProperty ::
  Value Prelude.Text
  -> Value Prelude.Double -> TrainingMetricProperty
mkTrainingMetricProperty :: Value Text -> Value Double -> TrainingMetricProperty
mkTrainingMetricProperty Value Text
name Value Double
value
  = TrainingMetricProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, value :: Value Double
value = Value Double
value,
       notes :: Maybe (Value Text)
notes = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TrainingMetricProperty where
  toResourceProperties :: TrainingMetricProperty -> ResourceProperties
toResourceProperties TrainingMetricProperty {Maybe (Value Text)
()
Value Double
Value Text
haddock_workaround_ :: TrainingMetricProperty -> ()
name :: TrainingMetricProperty -> Value Text
notes :: TrainingMetricProperty -> Maybe (Value Text)
value :: TrainingMetricProperty -> Value Double
haddock_workaround_ :: ()
name :: Value Text
notes :: Maybe (Value Text)
value :: Value Double
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::ModelCard.TrainingMetric",
         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
"Name" 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
name, Key
"Value" Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Double
value]
                           ([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
"Notes" (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)
notes]))}
instance JSON.ToJSON TrainingMetricProperty where
  toJSON :: TrainingMetricProperty -> Value
toJSON TrainingMetricProperty {Maybe (Value Text)
()
Value Double
Value Text
haddock_workaround_ :: TrainingMetricProperty -> ()
name :: TrainingMetricProperty -> Value Text
notes :: TrainingMetricProperty -> Maybe (Value Text)
value :: TrainingMetricProperty -> Value Double
haddock_workaround_ :: ()
name :: Value Text
notes :: Maybe (Value Text)
value :: Value Double
..}
    = [(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
"Name" 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
name, Key
"Value" Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Double
value]
              ([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
"Notes" (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)
notes])))
instance Property "Name" TrainingMetricProperty where
  type PropertyType "Name" TrainingMetricProperty = Value Prelude.Text
  set :: PropertyType "Name" TrainingMetricProperty
-> TrainingMetricProperty -> TrainingMetricProperty
set PropertyType "Name" TrainingMetricProperty
newValue TrainingMetricProperty {Maybe (Value Text)
()
Value Double
Value Text
haddock_workaround_ :: TrainingMetricProperty -> ()
name :: TrainingMetricProperty -> Value Text
notes :: TrainingMetricProperty -> Maybe (Value Text)
value :: TrainingMetricProperty -> Value Double
haddock_workaround_ :: ()
name :: Value Text
notes :: Maybe (Value Text)
value :: Value Double
..}
    = TrainingMetricProperty {name :: Value Text
name = PropertyType "Name" TrainingMetricProperty
Value Text
newValue, Maybe (Value Text)
()
Value Double
haddock_workaround_ :: ()
notes :: Maybe (Value Text)
value :: Value Double
haddock_workaround_ :: ()
notes :: Maybe (Value Text)
value :: Value Double
..}
instance Property "Notes" TrainingMetricProperty where
  type PropertyType "Notes" TrainingMetricProperty = Value Prelude.Text
  set :: PropertyType "Notes" TrainingMetricProperty
-> TrainingMetricProperty -> TrainingMetricProperty
set PropertyType "Notes" TrainingMetricProperty
newValue TrainingMetricProperty {Maybe (Value Text)
()
Value Double
Value Text
haddock_workaround_ :: TrainingMetricProperty -> ()
name :: TrainingMetricProperty -> Value Text
notes :: TrainingMetricProperty -> Maybe (Value Text)
value :: TrainingMetricProperty -> Value Double
haddock_workaround_ :: ()
name :: Value Text
notes :: Maybe (Value Text)
value :: Value Double
..}
    = TrainingMetricProperty {notes :: Maybe (Value Text)
notes = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Notes" TrainingMetricProperty
Value Text
newValue, ()
Value Double
Value Text
haddock_workaround_ :: ()
name :: Value Text
value :: Value Double
haddock_workaround_ :: ()
name :: Value Text
value :: Value Double
..}
instance Property "Value" TrainingMetricProperty where
  type PropertyType "Value" TrainingMetricProperty = Value Prelude.Double
  set :: PropertyType "Value" TrainingMetricProperty
-> TrainingMetricProperty -> TrainingMetricProperty
set PropertyType "Value" TrainingMetricProperty
newValue TrainingMetricProperty {Maybe (Value Text)
()
Value Double
Value Text
haddock_workaround_ :: TrainingMetricProperty -> ()
name :: TrainingMetricProperty -> Value Text
notes :: TrainingMetricProperty -> Maybe (Value Text)
value :: TrainingMetricProperty -> Value Double
haddock_workaround_ :: ()
name :: Value Text
notes :: Maybe (Value Text)
value :: Value Double
..}
    = TrainingMetricProperty {value :: Value Double
value = PropertyType "Value" TrainingMetricProperty
Value Double
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
notes :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
notes :: Maybe (Value Text)
..}