module Stratosphere.SageMaker.ModelPackage.MetricsSourceProperty (
        MetricsSourceProperty(..), mkMetricsSourceProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MetricsSourceProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelpackage-metricssource.html>
    MetricsSourceProperty {MetricsSourceProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelpackage-metricssource.html#cfn-sagemaker-modelpackage-metricssource-contentdigest>
                           MetricsSourceProperty -> Maybe (Value Text)
contentDigest :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelpackage-metricssource.html#cfn-sagemaker-modelpackage-metricssource-contenttype>
                           MetricsSourceProperty -> Value Text
contentType :: (Value Prelude.Text),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelpackage-metricssource.html#cfn-sagemaker-modelpackage-metricssource-s3uri>
                           MetricsSourceProperty -> Value Text
s3Uri :: (Value Prelude.Text)}
  deriving stock (MetricsSourceProperty -> MetricsSourceProperty -> Bool
(MetricsSourceProperty -> MetricsSourceProperty -> Bool)
-> (MetricsSourceProperty -> MetricsSourceProperty -> Bool)
-> Eq MetricsSourceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MetricsSourceProperty -> MetricsSourceProperty -> Bool
== :: MetricsSourceProperty -> MetricsSourceProperty -> Bool
$c/= :: MetricsSourceProperty -> MetricsSourceProperty -> Bool
/= :: MetricsSourceProperty -> MetricsSourceProperty -> Bool
Prelude.Eq, Int -> MetricsSourceProperty -> ShowS
[MetricsSourceProperty] -> ShowS
MetricsSourceProperty -> String
(Int -> MetricsSourceProperty -> ShowS)
-> (MetricsSourceProperty -> String)
-> ([MetricsSourceProperty] -> ShowS)
-> Show MetricsSourceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MetricsSourceProperty -> ShowS
showsPrec :: Int -> MetricsSourceProperty -> ShowS
$cshow :: MetricsSourceProperty -> String
show :: MetricsSourceProperty -> String
$cshowList :: [MetricsSourceProperty] -> ShowS
showList :: [MetricsSourceProperty] -> ShowS
Prelude.Show)
mkMetricsSourceProperty ::
  Value Prelude.Text -> Value Prelude.Text -> MetricsSourceProperty
mkMetricsSourceProperty :: Value Text -> Value Text -> MetricsSourceProperty
mkMetricsSourceProperty Value Text
contentType Value Text
s3Uri
  = MetricsSourceProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), contentType :: Value Text
contentType = Value Text
contentType,
       s3Uri :: Value Text
s3Uri = Value Text
s3Uri, contentDigest :: Maybe (Value Text)
contentDigest = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MetricsSourceProperty where
  toResourceProperties :: MetricsSourceProperty -> ResourceProperties
toResourceProperties MetricsSourceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricsSourceProperty -> ()
contentDigest :: MetricsSourceProperty -> Maybe (Value Text)
contentType :: MetricsSourceProperty -> Value Text
s3Uri :: MetricsSourceProperty -> Value Text
haddock_workaround_ :: ()
contentDigest :: Maybe (Value Text)
contentType :: Value Text
s3Uri :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::ModelPackage.MetricsSource",
         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
"ContentType" 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
contentType, Key
"S3Uri" 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
s3Uri]
                           ([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
"ContentDigest" (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)
contentDigest]))}
instance JSON.ToJSON MetricsSourceProperty where
  toJSON :: MetricsSourceProperty -> Value
toJSON MetricsSourceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricsSourceProperty -> ()
contentDigest :: MetricsSourceProperty -> Maybe (Value Text)
contentType :: MetricsSourceProperty -> Value Text
s3Uri :: MetricsSourceProperty -> Value Text
haddock_workaround_ :: ()
contentDigest :: Maybe (Value Text)
contentType :: Value Text
s3Uri :: 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
"ContentType" 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
contentType, Key
"S3Uri" 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
s3Uri]
              ([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
"ContentDigest" (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)
contentDigest])))
instance Property "ContentDigest" MetricsSourceProperty where
  type PropertyType "ContentDigest" MetricsSourceProperty = Value Prelude.Text
  set :: PropertyType "ContentDigest" MetricsSourceProperty
-> MetricsSourceProperty -> MetricsSourceProperty
set PropertyType "ContentDigest" MetricsSourceProperty
newValue MetricsSourceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricsSourceProperty -> ()
contentDigest :: MetricsSourceProperty -> Maybe (Value Text)
contentType :: MetricsSourceProperty -> Value Text
s3Uri :: MetricsSourceProperty -> Value Text
haddock_workaround_ :: ()
contentDigest :: Maybe (Value Text)
contentType :: Value Text
s3Uri :: Value Text
..}
    = MetricsSourceProperty {contentDigest :: Maybe (Value Text)
contentDigest = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContentDigest" MetricsSourceProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
contentType :: Value Text
s3Uri :: Value Text
haddock_workaround_ :: ()
contentType :: Value Text
s3Uri :: Value Text
..}
instance Property "ContentType" MetricsSourceProperty where
  type PropertyType "ContentType" MetricsSourceProperty = Value Prelude.Text
  set :: PropertyType "ContentType" MetricsSourceProperty
-> MetricsSourceProperty -> MetricsSourceProperty
set PropertyType "ContentType" MetricsSourceProperty
newValue MetricsSourceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricsSourceProperty -> ()
contentDigest :: MetricsSourceProperty -> Maybe (Value Text)
contentType :: MetricsSourceProperty -> Value Text
s3Uri :: MetricsSourceProperty -> Value Text
haddock_workaround_ :: ()
contentDigest :: Maybe (Value Text)
contentType :: Value Text
s3Uri :: Value Text
..}
    = MetricsSourceProperty {contentType :: Value Text
contentType = PropertyType "ContentType" MetricsSourceProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
contentDigest :: Maybe (Value Text)
s3Uri :: Value Text
haddock_workaround_ :: ()
contentDigest :: Maybe (Value Text)
s3Uri :: Value Text
..}
instance Property "S3Uri" MetricsSourceProperty where
  type PropertyType "S3Uri" MetricsSourceProperty = Value Prelude.Text
  set :: PropertyType "S3Uri" MetricsSourceProperty
-> MetricsSourceProperty -> MetricsSourceProperty
set PropertyType "S3Uri" MetricsSourceProperty
newValue MetricsSourceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricsSourceProperty -> ()
contentDigest :: MetricsSourceProperty -> Maybe (Value Text)
contentType :: MetricsSourceProperty -> Value Text
s3Uri :: MetricsSourceProperty -> Value Text
haddock_workaround_ :: ()
contentDigest :: Maybe (Value Text)
contentType :: Value Text
s3Uri :: Value Text
..}
    = MetricsSourceProperty {s3Uri :: Value Text
s3Uri = PropertyType "S3Uri" MetricsSourceProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
contentDigest :: Maybe (Value Text)
contentType :: Value Text
haddock_workaround_ :: ()
contentDigest :: Maybe (Value Text)
contentType :: Value Text
..}