{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
{ $sel:defaultResult:LifecycleHookSpecification' :: Maybe Text
defaultResult =
forall a. Maybe a
Prelude.Nothing,
$sel:heartbeatTimeout:LifecycleHookSpecification' :: Maybe Int
heartbeatTimeout = forall a. Maybe a
Prelude.Nothing,
$sel:notificationMetadata:LifecycleHookSpecification' :: Maybe Text
notificationMetadata = forall a. Maybe a
Prelude.Nothing,
$sel:notificationTargetARN:LifecycleHookSpecification' :: Maybe Text
notificationTargetARN = forall a. Maybe a
Prelude.Nothing,
$sel:roleARN:LifecycleHookSpecification' :: Maybe Text
roleARN = 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 :: Lens' LifecycleHookSpecification (Maybe Text)
lifecycleHookSpecification_defaultResult = 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 :: Lens' LifecycleHookSpecification (Maybe Int)
lifecycleHookSpecification_heartbeatTimeout = 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 :: Lens' LifecycleHookSpecification (Maybe Text)
lifecycleHookSpecification_notificationMetadata = 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 :: Lens' LifecycleHookSpecification (Maybe Text)
lifecycleHookSpecification_notificationTargetARN = 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 :: Lens' LifecycleHookSpecification (Maybe Text)
lifecycleHookSpecification_roleARN = 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 :: Lens' LifecycleHookSpecification Text
lifecycleHookSpecification_lifecycleHookName = 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 :: Lens' LifecycleHookSpecification Text
lifecycleHookSpecification_lifecycleTransition = 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 where
hashWithSalt :: Int -> LifecycleHookSpecification -> Int
hashWithSalt Int
_salt 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
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultResult
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
heartbeatTimeout
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
notificationMetadata
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
notificationTargetARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
lifecycleHookName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
lifecycleTransition
instance Prelude.NFData LifecycleHookSpecification where
rnf :: LifecycleHookSpecification -> ()
rnf 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
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultResult
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
heartbeatTimeout
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
notificationMetadata
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
notificationTargetARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roleARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
lifecycleHookName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
lifecycleTransition
instance Data.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
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"DefaultResult" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
defaultResult,
ByteString
"HeartbeatTimeout" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
heartbeatTimeout,
ByteString
"NotificationMetadata" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
notificationMetadata,
ByteString
"NotificationTargetARN"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
notificationTargetARN,
ByteString
"RoleARN" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
roleARN,
ByteString
"LifecycleHookName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
lifecycleHookName,
ByteString
"LifecycleTransition" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
lifecycleTransition
]