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