module Stratosphere.FMS.NotificationChannel (
        NotificationChannel(..), mkNotificationChannel
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data NotificationChannel
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fms-notificationchannel.html>
    NotificationChannel {NotificationChannel -> ()
haddock_workaround_ :: (),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fms-notificationchannel.html#cfn-fms-notificationchannel-snsrolename>
                         NotificationChannel -> Value Text
snsRoleName :: (Value Prelude.Text),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fms-notificationchannel.html#cfn-fms-notificationchannel-snstopicarn>
                         NotificationChannel -> Value Text
snsTopicArn :: (Value Prelude.Text)}
  deriving stock (NotificationChannel -> NotificationChannel -> Bool
(NotificationChannel -> NotificationChannel -> Bool)
-> (NotificationChannel -> NotificationChannel -> Bool)
-> Eq NotificationChannel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NotificationChannel -> NotificationChannel -> Bool
== :: NotificationChannel -> NotificationChannel -> Bool
$c/= :: NotificationChannel -> NotificationChannel -> Bool
/= :: NotificationChannel -> NotificationChannel -> Bool
Prelude.Eq, Int -> NotificationChannel -> ShowS
[NotificationChannel] -> ShowS
NotificationChannel -> String
(Int -> NotificationChannel -> ShowS)
-> (NotificationChannel -> String)
-> ([NotificationChannel] -> ShowS)
-> Show NotificationChannel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NotificationChannel -> ShowS
showsPrec :: Int -> NotificationChannel -> ShowS
$cshow :: NotificationChannel -> String
show :: NotificationChannel -> String
$cshowList :: [NotificationChannel] -> ShowS
showList :: [NotificationChannel] -> ShowS
Prelude.Show)
mkNotificationChannel ::
  Value Prelude.Text -> Value Prelude.Text -> NotificationChannel
mkNotificationChannel :: Value Text -> Value Text -> NotificationChannel
mkNotificationChannel Value Text
snsRoleName Value Text
snsTopicArn
  = NotificationChannel
      {haddock_workaround_ :: ()
haddock_workaround_ = (), snsRoleName :: Value Text
snsRoleName = Value Text
snsRoleName,
       snsTopicArn :: Value Text
snsTopicArn = Value Text
snsTopicArn}
instance ToResourceProperties NotificationChannel where
  toResourceProperties :: NotificationChannel -> ResourceProperties
toResourceProperties NotificationChannel {()
Value Text
haddock_workaround_ :: NotificationChannel -> ()
snsRoleName :: NotificationChannel -> Value Text
snsTopicArn :: NotificationChannel -> Value Text
haddock_workaround_ :: ()
snsRoleName :: Value Text
snsTopicArn :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::FMS::NotificationChannel",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"SnsRoleName" 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
snsRoleName,
                       Key
"SnsTopicArn" 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
snsTopicArn]}
instance JSON.ToJSON NotificationChannel where
  toJSON :: NotificationChannel -> Value
toJSON NotificationChannel {()
Value Text
haddock_workaround_ :: NotificationChannel -> ()
snsRoleName :: NotificationChannel -> Value Text
snsTopicArn :: NotificationChannel -> Value Text
haddock_workaround_ :: ()
snsRoleName :: Value Text
snsTopicArn :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        [Key
"SnsRoleName" 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
snsRoleName,
         Key
"SnsTopicArn" 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
snsTopicArn]
instance Property "SnsRoleName" NotificationChannel where
  type PropertyType "SnsRoleName" NotificationChannel = Value Prelude.Text
  set :: PropertyType "SnsRoleName" NotificationChannel
-> NotificationChannel -> NotificationChannel
set PropertyType "SnsRoleName" NotificationChannel
newValue NotificationChannel {()
Value Text
haddock_workaround_ :: NotificationChannel -> ()
snsRoleName :: NotificationChannel -> Value Text
snsTopicArn :: NotificationChannel -> Value Text
haddock_workaround_ :: ()
snsRoleName :: Value Text
snsTopicArn :: Value Text
..}
    = NotificationChannel {snsRoleName :: Value Text
snsRoleName = PropertyType "SnsRoleName" NotificationChannel
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
snsTopicArn :: Value Text
haddock_workaround_ :: ()
snsTopicArn :: Value Text
..}
instance Property "SnsTopicArn" NotificationChannel where
  type PropertyType "SnsTopicArn" NotificationChannel = Value Prelude.Text
  set :: PropertyType "SnsTopicArn" NotificationChannel
-> NotificationChannel -> NotificationChannel
set PropertyType "SnsTopicArn" NotificationChannel
newValue NotificationChannel {()
Value Text
haddock_workaround_ :: NotificationChannel -> ()
snsRoleName :: NotificationChannel -> Value Text
snsTopicArn :: NotificationChannel -> Value Text
haddock_workaround_ :: ()
snsRoleName :: Value Text
snsTopicArn :: Value Text
..}
    = NotificationChannel {snsTopicArn :: Value Text
snsTopicArn = PropertyType "SnsTopicArn" NotificationChannel
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
snsRoleName :: Value Text
haddock_workaround_ :: ()
snsRoleName :: Value Text
..}