{-# 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.DocDbElastic.Types.ClusterInList where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DocDbElastic.Types.Status
import qualified Amazonka.Prelude as Prelude
data ClusterInList = ClusterInList'
{
ClusterInList -> Text
clusterArn :: Prelude.Text,
ClusterInList -> Text
clusterName :: Prelude.Text,
ClusterInList -> Status
status :: Status
}
deriving (ClusterInList -> ClusterInList -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterInList -> ClusterInList -> Bool
$c/= :: ClusterInList -> ClusterInList -> Bool
== :: ClusterInList -> ClusterInList -> Bool
$c== :: ClusterInList -> ClusterInList -> Bool
Prelude.Eq, ReadPrec [ClusterInList]
ReadPrec ClusterInList
Int -> ReadS ClusterInList
ReadS [ClusterInList]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterInList]
$creadListPrec :: ReadPrec [ClusterInList]
readPrec :: ReadPrec ClusterInList
$creadPrec :: ReadPrec ClusterInList
readList :: ReadS [ClusterInList]
$creadList :: ReadS [ClusterInList]
readsPrec :: Int -> ReadS ClusterInList
$creadsPrec :: Int -> ReadS ClusterInList
Prelude.Read, Int -> ClusterInList -> ShowS
[ClusterInList] -> ShowS
ClusterInList -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterInList] -> ShowS
$cshowList :: [ClusterInList] -> ShowS
show :: ClusterInList -> String
$cshow :: ClusterInList -> String
showsPrec :: Int -> ClusterInList -> ShowS
$cshowsPrec :: Int -> ClusterInList -> ShowS
Prelude.Show, forall x. Rep ClusterInList x -> ClusterInList
forall x. ClusterInList -> Rep ClusterInList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClusterInList x -> ClusterInList
$cfrom :: forall x. ClusterInList -> Rep ClusterInList x
Prelude.Generic)
newClusterInList ::
Prelude.Text ->
Prelude.Text ->
Status ->
ClusterInList
newClusterInList :: Text -> Text -> Status -> ClusterInList
newClusterInList Text
pClusterArn_ Text
pClusterName_ Status
pStatus_ =
ClusterInList'
{ $sel:clusterArn:ClusterInList' :: Text
clusterArn = Text
pClusterArn_,
$sel:clusterName:ClusterInList' :: Text
clusterName = Text
pClusterName_,
$sel:status:ClusterInList' :: Status
status = Status
pStatus_
}
clusterInList_clusterArn :: Lens.Lens' ClusterInList Prelude.Text
clusterInList_clusterArn :: Lens' ClusterInList Text
clusterInList_clusterArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterInList' {Text
clusterArn :: Text
$sel:clusterArn:ClusterInList' :: ClusterInList -> Text
clusterArn} -> Text
clusterArn) (\s :: ClusterInList
s@ClusterInList' {} Text
a -> ClusterInList
s {$sel:clusterArn:ClusterInList' :: Text
clusterArn = Text
a} :: ClusterInList)
clusterInList_clusterName :: Lens.Lens' ClusterInList Prelude.Text
clusterInList_clusterName :: Lens' ClusterInList Text
clusterInList_clusterName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterInList' {Text
clusterName :: Text
$sel:clusterName:ClusterInList' :: ClusterInList -> Text
clusterName} -> Text
clusterName) (\s :: ClusterInList
s@ClusterInList' {} Text
a -> ClusterInList
s {$sel:clusterName:ClusterInList' :: Text
clusterName = Text
a} :: ClusterInList)
clusterInList_status :: Lens.Lens' ClusterInList Status
clusterInList_status :: Lens' ClusterInList Status
clusterInList_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterInList' {Status
status :: Status
$sel:status:ClusterInList' :: ClusterInList -> Status
status} -> Status
status) (\s :: ClusterInList
s@ClusterInList' {} Status
a -> ClusterInList
s {$sel:status:ClusterInList' :: Status
status = Status
a} :: ClusterInList)
instance Data.FromJSON ClusterInList where
parseJSON :: Value -> Parser ClusterInList
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ClusterInList"
( \Object
x ->
Text -> Text -> Status -> ClusterInList
ClusterInList'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"clusterArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"clusterName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"status")
)
instance Prelude.Hashable ClusterInList where
hashWithSalt :: Int -> ClusterInList -> Int
hashWithSalt Int
_salt ClusterInList' {Text
Status
status :: Status
clusterName :: Text
clusterArn :: Text
$sel:status:ClusterInList' :: ClusterInList -> Status
$sel:clusterName:ClusterInList' :: ClusterInList -> Text
$sel:clusterArn:ClusterInList' :: ClusterInList -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clusterArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clusterName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Status
status
instance Prelude.NFData ClusterInList where
rnf :: ClusterInList -> ()
rnf ClusterInList' {Text
Status
status :: Status
clusterName :: Text
clusterArn :: Text
$sel:status:ClusterInList' :: ClusterInList -> Status
$sel:clusterName:ClusterInList' :: ClusterInList -> Text
$sel:clusterArn:ClusterInList' :: ClusterInList -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
clusterArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
clusterName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Status
status