{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SecurityHub.Types.AwsDynamoDbTableProvisionedThroughput
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SecurityHub.Types.AwsDynamoDbTableProvisionedThroughput where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about the provisioned throughput for the table or for a
-- global secondary index.
--
-- /See:/ 'newAwsDynamoDbTableProvisionedThroughput' smart constructor.
data AwsDynamoDbTableProvisionedThroughput = AwsDynamoDbTableProvisionedThroughput'
  { -- | The maximum number of strongly consistent reads consumed per second
    -- before DynamoDB returns a @ThrottlingException@.
    AwsDynamoDbTableProvisionedThroughput -> Maybe Int
readCapacityUnits :: Prelude.Maybe Prelude.Int,
    -- | Indicates when the provisioned throughput was last decreased.
    --
    -- Uses the @date-time@ format specified in
    -- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
    -- The value cannot contain spaces. For example,
    -- @2020-03-22T13:22:13.933Z@.
    AwsDynamoDbTableProvisionedThroughput -> Maybe Text
lastDecreaseDateTime :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of writes consumed per second before DynamoDB returns
    -- a @ThrottlingException@.
    AwsDynamoDbTableProvisionedThroughput -> Maybe Int
writeCapacityUnits :: Prelude.Maybe Prelude.Int,
    -- | The number of times during the current UTC calendar day that the
    -- provisioned throughput was decreased.
    AwsDynamoDbTableProvisionedThroughput -> Maybe Int
numberOfDecreasesToday :: Prelude.Maybe Prelude.Int,
    -- | Indicates when the provisioned throughput was last increased.
    --
    -- Uses the @date-time@ format specified in
    -- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
    -- The value cannot contain spaces. For example,
    -- @2020-03-22T13:22:13.933Z@.
    AwsDynamoDbTableProvisionedThroughput -> Maybe Text
lastIncreaseDateTime :: Prelude.Maybe Prelude.Text
  }
  deriving (AwsDynamoDbTableProvisionedThroughput
-> AwsDynamoDbTableProvisionedThroughput -> Bool
(AwsDynamoDbTableProvisionedThroughput
 -> AwsDynamoDbTableProvisionedThroughput -> Bool)
-> (AwsDynamoDbTableProvisionedThroughput
    -> AwsDynamoDbTableProvisionedThroughput -> Bool)
-> Eq AwsDynamoDbTableProvisionedThroughput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsDynamoDbTableProvisionedThroughput
-> AwsDynamoDbTableProvisionedThroughput -> Bool
$c/= :: AwsDynamoDbTableProvisionedThroughput
-> AwsDynamoDbTableProvisionedThroughput -> Bool
== :: AwsDynamoDbTableProvisionedThroughput
-> AwsDynamoDbTableProvisionedThroughput -> Bool
$c== :: AwsDynamoDbTableProvisionedThroughput
-> AwsDynamoDbTableProvisionedThroughput -> Bool
Prelude.Eq, ReadPrec [AwsDynamoDbTableProvisionedThroughput]
ReadPrec AwsDynamoDbTableProvisionedThroughput
Int -> ReadS AwsDynamoDbTableProvisionedThroughput
ReadS [AwsDynamoDbTableProvisionedThroughput]
(Int -> ReadS AwsDynamoDbTableProvisionedThroughput)
-> ReadS [AwsDynamoDbTableProvisionedThroughput]
-> ReadPrec AwsDynamoDbTableProvisionedThroughput
-> ReadPrec [AwsDynamoDbTableProvisionedThroughput]
-> Read AwsDynamoDbTableProvisionedThroughput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsDynamoDbTableProvisionedThroughput]
$creadListPrec :: ReadPrec [AwsDynamoDbTableProvisionedThroughput]
readPrec :: ReadPrec AwsDynamoDbTableProvisionedThroughput
$creadPrec :: ReadPrec AwsDynamoDbTableProvisionedThroughput
readList :: ReadS [AwsDynamoDbTableProvisionedThroughput]
$creadList :: ReadS [AwsDynamoDbTableProvisionedThroughput]
readsPrec :: Int -> ReadS AwsDynamoDbTableProvisionedThroughput
$creadsPrec :: Int -> ReadS AwsDynamoDbTableProvisionedThroughput
Prelude.Read, Int -> AwsDynamoDbTableProvisionedThroughput -> ShowS
[AwsDynamoDbTableProvisionedThroughput] -> ShowS
AwsDynamoDbTableProvisionedThroughput -> String
(Int -> AwsDynamoDbTableProvisionedThroughput -> ShowS)
-> (AwsDynamoDbTableProvisionedThroughput -> String)
-> ([AwsDynamoDbTableProvisionedThroughput] -> ShowS)
-> Show AwsDynamoDbTableProvisionedThroughput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsDynamoDbTableProvisionedThroughput] -> ShowS
$cshowList :: [AwsDynamoDbTableProvisionedThroughput] -> ShowS
show :: AwsDynamoDbTableProvisionedThroughput -> String
$cshow :: AwsDynamoDbTableProvisionedThroughput -> String
showsPrec :: Int -> AwsDynamoDbTableProvisionedThroughput -> ShowS
$cshowsPrec :: Int -> AwsDynamoDbTableProvisionedThroughput -> ShowS
Prelude.Show, (forall x.
 AwsDynamoDbTableProvisionedThroughput
 -> Rep AwsDynamoDbTableProvisionedThroughput x)
