module Stratosphere.SES.ReceiptRule.S3ActionProperty (
        S3ActionProperty(..), mkS3ActionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data S3ActionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-s3action.html>
    S3ActionProperty {S3ActionProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-s3action.html#cfn-ses-receiptrule-s3action-bucketname>
                      S3ActionProperty -> Value Text
bucketName :: (Value Prelude.Text),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-s3action.html#cfn-ses-receiptrule-s3action-iamrolearn>
                      S3ActionProperty -> Maybe (Value Text)
iamRoleArn :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-s3action.html#cfn-ses-receiptrule-s3action-kmskeyarn>
                      S3ActionProperty -> Maybe (Value Text)
kmsKeyArn :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-s3action.html#cfn-ses-receiptrule-s3action-objectkeyprefix>
                      S3ActionProperty -> Maybe (Value Text)
objectKeyPrefix :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-s3action.html#cfn-ses-receiptrule-s3action-topicarn>
                      S3ActionProperty -> Maybe (Value Text)
topicArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (S3ActionProperty -> S3ActionProperty -> Bool
(S3ActionProperty -> S3ActionProperty -> Bool)
-> (S3ActionProperty -> S3ActionProperty -> Bool)
-> Eq S3ActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: S3ActionProperty -> S3ActionProperty -> Bool
== :: S3ActionProperty -> S3ActionProperty -> Bool
$c/= :: S3ActionProperty -> S3ActionProperty -> Bool
/= :: S3ActionProperty -> S3ActionProperty -> Bool
Prelude.Eq, Int -> S3ActionProperty -> ShowS
[S3ActionProperty] -> ShowS
S3ActionProperty -> String
(Int -> S3ActionProperty -> ShowS)
-> (S3ActionProperty -> String)
-> ([S3ActionProperty] -> ShowS)
-> Show S3ActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> S3ActionProperty -> ShowS
showsPrec :: Int -> S3ActionProperty -> ShowS
$cshow :: S3ActionProperty -> String
show :: S3ActionProperty -> String
$cshowList :: [S3ActionProperty] -> ShowS
showList :: [S3ActionProperty] -> ShowS
Prelude.Show)
mkS3ActionProperty :: Value Prelude.Text -> S3ActionProperty
mkS3ActionProperty :: Value Text -> S3ActionProperty
mkS3ActionProperty Value Text
bucketName
  = S3ActionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), bucketName :: Value Text
bucketName = Value Text
bucketName,
       iamRoleArn :: Maybe (Value Text)
iamRoleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, kmsKeyArn :: Maybe (Value Text)
kmsKeyArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       objectKeyPrefix :: Maybe (Value Text)
objectKeyPrefix = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, topicArn :: Maybe (Value Text)
topicArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties S3ActionProperty where
  toResourceProperties :: S3ActionProperty -> ResourceProperties
toResourceProperties S3ActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3ActionProperty -> ()
bucketName :: S3ActionProperty -> Value Text
iamRoleArn :: S3ActionProperty -> Maybe (Value Text)
kmsKeyArn :: S3ActionProperty -> Maybe (Value Text)
objectKeyPrefix :: S3ActionProperty -> Maybe (Value Text)
topicArn :: S3ActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Value Text
iamRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SES::ReceiptRule.S3Action",
         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
"BucketName" 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
bucketName]
                           ([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
"IamRoleArn" (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)
iamRoleArn,
                               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
"KmsKeyArn" (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)
kmsKeyArn,
                               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
"ObjectKeyPrefix" (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)
objectKeyPrefix,
                               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
"TopicArn" (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)
topicArn]))}
instance JSON.ToJSON S3ActionProperty where
  toJSON :: S3ActionProperty -> Value
toJSON S3ActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3ActionProperty -> ()
bucketName :: S3ActionProperty -> Value Text
iamRoleArn :: S3ActionProperty -> Maybe (Value Text)
kmsKeyArn :: S3ActionProperty -> Maybe (Value Text)
objectKeyPrefix :: S3ActionProperty -> Maybe (Value Text)
topicArn :: S3ActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Value Text
iamRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
topicArn :: 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
"BucketName" 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
bucketName]
              ([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
"IamRoleArn" (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)
iamRoleArn,
                  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
"KmsKeyArn" (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)
kmsKeyArn,
                  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
"ObjectKeyPrefix" (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)
objectKeyPrefix,
                  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
"TopicArn" (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)
topicArn])))
instance Property "BucketName" S3ActionProperty where
  type PropertyType "BucketName" S3ActionProperty = Value Prelude.Text
  set :: PropertyType "BucketName" S3ActionProperty
