{-# 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.CodeDeploy.Types.AutoScalingGroup where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AutoScalingGroup = AutoScalingGroup'
{
AutoScalingGroup -> Maybe Text
hook :: Prelude.Maybe Prelude.Text,
AutoScalingGroup -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (AutoScalingGroup -> AutoScalingGroup -> Bool
(AutoScalingGroup -> AutoScalingGroup -> Bool)
-> (AutoScalingGroup -> AutoScalingGroup -> Bool)
-> Eq AutoScalingGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoScalingGroup -> AutoScalingGroup -> Bool
$c/= :: AutoScalingGroup -> AutoScalingGroup -> Bool
== :: AutoScalingGroup -> AutoScalingGroup -> Bool
$c== :: AutoScalingGroup -> AutoScalingGroup -> Bool
Prelude.Eq, ReadPrec [AutoScalingGroup]
ReadPrec AutoScalingGroup
Int -> ReadS AutoScalingGroup
ReadS [AutoScalingGroup]
(Int -> ReadS AutoScalingGroup)
-> ReadS [AutoScalingGroup]
-> ReadPrec AutoScalingGroup
-> ReadPrec [AutoScalingGroup]
-> Read AutoScalingGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AutoScalingGroup]
$creadListPrec :: ReadPrec [AutoScalingGroup]
readPrec :: ReadPrec AutoScalingGroup
$creadPrec :: ReadPrec AutoScalingGroup
readList :: ReadS [AutoScalingGroup]
$creadList :: ReadS [AutoScalingGroup]
readsPrec :: Int -> ReadS AutoScalingGroup
$creadsPrec :: Int -> ReadS AutoScalingGroup
Prelude.Read, Int -> AutoScalingGroup -> ShowS
[AutoScalingGroup] -> ShowS
AutoScalingGroup -> String
(Int -> AutoScalingGroup -> ShowS)
-> (AutoScalingGroup -> String)
-> ([AutoScalingGroup] -> ShowS)
-> Show AutoScalingGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoScalingGroup] -> ShowS
$cshowList :: [AutoScalingGroup] -> ShowS
show :: AutoScalingGroup -> String
$cshow :: AutoScalingGroup -> String
showsPrec :: Int -> AutoScalingGroup -> ShowS
$cshowsPrec :: Int -> AutoScalingGroup -> ShowS
Prelude.Show, (forall x. AutoScalingGroup -> Rep AutoScalingGroup x)
-> (forall x. Rep AutoScalingGroup x -> AutoScalingGroup)
-> Generic AutoScalingGroup
forall x. Rep AutoScalingGroup x -> AutoScalingGroup
forall x. AutoScalingGroup -> Rep AutoScalingGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AutoScalingGroup x -> AutoScalingGroup
$cfrom :: forall x. AutoScalingGroup -> Rep AutoScalingGroup x
Prelude.Generic)
newAutoScalingGroup ::
AutoScalingGroup
newAutoScalingGroup :: AutoScalingGroup
newAutoScalingGroup =
AutoScalingGroup' :: Maybe Text -> Maybe Text -> AutoScalingGroup
AutoScalingGroup'
{ $sel:hook:AutoScalingGroup' :: Maybe Text
hook = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:AutoScalingGroup' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
autoScalingGroup_hook :: Lens.Lens' AutoScalingGroup (Prelude.Maybe Prelude.Text)
autoScalingGroup_hook :: (Maybe Text -> f (Maybe Text))
-> AutoScalingGroup -> f AutoScalingGroup
autoScalingGroup_hook = (AutoScalingGroup -> Maybe Text)
-> (AutoScalingGroup -> Maybe Text -> AutoScalingGroup)
-> Lens AutoScalingGroup AutoScalingGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingGroup' {Maybe Text
hook :: Maybe Text
$sel:hook:AutoScalingGroup' :: AutoScalingGroup -> Maybe Text
hook} -> Maybe Text
hook) (\s :: AutoScalingGroup
s@AutoScalingGroup' {} Maybe Text
a -> AutoScalingGroup
s {$sel:hook:AutoScalingGroup' :: Maybe Text
hook = Maybe Text
a} :: AutoScalingGroup)
autoScalingGroup_name :: Lens.Lens' AutoScalingGroup (Prelude.Maybe Prelude.Text)
autoScalingGroup_name :: (Maybe Text -> f (Maybe Text))
-> AutoScalingGroup -> f AutoScalingGroup
autoScalingGroup_name = (AutoScalingGroup -> Maybe Text)
-> (AutoScalingGroup -> Maybe Text -> AutoScalingGroup)
-> Lens AutoScalingGroup AutoScalingGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingGroup' {Maybe Text
name :: Maybe Text
$sel:name:AutoScalingGroup' :: AutoScalingGroup -> Maybe Text
name} -> Maybe Text
name) (\s :: AutoScalingGroup
s@AutoScalingGroup' {} Maybe Text
a -> AutoScalingGroup
s {$sel:name:AutoScalingGroup' :: Maybe Text
name = Maybe Text
a} :: AutoScalingGroup)
instance Core.FromJSON AutoScalingGroup where
parseJSON :: Value -> Parser AutoScalingGroup
parseJSON =
String
-> (Object -> Parser AutoScalingGroup)
-> Value
-> Parser AutoScalingGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AutoScalingGroup"
( \Object
x ->
Maybe Text -> Maybe Text -> AutoScalingGroup
AutoScalingGroup'
(Maybe Text -> Maybe Text -> AutoScalingGroup)
-> Parser (Maybe Text) -> Parser (Maybe Text -> AutoScalingGroup)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hook") Parser (Maybe Text -> AutoScalingGroup)
-> Parser (Maybe Text) -> Parser AutoScalingGroup
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
)
instance Prelude.Hashable AutoScalingGroup
instance Prelude.NFData AutoScalingGroup