{-# 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.DynamoDB.Types.ReplicaGlobalSecondaryIndexAutoScalingDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DynamoDB.Types.AttributeValue
import Amazonka.DynamoDB.Types.AutoScalingSettingsDescription
import Amazonka.DynamoDB.Types.IndexStatus
import Amazonka.DynamoDB.Types.WriteRequest
import qualified Amazonka.Prelude as Prelude
data ReplicaGlobalSecondaryIndexAutoScalingDescription = ReplicaGlobalSecondaryIndexAutoScalingDescription'
{
ReplicaGlobalSecondaryIndexAutoScalingDescription -> Maybe Text
indexName :: Prelude.Maybe Prelude.Text,
ReplicaGlobalSecondaryIndexAutoScalingDescription
-> Maybe IndexStatus
indexStatus :: Prelude.Maybe IndexStatus,
ReplicaGlobalSecondaryIndexAutoScalingDescription
-> Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings :: Prelude.Maybe AutoScalingSettingsDescription,
ReplicaGlobalSecondaryIndexAutoScalingDescription
-> Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings :: Prelude.Maybe AutoScalingSettingsDescription
}
deriving (ReplicaGlobalSecondaryIndexAutoScalingDescription
-> ReplicaGlobalSecondaryIndexAutoScalingDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplicaGlobalSecondaryIndexAutoScalingDescription
-> ReplicaGlobalSecondaryIndexAutoScalingDescription -> Bool
$c/= :: ReplicaGlobalSecondaryIndexAutoScalingDescription
-> ReplicaGlobalSecondaryIndexAutoScalingDescription -> Bool
== :: ReplicaGlobalSecondaryIndexAutoScalingDescription
-> ReplicaGlobalSecondaryIndexAutoScalingDescription -> Bool
$c== :: ReplicaGlobalSecondaryIndexAutoScalingDescription
-> ReplicaGlobalSecondaryIndexAutoScalingDescription -> Bool
Prelude.Eq, ReadPrec [ReplicaGlobalSecondaryIndexAutoScalingDescription]
ReadPrec ReplicaGlobalSecondaryIndexAutoScalingDescription
Int -> ReadS ReplicaGlobalSecondaryIndexAutoScalingDescription
ReadS [ReplicaGlobalSecondaryIndexAutoScalingDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplicaGlobalSecondaryIndexAutoScalingDescription]
$creadListPrec :: ReadPrec [ReplicaGlobalSecondaryIndexAutoScalingDescription]
readPrec :: ReadPrec ReplicaGlobalSecondaryIndexAutoScalingDescription
$creadPrec :: ReadPrec ReplicaGlobalSecondaryIndexAutoScalingDescription
readList :: ReadS [ReplicaGlobalSecondaryIndexAutoScalingDescription]
$creadList :: ReadS [ReplicaGlobalSecondaryIndexAutoScalingDescription]
readsPrec :: Int -> ReadS ReplicaGlobalSecondaryIndexAutoScalingDescription
$creadsPrec :: Int -> ReadS ReplicaGlobalSecondaryIndexAutoScalingDescription
Prelude.Read, Int -> ReplicaGlobalSecondaryIndexAutoScalingDescription -> ShowS
[ReplicaGlobalSecondaryIndexAutoScalingDescription] -> ShowS
ReplicaGlobalSecondaryIndexAutoScalingDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplicaGlobalSecondaryIndexAutoScalingDescription] -> ShowS
$cshowList :: [ReplicaGlobalSecondaryIndexAutoScalingDescription] -> ShowS
show :: ReplicaGlobalSecondaryIndexAutoScalingDescription -> String
$cshow :: ReplicaGlobalSecondaryIndexAutoScalingDescription -> String
showsPrec :: Int -> ReplicaGlobalSecondaryIndexAutoScalingDescription -> ShowS
$cshowsPrec :: Int -> ReplicaGlobalSecondaryIndexAutoScalingDescription -> ShowS
Prelude.Show, forall x.
Rep ReplicaGlobalSecondaryIndexAutoScalingDescription x
-> ReplicaGlobalSecondaryIndexAutoScalingDescription
forall x.
ReplicaGlobalSecondaryIndexAutoScalingDescription
-> Rep ReplicaGlobalSecondaryIndexAutoScalingDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReplicaGlobalSecondaryIndexAutoScalingDescription x
-> ReplicaGlobalSecondaryIndexAutoScalingDescription
$cfrom :: forall x.
ReplicaGlobalSecondaryIndexAutoScalingDescription
-> Rep ReplicaGlobalSecondaryIndexAutoScalingDescription x
Prelude.Generic)
newReplicaGlobalSecondaryIndexAutoScalingDescription ::
ReplicaGlobalSecondaryIndexAutoScalingDescription
newReplicaGlobalSecondaryIndexAutoScalingDescription :: ReplicaGlobalSecondaryIndexAutoScalingDescription
newReplicaGlobalSecondaryIndexAutoScalingDescription =
ReplicaGlobalSecondaryIndexAutoScalingDescription'
{ $sel:indexName:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: Maybe Text
indexName =
forall a. Maybe a
Prelude.Nothing,
$sel:indexStatus:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: Maybe IndexStatus
indexStatus =
forall a. Maybe a
Prelude.Nothing,
$sel:provisionedReadCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings =
forall a. Maybe a
Prelude.Nothing,
$sel:provisionedWriteCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings =
forall a. Maybe a
Prelude.Nothing
}
replicaGlobalSecondaryIndexAutoScalingDescription_indexName :: Lens.Lens' ReplicaGlobalSecondaryIndexAutoScalingDescription (Prelude.Maybe Prelude.Text)
replicaGlobalSecondaryIndexAutoScalingDescription_indexName :: Lens'
ReplicaGlobalSecondaryIndexAutoScalingDescription (Maybe Text)
replicaGlobalSecondaryIndexAutoScalingDescription_indexName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexAutoScalingDescription' {Maybe Text
indexName :: Maybe Text
$sel:indexName:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: ReplicaGlobalSecondaryIndexAutoScalingDescription -> Maybe Text
indexName} -> Maybe Text
indexName) (\s :: ReplicaGlobalSecondaryIndexAutoScalingDescription
s@ReplicaGlobalSecondaryIndexAutoScalingDescription' {} Maybe Text
a -> ReplicaGlobalSecondaryIndexAutoScalingDescription
s {$sel:indexName:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: Maybe Text
indexName = Maybe Text
a} :: ReplicaGlobalSecondaryIndexAutoScalingDescription)
replicaGlobalSecondaryIndexAutoScalingDescription_indexStatus :: Lens.Lens' ReplicaGlobalSecondaryIndexAutoScalingDescription (Prelude.Maybe IndexStatus)
replicaGlobalSecondaryIndexAutoScalingDescription_indexStatus :: Lens'
ReplicaGlobalSecondaryIndexAutoScalingDescription
(Maybe IndexStatus)
replicaGlobalSecondaryIndexAutoScalingDescription_indexStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexAutoScalingDescription' {Maybe IndexStatus
indexStatus :: Maybe IndexStatus
$sel:indexStatus:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: ReplicaGlobalSecondaryIndexAutoScalingDescription
-> Maybe IndexStatus
indexStatus} -> Maybe IndexStatus
indexStatus) (\s :: ReplicaGlobalSecondaryIndexAutoScalingDescription
s@ReplicaGlobalSecondaryIndexAutoScalingDescription' {} Maybe IndexStatus
a -> ReplicaGlobalSecondaryIndexAutoScalingDescription
s {$sel:indexStatus:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: Maybe IndexStatus
indexStatus = Maybe IndexStatus
a} :: ReplicaGlobalSecondaryIndexAutoScalingDescription)
replicaGlobalSecondaryIndexAutoScalingDescription_provisionedReadCapacityAutoScalingSettings :: Lens.Lens' ReplicaGlobalSecondaryIndexAutoScalingDescription (Prelude.Maybe AutoScalingSettingsDescription)
replicaGlobalSecondaryIndexAutoScalingDescription_provisionedReadCapacityAutoScalingSettings :: Lens'
ReplicaGlobalSecondaryIndexAutoScalingDescription
(Maybe AutoScalingSettingsDescription)
replicaGlobalSecondaryIndexAutoScalingDescription_provisionedReadCapacityAutoScalingSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexAutoScalingDescription' {Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings :: Maybe AutoScalingSettingsDescription
$sel:provisionedReadCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: ReplicaGlobalSecondaryIndexAutoScalingDescription
-> Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings} -> Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings) (\s :: ReplicaGlobalSecondaryIndexAutoScalingDescription
s@ReplicaGlobalSecondaryIndexAutoScalingDescription' {} Maybe AutoScalingSettingsDescription
a -> ReplicaGlobalSecondaryIndexAutoScalingDescription
s {$sel:provisionedReadCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings = Maybe AutoScalingSettingsDescription
a} :: ReplicaGlobalSecondaryIndexAutoScalingDescription)
replicaGlobalSecondaryIndexAutoScalingDescription_provisionedWriteCapacityAutoScalingSettings :: Lens.Lens' ReplicaGlobalSecondaryIndexAutoScalingDescription (Prelude.Maybe AutoScalingSettingsDescription)
replicaGlobalSecondaryIndexAutoScalingDescription_provisionedWriteCapacityAutoScalingSettings :: Lens'
ReplicaGlobalSecondaryIndexAutoScalingDescription
(Maybe AutoScalingSettingsDescription)
replicaGlobalSecondaryIndexAutoScalingDescription_provisionedWriteCapacityAutoScalingSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexAutoScalingDescription' {Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings :: Maybe AutoScalingSettingsDescription
$sel:provisionedWriteCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: ReplicaGlobalSecondaryIndexAutoScalingDescription
-> Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings} -> Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings) (\s :: ReplicaGlobalSecondaryIndexAutoScalingDescription
s@ReplicaGlobalSecondaryIndexAutoScalingDescription' {} Maybe AutoScalingSettingsDescription
a -> ReplicaGlobalSecondaryIndexAutoScalingDescription
s {$sel:provisionedWriteCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings = Maybe AutoScalingSettingsDescription
a} :: ReplicaGlobalSecondaryIndexAutoScalingDescription)
instance
Data.FromJSON
ReplicaGlobalSecondaryIndexAutoScalingDescription
where
parseJSON :: Value -> Parser ReplicaGlobalSecondaryIndexAutoScalingDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ReplicaGlobalSecondaryIndexAutoScalingDescription"
( \Object
x ->
Maybe Text
-> Maybe IndexStatus
-> Maybe AutoScalingSettingsDescription
-> Maybe AutoScalingSettingsDescription
-> ReplicaGlobalSecondaryIndexAutoScalingDescription
ReplicaGlobalSecondaryIndexAutoScalingDescription'
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
"IndexName")
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
"IndexStatus")
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
"ProvisionedReadCapacityAutoScalingSettings"
)
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
"ProvisionedWriteCapacityAutoScalingSettings"
)
)
instance
Prelude.Hashable
ReplicaGlobalSecondaryIndexAutoScalingDescription
where
hashWithSalt :: Int -> ReplicaGlobalSecondaryIndexAutoScalingDescription -> Int
hashWithSalt
Int
_salt
ReplicaGlobalSecondaryIndexAutoScalingDescription' {Maybe Text
Maybe IndexStatus
Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings :: Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings :: Maybe AutoScalingSettingsDescription
indexStatus :: Maybe IndexStatus
indexName :: Maybe Text
$sel:provisionedWriteCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: ReplicaGlobalSecondaryIndexAutoScalingDescription
-> Maybe AutoScalingSettingsDescription
$sel:provisionedReadCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: ReplicaGlobalSecondaryIndexAutoScalingDescription
-> Maybe AutoScalingSettingsDescription
$sel:indexStatus:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: ReplicaGlobalSecondaryIndexAutoScalingDescription
-> Maybe IndexStatus
$sel:indexName:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: ReplicaGlobalSecondaryIndexAutoScalingDescription -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
indexName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IndexStatus
indexStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings
instance
Prelude.NFData
ReplicaGlobalSecondaryIndexAutoScalingDescription
where
rnf :: ReplicaGlobalSecondaryIndexAutoScalingDescription -> ()
rnf
ReplicaGlobalSecondaryIndexAutoScalingDescription' {Maybe Text
Maybe IndexStatus
Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings :: Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings :: Maybe AutoScalingSettingsDescription
indexStatus :: Maybe IndexStatus
indexName :: Maybe Text
$sel:provisionedWriteCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: ReplicaGlobalSecondaryIndexAutoScalingDescription
-> Maybe AutoScalingSettingsDescription
$sel:provisionedReadCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: ReplicaGlobalSecondaryIndexAutoScalingDescription
-> Maybe AutoScalingSettingsDescription
$sel:indexStatus:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: ReplicaGlobalSecondaryIndexAutoScalingDescription
-> Maybe IndexStatus
$sel:indexName:ReplicaGlobalSecondaryIndexAutoScalingDescription' :: ReplicaGlobalSecondaryIndexAutoScalingDescription -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
indexName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IndexStatus
indexStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings