{-# 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.LifecycleHookSpecification where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LifecycleHookSpecification = LifecycleHookSpecification'
{
LifecycleHookSpecification -> Maybe Text
defaultResult :: Prelude.Maybe Prelude.Text,
LifecycleHookSpecification -> Maybe Int
heartbeatTimeout :: Prelude.Maybe Prelude.Int,
LifecycleHookSpecification -> Maybe Text
notificationMetadata :: Prelude.Maybe Prelude.Text,
LifecycleHookSpecification -> Maybe Text
notificationTargetARN :: Prelude.Maybe Prelude.Text,
LifecycleHookSpecification -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
LifecycleHookSpecification -> Text
lifecycleHookName :: Prelude.Text,
LifecycleHookSpecification -> Text
lifecycleTransition :: Prelude.Text
}
deriving (LifecycleHookSpecification -> LifecycleHookSpecification -> Bool
(LifecycleHookSpecification -> LifecycleHookSpecification -> Bool)
-> (LifecycleHookSpecification
-> LifecycleHookSpecification -> Bool)
-> Eq LifecycleHookSpecification
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LifecycleHookSpecification -> LifecycleHookSpecification -> Bool
$c/= :: LifecycleHookSpecification -> LifecycleHookSpecification -> Bool
== :: LifecycleHookSpecification -> LifecycleHookSpecification -> Bool
$c== :: LifecycleHookSpecification -> LifecycleHookSpecification -> Bool
Prelude.Eq, ReadPrec [LifecycleHookSpecification]
ReadPrec LifecycleHookSpecification
Int -> ReadS LifecycleHookSpecification
ReadS [LifecycleHookSpecification]
(Int -> ReadS LifecycleHookSpecification)
-> ReadS [LifecycleHookSpecification]
-> ReadPrec LifecycleHookSpecification
-> ReadPrec [LifecycleHookSpecification]
-> Read LifecycleHookSpecification
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LifecycleHookSpecification]
$creadListPrec :: ReadPrec [LifecycleHookSpecification]
readPrec :: ReadPrec LifecycleHookSpecification
$creadPrec :: ReadPrec LifecycleHookSpecification
readList :: ReadS [LifecycleHookSpecification]
$creadList :: ReadS [LifecycleHookSpecification]
readsPrec :: Int -> ReadS LifecycleHookSpecification
$creadsPrec :: Int -> ReadS LifecycleHookSpecification
Prelude.Read, Int -> LifecycleHookSpecification -> ShowS
[LifecycleHookSpecification] -> ShowS
LifecycleHookSpecification -> String
(Int -> LifecycleHookSpecification -> ShowS)
-> (LifecycleHookSpecification -> String)
-> ([LifecycleHookSpecification] -> ShowS)
-> Show LifecycleHookSpecification
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LifecycleHookSpecification] -> ShowS
$cshowList :: [LifecycleHookSpecification] -> ShowS
show :: LifecycleHookSpecification -> String
$cshow :: LifecycleHookSpecification -> String
showsPrec :: Int -> LifecycleHookSpecification -> ShowS
$cshowsPrec :: Int -> LifecycleHookSpecification -> ShowS
Prelude.Show, (forall x.
LifecycleHookSpecification -> Rep LifecycleHookSpecification x)
-> (forall x.
Rep LifecycleHookSpecification x -> LifecycleHookSpecification)
-> Generic LifecycleHookSpecification
forall x.
Rep LifecycleHookSpecification x -> LifecycleHookSpecification
forall x.
LifecycleHookSpecification -> Rep LifecycleHookSpecification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LifecycleHookSpecification x -> LifecycleHookSpecification
$cfrom :: forall x.
LifecycleHookSpecification -> Rep LifecycleHookSpecification x
Prelude.Generic)
newLifecycleHookSpecification ::
Prelude.Text ->
Prelude.Text ->
LifecycleHookSpecification
newLifecycleHookSpecification :: Text -> Text -> LifecycleHookSpecification
newLifecycleHookSpecification
Text
pLifecycleHookName_
Text
pLifecycleTransition_ =
LifecycleHookSpecification' :: Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> LifecycleHookSpecification
LifecycleHookSpecification'
{ $sel:defaultResult:LifecycleHookSpecification' :: Maybe Text
defaultResult =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:heartbeatTimeout:LifecycleHookSpecification' :: Maybe Int
heartbeatTimeout = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:notificationMetadata:LifecycleHookSpecification' :: Maybe Text
notificationMetadata = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:notificationTargetARN:LifecycleHookSpecification' :: Maybe Text
notificationTargetARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:roleARN:LifecycleHookSpecification' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lifecycleHookName:LifecycleHookSpecification' :: Text
lifecycleHookName = Text
pLifecycleHookName_,
$sel:lifecycleTransition:LifecycleHookSpecification' :: Text
lifecycleTransition = Text
pLifecycleTransition_
}
lifecycleHookSpecification_defaultResult :: Lens.Lens' LifecycleHookSpecification (Prelude.Maybe Prelude.Text)
lifecycleHookSpecification_defaultResult :: (Maybe Text -> f (Maybe Text))
-> LifecycleHookSpecification -> f LifecycleHookSpecification
lifecycleHookSpecification_defaultResult = (LifecycleHookSpecification -> Maybe Text)
-> (LifecycleHookSpecification
-> Maybe Text -> LifecycleHookSpecification)
-> Lens
LifecycleHookSpecification
LifecycleHookSpecification
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LifecycleHookSpecification' {Maybe Text
defaultResult :: Maybe Text
$sel:defaultResult:LifecycleHookSpecification' :: LifecycleHookSpecification -> Maybe Text
defaultResult} -> Maybe Text
defaultResult) (\s :: LifecycleHookSpecification
s@LifecycleHookSpecification' {} Maybe Text
a -> LifecycleHookSpecification
s {$sel:defaultResult:LifecycleHookSpecification' :: Maybe Text
defaultResult = Maybe Text
a} :: LifecycleHookSpecification)
lifecycleHookSpecification_heartbeatTimeout :: Lens.Lens' LifecycleHookSpecification (Prelude.Maybe Prelude.Int)
lifecycleHookSpecification_heartbeatTimeout :: (Maybe Int -> f (Maybe Int))
-> LifecycleHookSpecification -> f LifecycleHookSpecification
lifecycleHookSpecification_heartbeatTimeout = (LifecycleHookSpecification -> Maybe Int)
-> (LifecycleHookSpecification
-> Maybe Int -> LifecycleHookSpecification)
-> Lens
LifecycleHookSpecification
LifecycleHookSpecification
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LifecycleHookSpecification' {Maybe Int
heartbeatTimeout :: Maybe Int
$sel:heartbeatTimeout:LifecycleHookSpecification' :: LifecycleHookSpecification -> Maybe Int
heartbeatTimeout} -> Maybe Int
heartbeatTimeout) (\s :: LifecycleHookSpecification
s@LifecycleHookSpecification' {} Maybe Int
a -> LifecycleHookSpecification
s {$sel:heartbeatTimeout:LifecycleHookSpecification' :: Maybe Int
heartbeatTimeout = Maybe Int
a} :: LifecycleHookSpecification)
lifecycleHookSpecification_notificationMetadata :: Lens.Lens' LifecycleHookSpecification (Prelude.Maybe Prelude.Text)
lifecycleHookSpecification_notificationMetadata :: (Maybe Text -> f (Maybe Text))
-> LifecycleHookSpecification -> f LifecycleHookSpecification
lifecycleHookSpecification_notificationMetadata = (LifecycleHookSpecification -> Maybe Text)
-> (LifecycleHookSpecification
-> Maybe Text -> LifecycleHookSpecification)
-> Lens
LifecycleHookSpecification
LifecycleHookSpecification
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LifecycleHookSpecification' {Maybe Text
notificationMetadata :: Maybe Text
$sel:notificationMetadata:LifecycleHookSpecification' :: LifecycleHookSpecification -> Maybe Text
notificationMetadata} -> Maybe Text
notificationMetadata) (\s :: LifecycleHookSpecification
s@LifecycleHookSpecification' {} Maybe Text
a -> LifecycleHookSpecification
s {$sel:notificationMetadata:LifecycleHookSpecification' :: Maybe Text
notificationMetadata = Maybe Text
a} :: LifecycleHookSpecification)
lifecycleHookSpecification_notificationTargetARN :: Lens.Lens' LifecycleHookSpecification (Prelude.Maybe Prelude.Text)
lifecycleHookSpecification_notificationTargetARN :: (Maybe Text -> f (Maybe Text))
-> LifecycleHookSpecification -> f LifecycleHookSpecification
lifecycleHookSpecification_notificationTargetARN = (LifecycleHookSpecification -> Maybe Text)
-> (LifecycleHookSpecification
-> Maybe Text -> LifecycleHookSpecification)
-> Lens
LifecycleHookSpecification
LifecycleHookSpecification
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LifecycleHookSpecification' {Maybe Text
notificationTargetARN :: Maybe Text
$sel:notificationTargetARN:LifecycleHookSpecification' :: LifecycleHookSpecification -> Maybe Text
notificationTargetARN} -> Maybe Text
notificationTargetARN) (\s :: LifecycleHookSpecification
s@LifecycleHookSpecification' {} Maybe Text
a -> LifecycleHookSpecification
s {$sel:notificationTargetARN:LifecycleHookSpecification' :: Maybe Text
notificationTargetARN = Maybe Text
a} :: LifecycleHookSpecification)
lifecycleHookSpecification_roleARN :: Lens.Lens' LifecycleHookSpecification (Prelude.Maybe Prelude.Text)
lifecycleHookSpecification_roleARN :: (Maybe Text -> f (Maybe Text))
-> LifecycleHookSpecification -> f LifecycleHookSpecification
lifecycleHookSpecification_roleARN = (LifecycleHookSpecification -> Maybe Text)
-> (LifecycleHookSpecification
-> Maybe Text -> LifecycleHookSpecification)
-> Lens
LifecycleHookSpecification
LifecycleHookSpecification
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LifecycleHookSpecification' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:LifecycleHookSpecification' :: LifecycleHookSpecification -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: LifecycleHookSpecification
s@LifecycleHookSpecification' {} Maybe Text
a -> LifecycleHookSpecification
s {$sel:roleARN:LifecycleHookSpecification' :: Maybe Text
roleARN = Maybe Text
a} :: LifecycleHookSpecification)
lifecycleHookSpecification_lifecycleHookName :: Lens.Lens' LifecycleHookSpecification Prelude.Text
lifecycleHookSpecification_lifecycleHookName :: (Text -> f Text)
-> LifecycleHookSpecification -> f LifecycleHookSpecification
lifecycleHookSpecification_lifecycleHookName = (LifecycleHookSpecification -> Text)
-> (LifecycleHookSpecification
-> Text -> LifecycleHookSpecification)
-> Lens
LifecycleHookSpecification LifecycleHookSpecification Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LifecycleHookSpecification' {Text
lifecycleHookName :: Text
$sel:lifecycleHookName:LifecycleHookSpecification' :: LifecycleHookSpecification -> Text
lifecycleHookName} -> Text
lifecycleHookName) (\s :: LifecycleHookSpecification
s@LifecycleHookSpecification' {} Text
a -> LifecycleHookSpecification
s {$sel:lifecycleHookName:LifecycleHookSpecification' :: Text
lifecycleHookName = Text
a} :: LifecycleHookSpecification)
lifecycleHookSpecification_lifecycleTransition :: Lens.Lens' LifecycleHookSpecification Prelude.Text
lifecycleHookSpecification_lifecycleTransition :: (Text -> f Text)
-> LifecycleHookSpecification -> f LifecycleHookSpecification
lifecycleHookSpecification_lifecycleTransition = (LifecycleHookSpecification -> Text)
-> (LifecycleHookSpecification
-> Text -> LifecycleHookSpecification)
-> Lens
LifecycleHookSpecification LifecycleHookSpecification Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LifecycleHookSpecification' {Text
lifecycleTransition :: Text
$sel:lifecycleTransition:LifecycleHookSpecification' :: LifecycleHookSpecification -> Text
lifecycleTransition} -> Text
lifecycleTransition) (\s :: LifecycleHookSpecification
s@LifecycleHookSpecification' {} Text
a -> LifecycleHookSpecification
s {$sel:lifecycleTransition:LifecycleHookSpecification' :: Text
lifecycleTransition = Text
a} :: LifecycleHookSpecification)
instance Prelude.Hashable LifecycleHookSpecification
instance Prelude.NFData LifecycleHookSpecification
instance Core.ToQuery LifecycleHookSpecification where
toQuery :: LifecycleHookSpecification -> QueryString
toQuery LifecycleHookSpecification' {Maybe Int
Maybe Text
Text
lifecycleTransition :: Text
lifecycleHookName :: Text
roleARN :: Maybe Text
notificationTargetARN :: Maybe Text
notificationMetadata :: Maybe Text
heartbeatTimeout :: Maybe Int
defaultResult :: Maybe Text
$sel:lifecycleTransition:LifecycleHookSpecification' :: LifecycleHookSpecification -> Text
$sel:lifecycleHookName:LifecycleHookSpecification' :: LifecycleHookSpecification -> Text
$sel:roleARN:LifecycleHookSpecification' :: LifecycleHookSpecification -> Maybe Text
$sel:notificationTargetARN:LifecycleHookSpecification' :: LifecycleHookSpecification -> Maybe Text
$sel:notificationMetadata:LifecycleHookSpecification' :: LifecycleHookSpecification -> Maybe Text
$sel:heartbeatTimeout:LifecycleHookSpecification' :: LifecycleHookSpecification -> Maybe Int
$sel:defaultResult:LifecycleHookSpecification' :: LifecycleHookSpecification -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"DefaultResult" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
defaultResult,
ByteString
"HeartbeatTimeout" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
heartbeatTimeout,
ByteString
"NotificationMetadata" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
notificationMetadata,
ByteString
"NotificationTargetARN"
ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
notificationTargetARN,
ByteString
"RoleARN" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
roleARN,
ByteString
"LifecycleHookName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
lifecycleHookName,
ByteString
"LifecycleTransition" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
lifecycleTransition
]