{-# 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.Cluster 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.Auth
import Amazonka.DocDbElastic.Types.Status
import qualified Amazonka.Prelude as Prelude
data Cluster = Cluster'
{
Cluster -> Text
adminUserName :: Prelude.Text,
Cluster -> Auth
authType :: Auth,
Cluster -> Text
clusterArn :: Prelude.Text,
Cluster -> Text
clusterEndpoint :: Prelude.Text,
Cluster -> Text
clusterName :: Prelude.Text,
Cluster -> Text
createTime :: Prelude.Text,
Cluster -> Text
kmsKeyId :: Prelude.Text,
Cluster -> Text
preferredMaintenanceWindow :: Prelude.Text,
Cluster -> Int
shardCapacity :: Prelude.Int,
Cluster -> Int
shardCount :: Prelude.Int,
Cluster -> Status
status :: Status,
Cluster -> [Text]
subnetIds :: [Prelude.Text],
Cluster -> [Text]
vpcSecurityGroupIds :: [Prelude.Text]
}
deriving (Cluster -> Cluster -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Cluster -> Cluster -> Bool
$c/= :: Cluster -> Cluster -> Bool
== :: Cluster -> Cluster -> Bool
$c== :: Cluster -> Cluster -> Bool
Prelude.Eq, ReadPrec [Cluster]
ReadPrec Cluster
Int -> ReadS Cluster
ReadS [Cluster]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Cluster]
$creadListPrec :: ReadPrec [Cluster]
readPrec :: ReadPrec Cluster
$creadPrec :: ReadPrec Cluster
readList :: ReadS [Cluster]
$creadList :: ReadS [Cluster]
readsPrec :: Int -> ReadS Cluster
$creadsPrec :: Int -> ReadS Cluster
Prelude.Read, Int -> Cluster -> ShowS
[Cluster] -> ShowS
Cluster -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Cluster] -> ShowS
$cshowList :: [Cluster] -> ShowS
show :: Cluster -> String
$cshow :: Cluster -> String
showsPrec :: Int -> Cluster -> ShowS
$cshowsPrec :: Int -> Cluster -> ShowS
Prelude.Show, forall x. Rep Cluster x -> Cluster
forall x. Cluster -> Rep Cluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Cluster x -> Cluster
$cfrom :: forall x. Cluster -> Rep Cluster x
Prelude.Generic)
newCluster ::
Prelude.Text ->
Auth ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Int ->
Prelude.Int ->
Status ->
Cluster
newCluster :: Text
-> Auth
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Int
-> Int
-> Status
-> Cluster
newCluster
Text
pAdminUserName_
Auth
pAuthType_
Text
pClusterArn_
Text
pClusterEndpoint_
Text
pClusterName_
Text
pCreateTime_
Text
pKmsKeyId_
Text
pPreferredMaintenanceWindow_
Int
pShardCapacity_
Int
pShardCount_
Status
pStatus_ =
Cluster'
{ $sel:adminUserName:Cluster' :: Text
adminUserName = Text
pAdminUserName_,
$sel:authType:Cluster' :: Auth
authType = Auth
pAuthType_,
$sel:clusterArn:Cluster' :: Text
clusterArn = Text
pClusterArn_,
$sel:clusterEndpoint:Cluster' :: Text
clusterEndpoint = Text
pClusterEndpoint_,
$sel:clusterName:Cluster' :: Text
clusterName = Text
pClusterName_,
$sel:createTime:Cluster' :: Text
createTime = Text
pCreateTime_,
$sel:kmsKeyId:Cluster' :: Text
kmsKeyId = Text
pKmsKeyId_,
$sel:preferredMaintenanceWindow:Cluster' :: Text
preferredMaintenanceWindow =
Text
pPreferredMaintenanceWindow_,
$sel:shardCapacity:Cluster' :: Int
shardCapacity = Int
pShardCapacity_,
$sel:shardCount:Cluster' :: Int
shardCount = Int
pShardCount_,
$sel:status:Cluster' :: Status
status = Status
pStatus_,
$sel:subnetIds:Cluster' :: [Text]
subnetIds = forall a. Monoid a => a
Prelude.mempty,
$sel:vpcSecurityGroupIds:Cluster' :: [Text]
vpcSecurityGroupIds = forall a. Monoid a => a
Prelude.mempty
}
cluster_adminUserName :: Lens.Lens' Cluster Prelude.Text
cluster_adminUserName :: Lens' Cluster Text
cluster_adminUserName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Text
adminUserName :: Text
$sel:adminUserName:Cluster' :: Cluster -> Text
adminUserName} -> Text
adminUserName) (\s :: Cluster
s@Cluster' {} Text
a -> Cluster
s {$sel:adminUserName:Cluster' :: Text
adminUserName = Text
a} :: Cluster)
cluster_authType :: Lens.Lens' Cluster Auth
cluster_authType :: Lens' Cluster Auth
cluster_authType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Auth
authType :: Auth
$sel:authType:Cluster' :: Cluster -> Auth
authType} -> Auth
authType) (\s :: Cluster
s@Cluster' {} Auth
a -> Cluster
s {$sel:authType:Cluster' :: Auth
authType = Auth
a} :: Cluster)
cluster_clusterArn :: Lens.Lens' Cluster Prelude.Text
cluster_clusterArn :: Lens' Cluster Text
cluster_clusterArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Text
clusterArn :: Text
$sel:clusterArn:Cluster' :: Cluster -> Text
clusterArn} -> Text
clusterArn) (\s :: Cluster
s@Cluster' {} Text
a -> Cluster
s {$sel:clusterArn:Cluster' :: Text
clusterArn = Text
a} :: Cluster)
cluster_clusterEndpoint :: Lens.Lens' Cluster Prelude.Text
cluster_clusterEndpoint :: Lens' Cluster Text
cluster_clusterEndpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Text
clusterEndpoint :: Text
$sel:clusterEndpoint:Cluster' :: Cluster -> Text
clusterEndpoint} -> Text
clusterEndpoint) (\s :: Cluster
s@Cluster' {} Text
a -> Cluster
s {$sel:clusterEndpoint:Cluster' :: Text
clusterEndpoint = Text
a} :: Cluster)
cluster_clusterName :: Lens.Lens' Cluster Prelude.Text
cluster_clusterName :: Lens' Cluster Text
cluster_clusterName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Text
clusterName :: Text
$sel:clusterName:Cluster' :: Cluster -> Text
clusterName} -> Text
clusterName) (\s :: Cluster
s@Cluster' {} Text
a -> Cluster
s {$sel:clusterName:Cluster' :: Text
clusterName = Text
a} :: Cluster)
cluster_createTime :: Lens.Lens' Cluster Prelude.Text
cluster_createTime :: Lens' Cluster Text
cluster_createTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Text
createTime :: Text
$sel:createTime:Cluster' :: Cluster -> Text
createTime} -> Text
createTime) (\s :: Cluster
s@Cluster' {} Text
a -> Cluster
s {$sel:createTime:Cluster' :: Text
createTime = Text
a} :: Cluster)
cluster_kmsKeyId :: Lens.Lens' Cluster Prelude.Text
cluster_kmsKeyId :: Lens' Cluster Text
cluster_kmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Text
kmsKeyId :: Text
$sel:kmsKeyId:Cluster' :: Cluster -> Text
kmsKeyId} -> Text
kmsKeyId) (\s :: Cluster
s@Cluster' {} Text
a -> Cluster
s {$sel:kmsKeyId:Cluster' :: Text
kmsKeyId = Text
a} :: Cluster)
cluster_preferredMaintenanceWindow :: Lens.Lens' Cluster Prelude.Text
cluster_preferredMaintenanceWindow :: Lens' Cluster Text
cluster_preferredMaintenanceWindow = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Text
preferredMaintenanceWindow :: Text
$sel:preferredMaintenanceWindow:Cluster' :: Cluster -> Text
preferredMaintenanceWindow} -> Text
preferredMaintenanceWindow) (\s :: Cluster
s@Cluster' {} Text
a -> Cluster
s {$sel:preferredMaintenanceWindow:Cluster' :: Text
preferredMaintenanceWindow = Text
a} :: Cluster)
cluster_shardCapacity :: Lens.Lens' Cluster Prelude.Int
cluster_shardCapacity :: Lens' Cluster Int
cluster_shardCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Int
shardCapacity :: Int
$sel:shardCapacity:Cluster' :: Cluster -> Int
shardCapacity} -> Int
shardCapacity) (\s :: Cluster
s@Cluster' {} Int
a -> Cluster
s {$sel:shardCapacity:Cluster' :: Int
shardCapacity = Int
a} :: Cluster)
cluster_shardCount :: Lens.Lens' Cluster Prelude.Int
cluster_shardCount :: Lens' Cluster Int
cluster_shardCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Int
shardCount :: Int
$sel:shardCount:Cluster' :: Cluster -> Int
shardCount} -> Int
shardCount) (\s :: Cluster
s@Cluster' {} Int
a -> Cluster
s {$sel:shardCount:Cluster' :: Int
shardCount = Int
a} :: Cluster)
cluster_status :: Lens.Lens' Cluster Status
cluster_status :: Lens' Cluster Status
cluster_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Status
status :: Status
$sel:status:Cluster' :: Cluster -> Status
status} -> Status
status) (\s :: Cluster
s@Cluster' {} Status
a -> Cluster
s {$sel:status:Cluster' :: Status
status = Status
a} :: Cluster)
cluster_subnetIds :: Lens.Lens' Cluster [Prelude.Text]
cluster_subnetIds :: Lens' Cluster [Text]
cluster_subnetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {[Text]
subnetIds :: [Text]
$sel:subnetIds:Cluster' :: Cluster -> [Text]
subnetIds} -> [Text]
subnetIds) (\s :: Cluster
s@Cluster' {} [Text]
a -> Cluster
s {$sel:subnetIds:Cluster' :: [Text]
subnetIds = [Text]
a} :: Cluster) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
cluster_vpcSecurityGroupIds :: Lens.Lens' Cluster [Prelude.Text]
cluster_vpcSecurityGroupIds :: Lens' Cluster [Text]
cluster_vpcSecurityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {[Text]
vpcSecurityGroupIds :: [Text]
$sel:vpcSecurityGroupIds:Cluster' :: Cluster -> [Text]
vpcSecurityGroupIds} -> [Text]
vpcSecurityGroupIds) (\s :: Cluster
s@Cluster' {} [Text]
a -> Cluster
s {$sel:vpcSecurityGroupIds:Cluster' :: [Text]
vpcSecurityGroupIds = [Text]
a} :: Cluster) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON Cluster where
parseJSON :: Value -> Parser Cluster
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Cluster"
( \Object
x ->
Text
-> Auth
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Int
-> Int
-> Status
-> [Text]
-> [Text]
-> Cluster
Cluster'
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
"adminUserName")
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
"authType")
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
"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
"clusterEndpoint")
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
"createTime")
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
"kmsKeyId")
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
"preferredMaintenanceWindow")
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
"shardCapacity")
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
"shardCount")
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")
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
"subnetIds" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"vpcSecurityGroupIds"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable Cluster where
hashWithSalt :: Int -> Cluster -> Int
hashWithSalt Int
_salt Cluster' {Int
[Text]
Text
Auth
Status
vpcSecurityGroupIds :: [Text]
subnetIds :: [Text]
status :: Status
shardCount :: Int
shardCapacity :: Int
preferredMaintenanceWindow :: Text
kmsKeyId :: Text
createTime :: Text
clusterName :: Text
clusterEndpoint :: Text
clusterArn :: Text
authType :: Auth
adminUserName :: Text
$sel:vpcSecurityGroupIds:Cluster' :: Cluster -> [Text]
$sel:subnetIds:Cluster' :: Cluster -> [Text]
$sel:status:Cluster' :: Cluster -> Status
$sel:shardCount:Cluster' :: Cluster -> Int
$sel:shardCapacity:Cluster' :: Cluster -> Int
$sel:preferredMaintenanceWindow:Cluster' :: Cluster -> Text
$sel:kmsKeyId:Cluster' :: Cluster -> Text
$sel:createTime:Cluster' :: Cluster -> Text
$sel:clusterName:Cluster' :: Cluster -> Text
$sel:clusterEndpoint:Cluster' :: Cluster -> Text
$sel:clusterArn:Cluster' :: Cluster -> Text
$sel:authType:Cluster' :: Cluster -> Auth
$sel:adminUserName:Cluster' :: Cluster -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
adminUserName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Auth
authType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clusterArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clusterEndpoint
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clusterName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
createTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
kmsKeyId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
preferredMaintenanceWindow
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
shardCapacity
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
shardCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Status
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
subnetIds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
vpcSecurityGroupIds
instance Prelude.NFData Cluster where
rnf :: Cluster -> ()
rnf Cluster' {Int
[Text]
Text
Auth
Status
vpcSecurityGroupIds :: [Text]
subnetIds :: [Text]
status :: Status
shardCount :: Int
shardCapacity :: Int
preferredMaintenanceWindow :: Text
kmsKeyId :: Text
createTime :: Text
clusterName :: Text
clusterEndpoint :: Text
clusterArn :: Text
authType :: Auth
adminUserName :: Text
$sel:vpcSecurityGroupIds:Cluster' :: Cluster -> [Text]
$sel:subnetIds:Cluster' :: Cluster -> [Text]
$sel:status:Cluster' :: Cluster -> Status
$sel:shardCount:Cluster' :: Cluster -> Int
$sel:shardCapacity:Cluster' :: Cluster -> Int
$sel:preferredMaintenanceWindow:Cluster' :: Cluster -> Text
$sel:kmsKeyId:Cluster' :: Cluster -> Text
$sel:createTime:Cluster' :: Cluster -> Text
$sel:clusterName:Cluster' :: Cluster -> Text
$sel:clusterEndpoint:Cluster' :: Cluster -> Text
$sel:clusterArn:Cluster' :: Cluster -> Text
$sel:authType:Cluster' :: Cluster -> Auth
$sel:adminUserName:Cluster' :: Cluster -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
adminUserName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Auth
authType
seq :: forall a b. a -> b -> b
`Prelude.seq` 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
clusterEndpoint
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 Text
createTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
kmsKeyId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
preferredMaintenanceWindow
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
shardCapacity
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
shardCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Status
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
subnetIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
vpcSecurityGroupIds