module Stratosphere.AutoScaling.AutoScalingGroup.NotificationConfigurationProperty (
        NotificationConfigurationProperty(..),
        mkNotificationConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data NotificationConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-notificationconfiguration.html>
    NotificationConfigurationProperty {NotificationConfigurationProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-notificationconfiguration.html#cfn-autoscaling-autoscalinggroup-notificationconfiguration-notificationtypes>
                                       NotificationConfigurationProperty -> Maybe (ValueList Text)
notificationTypes :: (Prelude.Maybe (ValueList Prelude.Text)),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-notificationconfiguration.html#cfn-autoscaling-autoscalinggroup-notificationconfiguration-topicarn>
                                       NotificationConfigurationProperty -> ValueList Text
topicARN :: (ValueList Prelude.Text)}
  deriving stock (NotificationConfigurationProperty
-> NotificationConfigurationProperty -> Bool
(NotificationConfigurationProperty
 -> NotificationConfigurationProperty -> Bool)
-> (NotificationConfigurationProperty
    -> NotificationConfigurationProperty -> Bool)
-> Eq NotificationConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NotificationConfigurationProperty
-> NotificationConfigurationProperty -> Bool
== :: NotificationConfigurationProperty
-> NotificationConfigurationProperty -> Bool
$c/= :: NotificationConfigurationProperty
-> NotificationConfigurationProperty -> Bool
/= :: NotificationConfigurationProperty
-> NotificationConfigurationProperty -> Bool
Prelude.Eq, Int -> NotificationConfigurationProperty -> ShowS
[NotificationConfigurationProperty] -> ShowS
NotificationConfigurationProperty -> String
(Int -> NotificationConfigurationProperty -> ShowS)
-> (NotificationConfigurationProperty -> String)
-> ([NotificationConfigurationProperty] -> ShowS)
-> Show NotificationConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NotificationConfigurationProperty -> ShowS
showsPrec :: Int -> NotificationConfigurationProperty -> ShowS
$cshow :: NotificationConfigurationProperty -> String
show :: NotificationConfigurationProperty -> String
$cshowList :: [NotificationConfigurationProperty] -> ShowS
showList :: [NotificationConfigurationProperty] -> ShowS
Prelude.Show)
mkNotificationConfigurationProperty ::
  ValueList Prelude.Text -> NotificationConfigurationProperty
mkNotificationConfigurationProperty :: ValueList Text -> NotificationConfigurationProperty
mkNotificationConfigurationProperty ValueList Text
topicARN
  = NotificationConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), topicARN :: ValueList Text
topicARN = ValueList Text
topicARN,
       notificationTypes :: Maybe (ValueList Text)
notificationTypes = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties NotificationConfigurationProperty where
  toResourceProperties :: NotificationConfigurationProperty -> ResourceProperties
toResourceProperties NotificationConfigurationProperty {Maybe (ValueList Text)
()
ValueList Text
haddock_workaround_ :: NotificationConfigurationProperty -> ()
notificationTypes :: NotificationConfigurationProperty -> Maybe (ValueList Text)
topicARN :: NotificationConfigurationProperty -> ValueList Text
haddock_workaround_ :: ()
notificationTypes :: Maybe (ValueList Text)
topicARN :: ValueList Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AutoScaling::AutoScalingGroup.NotificationConfiguration",
         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
"TopicARN" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
topicARN]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> ValueList 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
"NotificationTypes" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
notificationTypes]))}
instance JSON.ToJSON NotificationConfigurationProperty where
  toJSON :: NotificationConfigurationProperty -> Value
toJSON NotificationConfigurationProperty {Maybe (ValueList Text)
()
ValueList Text
haddock_workaround_ :: NotificationConfigurationProperty -> ()
notificationTypes :: NotificationConfigurationProperty -> Maybe (ValueList Text)
topicARN :: NotificationConfigurationProperty -> ValueList Text
haddock_workaround_ :: ()
notificationTypes :: Maybe (ValueList Text)
topicARN :: ValueList 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
"TopicARN" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
topicARN]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> ValueList 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
"NotificationTypes" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
notificationTypes])))
instance Property "NotificationTypes" NotificationConfigurationProperty where
  type PropertyType "NotificationTypes" NotificationConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType "NotificationTypes" NotificationConfigurationProperty
-> NotificationConfigurationProperty
-> NotificationConfigurationProperty
set PropertyType "NotificationTypes" NotificationConfigurationProperty
newValue NotificationConfigurationProperty {Maybe (ValueList Text)
()
ValueList Text
haddock_workaround_ :: NotificationConfigurationProperty -> ()
notificationTypes :: NotificationConfigurationProperty -> Maybe (ValueList Text)
topicARN :: NotificationConfigurationProperty -> ValueList Text
haddock_workaround_ :: ()
notificationTypes :: Maybe (ValueList Text)
topicARN :: ValueList Text
..}
    = NotificationConfigurationProperty
        {notificationTypes :: Maybe (ValueList Text)
notificationTypes = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NotificationTypes" NotificationConfigurationProperty
ValueList Text
newValue, ()
ValueList Text
haddock_workaround_ :: ()
topicARN :: ValueList Text
haddock_workaround_ :: ()
topicARN :: ValueList Text
..}
instance Property "TopicARN" NotificationConfigurationProperty where
  type PropertyType "TopicARN" NotificationConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType "TopicARN" NotificationConfigurationProperty
-> NotificationConfigurationProperty
-> NotificationConfigurationProperty
set PropertyType "TopicARN" NotificationConfigurationProperty
newValue NotificationConfigurationProperty {Maybe (ValueList Text)
()
ValueList Text
haddock_workaround_ :: NotificationConfigurationProperty -> ()
notificationTypes :: NotificationConfigurationProperty -> Maybe (ValueList Text)
topicARN :: NotificationConfigurationProperty -> ValueList Text
haddock_workaround_ :: ()
notificationTypes :: Maybe (ValueList Text)
topicARN :: ValueList Text
..}
    = NotificationConfigurationProperty {topicARN :: ValueList Text
topicARN = PropertyType "TopicARN" NotificationConfigurationProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
notificationTypes :: Maybe (ValueList Text)
haddock_workaround_ :: ()
notificationTypes :: Maybe (ValueList Text)
..}