{-# 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.Route53RecoveryCluster.Types.UpdateRoutingControlStateEntry where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53RecoveryCluster.Types.RoutingControlState
data UpdateRoutingControlStateEntry = UpdateRoutingControlStateEntry'
{
UpdateRoutingControlStateEntry -> Text
routingControlArn :: Prelude.Text,
UpdateRoutingControlStateEntry -> RoutingControlState
routingControlState :: RoutingControlState
}
deriving (UpdateRoutingControlStateEntry
-> UpdateRoutingControlStateEntry -> Bool
(UpdateRoutingControlStateEntry
-> UpdateRoutingControlStateEntry -> Bool)
-> (UpdateRoutingControlStateEntry
-> UpdateRoutingControlStateEntry -> Bool)
-> Eq UpdateRoutingControlStateEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRoutingControlStateEntry
-> UpdateRoutingControlStateEntry -> Bool
$c/= :: UpdateRoutingControlStateEntry
-> UpdateRoutingControlStateEntry -> Bool
== :: UpdateRoutingControlStateEntry
-> UpdateRoutingControlStateEntry -> Bool
$c== :: UpdateRoutingControlStateEntry
-> UpdateRoutingControlStateEntry -> Bool
Prelude.Eq, ReadPrec [UpdateRoutingControlStateEntry]
ReadPrec UpdateRoutingControlStateEntry
Int -> ReadS UpdateRoutingControlStateEntry
ReadS [UpdateRoutingControlStateEntry]
(Int -> ReadS UpdateRoutingControlStateEntry)
-> ReadS [UpdateRoutingControlStateEntry]
-> ReadPrec UpdateRoutingControlStateEntry
-> ReadPrec [UpdateRoutingControlStateEntry]
-> Read UpdateRoutingControlStateEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRoutingControlStateEntry]
$creadListPrec :: ReadPrec [UpdateRoutingControlStateEntry]
readPrec :: ReadPrec UpdateRoutingControlStateEntry
$creadPrec :: ReadPrec UpdateRoutingControlStateEntry
readList :: ReadS [UpdateRoutingControlStateEntry]
$creadList :: ReadS [UpdateRoutingControlStateEntry]
readsPrec :: Int -> ReadS UpdateRoutingControlStateEntry
$creadsPrec :: Int -> ReadS UpdateRoutingControlStateEntry
Prelude.Read, Int -> UpdateRoutingControlStateEntry -> ShowS
[UpdateRoutingControlStateEntry] -> ShowS
UpdateRoutingControlStateEntry -> String
(Int -> UpdateRoutingControlStateEntry -> ShowS)
-> (UpdateRoutingControlStateEntry -> String)
-> ([UpdateRoutingControlStateEntry] -> ShowS)
-> Show UpdateRoutingControlStateEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRoutingControlStateEntry] -> ShowS
$cshowList :: [UpdateRoutingControlStateEntry] -> ShowS
show :: UpdateRoutingControlStateEntry -> String
$cshow :: UpdateRoutingControlStateEntry -> String
showsPrec :: Int -> UpdateRoutingControlStateEntry -> ShowS
$cshowsPrec :: Int -> UpdateRoutingControlStateEntry -> ShowS
Prelude.Show, (forall x.
UpdateRoutingControlStateEntry
-> Rep UpdateRoutingControlStateEntry x)
-> (forall x.
Rep UpdateRoutingControlStateEntry x
-> UpdateRoutingControlStateEntry)
-> Generic UpdateRoutingControlStateEntry
forall x.
Rep UpdateRoutingControlStateEntry x
-> UpdateRoutingControlStateEntry
forall x.
UpdateRoutingControlStateEntry
-> Rep UpdateRoutingControlStateEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateRoutingControlStateEntry x
-> UpdateRoutingControlStateEntry
$cfrom :: forall x.
UpdateRoutingControlStateEntry
-> Rep UpdateRoutingControlStateEntry x
Prelude.Generic)
newUpdateRoutingControlStateEntry ::
Prelude.Text ->
RoutingControlState ->
UpdateRoutingControlStateEntry
newUpdateRoutingControlStateEntry :: Text -> RoutingControlState -> UpdateRoutingControlStateEntry
newUpdateRoutingControlStateEntry
Text
pRoutingControlArn_
RoutingControlState
pRoutingControlState_ =
UpdateRoutingControlStateEntry' :: Text -> RoutingControlState -> UpdateRoutingControlStateEntry
UpdateRoutingControlStateEntry'
{ $sel:routingControlArn:UpdateRoutingControlStateEntry' :: Text
routingControlArn =
Text
pRoutingControlArn_,
$sel:routingControlState:UpdateRoutingControlStateEntry' :: RoutingControlState
routingControlState = RoutingControlState
pRoutingControlState_
}
updateRoutingControlStateEntry_routingControlArn :: Lens.Lens' UpdateRoutingControlStateEntry Prelude.Text
updateRoutingControlStateEntry_routingControlArn :: (Text -> f Text)
-> UpdateRoutingControlStateEntry
-> f UpdateRoutingControlStateEntry
updateRoutingControlStateEntry_routingControlArn = (UpdateRoutingControlStateEntry -> Text)
-> (UpdateRoutingControlStateEntry
-> Text -> UpdateRoutingControlStateEntry)
-> Lens
UpdateRoutingControlStateEntry
UpdateRoutingControlStateEntry
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRoutingControlStateEntry' {Text
routingControlArn :: Text
$sel:routingControlArn:UpdateRoutingControlStateEntry' :: UpdateRoutingControlStateEntry -> Text
routingControlArn} -> Text
routingControlArn) (\s :: UpdateRoutingControlStateEntry
s@UpdateRoutingControlStateEntry' {} Text
a -> UpdateRoutingControlStateEntry
s {$sel:routingControlArn:UpdateRoutingControlStateEntry' :: Text
routingControlArn = Text
a} :: UpdateRoutingControlStateEntry)
updateRoutingControlStateEntry_routingControlState :: Lens.Lens' UpdateRoutingControlStateEntry RoutingControlState
updateRoutingControlStateEntry_routingControlState :: (RoutingControlState -> f RoutingControlState)
-> UpdateRoutingControlStateEntry
-> f UpdateRoutingControlStateEntry
updateRoutingControlStateEntry_routingControlState = (UpdateRoutingControlStateEntry -> RoutingControlState)
-> (UpdateRoutingControlStateEntry
-> RoutingControlState -> UpdateRoutingControlStateEntry)
-> Lens
UpdateRoutingControlStateEntry
UpdateRoutingControlStateEntry
RoutingControlState
RoutingControlState
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRoutingControlStateEntry' {RoutingControlState
routingControlState :: RoutingControlState
$sel:routingControlState:UpdateRoutingControlStateEntry' :: UpdateRoutingControlStateEntry -> RoutingControlState
routingControlState} -> RoutingControlState
routingControlState) (\s :: UpdateRoutingControlStateEntry
s@UpdateRoutingControlStateEntry' {} RoutingControlState
a -> UpdateRoutingControlStateEntry
s {$sel:routingControlState:UpdateRoutingControlStateEntry' :: RoutingControlState
routingControlState = RoutingControlState
a} :: UpdateRoutingControlStateEntry)
instance
Prelude.Hashable
UpdateRoutingControlStateEntry
instance
Prelude.NFData
UpdateRoutingControlStateEntry
instance Core.ToJSON UpdateRoutingControlStateEntry where
toJSON :: UpdateRoutingControlStateEntry -> Value
toJSON UpdateRoutingControlStateEntry' {Text
RoutingControlState
routingControlState :: RoutingControlState
routingControlArn :: Text
$sel:routingControlState:UpdateRoutingControlStateEntry' :: UpdateRoutingControlStateEntry -> RoutingControlState
$sel:routingControlArn:UpdateRoutingControlStateEntry' :: UpdateRoutingControlStateEntry -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"RoutingControlArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
routingControlArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"RoutingControlState" Text -> RoutingControlState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= RoutingControlState
routingControlState)
]
)