-> (forall x.
    Rep AwsDynamoDbTableProvisionedThroughput x
    -> AwsDynamoDbTableProvisionedThroughput)
-> Generic AwsDynamoDbTableProvisionedThroughput
forall x.
Rep AwsDynamoDbTableProvisionedThroughput x
-> AwsDynamoDbTableProvisionedThroughput
forall x.
AwsDynamoDbTableProvisionedThroughput
-> Rep AwsDynamoDbTableProvisionedThroughput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsDynamoDbTableProvisionedThroughput x
-> AwsDynamoDbTableProvisionedThroughput
$cfrom :: forall x.
AwsDynamoDbTableProvisionedThroughput
-> Rep AwsDynamoDbTableProvisionedThroughput x
Prelude.Generic)

-- |
-- Create a value of 'AwsDynamoDbTableProvisionedThroughput' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'readCapacityUnits', 'awsDynamoDbTableProvisionedThroughput_readCapacityUnits' - The maximum number of strongly consistent reads consumed per second
-- before DynamoDB returns a @ThrottlingException@.
--
-- 'lastDecreaseDateTime', 'awsDynamoDbTableProvisionedThroughput_lastDecreaseDateTime' - Indicates when the provisioned throughput was last decreased.
--
-- Uses the @date-time@ format specified in
-- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
-- The value cannot contain spaces. For example,
-- @2020-03-22T13:22:13.933Z@.
--
-- 'writeCapacityUnits', 'awsDynamoDbTableProvisionedThroughput_writeCapacityUnits' - The maximum number of writes consumed per second before DynamoDB returns
-- a @ThrottlingException@.
--
-- 'numberOfDecreasesToday', 'awsDynamoDbTableProvisionedThroughput_numberOfDecreasesToday' - The number of times during the current UTC calendar day that the
-- provisioned throughput was decreased.
--
-- 'lastIncreaseDateTime', 'awsDynamoDbTableProvisionedThroughput_lastIncreaseDateTime' - Indicates when the provisioned throughput was last increased.
--
-- Uses the @date-time@ format specified in
-- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
-- The value cannot contain spaces. For example,
-- @2020-03-22T13:22:13.933Z@.
newAwsDynamoDbTableProvisionedThroughput ::
  AwsDynamoDbTableProvisionedThroughput
newAwsDynamoDbTableProvisionedThroughput :: AwsDynamoDbTableProvisionedThroughput
newAwsDynamoDbTableProvisionedThroughput =
  AwsDynamoDbTableProvisionedThroughput' :: Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> AwsDynamoDbTableProvisionedThroughput
