{-# 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.Route53RecoveryControlConfig.Types.ControlPanel where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53RecoveryControlConfig.Types.Status
data ControlPanel = ControlPanel'
{
ControlPanel -> Maybe Status
status :: Prelude.Maybe Status,
ControlPanel -> Maybe Text
controlPanelArn :: Prelude.Maybe Prelude.Text,
ControlPanel -> Maybe Text
clusterArn :: Prelude.Maybe Prelude.Text,
ControlPanel -> Maybe Int
routingControlCount :: Prelude.Maybe Prelude.Int,
ControlPanel -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ControlPanel -> Maybe Bool
defaultControlPanel :: Prelude.Maybe Prelude.Bool
}
deriving (ControlPanel -> ControlPanel -> Bool
(ControlPanel -> ControlPanel -> Bool)
-> (ControlPanel -> ControlPanel -> Bool) -> Eq ControlPanel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ControlPanel -> ControlPanel -> Bool
$c/= :: ControlPanel -> ControlPanel -> Bool
== :: ControlPanel -> ControlPanel -> Bool
$c== :: ControlPanel -> ControlPanel -> Bool
Prelude.Eq, ReadPrec [ControlPanel]
ReadPrec ControlPanel
Int -> ReadS ControlPanel
ReadS [ControlPanel]
(Int -> ReadS ControlPanel)
-> ReadS [ControlPanel]
-> ReadPrec ControlPanel
-> ReadPrec [ControlPanel]
-> Read ControlPanel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ControlPanel]
$creadListPrec :: ReadPrec [ControlPanel]
readPrec :: ReadPrec ControlPanel
$creadPrec :: ReadPrec ControlPanel
readList :: ReadS [ControlPanel]
$creadList :: ReadS [ControlPanel]
readsPrec :: Int -> ReadS ControlPanel
$creadsPrec :: Int -> ReadS ControlPanel
Prelude.Read, Int -> ControlPanel -> ShowS
[ControlPanel] -> ShowS
ControlPanel -> String
(Int -> ControlPanel -> ShowS)
-> (ControlPanel -> String)
-> ([ControlPanel] -> ShowS)
-> Show ControlPanel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ControlPanel] -> ShowS
$cshowList :: [ControlPanel] -> ShowS
show :: ControlPanel -> String
$cshow :: ControlPanel -> String
showsPrec :: Int -> ControlPanel -> ShowS
$cshowsPrec :: Int -> ControlPanel -> ShowS
Prelude.Show, (forall x. ControlPanel -> Rep ControlPanel x)
-> (forall x. Rep ControlPanel x -> ControlPanel)
-> Generic ControlPanel
forall x. Rep ControlPanel x -> ControlPanel
forall x. ControlPanel -> Rep ControlPanel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ControlPanel x -> ControlPanel
$cfrom :: forall x. ControlPanel -> Rep ControlPanel x
Prelude.Generic)
newControlPanel ::
ControlPanel
newControlPanel :: ControlPanel
newControlPanel =
ControlPanel' :: Maybe Status
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> ControlPanel
ControlPanel'
{ $sel:status:ControlPanel' :: Maybe Status
status = Maybe Status
forall a. Maybe a
Prelude.Nothing,
$sel:controlPanelArn:ControlPanel' :: Maybe Text
controlPanelArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clusterArn:ControlPanel' :: Maybe Text
clusterArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:routingControlCount:ControlPanel' :: Maybe Int
routingControlCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:name:ControlPanel' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:defaultControlPanel:ControlPanel' :: Maybe Bool
defaultControlPanel = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
controlPanel_status :: Lens.Lens' ControlPanel (Prelude.Maybe Status)
controlPanel_status :: (Maybe Status -> f (Maybe Status))
-> ControlPanel -> f ControlPanel
controlPanel_status = (ControlPanel -> Maybe Status)
-> (ControlPanel -> Maybe Status -> ControlPanel)
-> Lens ControlPanel ControlPanel (Maybe Status) (Maybe Status)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlPanel' {Maybe Status
status :: Maybe Status
$sel:status:ControlPanel' :: ControlPanel -> Maybe Status
status} -> Maybe Status
status) (\s :: ControlPanel
s@ControlPanel' {} Maybe Status
a -> ControlPanel
s {$sel:status:ControlPanel' :: Maybe Status
status = Maybe Status
a} :: ControlPanel)
controlPanel_controlPanelArn :: Lens.Lens' ControlPanel (Prelude.Maybe Prelude.Text)
controlPanel_controlPanelArn :: (Maybe Text -> f (Maybe Text)) -> ControlPanel -> f ControlPanel
controlPanel_controlPanelArn = (ControlPanel -> Maybe Text)
-> (ControlPanel -> Maybe Text -> ControlPanel)
-> Lens ControlPanel ControlPanel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlPanel' {Maybe Text
controlPanelArn :: Maybe Text
$sel:controlPanelArn:ControlPanel' :: ControlPanel -> Maybe Text
controlPanelArn} -> Maybe Text
controlPanelArn) (\s :: ControlPanel
s@ControlPanel' {} Maybe Text
a -> ControlPanel
s {$sel:controlPanelArn:ControlPanel' :: Maybe Text
controlPanelArn = Maybe Text
a} :: ControlPanel)
controlPanel_clusterArn :: Lens.Lens' ControlPanel (Prelude.Maybe Prelude.Text)
controlPanel_clusterArn :: (Maybe Text -> f (Maybe Text)) -> ControlPanel -> f ControlPanel
controlPanel_clusterArn = (ControlPanel -> Maybe Text)
-> (ControlPanel -> Maybe Text -> ControlPanel)
-> Lens ControlPanel ControlPanel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlPanel' {Maybe Text
clusterArn :: Maybe Text
$sel:clusterArn:ControlPanel' :: ControlPanel -> Maybe Text
clusterArn} -> Maybe Text
clusterArn) (\s :: ControlPanel
s@ControlPanel' {} Maybe Text
a -> ControlPanel
s {$sel:clusterArn:ControlPanel' :: Maybe Text
clusterArn = Maybe Text
a} :: ControlPanel)
controlPanel_routingControlCount :: Lens.Lens' ControlPanel (Prelude.Maybe Prelude.Int)
controlPanel_routingControlCount :: (Maybe Int -> f (Maybe Int)) -> ControlPanel -> f ControlPanel
controlPanel_routingControlCount = (ControlPanel -> Maybe Int)
-> (ControlPanel -> Maybe Int -> ControlPanel)
-> Lens ControlPanel ControlPanel (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlPanel' {Maybe Int
routingControlCount :: Maybe Int
$sel:routingControlCount:ControlPanel' :: ControlPanel -> Maybe Int
routingControlCount} -> Maybe Int
routingControlCount) (\s :: ControlPanel
s@ControlPanel' {} Maybe Int
a -> ControlPanel
s {$sel:routingControlCount:ControlPanel' :: Maybe Int
routingControlCount = Maybe Int
a} :: ControlPanel)
controlPanel_name :: Lens.Lens' ControlPanel (Prelude.Maybe Prelude.Text)
controlPanel_name :: (Maybe Text -> f (Maybe Text)) -> ControlPanel -> f ControlPanel
controlPanel_name = (ControlPanel -> Maybe Text)
-> (ControlPanel -> Maybe Text -> ControlPanel)
-> Lens ControlPanel ControlPanel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlPanel' {Maybe Text
name :: Maybe Text
$sel:name:ControlPanel' :: ControlPanel -> Maybe Text
name} -> Maybe Text
name) (\s :: ControlPanel
s@ControlPanel' {} Maybe Text
a -> ControlPanel
s {$sel:name:ControlPanel' :: Maybe Text
name = Maybe Text
a} :: ControlPanel)
controlPanel_defaultControlPanel :: Lens.Lens' ControlPanel (Prelude.Maybe Prelude.Bool)
controlPanel_defaultControlPanel :: (Maybe Bool -> f (Maybe Bool)) -> ControlPanel -> f ControlPanel
controlPanel_defaultControlPanel = (ControlPanel -> Maybe Bool)
-> (ControlPanel -> Maybe Bool -> ControlPanel)
-> Lens ControlPanel ControlPanel (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ControlPanel' {Maybe Bool
defaultControlPanel :: Maybe Bool
$sel:defaultControlPanel:ControlPanel' :: ControlPanel -> Maybe Bool
defaultControlPanel} -> Maybe Bool
defaultControlPanel) (\s :: ControlPanel
s@ControlPanel' {} Maybe Bool
a -> ControlPanel
s {$sel:defaultControlPanel:ControlPanel' :: Maybe Bool
defaultControlPanel = Maybe Bool
a} :: ControlPanel)
instance Core.FromJSON ControlPanel where
parseJSON :: Value -> Parser ControlPanel
parseJSON =
String
-> (Object -> Parser ControlPanel) -> Value -> Parser ControlPanel
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ControlPanel"
( \Object
x ->
Maybe Status
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> ControlPanel
ControlPanel'
(Maybe Status
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> ControlPanel)
-> Parser (Maybe Status)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> ControlPanel)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Status)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> ControlPanel)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Int -> Maybe Text -> Maybe Bool -> ControlPanel)
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
"ControlPanelArn")
Parser
(Maybe Text
-> Maybe Int -> Maybe Text -> Maybe Bool -> ControlPanel)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> Maybe Text -> Maybe Bool -> ControlPanel)
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
"ClusterArn")
Parser (Maybe Int -> Maybe Text -> Maybe Bool -> ControlPanel)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> Maybe Bool -> ControlPanel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RoutingControlCount")
Parser (Maybe Text -> Maybe Bool -> ControlPanel)
-> Parser (Maybe Text) -> Parser (Maybe Bool -> ControlPanel)
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")
Parser (Maybe Bool -> ControlPanel)
-> Parser (Maybe Bool) -> Parser ControlPanel
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultControlPanel")
)
instance Prelude.Hashable ControlPanel
instance Prelude.NFData ControlPanel