{-# 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.CloudHSMV2.Types.Cluster where
import Amazonka.CloudHSMV2.Types.BackupPolicy
import Amazonka.CloudHSMV2.Types.BackupRetentionPolicy
import Amazonka.CloudHSMV2.Types.Certificates
import Amazonka.CloudHSMV2.Types.ClusterState
import Amazonka.CloudHSMV2.Types.Hsm
import Amazonka.CloudHSMV2.Types.Tag
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Cluster = Cluster'
{
Cluster -> Maybe Text
preCoPassword :: Prelude.Maybe Prelude.Text,
Cluster -> Maybe Text
stateMessage :: Prelude.Maybe Prelude.Text,
Cluster -> Maybe ClusterState
state :: Prelude.Maybe ClusterState,
Cluster -> Maybe (HashMap Text Text)
subnetMapping :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Cluster -> Maybe BackupRetentionPolicy
backupRetentionPolicy :: Prelude.Maybe BackupRetentionPolicy,
Cluster -> Maybe [Hsm]
hsms :: Prelude.Maybe [Hsm],
Cluster -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
Cluster -> Maybe [Tag]
tagList :: Prelude.Maybe [Tag],
Cluster -> Maybe Text
sourceBackupId :: Prelude.Maybe Prelude.Text,
Cluster -> Maybe Certificates
certificates :: Prelude.Maybe Certificates,
Cluster -> Maybe Text
securityGroup :: Prelude.Maybe Prelude.Text,
Cluster -> Maybe Text
clusterId :: Prelude.Maybe Prelude.Text,
Cluster -> Maybe POSIX
createTimestamp :: Prelude.Maybe Core.POSIX,
Cluster -> Maybe BackupPolicy
backupPolicy :: Prelude.Maybe BackupPolicy,
Cluster -> Maybe Text
hsmType :: Prelude.Maybe Prelude.Text
}
deriving (Cluster -> Cluster -> Bool
(Cluster -> Cluster -> Bool)
-> (Cluster -> Cluster -> Bool) -> Eq Cluster
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]
(Int -> ReadS Cluster)
-> ReadS [Cluster]
-> ReadPrec Cluster
-> ReadPrec [Cluster]
-> Read 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
(Int -> Cluster -> ShowS)
-> (Cluster -> String) -> ([Cluster] -> ShowS) -> Show Cluster
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. Cluster -> Rep Cluster x)
-> (forall x. Rep Cluster x -> Cluster) -> Generic Cluster
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 ::
Cluster
newCluster :: Cluster
newCluster =
Cluster' :: Maybe Text
-> Maybe Text
-> Maybe ClusterState
-> Maybe (HashMap Text Text)
-> Maybe BackupRetentionPolicy
-> Maybe [Hsm]
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster
Cluster'
{ $sel:preCoPassword:Cluster' :: Maybe Text
preCoPassword = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:stateMessage:Cluster' :: Maybe Text
stateMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:state:Cluster' :: Maybe ClusterState
state = Maybe ClusterState
forall a. Maybe a
Prelude.Nothing,
$sel:subnetMapping:Cluster' :: Maybe (HashMap Text Text)
subnetMapping = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:backupRetentionPolicy:Cluster' :: Maybe BackupRetentionPolicy
backupRetentionPolicy = Maybe BackupRetentionPolicy
forall a. Maybe a
Prelude.Nothing,
$sel:hsms:Cluster' :: Maybe [Hsm]
hsms = Maybe [Hsm]
forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:Cluster' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tagList:Cluster' :: Maybe [Tag]
tagList = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:sourceBackupId:Cluster' :: Maybe Text
sourceBackupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:certificates:Cluster' :: Maybe Certificates
certificates = Maybe Certificates
forall a. Maybe a
Prelude.Nothing,
$sel:securityGroup:Cluster' :: Maybe Text
securityGroup = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clusterId:Cluster' :: Maybe Text
clusterId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createTimestamp:Cluster' :: Maybe POSIX
createTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:backupPolicy:Cluster' :: Maybe BackupPolicy
backupPolicy = Maybe BackupPolicy
forall a. Maybe a
Prelude.Nothing,
$sel:hsmType:Cluster' :: Maybe Text
hsmType = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
cluster_preCoPassword :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_preCoPassword :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_preCoPassword = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
preCoPassword :: Maybe Text
$sel:preCoPassword:Cluster' :: Cluster -> Maybe Text
preCoPassword} -> Maybe Text
preCoPassword) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:preCoPassword:Cluster' :: Maybe Text
preCoPassword = Maybe Text
a} :: Cluster)
cluster_stateMessage :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_stateMessage :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_stateMessage = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
stateMessage :: Maybe Text
$sel:stateMessage:Cluster' :: Cluster -> Maybe Text
stateMessage} -> Maybe Text
stateMessage) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:stateMessage:Cluster' :: Maybe Text
stateMessage = Maybe Text
a} :: Cluster)
cluster_state :: Lens.Lens' Cluster (Prelude.Maybe ClusterState)
cluster_state :: (Maybe ClusterState -> f (Maybe ClusterState))
-> Cluster -> f Cluster
cluster_state = (Cluster -> Maybe ClusterState)
-> (Cluster -> Maybe ClusterState -> Cluster)
-> Lens Cluster Cluster (Maybe ClusterState) (Maybe ClusterState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe ClusterState
state :: Maybe ClusterState
$sel:state:Cluster' :: Cluster -> Maybe ClusterState
state} -> Maybe ClusterState
state) (\s :: Cluster
s@Cluster' {} Maybe ClusterState
a -> Cluster
s {$sel:state:Cluster' :: Maybe ClusterState
state = Maybe ClusterState
a} :: Cluster)
cluster_subnetMapping :: Lens.Lens' Cluster (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
cluster_subnetMapping :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Cluster -> f Cluster
cluster_subnetMapping = (Cluster -> Maybe (HashMap Text Text))
-> (Cluster -> Maybe (HashMap Text Text) -> Cluster)
-> Lens
Cluster
Cluster
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe (HashMap Text Text)
subnetMapping :: Maybe (HashMap Text Text)
$sel:subnetMapping:Cluster' :: Cluster -> Maybe (HashMap Text Text)
subnetMapping} -> Maybe (HashMap Text Text)
subnetMapping) (\s :: Cluster
s@Cluster' {} Maybe (HashMap Text Text)
a -> Cluster
s {$sel:subnetMapping:Cluster' :: Maybe (HashMap Text Text)
subnetMapping = Maybe (HashMap Text Text)
a} :: Cluster) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Cluster -> f Cluster)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Cluster
-> f Cluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
cluster_backupRetentionPolicy :: Lens.Lens' Cluster (Prelude.Maybe BackupRetentionPolicy)
cluster_backupRetentionPolicy :: (Maybe BackupRetentionPolicy -> f (Maybe BackupRetentionPolicy))
-> Cluster -> f Cluster
cluster_backupRetentionPolicy = (Cluster -> Maybe BackupRetentionPolicy)
-> (Cluster -> Maybe BackupRetentionPolicy -> Cluster)
-> Lens
Cluster
Cluster
(Maybe BackupRetentionPolicy)
(Maybe BackupRetentionPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe BackupRetentionPolicy
backupRetentionPolicy :: Maybe BackupRetentionPolicy
$sel:backupRetentionPolicy:Cluster' :: Cluster -> Maybe BackupRetentionPolicy
backupRetentionPolicy} -> Maybe BackupRetentionPolicy
backupRetentionPolicy) (\s :: Cluster
s@Cluster' {} Maybe BackupRetentionPolicy
a -> Cluster
s {$sel:backupRetentionPolicy:Cluster' :: Maybe BackupRetentionPolicy
backupRetentionPolicy = Maybe BackupRetentionPolicy
a} :: Cluster)
cluster_hsms :: Lens.Lens' Cluster (Prelude.Maybe [Hsm])
cluster_hsms :: (Maybe [Hsm] -> f (Maybe [Hsm])) -> Cluster -> f Cluster
cluster_hsms = (Cluster -> Maybe [Hsm])
-> (Cluster -> Maybe [Hsm] -> Cluster)
-> Lens Cluster Cluster (Maybe [Hsm]) (Maybe [Hsm])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe [Hsm]
hsms :: Maybe [Hsm]
$sel:hsms:Cluster' :: Cluster -> Maybe [Hsm]
hsms} -> Maybe [Hsm]
hsms) (\s :: Cluster
s@Cluster' {} Maybe [Hsm]
a -> Cluster
s {$sel:hsms:Cluster' :: Maybe [Hsm]
hsms = Maybe [Hsm]
a} :: Cluster) ((Maybe [Hsm] -> f (Maybe [Hsm])) -> Cluster -> f Cluster)
-> ((Maybe [Hsm] -> f (Maybe [Hsm]))
-> Maybe [Hsm] -> f (Maybe [Hsm]))
-> (Maybe [Hsm] -> f (Maybe [Hsm]))
-> Cluster
-> f Cluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Hsm] [Hsm] [Hsm] [Hsm]
-> Iso (Maybe [Hsm]) (Maybe [Hsm]) (Maybe [Hsm]) (Maybe [Hsm])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Hsm] [Hsm] [Hsm] [Hsm]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
cluster_vpcId :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_vpcId :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_vpcId = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:Cluster' :: Cluster -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:vpcId:Cluster' :: Maybe Text
vpcId = Maybe Text
a} :: Cluster)
cluster_tagList :: Lens.Lens' Cluster (Prelude.Maybe [Tag])
cluster_tagList :: (Maybe [Tag] -> f (Maybe [Tag])) -> Cluster -> f Cluster
cluster_tagList = (Cluster -> Maybe [Tag])
-> (Cluster -> Maybe [Tag] -> Cluster)
-> Lens Cluster Cluster (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe [Tag]
tagList :: Maybe [Tag]
$sel:tagList:Cluster' :: Cluster -> Maybe [Tag]
tagList} -> Maybe [Tag]
tagList) (\s :: Cluster
s@Cluster' {} Maybe [Tag]
a -> Cluster
s {$sel:tagList:Cluster' :: Maybe [Tag]
tagList = Maybe [Tag]
a} :: Cluster) ((Maybe [Tag] -> f (Maybe [Tag])) -> Cluster -> f Cluster)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> Cluster
-> f Cluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
cluster_sourceBackupId :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_sourceBackupId :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_sourceBackupId = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
sourceBackupId :: Maybe Text
$sel:sourceBackupId:Cluster' :: Cluster -> Maybe Text
sourceBackupId} -> Maybe Text
sourceBackupId) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:sourceBackupId:Cluster' :: Maybe Text
sourceBackupId = Maybe Text
a} :: Cluster)
cluster_certificates :: Lens.Lens' Cluster (Prelude.Maybe Certificates)
cluster_certificates :: (Maybe Certificates -> f (Maybe Certificates))
-> Cluster -> f Cluster
cluster_certificates = (Cluster -> Maybe Certificates)
-> (Cluster -> Maybe Certificates -> Cluster)
-> Lens Cluster Cluster (Maybe Certificates) (Maybe Certificates)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Certificates
certificates :: Maybe Certificates
$sel:certificates:Cluster' :: Cluster -> Maybe Certificates
certificates} -> Maybe Certificates
certificates) (\s :: Cluster
s@Cluster' {} Maybe Certificates
a -> Cluster
s {$sel:certificates:Cluster' :: Maybe Certificates
certificates = Maybe Certificates
a} :: Cluster)
cluster_securityGroup :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_securityGroup :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_securityGroup = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
securityGroup :: Maybe Text
$sel:securityGroup:Cluster' :: Cluster -> Maybe Text
securityGroup} -> Maybe Text
securityGroup) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:securityGroup:Cluster' :: Maybe Text
securityGroup = Maybe Text
a} :: Cluster)
cluster_clusterId :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_clusterId :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_clusterId = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
clusterId :: Maybe Text
$sel:clusterId:Cluster' :: Cluster -> Maybe Text
clusterId} -> Maybe Text
clusterId) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:clusterId:Cluster' :: Maybe Text
clusterId = Maybe Text
a} :: Cluster)
cluster_createTimestamp :: Lens.Lens' Cluster (Prelude.Maybe Prelude.UTCTime)
cluster_createTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Cluster -> f Cluster
cluster_createTimestamp = (Cluster -> Maybe POSIX)
-> (Cluster -> Maybe POSIX -> Cluster)
-> Lens Cluster Cluster (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe POSIX
createTimestamp :: Maybe POSIX
$sel:createTimestamp:Cluster' :: Cluster -> Maybe POSIX
createTimestamp} -> Maybe POSIX
createTimestamp) (\s :: Cluster
s@Cluster' {} Maybe POSIX
a -> Cluster
s {$sel:createTimestamp:Cluster' :: Maybe POSIX
createTimestamp = Maybe POSIX
a} :: Cluster) ((Maybe POSIX -> f (Maybe POSIX)) -> Cluster -> f Cluster)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Cluster
-> f Cluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
cluster_backupPolicy :: Lens.Lens' Cluster (Prelude.Maybe BackupPolicy)
cluster_backupPolicy :: (Maybe BackupPolicy -> f (Maybe BackupPolicy))
-> Cluster -> f Cluster
cluster_backupPolicy = (Cluster -> Maybe BackupPolicy)
-> (Cluster -> Maybe BackupPolicy -> Cluster)
-> Lens Cluster Cluster (Maybe BackupPolicy) (Maybe BackupPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe BackupPolicy
backupPolicy :: Maybe BackupPolicy
$sel:backupPolicy:Cluster' :: Cluster -> Maybe BackupPolicy
backupPolicy} -> Maybe BackupPolicy
backupPolicy) (\s :: Cluster
s@Cluster' {} Maybe BackupPolicy
a -> Cluster
s {$sel:backupPolicy:Cluster' :: Maybe BackupPolicy
backupPolicy = Maybe BackupPolicy
a} :: Cluster)
cluster_hsmType :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_hsmType :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_hsmType = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
hsmType :: Maybe Text
$sel:hsmType:Cluster' :: Cluster -> Maybe Text
hsmType} -> Maybe Text
hsmType) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:hsmType:Cluster' :: Maybe Text
hsmType = Maybe Text
a} :: Cluster)
instance Core.FromJSON Cluster where
parseJSON :: Value -> Parser Cluster
parseJSON =
String -> (Object -> Parser Cluster) -> Value -> Parser Cluster
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Cluster"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe ClusterState
-> Maybe (HashMap Text Text)
-> Maybe BackupRetentionPolicy
-> Maybe [Hsm]
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster
Cluster'
(Maybe Text
-> Maybe Text
-> Maybe ClusterState
-> Maybe (HashMap Text Text)
-> Maybe BackupRetentionPolicy
-> Maybe [Hsm]
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe ClusterState
-> Maybe (HashMap Text Text)
-> Maybe BackupRetentionPolicy
-> Maybe [Hsm]
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
forall (f :: * -> *) a b. Functor 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
"PreCoPassword")
Parser
(Maybe Text
-> Maybe ClusterState
-> Maybe (HashMap Text Text)
-> Maybe BackupRetentionPolicy
-> Maybe [Hsm]
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
-> Parser (Maybe Text)
-> Parser
(Maybe ClusterState
-> Maybe (HashMap Text Text)
-> Maybe BackupRetentionPolicy
-> Maybe [Hsm]
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
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
"StateMessage")
Parser
(Maybe ClusterState
-> Maybe (HashMap Text Text)
-> Maybe BackupRetentionPolicy
-> Maybe [Hsm]
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
-> Parser (Maybe ClusterState)
-> Parser
(Maybe (HashMap Text Text)
-> Maybe BackupRetentionPolicy
-> Maybe [Hsm]
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ClusterState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
Parser
(Maybe (HashMap Text Text)
-> Maybe BackupRetentionPolicy
-> Maybe [Hsm]
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Maybe BackupRetentionPolicy
-> Maybe [Hsm]
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SubnetMapping" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe BackupRetentionPolicy
-> Maybe [Hsm]
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
-> Parser (Maybe BackupRetentionPolicy)
-> Parser
(Maybe [Hsm]
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BackupRetentionPolicy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BackupRetentionPolicy")
Parser
(Maybe [Hsm]
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
-> Parser (Maybe [Hsm])
-> Parser
(Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Hsm]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Hsms" Parser (Maybe (Maybe [Hsm])) -> Maybe [Hsm] -> Parser (Maybe [Hsm])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Hsm]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
-> Parser (Maybe Text)
-> Parser
(Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
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
"VpcId")
Parser
(Maybe [Tag]
-> Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
-> Parser (Maybe [Tag])
-> Parser
(Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TagList" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
-> Parser (Maybe Text)
-> Parser
(Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
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
"SourceBackupId")
Parser
(Maybe Certificates
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
-> Parser (Maybe Certificates)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Certificates)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Certificates")
Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe BackupPolicy
-> Maybe Text
-> Cluster)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX -> Maybe BackupPolicy -> Maybe Text -> Cluster)
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
"SecurityGroup")
Parser
(Maybe Text
-> Maybe POSIX -> Maybe BackupPolicy -> Maybe Text -> Cluster)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX -> Maybe BackupPolicy -> Maybe Text -> Cluster)
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
"ClusterId")
Parser (Maybe POSIX -> Maybe BackupPolicy -> Maybe Text -> Cluster)
-> Parser (Maybe POSIX)
-> Parser (Maybe BackupPolicy -> Maybe Text -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreateTimestamp")
Parser (Maybe BackupPolicy -> Maybe Text -> Cluster)
-> Parser (Maybe BackupPolicy) -> Parser (Maybe Text -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BackupPolicy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BackupPolicy")
Parser (Maybe Text -> Cluster)
-> Parser (Maybe Text) -> Parser Cluster
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
"HsmType")
)
instance Prelude.Hashable Cluster
instance Prelude.NFData Cluster