AwsDynamoDbTableProvisionedThroughput'
    { $sel:readCapacityUnits:AwsDynamoDbTableProvisionedThroughput' :: Maybe Int
readCapacityUnits =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:lastDecreaseDateTime:AwsDynamoDbTableProvisionedThroughput' :: Maybe Text
lastDecreaseDateTime =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:writeCapacityUnits:AwsDynamoDbTableProvisionedThroughput' :: Maybe Int
writeCapacityUnits = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfDecreasesToday:AwsDynamoDbTableProvisionedThroughput' :: Maybe Int
numberOfDecreasesToday =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:lastIncreaseDateTime:AwsDynamoDbTableProvisionedThroughput' :: Maybe Text
lastIncreaseDateTime =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of strongly consistent reads consumed per second
-- before DynamoDB returns a @ThrottlingException@.
awsDynamoDbTableProvisionedThroughput_readCapacityUnits :: Lens.Lens' AwsDynamoDbTableProvisionedThroughput (Prelude.Maybe Prelude.Int)
awsDynamoDbTableProvisionedThroughput_readCapacityUnits :: (Maybe Int -> f (Maybe Int))
-> AwsDynamoDbTableProvisionedThroughput
-> f AwsDynamoDbTableProvisionedThroughput
awsDynamoDbTableProvisionedThroughput_readCapacityUnits = (AwsDynamoDbTableProvisionedThroughput -> Maybe Int)
-> (AwsDynamoDbTableProvisionedThroughput
    -> Maybe Int -> AwsDynamoDbTableProvisionedThroughput)
-> Lens
     AwsDynamoDbTableProvisionedThroughput
     AwsDynamoDbTableProvisionedThroughput
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableProvisionedThroughput' {Maybe Int
readCapacityUnits :: Maybe Int
$sel:readCapacityUnits:AwsDynamoDbTableProvisionedThroughput' :: AwsDynamoDbTableProvisionedThroughput -> Maybe Int
readCapacityUnits} -> Maybe Int
readCapacityUnits) (\s :: AwsDynamoDbTableProvisionedThroughput
s@AwsDynamoDbTableProvisionedThroughput' {} Maybe Int
a -> AwsDynamoDbTableProvisionedThroughput
s {$sel:readCapacityUnits:AwsDynamoDbTableProvisionedThroughput' :: Maybe Int
readCapacityUnits = Maybe Int
a} :: AwsDynamoDbTableProvisionedThroughput)

-- | Indicates when the provisioned throughput was last decreased.
--
-- Uses the @date-time@ format specified in
-- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
-- The value cannot contain spaces. For example,
-- @2020-03-22T13:22:13.933Z@.
awsDynamoDbTableProvisionedThroughput_lastDecreaseDateTime :: Lens.Lens' AwsDynamoDbTableProvisionedThroughput (Prelude.Maybe Prelude.Text)
awsDynamoDbTableProvisionedThroughput_lastDecreaseDateTime :: (Maybe Text -> f (Maybe Text))
-> AwsDynamoDbTableProvisionedThroughput
-> f AwsDynamoDbTableProvisionedThroughput
awsDynamoDbTableProvisionedThroughput_lastDecreaseDateTime = (AwsDynamoDbTableProvisionedThroughput -> Maybe Text)
-> (AwsDynamoDbTableProvisionedThroughput
    -> Maybe Text -> AwsDynamoDbTableProvisionedThroughput)
-> Lens
     AwsDynamoDbTableProvisionedThroughput
     AwsDynamoDbTableProvisionedThroughput
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableProvisionedThroughput' {Maybe Text
lastDecreaseDateTime :: Maybe Text
$sel:lastDecreaseDateTime:AwsDynamoDbTableProvisionedThroughput' :: AwsDynamoDbTableProvisionedThroughput -> Maybe Text
lastDecreaseDateTime} -> Maybe Text
lastDecreaseDateTime) (\s :: AwsDynamoDbTableProvisionedThroughput
s@AwsDynamoDbTableProvisionedThroughput' {} Maybe Text
a -> AwsDynamoDbTableProvisionedThroughput
s {$sel:lastDecreaseDateTime:AwsDynamoDbTableProvisionedThroughput' :: Maybe Text
lastDecreaseDateTime = Maybe Text
a} :: AwsDynamoDbTableProvisionedThroughput)

