{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.AutoScaling.Types.NotificationConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data NotificationConfiguration = NotificationConfiguration'
{
NotificationConfiguration -> Maybe Text
autoScalingGroupName :: Prelude.Maybe Prelude.Text,
NotificationConfiguration -> Maybe Text
notificationType :: Prelude.Maybe Prelude.Text,
NotificationConfiguration -> Maybe Text
topicARN :: Prelude.Maybe Prelude.Text
}
deriving (NotificationConfiguration -> NotificationConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NotificationConfiguration -> NotificationConfiguration -> Bool
$c/= :: NotificationConfiguration -> NotificationConfiguration -> Bool
== :: NotificationConfiguration -> NotificationConfiguration -> Bool
$c== :: NotificationConfiguration -> NotificationConfiguration -> Bool
Prelude.Eq, ReadPrec [NotificationConfiguration]
ReadPrec NotificationConfiguration
Int -> ReadS NotificationConfiguration
ReadS [NotificationConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NotificationConfiguration]
$creadListPrec :: ReadPrec [NotificationConfiguration]
readPrec :: ReadPrec NotificationConfiguration
$creadPrec :: ReadPrec NotificationConfiguration
readList :: ReadS [NotificationConfiguration]
$creadList :: ReadS [NotificationConfiguration]
readsPrec :: Int -> ReadS NotificationConfiguration
$creadsPrec :: Int -> ReadS NotificationConfiguration
Prelude.Read, Int -> NotificationConfiguration -> ShowS
[NotificationConfiguration] -> ShowS
NotificationConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NotificationConfiguration] -> ShowS
$cshowList :: [NotificationConfiguration] -> ShowS
show :: NotificationConfiguration -> String
$cshow :: NotificationConfiguration -> String
showsPrec :: Int -> NotificationConfiguration -> ShowS
$cshowsPrec :: Int -> NotificationConfiguration -> ShowS
Prelude.Show, forall x.
Rep NotificationConfiguration x -> NotificationConfiguration
forall x.
NotificationConfiguration -> Rep NotificationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NotificationConfiguration x -> NotificationConfiguration
$cfrom :: forall x.
NotificationConfiguration -> Rep NotificationConfiguration x
Prelude.Generic)
newNotificationConfiguration ::
NotificationConfiguration
newNotificationConfiguration :: NotificationConfiguration
newNotificationConfiguration =
NotificationConfiguration'
{ $sel:autoScalingGroupName:NotificationConfiguration' :: Maybe Text
autoScalingGroupName =
forall a. Maybe a
Prelude.Nothing,
$sel:notificationType:NotificationConfiguration' :: Maybe Text
notificationType = forall a. Maybe a
Prelude.Nothing,
$sel:topicARN:NotificationConfiguration' :: Maybe Text
topicARN = forall a. Maybe a
Prelude.Nothing
}
notificationConfiguration_autoScalingGroupName :: Lens.Lens' NotificationConfiguration (Prelude.Maybe Prelude.Text)
notificationConfiguration_autoScalingGroupName :: Lens' NotificationConfiguration (Maybe Text)
notificationConfiguration_autoScalingGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotificationConfiguration' {Maybe Text
autoScalingGroupName :: Maybe Text
$sel:autoScalingGroupName:NotificationConfiguration' :: NotificationConfiguration -> Maybe Text
autoScalingGroupName} -> Maybe Text
autoScalingGroupName) (\s :: NotificationConfiguration
s@NotificationConfiguration' {} Maybe Text
a -> NotificationConfiguration
s {$sel:autoScalingGroupName:NotificationConfiguration' :: Maybe Text
autoScalingGroupName = Maybe Text
a} :: NotificationConfiguration)
notificationConfiguration_notificationType :: Lens.Lens' NotificationConfiguration (Prelude.Maybe Prelude.Text)
notificationConfiguration_notificationType :: Lens' NotificationConfiguration (Maybe Text)
notificationConfiguration_notificationType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotificationConfiguration' {Maybe Text
notificationType :: Maybe Text
$sel:notificationType:NotificationConfiguration' :: NotificationConfiguration -> Maybe Text
notificationType} -> Maybe Text
notificationType) (\s :: NotificationConfiguration
s@NotificationConfiguration' {} Maybe Text
a -> NotificationConfiguration
s {$sel:notificationType:NotificationConfiguration' :: Maybe Text
notificationType = Maybe Text
a} :: NotificationConfiguration)
notificationConfiguration_topicARN :: Lens.Lens' NotificationConfiguration (Prelude.Maybe Prelude.Text)
notificationConfiguration_topicARN :: Lens' NotificationConfiguration (Maybe Text)
notificationConfiguration_topicARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotificationConfiguration' {Maybe Text
topicARN :: Maybe Text
$sel:topicARN:NotificationConfiguration' :: NotificationConfiguration -> Maybe Text
topicARN} -> Maybe Text
topicARN) (\s :: NotificationConfiguration
s@NotificationConfiguration' {} Maybe Text
a -> NotificationConfiguration
s {$sel:topicARN:NotificationConfiguration' :: Maybe Text
topicARN = Maybe Text
a} :: NotificationConfiguration)
instance Data.FromXML NotificationConfiguration where
parseXML :: [Node] -> Either String NotificationConfiguration
parseXML [Node]
x =
Maybe Text -> Maybe Text -> Maybe Text -> NotificationConfiguration
NotificationConfiguration'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"AutoScalingGroupName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"NotificationType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"TopicARN")
instance Prelude.Hashable NotificationConfiguration where
hashWithSalt :: Int -> NotificationConfiguration -> Int
hashWithSalt Int
_salt NotificationConfiguration' {Maybe Text
topicARN :: Maybe Text
notificationType :: Maybe Text
autoScalingGroupName :: Maybe Text
$sel:topicARN:NotificationConfiguration' :: NotificationConfiguration -> Maybe Text
$sel:notificationType:NotificationConfiguration' :: NotificationConfiguration -> Maybe Text
$sel:autoScalingGroupName:NotificationConfiguration' :: NotificationConfiguration -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
autoScalingGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
notificationType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
topicARN
instance Prelude.NFData NotificationConfiguration where
rnf :: NotificationConfiguration -> ()
rnf NotificationConfiguration' {Maybe Text
topicARN :: Maybe Text
notificationType :: Maybe Text
autoScalingGroupName :: Maybe Text
$sel:topicARN:NotificationConfiguration' :: NotificationConfiguration -> Maybe Text
$sel:notificationType:NotificationConfiguration' :: NotificationConfiguration -> Maybe Text
$sel:autoScalingGroupName:NotificationConfiguration' :: NotificationConfiguration -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
autoScalingGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
notificationType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
topicARN