{-# 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.ClusterSnapshot 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 ClusterSnapshot = ClusterSnapshot'
{
ClusterSnapshot -> Text
adminUserName :: Prelude.Text,
ClusterSnapshot -> Text
clusterArn :: Prelude.Text,
ClusterSnapshot -> Text
clusterCreationTime :: Prelude.Text,
ClusterSnapshot -> Text
kmsKeyId :: Prelude.Text,
ClusterSnapshot -> Text
snapshotArn :: Prelude.Text,
ClusterSnapshot -> Text
snapshotCreationTime :: Prelude.Text,
ClusterSnapshot -> Text
snapshotName :: Prelude.Text,
ClusterSnapshot -> Status
status :: Status,
ClusterSnapshot -> [Text]
subnetIds :: [Prelude.Text],
ClusterSnapshot -> [Text]
vpcSecurityGroupIds :: [Prelude.Text]
}
deriving (ClusterSnapshot -> ClusterSnapshot -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterSnapshot -> ClusterSnapshot -> Bool
$c/= :: ClusterSnapshot -> ClusterSnapshot -> Bool
== :: ClusterSnapshot -> ClusterSnapshot -> Bool
$c== :: ClusterSnapshot -> ClusterSnapshot -> Bool
Prelude.Eq, ReadPrec [ClusterSnapshot]
ReadPrec ClusterSnapshot
Int -> ReadS ClusterSnapshot
ReadS [ClusterSnapshot]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterSnapshot]
$creadListPrec :: ReadPrec [ClusterSnapshot]
readPrec :: ReadPrec ClusterSnapshot
$creadPrec :: ReadPrec ClusterSnapshot
readList :: ReadS [ClusterSnapshot]
$creadList :: ReadS [ClusterSnapshot]
readsPrec :: Int -> ReadS ClusterSnapshot
$creadsPrec :: Int -> ReadS ClusterSnapshot
Prelude.Read, Int -> ClusterSnapshot -> ShowS
[ClusterSnapshot] -> ShowS
ClusterSnapshot -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterSnapshot] -> ShowS
$cshowList :: [ClusterSnapshot] -> ShowS
show :: ClusterSnapshot -> String
$cshow :: ClusterSnapshot -> String
showsPrec :: Int -> ClusterSnapshot -> ShowS
$cshowsPrec :: Int -> ClusterSnapshot -> ShowS
Prelude.Show, forall x. Rep ClusterSnapshot x -> ClusterSnapshot
forall x. ClusterSnapshot -> Rep ClusterSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClusterSnapshot x -> ClusterSnapshot
$cfrom :: forall x. ClusterSnapshot -> Rep ClusterSnapshot x
Prelude.Generic)
newClusterSnapshot ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Status ->
ClusterSnapshot
newClusterSnapshot :: Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Status
-> ClusterSnapshot
newClusterSnapshot
Text
pAdminUserName_
Text
pClusterArn_
Text
pClusterCreationTime_
Text
pKmsKeyId_
Text
pSnapshotArn_
Text
pSnapshotCreationTime_
Text
pSnapshotName_
Status
pStatus_ =
ClusterSnapshot'
{ $sel:adminUserName:ClusterSnapshot' :: Text
adminUserName = Text
pAdminUserName_,
$sel:clusterArn:ClusterSnapshot' :: Text
clusterArn = Text
pClusterArn_,
$sel:clusterCreationTime:ClusterSnapshot' :: Text
clusterCreationTime = Text
pClusterCreationTime_,
$sel:kmsKeyId:ClusterSnapshot' :: Text
kmsKeyId = Text
pKmsKeyId_,
$sel:snapshotArn:ClusterSnapshot' :: Text
snapshotArn = Text
pSnapshotArn_,
$sel:snapshotCreationTime:ClusterSnapshot' :: Text
snapshotCreationTime = Text
pSnapshotCreationTime_,
$sel:snapshotName:ClusterSnapshot' :: Text
snapshotName = Text
pSnapshotName_,
$sel:status:ClusterSnapshot' :: Status
status = Status
pStatus_,
$sel:subnetIds:ClusterSnapshot' :: [Text]
subnetIds = forall a. Monoid a => a
Prelude.mempty,
$sel:vpcSecurityGroupIds:ClusterSnapshot' :: [Text]
vpcSecurityGroupIds = forall a. Monoid a => a
Prelude.mempty
}
clusterSnapshot_adminUserName :: Lens.Lens' ClusterSnapshot Prelude.Text
clusterSnapshot_adminUserName :: Lens' ClusterSnapshot Text
clusterSnapshot_adminUserName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSnapshot' {Text
adminUserName :: Text
$sel:adminUserName:ClusterSnapshot' :: ClusterSnapshot -> Text
adminUserName} -> Text
adminUserName) (\s :: ClusterSnapshot
s@ClusterSnapshot' {} Text
a -> ClusterSnapshot
s {$sel:adminUserName:ClusterSnapshot' :: Text
adminUserName = Text
a} :: ClusterSnapshot)
clusterSnapshot_clusterArn :: Lens.Lens' ClusterSnapshot Prelude.Text
clusterSnapshot_clusterArn :: Lens' ClusterSnapshot Text
clusterSnapshot_clusterArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSnapshot' {Text
clusterArn :: Text
$sel:clusterArn:ClusterSnapshot' :: ClusterSnapshot -> Text
clusterArn} -> Text
clusterArn) (\s :: ClusterSnapshot
s@ClusterSnapshot' {} Text
a -> ClusterSnapshot
s {$sel:clusterArn:ClusterSnapshot' :: Text
clusterArn = Text
a} :: ClusterSnapshot)
clusterSnapshot_clusterCreationTime :: Lens.Lens' ClusterSnapshot Prelude.Text
clusterSnapshot_clusterCreationTime :: Lens' ClusterSnapshot Text
clusterSnapshot_clusterCreationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSnapshot' {Text
clusterCreationTime :: Text
$sel:clusterCreationTime:ClusterSnapshot' :: ClusterSnapshot -> Text
clusterCreationTime} -> Text
clusterCreationTime) (\s :: ClusterSnapshot
s@ClusterSnapshot' {} Text
a -> ClusterSnapshot
s {$sel:clusterCreationTime:ClusterSnapshot' :: Text
clusterCreationTime = Text
a} :: ClusterSnapshot)
clusterSnapshot_kmsKeyId :: Lens.Lens' ClusterSnapshot Prelude.Text
clusterSnapshot_kmsKeyId :: Lens' ClusterSnapshot Text
clusterSnapshot_kmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSnapshot' {Text
kmsKeyId :: Text
$sel:kmsKeyId:ClusterSnapshot' :: ClusterSnapshot -> Text
kmsKeyId} -> Text
kmsKeyId) (\s :: ClusterSnapshot
s@ClusterSnapshot' {} Text
a -> ClusterSnapshot
s {$sel:kmsKeyId:ClusterSnapshot' :: Text
kmsKeyId = Text
a} :: ClusterSnapshot)
clusterSnapshot_snapshotArn :: Lens.Lens' ClusterSnapshot Prelude.Text
clusterSnapshot_snapshotArn :: Lens' ClusterSnapshot Text
clusterSnapshot_snapshotArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSnapshot' {Text
snapshotArn :: Text
$sel:snapshotArn:ClusterSnapshot' :: ClusterSnapshot -> Text
snapshotArn} -> Text
snapshotArn) (\s :: ClusterSnapshot
s@ClusterSnapshot' {} Text
a -> ClusterSnapshot
s {$sel:snapshotArn:ClusterSnapshot' :: Text
snapshotArn = Text
a} :: ClusterSnapshot)
clusterSnapshot_snapshotCreationTime :: Lens.Lens' ClusterSnapshot Prelude.Text
clusterSnapshot_snapshotCreationTime :: Lens' ClusterSnapshot Text
clusterSnapshot_snapshotCreationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSnapshot' {Text
snapshotCreationTime :: Text
$sel:snapshotCreationTime:ClusterSnapshot' :: ClusterSnapshot -> Text
snapshotCreationTime} -> Text
snapshotCreationTime) (\s :: ClusterSnapshot
s@ClusterSnapshot' {} Text
a -> ClusterSnapshot
s {$sel:snapshotCreationTime:ClusterSnapshot' :: Text
snapshotCreationTime = Text
a} :: ClusterSnapshot)
clusterSnapshot_snapshotName :: Lens.Lens' ClusterSnapshot Prelude.Text
clusterSnapshot_snapshotName :: Lens' ClusterSnapshot Text
clusterSnapshot_snapshotName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSnapshot' {Text
snapshotName :: Text
$sel:snapshotName:ClusterSnapshot' :: ClusterSnapshot -> Text
snapshotName} -> Text
snapshotName) (\s :: ClusterSnapshot
s@ClusterSnapshot' {} Text
a -> ClusterSnapshot
s {$sel:snapshotName:ClusterSnapshot' :: Text
snapshotName = Text
a} :: ClusterSnapshot)
clusterSnapshot_status :: Lens.Lens' ClusterSnapshot Status
clusterSnapshot_status :: Lens' ClusterSnapshot Status
clusterSnapshot_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSnapshot' {Status
status :: Status
$sel:status:ClusterSnapshot' :: ClusterSnapshot -> Status
status} -> Status
status) (\s :: ClusterSnapshot
s@ClusterSnapshot' {} Status
a -> ClusterSnapshot
s {$sel:status:ClusterSnapshot' :: Status
status = Status
a} :: ClusterSnapshot)
clusterSnapshot_subnetIds :: Lens.Lens' ClusterSnapshot [Prelude.Text]
clusterSnapshot_subnetIds :: Lens' ClusterSnapshot [Text]
clusterSnapshot_subnetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSnapshot' {[Text]
subnetIds :: [Text]
$sel:subnetIds:ClusterSnapshot' :: ClusterSnapshot -> [Text]
subnetIds} -> [Text]
subnetIds) (\s :: ClusterSnapshot
s@ClusterSnapshot' {} [Text]
a -> ClusterSnapshot
s {$sel:subnetIds:ClusterSnapshot' :: [Text]
subnetIds = [Text]
a} :: ClusterSnapshot) 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
clusterSnapshot_vpcSecurityGroupIds :: Lens.Lens' ClusterSnapshot [Prelude.Text]
clusterSnapshot_vpcSecurityGroupIds :: Lens' ClusterSnapshot [Text]
clusterSnapshot_vpcSecurityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSnapshot' {[Text]
vpcSecurityGroupIds :: [Text]
$sel:vpcSecurityGroupIds:ClusterSnapshot' :: ClusterSnapshot -> [Text]
vpcSecurityGroupIds} -> [Text]
vpcSecurityGroupIds) (\s :: ClusterSnapshot
s@ClusterSnapshot' {} [Text]
a -> ClusterSnapshot
s {$sel:vpcSecurityGroupIds:ClusterSnapshot' :: [Text]
vpcSecurityGroupIds = [Text]
a} :: ClusterSnapshot) 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 ClusterSnapshot where
parseJSON :: Value -> Parser ClusterSnapshot
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ClusterSnapshot"
( \Object
x ->
Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Status
-> [Text]
-> [Text]
-> ClusterSnapshot
ClusterSnapshot'
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
"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
"clusterCreationTime")
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
"snapshotArn")
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
"snapshotCreationTime")
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
"snapshotName")
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 ClusterSnapshot where
hashWithSalt :: Int -> ClusterSnapshot -> Int
hashWithSalt Int
_salt ClusterSnapshot' {[Text]
Text
Status
vpcSecurityGroupIds :: [Text]
subnetIds :: [Text]
status :: Status
snapshotName :: Text
snapshotCreationTime :: Text
snapshotArn :: Text
kmsKeyId :: Text
clusterCreationTime :: Text
clusterArn :: Text
adminUserName :: Text
$sel:vpcSecurityGroupIds:ClusterSnapshot' :: ClusterSnapshot -> [Text]
$sel:subnetIds:ClusterSnapshot' :: ClusterSnapshot -> [Text]
$sel:status:ClusterSnapshot' :: ClusterSnapshot -> Status
$sel:snapshotName:ClusterSnapshot' :: ClusterSnapshot -> Text
$sel:snapshotCreationTime:ClusterSnapshot' :: ClusterSnapshot -> Text
$sel:snapshotArn:ClusterSnapshot' :: ClusterSnapshot -> Text
$sel:kmsKeyId:ClusterSnapshot' :: ClusterSnapshot -> Text
$sel:clusterCreationTime:ClusterSnapshot' :: ClusterSnapshot -> Text
$sel:clusterArn:ClusterSnapshot' :: ClusterSnapshot -> Text
$sel:adminUserName:ClusterSnapshot' :: ClusterSnapshot -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
adminUserName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clusterArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clusterCreationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
kmsKeyId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
snapshotArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
snapshotCreationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
snapshotName
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 ClusterSnapshot where
rnf :: ClusterSnapshot -> ()
rnf ClusterSnapshot' {[Text]
Text
Status
vpcSecurityGroupIds :: [Text]
subnetIds :: [Text]
status :: Status
snapshotName :: Text
snapshotCreationTime :: Text
snapshotArn :: Text
kmsKeyId :: Text
clusterCreationTime :: Text
clusterArn :: Text
adminUserName :: Text
$sel:vpcSecurityGroupIds:ClusterSnapshot' :: ClusterSnapshot -> [Text]
$sel:subnetIds:ClusterSnapshot' :: ClusterSnapshot -> [Text]
$sel:status:ClusterSnapshot' :: ClusterSnapshot -> Status
$sel:snapshotName:ClusterSnapshot' :: ClusterSnapshot -> Text
$sel:snapshotCreationTime:ClusterSnapshot' :: ClusterSnapshot -> Text
$sel:snapshotArn:ClusterSnapshot' :: ClusterSnapshot -> Text
$sel:kmsKeyId:ClusterSnapshot' :: ClusterSnapshot -> Text
$sel:clusterCreationTime:ClusterSnapshot' :: ClusterSnapshot -> Text
$sel:clusterArn:ClusterSnapshot' :: ClusterSnapshot -> Text
$sel:adminUserName:ClusterSnapshot' :: ClusterSnapshot -> 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 Text
clusterArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
clusterCreationTime
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
snapshotArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
snapshotCreationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
snapshotName
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