module Stratosphere.SES.ReceiptRule.StopActionProperty (
        StopActionProperty(..), mkStopActionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data StopActionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-stopaction.html>
    StopActionProperty {StopActionProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-stopaction.html#cfn-ses-receiptrule-stopaction-scope>
                        StopActionProperty -> Value Text
scope :: (Value Prelude.Text),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-stopaction.html#cfn-ses-receiptrule-stopaction-topicarn>
                        StopActionProperty -> Maybe (Value Text)
topicArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (StopActionProperty -> StopActionProperty -> Bool
(StopActionProperty -> StopActionProperty -> Bool)
-> (StopActionProperty -> StopActionProperty -> Bool)
-> Eq StopActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StopActionProperty -> StopActionProperty -> Bool
== :: StopActionProperty -> StopActionProperty -> Bool
$c/= :: StopActionProperty -> StopActionProperty -> Bool
/= :: StopActionProperty -> StopActionProperty -> Bool
Prelude.Eq, Int -> StopActionProperty -> ShowS
[StopActionProperty] -> ShowS
StopActionProperty -> String
(Int -> StopActionProperty -> ShowS)
-> (StopActionProperty -> String)
-> ([StopActionProperty] -> ShowS)
-> Show StopActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StopActionProperty -> ShowS
showsPrec :: Int -> StopActionProperty -> ShowS
$cshow :: StopActionProperty -> String
show :: StopActionProperty -> String
$cshowList :: [StopActionProperty] -> ShowS
showList :: [StopActionProperty] -> ShowS
Prelude.Show)
mkStopActionProperty :: Value Prelude.Text -> StopActionProperty
mkStopActionProperty :: Value Text -> StopActionProperty
mkStopActionProperty Value Text
scope
  = StopActionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), scope :: Value Text
scope = Value Text
scope,
       topicArn :: Maybe (Value Text)
topicArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StopActionProperty where
  toResourceProperties :: StopActionProperty -> ResourceProperties
toResourceProperties StopActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: StopActionProperty -> ()
scope :: StopActionProperty -> Value Text
topicArn :: StopActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
scope :: Value Text
topicArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SES::ReceiptRule.StopAction",
         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
"Scope" 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
scope]
                           ([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
"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 StopActionProperty where
  toJSON :: StopActionProperty -> Value
toJSON StopActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: StopActionProperty -> ()
scope :: StopActionProperty -> Value Text
topicArn :: StopActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
scope :: 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
"Scope" 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
scope]
              ([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
"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 "Scope" StopActionProperty where
  type PropertyType "Scope" StopActionProperty = Value Prelude.Text
  set :: PropertyType "Scope" StopActionProperty
-> StopActionProperty -> StopActionProperty
set PropertyType "Scope" StopActionProperty
newValue StopActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: StopActionProperty -> ()
scope :: StopActionProperty -> Value Text
topicArn :: StopActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
scope :: Value Text
topicArn :: Maybe (Value Text)
..}
    = StopActionProperty {scope :: Value Text
scope = PropertyType "Scope" StopActionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
topicArn :: Maybe (Value Text)
haddock_workaround_ :: ()
topicArn :: Maybe (Value Text)
..}
instance Property "TopicArn" StopActionProperty where
  type PropertyType "TopicArn" StopActionProperty = Value Prelude.Text
  set :: PropertyType "TopicArn" StopActionProperty
-> StopActionProperty -> StopActionProperty
set PropertyType "TopicArn" StopActionProperty
newValue StopActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: StopActionProperty -> ()
scope :: StopActionProperty -> Value Text
topicArn :: StopActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
scope :: Value Text
topicArn :: Maybe (Value Text)
..}
    = StopActionProperty {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" StopActionProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
scope :: Value Text
haddock_workaround_ :: ()
scope :: Value Text
..}