module Stratosphere.SES.ReceiptRule.SNSActionProperty (
        SNSActionProperty(..), mkSNSActionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SNSActionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-snsaction.html>
    SNSActionProperty {SNSActionProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-snsaction.html#cfn-ses-receiptrule-snsaction-encoding>
                       SNSActionProperty -> Maybe (Value Text)
encoding :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-snsaction.html#cfn-ses-receiptrule-snsaction-topicarn>
                       SNSActionProperty -> Maybe (Value Text)
topicArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (SNSActionProperty -> SNSActionProperty -> Bool
(SNSActionProperty -> SNSActionProperty -> Bool)
-> (SNSActionProperty -> SNSActionProperty -> Bool)
-> Eq SNSActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SNSActionProperty -> SNSActionProperty -> Bool
== :: SNSActionProperty -> SNSActionProperty -> Bool
$c/= :: SNSActionProperty -> SNSActionProperty -> Bool
/= :: SNSActionProperty -> SNSActionProperty -> Bool
Prelude.Eq, Int -> SNSActionProperty -> ShowS
[SNSActionProperty] -> ShowS
SNSActionProperty -> String
(Int -> SNSActionProperty -> ShowS)
-> (SNSActionProperty -> String)
-> ([SNSActionProperty] -> ShowS)
-> Show SNSActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SNSActionProperty -> ShowS
showsPrec :: Int -> SNSActionProperty -> ShowS
$cshow :: SNSActionProperty -> String
show :: SNSActionProperty -> String
$cshowList :: [SNSActionProperty] -> ShowS
showList :: [SNSActionProperty] -> ShowS
Prelude.Show)
mkSNSActionProperty :: SNSActionProperty
mkSNSActionProperty :: SNSActionProperty
mkSNSActionProperty
  = SNSActionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), encoding :: Maybe (Value Text)
encoding = 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 SNSActionProperty where
  toResourceProperties :: SNSActionProperty -> ResourceProperties
toResourceProperties SNSActionProperty {Maybe (Value Text)
()
haddock_workaround_ :: SNSActionProperty -> ()
encoding :: SNSActionProperty -> Maybe (Value Text)
topicArn :: SNSActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
encoding :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SES::ReceiptRule.SNSAction",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([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
"Encoding" (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)
encoding,
                            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 SNSActionProperty where
  toJSON :: SNSActionProperty -> Value
toJSON SNSActionProperty {Maybe (Value Text)
()
haddock_workaround_ :: SNSActionProperty -> ()
encoding :: SNSActionProperty -> Maybe (Value Text)
topicArn :: SNSActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
encoding :: 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
           ([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
"Encoding" (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)
encoding,
               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 "Encoding" SNSActionProperty where
  type PropertyType "Encoding" SNSActionProperty = Value Prelude.Text
  set :: PropertyType "Encoding" SNSActionProperty
-> SNSActionProperty -> SNSActionProperty
set PropertyType "Encoding" SNSActionProperty
newValue SNSActionProperty {Maybe (Value Text)
()
haddock_workaround_ :: SNSActionProperty -> ()
encoding :: SNSActionProperty -> Maybe (Value Text)
topicArn :: SNSActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
encoding :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
    = SNSActionProperty {encoding :: Maybe (Value Text)
encoding = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Encoding" SNSActionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
topicArn :: Maybe (Value Text)
haddock_workaround_ :: ()
topicArn :: Maybe (Value Text)
..}
instance Property "TopicArn" SNSActionProperty where
  type PropertyType "TopicArn" SNSActionProperty = Value Prelude.Text
  set :: PropertyType "TopicArn" SNSActionProperty
-> SNSActionProperty -> SNSActionProperty
set PropertyType "TopicArn" SNSActionProperty
newValue SNSActionProperty {Maybe (Value Text)
()
haddock_workaround_ :: SNSActionProperty -> ()
encoding :: SNSActionProperty -> Maybe (Value Text)
topicArn :: SNSActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
encoding :: Maybe (Value Text)
topicArn :: Maybe (Value Text)
..}
    = SNSActionProperty {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" SNSActionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
encoding :: Maybe (Value Text)
haddock_workaround_ :: ()
encoding :: Maybe (Value Text)
..}