{-# 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.GlobalSecondaryIndexAutoScalingUpdate 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.AutoScalingSettingsUpdate
import Amazonka.DynamoDB.Types.WriteRequest
import qualified Amazonka.Prelude as Prelude
data GlobalSecondaryIndexAutoScalingUpdate = GlobalSecondaryIndexAutoScalingUpdate'
{
GlobalSecondaryIndexAutoScalingUpdate -> Maybe Text
indexName :: Prelude.Maybe Prelude.Text,
GlobalSecondaryIndexAutoScalingUpdate
-> Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate :: Prelude.Maybe AutoScalingSettingsUpdate
}
deriving (GlobalSecondaryIndexAutoScalingUpdate
-> GlobalSecondaryIndexAutoScalingUpdate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GlobalSecondaryIndexAutoScalingUpdate
-> GlobalSecondaryIndexAutoScalingUpdate -> Bool
$c/= :: GlobalSecondaryIndexAutoScalingUpdate
-> GlobalSecondaryIndexAutoScalingUpdate -> Bool
== :: GlobalSecondaryIndexAutoScalingUpdate
-> GlobalSecondaryIndexAutoScalingUpdate -> Bool
$c== :: GlobalSecondaryIndexAutoScalingUpdate
-> GlobalSecondaryIndexAutoScalingUpdate -> Bool
Prelude.Eq, ReadPrec [GlobalSecondaryIndexAutoScalingUpdate]
ReadPrec GlobalSecondaryIndexAutoScalingUpdate
Int -> ReadS GlobalSecondaryIndexAutoScalingUpdate
ReadS [GlobalSecondaryIndexAutoScalingUpdate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GlobalSecondaryIndexAutoScalingUpdate]
$creadListPrec :: ReadPrec [GlobalSecondaryIndexAutoScalingUpdate]
readPrec :: ReadPrec GlobalSecondaryIndexAutoScalingUpdate
$creadPrec :: ReadPrec GlobalSecondaryIndexAutoScalingUpdate
readList :: ReadS [GlobalSecondaryIndexAutoScalingUpdate]
$creadList :: ReadS [GlobalSecondaryIndexAutoScalingUpdate]
readsPrec :: Int -> ReadS GlobalSecondaryIndexAutoScalingUpdate
$creadsPrec :: Int -> ReadS GlobalSecondaryIndexAutoScalingUpdate
Prelude.Read, Int -> GlobalSecondaryIndexAutoScalingUpdate -> ShowS
[GlobalSecondaryIndexAutoScalingUpdate] -> ShowS
GlobalSecondaryIndexAutoScalingUpdate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GlobalSecondaryIndexAutoScalingUpdate] -> ShowS
$cshowList :: [GlobalSecondaryIndexAutoScalingUpdate] -> ShowS
show :: GlobalSecondaryIndexAutoScalingUpdate -> String
$cshow :: GlobalSecondaryIndexAutoScalingUpdate -> String
showsPrec :: Int -> GlobalSecondaryIndexAutoScalingUpdate -> ShowS
$cshowsPrec :: Int -> GlobalSecondaryIndexAutoScalingUpdate -> ShowS
Prelude.Show, forall x.
Rep GlobalSecondaryIndexAutoScalingUpdate x
-> GlobalSecondaryIndexAutoScalingUpdate
forall x.
GlobalSecondaryIndexAutoScalingUpdate
-> Rep GlobalSecondaryIndexAutoScalingUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GlobalSecondaryIndexAutoScalingUpdate x
-> GlobalSecondaryIndexAutoScalingUpdate
$cfrom :: forall x.
GlobalSecondaryIndexAutoScalingUpdate
-> Rep GlobalSecondaryIndexAutoScalingUpdate x
Prelude.Generic)
newGlobalSecondaryIndexAutoScalingUpdate ::
GlobalSecondaryIndexAutoScalingUpdate
newGlobalSecondaryIndexAutoScalingUpdate :: GlobalSecondaryIndexAutoScalingUpdate
newGlobalSecondaryIndexAutoScalingUpdate =
GlobalSecondaryIndexAutoScalingUpdate'
{ $sel:indexName:GlobalSecondaryIndexAutoScalingUpdate' :: Maybe Text
indexName =
forall a. Maybe a
Prelude.Nothing,
$sel:provisionedWriteCapacityAutoScalingUpdate:GlobalSecondaryIndexAutoScalingUpdate' :: Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate =
forall a. Maybe a
Prelude.Nothing
}
globalSecondaryIndexAutoScalingUpdate_indexName :: Lens.Lens' GlobalSecondaryIndexAutoScalingUpdate (Prelude.Maybe Prelude.Text)
globalSecondaryIndexAutoScalingUpdate_indexName :: Lens' GlobalSecondaryIndexAutoScalingUpdate (Maybe Text)
globalSecondaryIndexAutoScalingUpdate_indexName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalSecondaryIndexAutoScalingUpdate' {Maybe Text
indexName :: Maybe Text
$sel:indexName:GlobalSecondaryIndexAutoScalingUpdate' :: GlobalSecondaryIndexAutoScalingUpdate -> Maybe Text
indexName} -> Maybe Text
indexName) (\s :: GlobalSecondaryIndexAutoScalingUpdate
s@GlobalSecondaryIndexAutoScalingUpdate' {} Maybe Text
a -> GlobalSecondaryIndexAutoScalingUpdate
s {$sel:indexName:GlobalSecondaryIndexAutoScalingUpdate' :: Maybe Text
indexName = Maybe Text
a} :: GlobalSecondaryIndexAutoScalingUpdate)
globalSecondaryIndexAutoScalingUpdate_provisionedWriteCapacityAutoScalingUpdate :: Lens.Lens' GlobalSecondaryIndexAutoScalingUpdate (Prelude.Maybe AutoScalingSettingsUpdate)
globalSecondaryIndexAutoScalingUpdate_provisionedWriteCapacityAutoScalingUpdate :: Lens'
GlobalSecondaryIndexAutoScalingUpdate
(Maybe AutoScalingSettingsUpdate)
globalSecondaryIndexAutoScalingUpdate_provisionedWriteCapacityAutoScalingUpdate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalSecondaryIndexAutoScalingUpdate' {Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate :: Maybe AutoScalingSettingsUpdate
$sel:provisionedWriteCapacityAutoScalingUpdate:GlobalSecondaryIndexAutoScalingUpdate' :: GlobalSecondaryIndexAutoScalingUpdate
-> Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate} -> Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate) (\s :: GlobalSecondaryIndexAutoScalingUpdate
s@GlobalSecondaryIndexAutoScalingUpdate' {} Maybe AutoScalingSettingsUpdate
a -> GlobalSecondaryIndexAutoScalingUpdate
s {$sel:provisionedWriteCapacityAutoScalingUpdate:GlobalSecondaryIndexAutoScalingUpdate' :: Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate = Maybe AutoScalingSettingsUpdate
a} :: GlobalSecondaryIndexAutoScalingUpdate)
instance
Prelude.Hashable
GlobalSecondaryIndexAutoScalingUpdate
where
hashWithSalt :: Int -> GlobalSecondaryIndexAutoScalingUpdate -> Int
hashWithSalt
Int
_salt
GlobalSecondaryIndexAutoScalingUpdate' {Maybe Text
Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate :: Maybe AutoScalingSettingsUpdate
indexName :: Maybe Text
$sel:provisionedWriteCapacityAutoScalingUpdate:GlobalSecondaryIndexAutoScalingUpdate' :: GlobalSecondaryIndexAutoScalingUpdate
-> Maybe AutoScalingSettingsUpdate
$sel:indexName:GlobalSecondaryIndexAutoScalingUpdate' :: GlobalSecondaryIndexAutoScalingUpdate -> 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 AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate
instance
Prelude.NFData
GlobalSecondaryIndexAutoScalingUpdate
where
rnf :: GlobalSecondaryIndexAutoScalingUpdate -> ()
rnf GlobalSecondaryIndexAutoScalingUpdate' {Maybe Text
Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate :: Maybe AutoScalingSettingsUpdate
indexName :: Maybe Text
$sel:provisionedWriteCapacityAutoScalingUpdate:GlobalSecondaryIndexAutoScalingUpdate' :: GlobalSecondaryIndexAutoScalingUpdate
-> Maybe AutoScalingSettingsUpdate
$sel:indexName:GlobalSecondaryIndexAutoScalingUpdate' :: GlobalSecondaryIndexAutoScalingUpdate -> 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 AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate
instance
Data.ToJSON
GlobalSecondaryIndexAutoScalingUpdate
where
toJSON :: GlobalSecondaryIndexAutoScalingUpdate -> Value
toJSON GlobalSecondaryIndexAutoScalingUpdate' {Maybe Text
Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate :: Maybe AutoScalingSettingsUpdate
indexName :: Maybe Text
$sel:provisionedWriteCapacityAutoScalingUpdate:GlobalSecondaryIndexAutoScalingUpdate' :: GlobalSecondaryIndexAutoScalingUpdate
-> Maybe AutoScalingSettingsUpdate
$sel:indexName:GlobalSecondaryIndexAutoScalingUpdate' :: GlobalSecondaryIndexAutoScalingUpdate -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"IndexName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
indexName,
(Key
"ProvisionedWriteCapacityAutoScalingUpdate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate
]
)