module Stratosphere.Lambda.LayerVersion.ContentProperty (
        ContentProperty(..), mkContentProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ContentProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-layerversion-content.html>
    ContentProperty {ContentProperty -> ()
haddock_workaround_ :: (),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-layerversion-content.html#cfn-lambda-layerversion-content-s3bucket>
                     ContentProperty -> Value Text
s3Bucket :: (Value Prelude.Text),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-layerversion-content.html#cfn-lambda-layerversion-content-s3key>
                     ContentProperty -> Value Text
s3Key :: (Value Prelude.Text),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-layerversion-content.html#cfn-lambda-layerversion-content-s3objectversion>
                     ContentProperty -> Maybe (Value Text)
s3ObjectVersion :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ContentProperty -> ContentProperty -> Bool
(ContentProperty -> ContentProperty -> Bool)
-> (ContentProperty -> ContentProperty -> Bool)
-> Eq ContentProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ContentProperty -> ContentProperty -> Bool
== :: ContentProperty -> ContentProperty -> Bool
$c/= :: ContentProperty -> ContentProperty -> Bool
/= :: ContentProperty -> ContentProperty -> Bool
Prelude.Eq, Int -> ContentProperty -> ShowS
[ContentProperty] -> ShowS
ContentProperty -> String
(Int -> ContentProperty -> ShowS)
-> (ContentProperty -> String)
-> ([ContentProperty] -> ShowS)
-> Show ContentProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ContentProperty -> ShowS
showsPrec :: Int -> ContentProperty -> ShowS
$cshow :: ContentProperty -> String
show :: ContentProperty -> String
$cshowList :: [ContentProperty] -> ShowS
showList :: [ContentProperty] -> ShowS
Prelude.Show)
mkContentProperty ::
  Value Prelude.Text -> Value Prelude.Text -> ContentProperty
mkContentProperty :: Value Text -> Value Text -> ContentProperty
mkContentProperty Value Text
s3Bucket Value Text
s3Key
  = ContentProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), s3Bucket :: Value Text
s3Bucket = Value Text
s3Bucket, s3Key :: Value Text
s3Key = Value Text
s3Key,
       s3ObjectVersion :: Maybe (Value Text)
s3ObjectVersion = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ContentProperty where
  toResourceProperties :: ContentProperty -> ResourceProperties
toResourceProperties ContentProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ContentProperty -> ()
s3Bucket :: ContentProperty -> Value Text
s3Key :: ContentProperty -> Value Text
s3ObjectVersion :: ContentProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
s3Bucket :: Value Text
s3Key :: Value Text
s3ObjectVersion :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lambda::LayerVersion.Content",
         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
"S3Bucket" 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
s3Bucket, Key
"S3Key" 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
s3Key]
                           ([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
"S3ObjectVersion" (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)
s3ObjectVersion]))}
instance JSON.ToJSON ContentProperty where
  toJSON :: ContentProperty -> Value
toJSON ContentProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ContentProperty -> ()
s3Bucket :: ContentProperty -> Value Text
s3Key :: ContentProperty -> Value Text
s3ObjectVersion :: ContentProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
s3Bucket :: Value Text
s3Key :: Value Text
s3ObjectVersion :: 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
"S3Bucket" 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
s3Bucket, Key
"S3Key" 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
s3Key]
              ([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
"S3ObjectVersion" (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)
s3ObjectVersion])))
instance Property "S3Bucket" ContentProperty where
  type PropertyType "S3Bucket" ContentProperty = Value Prelude.Text
  set :: PropertyType "S3Bucket" ContentProperty
-> ContentProperty -> ContentProperty
set PropertyType "S3Bucket" ContentProperty
newValue ContentProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ContentProperty -> ()
s3Bucket :: ContentProperty -> Value Text
s3Key :: ContentProperty -> Value Text
s3ObjectVersion :: ContentProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
s3Bucket :: Value Text
s3Key :: Value Text
s3ObjectVersion :: Maybe (Value Text)
..}
    = ContentProperty {s3Bucket :: Value Text
s3Bucket = PropertyType "S3Bucket" ContentProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
s3Key :: Value Text
s3ObjectVersion :: Maybe (Value Text)
haddock_workaround_ :: ()
s3Key :: Value Text
s3ObjectVersion :: Maybe (Value Text)
..}
instance Property "S3Key" ContentProperty where
  type PropertyType "S3Key" ContentProperty = Value Prelude.Text
  set :: PropertyType "S3Key" ContentProperty
-> ContentProperty -> ContentProperty
set PropertyType "S3Key" ContentProperty
newValue ContentProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ContentProperty -> ()
s3Bucket :: ContentProperty -> Value Text
s3Key :: ContentProperty -> Value Text
s3ObjectVersion :: ContentProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
s3Bucket :: Value Text
s3Key :: Value Text
s3ObjectVersion :: Maybe (Value Text)
..}
    = ContentProperty {s3Key :: Value Text
s3Key = PropertyType "S3Key" ContentProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
s3Bucket :: Value Text
s3ObjectVersion :: Maybe (Value Text)
haddock_workaround_ :: ()
s3Bucket :: Value Text
s3ObjectVersion :: Maybe (Value Text)
..}
instance Property "S3ObjectVersion" ContentProperty where
  type PropertyType "S3ObjectVersion" ContentProperty = Value Prelude.Text
  set :: PropertyType "S3ObjectVersion" ContentProperty
-> ContentProperty -> ContentProperty
set PropertyType "S3ObjectVersion" ContentProperty
newValue ContentProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ContentProperty -> ()
s3Bucket :: ContentProperty -> Value Text
s3Key :: ContentProperty -> Value Text
s3ObjectVersion :: ContentProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
s3Bucket :: Value Text
s3Key :: Value Text
s3ObjectVersion :: Maybe (Value Text)
..}
    = ContentProperty {s3ObjectVersion :: Maybe (Value Text)
s3ObjectVersion = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3ObjectVersion" ContentProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
s3Bucket :: Value Text
s3Key :: Value Text
haddock_workaround_ :: ()
s3Bucket :: Value Text
s3Key :: Value Text
..}