{-# 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.ClusterEndpoint 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 ClusterEndpoint = ClusterEndpoint'
{
ClusterEndpoint -> Maybe Text
endpoint :: Prelude.Maybe Prelude.Text,
ClusterEndpoint -> Maybe Text
region :: Prelude.Maybe Prelude.Text
}
deriving (ClusterEndpoint -> ClusterEndpoint -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterEndpoint -> ClusterEndpoint -> Bool
$c/= :: ClusterEndpoint -> ClusterEndpoint -> Bool
== :: ClusterEndpoint -> ClusterEndpoint -> Bool
$c== :: ClusterEndpoint -> ClusterEndpoint -> Bool
Prelude.Eq, ReadPrec [ClusterEndpoint]
ReadPrec ClusterEndpoint
Int -> ReadS ClusterEndpoint
ReadS [ClusterEndpoint]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterEndpoint]
$creadListPrec :: ReadPrec [ClusterEndpoint]
readPrec :: ReadPrec ClusterEndpoint
$creadPrec :: ReadPrec ClusterEndpoint
readList :: ReadS [ClusterEndpoint]
$creadList :: ReadS [ClusterEndpoint]
readsPrec :: Int -> ReadS ClusterEndpoint
$creadsPrec :: Int -> ReadS ClusterEndpoint
Prelude.Read, Int -> ClusterEndpoint -> ShowS
[ClusterEndpoint] -> ShowS
ClusterEndpoint -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterEndpoint] -> ShowS
$cshowList :: [ClusterEndpoint] -> ShowS
show :: ClusterEndpoint -> String
$cshow :: ClusterEndpoint -> String
showsPrec :: Int -> ClusterEndpoint -> ShowS
$cshowsPrec :: Int -> ClusterEndpoint -> ShowS
Prelude.Show, forall x. Rep ClusterEndpoint x -> ClusterEndpoint
forall x. ClusterEndpoint -> Rep ClusterEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClusterEndpoint x -> ClusterEndpoint
$cfrom :: forall x. ClusterEndpoint -> Rep ClusterEndpoint x
Prelude.Generic)
newClusterEndpoint ::
ClusterEndpoint
newClusterEndpoint :: ClusterEndpoint
newClusterEndpoint =
ClusterEndpoint'
{ $sel:endpoint:ClusterEndpoint' :: Maybe Text
endpoint = forall a. Maybe a
Prelude.Nothing,
$sel:region:ClusterEndpoint' :: Maybe Text
region = forall a. Maybe a
Prelude.Nothing
}
clusterEndpoint_endpoint :: Lens.Lens' ClusterEndpoint (Prelude.Maybe Prelude.Text)
clusterEndpoint_endpoint :: Lens' ClusterEndpoint (Maybe Text)
clusterEndpoint_endpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterEndpoint' {Maybe Text
endpoint :: Maybe Text
$sel:endpoint:ClusterEndpoint' :: ClusterEndpoint -> Maybe Text
endpoint} -> Maybe Text
endpoint) (\s :: ClusterEndpoint
s@ClusterEndpoint' {} Maybe Text
a -> ClusterEndpoint
s {$sel:endpoint:ClusterEndpoint' :: Maybe Text
endpoint = Maybe Text
a} :: ClusterEndpoint)
clusterEndpoint_region :: Lens.Lens' ClusterEndpoint (Prelude.Maybe Prelude.Text)
clusterEndpoint_region :: Lens' ClusterEndpoint (Maybe Text)
clusterEndpoint_region = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterEndpoint' {Maybe Text
region :: Maybe Text
$sel:region:ClusterEndpoint' :: ClusterEndpoint -> Maybe Text
region} -> Maybe Text
region) (\s :: ClusterEndpoint
s@ClusterEndpoint' {} Maybe Text
a -> ClusterEndpoint
s {$sel:region:ClusterEndpoint' :: Maybe Text
region = Maybe Text
a} :: ClusterEndpoint)
instance Data.FromJSON ClusterEndpoint where
parseJSON :: Value -> Parser ClusterEndpoint
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ClusterEndpoint"
( \Object
x ->
Maybe Text -> Maybe Text -> ClusterEndpoint
ClusterEndpoint'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Endpoint")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Region")
)
instance Prelude.Hashable ClusterEndpoint where
hashWithSalt :: Int -> ClusterEndpoint -> Int
hashWithSalt Int
_salt ClusterEndpoint' {Maybe Text
region :: Maybe Text
endpoint :: Maybe Text
$sel:region:ClusterEndpoint' :: ClusterEndpoint -> Maybe Text
$sel:endpoint:ClusterEndpoint' :: ClusterEndpoint -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
endpoint
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
region
instance Prelude.NFData ClusterEndpoint where
rnf :: ClusterEndpoint -> ()
rnf ClusterEndpoint' {Maybe Text
region :: Maybe Text
endpoint :: Maybe Text
$sel:region:ClusterEndpoint' :: ClusterEndpoint -> Maybe Text
$sel:endpoint:ClusterEndpoint' :: ClusterEndpoint -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
endpoint
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
region