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