{-# 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.LoadBalancerTargetGroupState where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LoadBalancerTargetGroupState = LoadBalancerTargetGroupState'
{
LoadBalancerTargetGroupState -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
LoadBalancerTargetGroupState -> Maybe Text
loadBalancerTargetGroupARN :: Prelude.Maybe Prelude.Text
}
deriving (LoadBalancerTargetGroupState
-> LoadBalancerTargetGroupState -> Bool
(LoadBalancerTargetGroupState
-> LoadBalancerTargetGroupState -> Bool)
-> (LoadBalancerTargetGroupState
-> LoadBalancerTargetGroupState -> Bool)
-> Eq LoadBalancerTargetGroupState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LoadBalancerTargetGroupState
-> LoadBalancerTargetGroupState -> Bool
$c/= :: LoadBalancerTargetGroupState
-> LoadBalancerTargetGroupState -> Bool
== :: LoadBalancerTargetGroupState
-> LoadBalancerTargetGroupState -> Bool
$c== :: LoadBalancerTargetGroupState
-> LoadBalancerTargetGroupState -> Bool
Prelude.Eq, ReadPrec [LoadBalancerTargetGroupState]
ReadPrec LoadBalancerTargetGroupState
Int -> ReadS LoadBalancerTargetGroupState
ReadS [LoadBalancerTargetGroupState]
(Int -> ReadS LoadBalancerTargetGroupState)
-> ReadS [LoadBalancerTargetGroupState]
-> ReadPrec LoadBalancerTargetGroupState
-> ReadPrec [LoadBalancerTargetGroupState]
-> Read LoadBalancerTargetGroupState
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LoadBalancerTargetGroupState]
$creadListPrec :: ReadPrec [LoadBalancerTargetGroupState]
readPrec :: ReadPrec LoadBalancerTargetGroupState
$creadPrec :: ReadPrec LoadBalancerTargetGroupState
readList :: ReadS [LoadBalancerTargetGroupState]
$creadList :: ReadS [LoadBalancerTargetGroupState]
readsPrec :: Int -> ReadS LoadBalancerTargetGroupState
$creadsPrec :: Int -> ReadS LoadBalancerTargetGroupState
Prelude.Read, Int -> LoadBalancerTargetGroupState -> ShowS
[LoadBalancerTargetGroupState] -> ShowS
LoadBalancerTargetGroupState -> String
(Int -> LoadBalancerTargetGroupState -> ShowS)
-> (LoadBalancerTargetGroupState -> String)
-> ([LoadBalancerTargetGroupState] -> ShowS)
-> Show LoadBalancerTargetGroupState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LoadBalancerTargetGroupState] -> ShowS
$cshowList :: [LoadBalancerTargetGroupState] -> ShowS
show :: LoadBalancerTargetGroupState -> String
$cshow :: LoadBalancerTargetGroupState -> String
showsPrec :: Int -> LoadBalancerTargetGroupState -> ShowS
$cshowsPrec :: Int -> LoadBalancerTargetGroupState -> ShowS
Prelude.Show, (forall x.
LoadBalancerTargetGroupState -> Rep LoadBalancerTargetGroupState x)
-> (forall x.
Rep LoadBalancerTargetGroupState x -> LoadBalancerTargetGroupState)
-> Generic LoadBalancerTargetGroupState
forall x.
Rep LoadBalancerTargetGroupState x -> LoadBalancerTargetGroupState
forall x.
LoadBalancerTargetGroupState -> Rep LoadBalancerTargetGroupState x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LoadBalancerTargetGroupState x -> LoadBalancerTargetGroupState
$cfrom :: forall x.
LoadBalancerTargetGroupState -> Rep LoadBalancerTargetGroupState x
Prelude.Generic)
newLoadBalancerTargetGroupState ::
LoadBalancerTargetGroupState
newLoadBalancerTargetGroupState :: LoadBalancerTargetGroupState
newLoadBalancerTargetGroupState =
LoadBalancerTargetGroupState' :: Maybe Text -> Maybe Text -> LoadBalancerTargetGroupState
LoadBalancerTargetGroupState'
{ $sel:state:LoadBalancerTargetGroupState' :: Maybe Text
state =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:loadBalancerTargetGroupARN:LoadBalancerTargetGroupState' :: Maybe Text
loadBalancerTargetGroupARN = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
loadBalancerTargetGroupState_state :: Lens.Lens' LoadBalancerTargetGroupState (Prelude.Maybe Prelude.Text)
loadBalancerTargetGroupState_state :: (Maybe Text -> f (Maybe Text))
-> LoadBalancerTargetGroupState -> f LoadBalancerTargetGroupState
loadBalancerTargetGroupState_state = (LoadBalancerTargetGroupState -> Maybe Text)
-> (LoadBalancerTargetGroupState
-> Maybe Text -> LoadBalancerTargetGroupState)
-> Lens
LoadBalancerTargetGroupState
LoadBalancerTargetGroupState
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancerTargetGroupState' {Maybe Text
state :: Maybe Text
$sel:state:LoadBalancerTargetGroupState' :: LoadBalancerTargetGroupState -> Maybe Text
state} -> Maybe Text
state) (\s :: LoadBalancerTargetGroupState
s@LoadBalancerTargetGroupState' {} Maybe Text
a -> LoadBalancerTargetGroupState
s {$sel:state:LoadBalancerTargetGroupState' :: Maybe Text
state = Maybe Text
a} :: LoadBalancerTargetGroupState)
loadBalancerTargetGroupState_loadBalancerTargetGroupARN :: Lens.Lens' LoadBalancerTargetGroupState (Prelude.Maybe Prelude.Text)
loadBalancerTargetGroupState_loadBalancerTargetGroupARN :: (Maybe Text -> f (Maybe Text))
-> LoadBalancerTargetGroupState -> f LoadBalancerTargetGroupState
loadBalancerTargetGroupState_loadBalancerTargetGroupARN = (LoadBalancerTargetGroupState -> Maybe Text)
-> (LoadBalancerTargetGroupState
-> Maybe Text -> LoadBalancerTargetGroupState)
-> Lens
LoadBalancerTargetGroupState
LoadBalancerTargetGroupState
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancerTargetGroupState' {Maybe Text
loadBalancerTargetGroupARN :: Maybe Text
$sel:loadBalancerTargetGroupARN:LoadBalancerTargetGroupState' :: LoadBalancerTargetGroupState -> Maybe Text
loadBalancerTargetGroupARN} -> Maybe Text
loadBalancerTargetGroupARN) (\s :: LoadBalancerTargetGroupState
s@LoadBalancerTargetGroupState' {} Maybe Text
a -> LoadBalancerTargetGroupState
s {$sel:loadBalancerTargetGroupARN:LoadBalancerTargetGroupState' :: Maybe Text
loadBalancerTargetGroupARN = Maybe Text
a} :: LoadBalancerTargetGroupState)
instance Core.FromXML LoadBalancerTargetGroupState where
parseXML :: [Node] -> Either String LoadBalancerTargetGroupState
parseXML [Node]
x =
Maybe Text -> Maybe Text -> LoadBalancerTargetGroupState
LoadBalancerTargetGroupState'
(Maybe Text -> Maybe Text -> LoadBalancerTargetGroupState)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> LoadBalancerTargetGroupState)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"State")
Either String (Maybe Text -> LoadBalancerTargetGroupState)
-> Either String (Maybe Text)
-> Either String LoadBalancerTargetGroupState
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LoadBalancerTargetGroupARN")
instance
Prelude.Hashable
LoadBalancerTargetGroupState
instance Prelude.NFData LoadBalancerTargetGroupState