-- | The maximum number of writes consumed per second before DynamoDB returns
-- a @ThrottlingException@.
awsDynamoDbTableProvisionedThroughput_writeCapacityUnits :: Lens.Lens' AwsDynamoDbTableProvisionedThroughput (Prelude.Maybe Prelude.Int)
awsDynamoDbTableProvisionedThroughput_writeCapacityUnits :: (Maybe Int -> f (Maybe Int))
-> AwsDynamoDbTableProvisionedThroughput
-> f AwsDynamoDbTableProvisionedThroughput
awsDynamoDbTableProvisionedThroughput_writeCapacityUnits = (AwsDynamoDbTableProvisionedThroughput -> Maybe Int)
-> (AwsDynamoDbTableProvisionedThroughput
    -> Maybe Int -> AwsDynamoDbTableProvisionedThroughput)
-> Lens
     AwsDynamoDbTableProvisionedThroughput
     AwsDynamoDbTableProvisionedThroughput
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableProvisionedThroughput' {Maybe Int
writeCapacityUnits :: Maybe Int
$sel:writeCapacityUnits:AwsDynamoDbTableProvisionedThroughput' :: AwsDynamoDbTableProvisionedThroughput -> Maybe Int
writeCapacityUnits} -> Maybe Int
writeCapacityUnits) (\s :: AwsDynamoDbTableProvisionedThroughput
s@AwsDynamoDbTableProvisionedThroughput' {} Maybe Int
a -> AwsDynamoDbTableProvisionedThroughput
s {$sel:writeCapacityUnits:AwsDynamoDbTableProvisionedThroughput' :: Maybe Int
writeCapacityUnits = Maybe Int
a} :: AwsDynamoDbTableProvisionedThroughput)

-- | The number of times during the current UTC calendar day that the
-- provisioned throughput was decreased.
awsDynamoDbTableProvisionedThroughput_numberOfDecreasesToday :: Lens.Lens' AwsDynamoDbTableProvisionedThroughput (Prelude.Maybe Prelude.Int)
awsDynamoDbTableProvisionedThroughput_numberOfDecreasesToday :: (Maybe Int -> f (Maybe Int))
-> AwsDynamoDbTableProvisionedThroughput
-> f AwsDynamoDbTableProvisionedThroughput
awsDynamoDbTableProvisionedThroughput_numberOfDecreasesToday = (AwsDynamoDbTableProvisionedThroughput -> Maybe Int)
-> (AwsDynamoDbTableProvisionedThroughput
    -> Maybe Int -> AwsDynamoDbTableProvisionedThroughput)
-> Lens
     AwsDynamoDbTableProvisionedThroughput
     AwsDynamoDbTableProvisionedThroughput
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableProvisionedThroughput' {Maybe Int
numberOfDecreasesToday :: Maybe Int
$sel:numberOfDecreasesToday:AwsDynamoDbTableProvisionedThroughput' :: AwsDynamoDbTableProvisionedThroughput -> Maybe Int
numberOfDecreasesToday} -> Maybe Int
numberOfDecreasesToday) (\s :: AwsDynamoDbTableProvisionedThroughput
s@AwsDynamoDbTableProvisionedThroughput' {} Maybe Int
a -> AwsDynamoDbTableProvisionedThroughput
s {$sel:numberOfDecreasesToday:AwsDynamoDbTableProvisionedThroughput' :: Maybe Int
numberOfDecreasesToday = Maybe Int
a} :: AwsDynamoDbTableProvisionedThroughput)

-- | Indicates when the provisioned throughput was last increased.
--
-- Uses the @date-time@ format specified in
-- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
-- The value cannot contain spaces. For example,
-- @2020-03-22T13:22:13.933Z@.
awsDynamoDbTableProvisionedThroughput_lastIncreaseDateTime :: Lens.Lens' AwsDynamoDbTableProvisionedThroughput (Prelude.Maybe Prelude.Text)
awsDynamoDbTableProvisionedThroughput_lastIncreaseDateTime :: (Maybe Text -> f (Maybe Text))
-> AwsDynamoDbTableProvisionedThroughput
-> f AwsDynamoDbTableProvisionedThroughput
awsDynamoDbTableProvisionedThroughput_lastIncreaseDateTime = (AwsDynamoDbTableProvisionedThroughput -> Maybe Text)
-> (AwsDynamoDbTableProvisionedThroughput
    -> Maybe Text -> AwsDynamoDbTableProvisionedThroughput)
