{-# 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.KeySpaces.Types.CapacitySpecificationSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.KeySpaces.Types.ThroughputMode
import qualified Amazonka.Prelude as Prelude
data CapacitySpecificationSummary = CapacitySpecificationSummary'
{
CapacitySpecificationSummary -> Maybe POSIX
lastUpdateToPayPerRequestTimestamp :: Prelude.Maybe Data.POSIX,
CapacitySpecificationSummary -> Maybe Natural
readCapacityUnits :: Prelude.Maybe Prelude.Natural,
CapacitySpecificationSummary -> Maybe Natural
writeCapacityUnits :: Prelude.Maybe Prelude.Natural,
CapacitySpecificationSummary -> ThroughputMode
throughputMode :: ThroughputMode
}
deriving (CapacitySpecificationSummary
-> CapacitySpecificationSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CapacitySpecificationSummary
-> CapacitySpecificationSummary -> Bool
$c/= :: CapacitySpecificationSummary
-> CapacitySpecificationSummary -> Bool
== :: CapacitySpecificationSummary
-> CapacitySpecificationSummary -> Bool
$c== :: CapacitySpecificationSummary
-> CapacitySpecificationSummary -> Bool
Prelude.Eq, ReadPrec [CapacitySpecificationSummary]
ReadPrec CapacitySpecificationSummary
Int -> ReadS CapacitySpecificationSummary
ReadS [CapacitySpecificationSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CapacitySpecificationSummary]
$creadListPrec :: ReadPrec [CapacitySpecificationSummary]
readPrec :: ReadPrec CapacitySpecificationSummary
$creadPrec :: ReadPrec CapacitySpecificationSummary
readList :: ReadS [CapacitySpecificationSummary]
$creadList :: ReadS [CapacitySpecificationSummary]
readsPrec :: Int -> ReadS CapacitySpecificationSummary
$creadsPrec :: Int -> ReadS CapacitySpecificationSummary
Prelude.Read, Int -> CapacitySpecificationSummary -> ShowS
[CapacitySpecificationSummary] -> ShowS
CapacitySpecificationSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CapacitySpecificationSummary] -> ShowS
$cshowList :: [CapacitySpecificationSummary] -> ShowS
show :: CapacitySpecificationSummary -> String
$cshow :: CapacitySpecificationSummary -> String
showsPrec :: Int -> CapacitySpecificationSummary -> ShowS
$cshowsPrec :: Int -> CapacitySpecificationSummary -> ShowS
Prelude.Show, forall x.
Rep CapacitySpecificationSummary x -> CapacitySpecificationSummary
forall x.
CapacitySpecificationSummary -> Rep CapacitySpecificationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CapacitySpecificationSummary x -> CapacitySpecificationSummary
$cfrom :: forall x.
CapacitySpecificationSummary -> Rep CapacitySpecificationSummary x
Prelude.Generic)
newCapacitySpecificationSummary ::
ThroughputMode ->
CapacitySpecificationSummary
newCapacitySpecificationSummary :: ThroughputMode -> CapacitySpecificationSummary
newCapacitySpecificationSummary ThroughputMode
pThroughputMode_ =
CapacitySpecificationSummary'
{ $sel:lastUpdateToPayPerRequestTimestamp:CapacitySpecificationSummary' :: Maybe POSIX
lastUpdateToPayPerRequestTimestamp =
forall a. Maybe a
Prelude.Nothing,
$sel:readCapacityUnits:CapacitySpecificationSummary' :: Maybe Natural
readCapacityUnits = forall a. Maybe a
Prelude.Nothing,
$sel:writeCapacityUnits:CapacitySpecificationSummary' :: Maybe Natural
writeCapacityUnits = forall a. Maybe a
Prelude.Nothing,
$sel:throughputMode:CapacitySpecificationSummary' :: ThroughputMode
throughputMode = ThroughputMode
pThroughputMode_
}
capacitySpecificationSummary_lastUpdateToPayPerRequestTimestamp :: Lens.Lens' CapacitySpecificationSummary (Prelude.Maybe Prelude.UTCTime)
capacitySpecificationSummary_lastUpdateToPayPerRequestTimestamp :: Lens' CapacitySpecificationSummary (Maybe UTCTime)
capacitySpecificationSummary_lastUpdateToPayPerRequestTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CapacitySpecificationSummary' {Maybe POSIX
lastUpdateToPayPerRequestTimestamp :: Maybe POSIX
$sel:lastUpdateToPayPerRequestTimestamp:CapacitySpecificationSummary' :: CapacitySpecificationSummary -> Maybe POSIX
lastUpdateToPayPerRequestTimestamp} -> Maybe POSIX
lastUpdateToPayPerRequestTimestamp) (\s :: CapacitySpecificationSummary
s@CapacitySpecificationSummary' {} Maybe POSIX
a -> CapacitySpecificationSummary
s {$sel:lastUpdateToPayPerRequestTimestamp:CapacitySpecificationSummary' :: Maybe POSIX
lastUpdateToPayPerRequestTimestamp = Maybe POSIX
a} :: CapacitySpecificationSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
capacitySpecificationSummary_readCapacityUnits :: Lens.Lens' CapacitySpecificationSummary (Prelude.Maybe Prelude.Natural)
capacitySpecificationSummary_readCapacityUnits :: Lens' CapacitySpecificationSummary (Maybe Natural)
capacitySpecificationSummary_readCapacityUnits = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CapacitySpecificationSummary' {Maybe Natural
readCapacityUnits :: Maybe Natural
$sel:readCapacityUnits:CapacitySpecificationSummary' :: CapacitySpecificationSummary -> Maybe Natural
readCapacityUnits} -> Maybe Natural
readCapacityUnits) (\s :: CapacitySpecificationSummary
s@CapacitySpecificationSummary' {} Maybe Natural
a -> CapacitySpecificationSummary
s {$sel:readCapacityUnits:CapacitySpecificationSummary' :: Maybe Natural
readCapacityUnits = Maybe Natural
a} :: CapacitySpecificationSummary)
capacitySpecificationSummary_writeCapacityUnits :: Lens.Lens' CapacitySpecificationSummary (Prelude.Maybe Prelude.Natural)
capacitySpecificationSummary_writeCapacityUnits :: Lens' CapacitySpecificationSummary (Maybe Natural)
capacitySpecificationSummary_writeCapacityUnits = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CapacitySpecificationSummary' {Maybe Natural
writeCapacityUnits :: Maybe Natural
$sel:writeCapacityUnits:CapacitySpecificationSummary' :: CapacitySpecificationSummary -> Maybe Natural
writeCapacityUnits} -> Maybe Natural
writeCapacityUnits) (\s :: CapacitySpecificationSummary
s@CapacitySpecificationSummary' {} Maybe Natural
a -> CapacitySpecificationSummary
s {$sel:writeCapacityUnits:CapacitySpecificationSummary' :: Maybe Natural
writeCapacityUnits = Maybe Natural
a} :: CapacitySpecificationSummary)
capacitySpecificationSummary_throughputMode :: Lens.Lens' CapacitySpecificationSummary ThroughputMode
capacitySpecificationSummary_throughputMode :: Lens' CapacitySpecificationSummary ThroughputMode
capacitySpecificationSummary_throughputMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CapacitySpecificationSummary' {ThroughputMode
throughputMode :: ThroughputMode
$sel:throughputMode:CapacitySpecificationSummary' :: CapacitySpecificationSummary -> ThroughputMode
throughputMode} -> ThroughputMode
throughputMode) (\s :: CapacitySpecificationSummary
s@CapacitySpecificationSummary' {} ThroughputMode
a -> CapacitySpecificationSummary
s {$sel:throughputMode:CapacitySpecificationSummary' :: ThroughputMode
throughputMode = ThroughputMode
a} :: CapacitySpecificationSummary)
instance Data.FromJSON CapacitySpecificationSummary where
parseJSON :: Value -> Parser CapacitySpecificationSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CapacitySpecificationSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Natural
-> Maybe Natural
-> ThroughputMode
-> CapacitySpecificationSummary
CapacitySpecificationSummary'
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
"lastUpdateToPayPerRequestTimestamp")
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
"readCapacityUnits")
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
"writeCapacityUnits")
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
"throughputMode")
)
instance
Prelude.Hashable
CapacitySpecificationSummary
where
hashWithSalt :: Int -> CapacitySpecificationSummary -> Int
hashWithSalt Int
_salt CapacitySpecificationSummary' {Maybe Natural
Maybe POSIX
ThroughputMode
throughputMode :: ThroughputMode
writeCapacityUnits :: Maybe Natural
readCapacityUnits :: Maybe Natural
lastUpdateToPayPerRequestTimestamp :: Maybe POSIX
$sel:throughputMode:CapacitySpecificationSummary' :: CapacitySpecificationSummary -> ThroughputMode
$sel:writeCapacityUnits:CapacitySpecificationSummary' :: CapacitySpecificationSummary -> Maybe Natural
$sel:readCapacityUnits:CapacitySpecificationSummary' :: CapacitySpecificationSummary -> Maybe Natural
$sel:lastUpdateToPayPerRequestTimestamp:CapacitySpecificationSummary' :: CapacitySpecificationSummary -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdateToPayPerRequestTimestamp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
readCapacityUnits
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
writeCapacityUnits
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ThroughputMode
throughputMode
instance Prelude.NFData CapacitySpecificationSummary where
rnf :: CapacitySpecificationSummary -> ()
rnf CapacitySpecificationSummary' {Maybe Natural
Maybe POSIX
ThroughputMode
throughputMode :: ThroughputMode
writeCapacityUnits :: Maybe Natural
readCapacityUnits :: Maybe Natural
lastUpdateToPayPerRequestTimestamp :: Maybe POSIX
$sel:throughputMode:CapacitySpecificationSummary' :: CapacitySpecificationSummary -> ThroughputMode
$sel:writeCapacityUnits:CapacitySpecificationSummary' :: CapacitySpecificationSummary -> Maybe Natural
$sel:readCapacityUnits:CapacitySpecificationSummary' :: CapacitySpecificationSummary -> Maybe Natural
$sel:lastUpdateToPayPerRequestTimestamp:CapacitySpecificationSummary' :: CapacitySpecificationSummary -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdateToPayPerRequestTimestamp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
readCapacityUnits
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
writeCapacityUnits
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ThroughputMode
throughputMode