-> S3ActionProperty -> S3ActionProperty
set PropertyType "BucketName" S3ActionProperty
newValue S3ActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3ActionProperty -> ()
bucketName :: S3ActionProperty -> Value Text
iamRoleArn :: S3ActionProperty -> Maybe (Value Text)
kmsKeyArn :: S3ActionProperty -> Maybe (Value Text)
objectKeyPrefix :: S3ActionProperty -> Maybe (Value Text)
topicArn :: S3ActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Value Text
iamRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
    = S3ActionProperty {bucketName :: Value Text
bucketName = PropertyType "BucketName" S3ActionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
iamRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
haddock_workaround_ :: ()
iamRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
instance Property "IamRoleArn" S3ActionProperty where
  type PropertyType "IamRoleArn" S3ActionProperty = Value Prelude.Text
  set :: PropertyType "IamRoleArn" S3ActionProperty
-> S3ActionProperty -> S3ActionProperty
set PropertyType "IamRoleArn" S3ActionProperty
newValue S3ActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3ActionProperty -> ()
bucketName :: S3ActionProperty -> Value Text
iamRoleArn :: S3ActionProperty -> Maybe (Value Text)
kmsKeyArn :: S3ActionProperty -> Maybe (Value Text)
objectKeyPrefix :: S3ActionProperty -> Maybe (Value Text)
topicArn :: S3ActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Value Text
iamRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
    = S3ActionProperty {iamRoleArn :: Maybe (Value Text)
iamRoleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IamRoleArn" S3ActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
bucketName :: Value Text
kmsKeyArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Value Text
kmsKeyArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
instance Property "KmsKeyArn" S3ActionProperty where
  type PropertyType "KmsKeyArn" S3ActionProperty = Value Prelude.Text
  set :: PropertyType "KmsKeyArn" S3ActionProperty
-> S3ActionProperty -> S3ActionProperty
set PropertyType "KmsKeyArn" S3ActionProperty
newValue S3ActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3ActionProperty -> ()
bucketName :: S3ActionProperty -> Value Text
iamRoleArn :: S3ActionProperty -> Maybe (Value Text)
kmsKeyArn :: S3ActionProperty -> Maybe (Value Text)
objectKeyPrefix :: S3ActionProperty -> Maybe (Value Text)
topicArn :: S3ActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Value Text
iamRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
    = S3ActionProperty {kmsKeyArn :: Maybe (Value Text)
kmsKeyArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KmsKeyArn" S3ActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
bucketName :: Value Text
iamRoleArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Value Text
iamRoleArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
instance Property "ObjectKeyPrefix" S3ActionProperty where
  type PropertyType "ObjectKeyPrefix" S3ActionProperty = Value Prelude.Text
  set :: PropertyType "ObjectKeyPrefix" S3ActionProperty
-> S3ActionProperty -> S3ActionProperty
set PropertyType "ObjectKeyPrefix" S3ActionProperty
newValue S3ActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3ActionProperty -> ()
bucketName :: S3ActionProperty -> Value Text
iamRoleArn :: S3ActionProperty -> Maybe (Value Text)
kmsKeyArn :: S3ActionProperty -> Maybe (Value Text)
objectKeyPrefix :: S3ActionProperty -> Maybe (Value Text)
topicArn :: S3ActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Value Text
iamRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
    = S3ActionProperty {objectKeyPrefix :: Maybe (Value Text)
objectKeyPrefix = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ObjectKeyPrefix" S3ActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
bucketName :: Value Text
iamRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Value Text
iamRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
instance Property "TopicArn" S3ActionProperty where
  type PropertyType "TopicArn" S3ActionProperty = Value Prelude.Text
  set :: PropertyType "TopicArn" S3ActionProperty
-> S3ActionProperty -> S3ActionProperty
set PropertyType "TopicArn" S3ActionProperty
newValue S3ActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3ActionProperty -> ()
bucketName :: S3ActionProperty -> Value Text
iamRoleArn :: S3ActionProperty -> Maybe (Value Text)
kmsKeyArn :: S3ActionProperty -> Maybe (Value Text)
objectKeyPrefix :: S3ActionProperty -> Maybe (Value Text)
topicArn :: S3ActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Value Text
iamRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
    = S3ActionProperty {topicArn :: Maybe (Value Text)
topicArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TopicArn" S3ActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
bucketName :: Value Text
iamRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Value Text
iamRoleArn :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
objectKeyPrefix :: Maybe (Value Text)
..}