-> Lens
     AwsDynamoDbTableProvisionedThroughput
     AwsDynamoDbTableProvisionedThroughput
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableProvisionedThroughput' {Maybe Text
lastIncreaseDateTime :: Maybe Text
$sel:lastIncreaseDateTime:AwsDynamoDbTableProvisionedThroughput' :: AwsDynamoDbTableProvisionedThroughput -> Maybe Text
lastIncreaseDateTime} -> Maybe Text
lastIncreaseDateTime) (\s :: AwsDynamoDbTableProvisionedThroughput
s@AwsDynamoDbTableProvisionedThroughput' {} Maybe Text
a -> AwsDynamoDbTableProvisionedThroughput
s {$sel:lastIncreaseDateTime:AwsDynamoDbTableProvisionedThroughput' :: Maybe Text
lastIncreaseDateTime = Maybe Text
a} :: AwsDynamoDbTableProvisionedThroughput)

instance
  Core.FromJSON
    AwsDynamoDbTableProvisionedThroughput
  where
  parseJSON :: Value -> Parser AwsDynamoDbTableProvisionedThroughput
parseJSON =
    String
-> (Object -> Parser AwsDynamoDbTableProvisionedThroughput)
-> Value
-> Parser AwsDynamoDbTableProvisionedThroughput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsDynamoDbTableProvisionedThroughput"
      ( \Object
x ->
          Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> AwsDynamoDbTableProvisionedThroughput
AwsDynamoDbTableProvisionedThroughput'
            (Maybe Int
 -> Maybe Text
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> AwsDynamoDbTableProvisionedThroughput)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> AwsDynamoDbTableProvisionedThroughput)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReadCapacityUnits")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> AwsDynamoDbTableProvisionedThroughput)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> AwsDynamoDbTableProvisionedThroughput)
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
"LastDecreaseDateTime")
            Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> AwsDynamoDbTableProvisionedThroughput)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int -> Maybe Text -> AwsDynamoDbTableProvisionedThroughput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"WriteCapacityUnits")
            Parser
  (Maybe Int -> Maybe Text -> AwsDynamoDbTableProvisionedThroughput)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> AwsDynamoDbTableProvisionedThroughput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NumberOfDecreasesToday")
            Parser (Maybe Text -> AwsDynamoDbTableProvisionedThroughput)
-> Parser (Maybe Text)
-> Parser AwsDynamoDbTableProvisionedThroughput
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
"LastIncreaseDateTime")
      )

instance
  Prelude.Hashable
    AwsDynamoDbTableProvisionedThroughput

instance
  Prelude.NFData
    AwsDynamoDbTableProvisionedThroughput

instance
  Core.ToJSON
    AwsDynamoDbTableProvisionedThroughput
  where
  toJSON :: AwsDynamoDbTableProvisionedThroughput -> Value
toJSON AwsDynamoDbTableProvisionedThroughput' {Maybe Int
Maybe Text
lastIncreaseDateTime :: Maybe Text
numberOfDecreasesToday :: Maybe Int
writeCapacityUnits :: Maybe Int
lastDecreaseDateTime :: Maybe Text
readCapacityUnits :: Maybe Int
$sel:lastIncreaseDateTime:AwsDynamoDbTableProvisionedThroughput' :: AwsDynamoDbTableProvisionedThroughput -> Maybe Text
$sel:numberOfDecreasesToday:AwsDynamoDbTableProvisionedThroughput' :: AwsDynamoDbTableProvisionedThroughput -> Maybe Int
$sel:writeCapacityUnits:AwsDynamoDbTableProvisionedThroughput' :: AwsDynamoDbTableProvisionedThroughput -> Maybe Int
$sel:lastDecreaseDateTime:AwsDynamoDbTableProvisionedThroughput' :: AwsDynamoDbTableProvisionedThroughput -> Maybe Text
$sel:readCapacityUnits:AwsDynamoDbTableProvisionedThroughput' :: AwsDynamoDbTableProvisionedThroughput -> Maybe Int
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ReadCapacityUnits" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
readCapacityUnits,
            (Text
"LastDecreaseDateTime" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
lastDecreaseDateTime,
            (Text
"WriteCapacityUnits" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
writeCapacityUnits,
            (Text
"NumberOfDecreasesToday" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
numberOfDecreasesToday,
            (Text
"LastIncreaseDateTime" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
lastIncreaseDateTime
          ]
      )