{-# 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.SecurityHub.Types.AwsDynamoDbTableBillingModeSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsDynamoDbTableBillingModeSummary = AwsDynamoDbTableBillingModeSummary'
{
AwsDynamoDbTableBillingModeSummary -> Maybe Text
lastUpdateToPayPerRequestDateTime :: Prelude.Maybe Prelude.Text,
AwsDynamoDbTableBillingModeSummary -> Maybe Text
billingMode :: Prelude.Maybe Prelude.Text
}
deriving (AwsDynamoDbTableBillingModeSummary
-> AwsDynamoDbTableBillingModeSummary -> Bool
(AwsDynamoDbTableBillingModeSummary
-> AwsDynamoDbTableBillingModeSummary -> Bool)
-> (AwsDynamoDbTableBillingModeSummary
-> AwsDynamoDbTableBillingModeSummary -> Bool)
-> Eq AwsDynamoDbTableBillingModeSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsDynamoDbTableBillingModeSummary
-> AwsDynamoDbTableBillingModeSummary -> Bool
$c/= :: AwsDynamoDbTableBillingModeSummary
-> AwsDynamoDbTableBillingModeSummary -> Bool
== :: AwsDynamoDbTableBillingModeSummary
-> AwsDynamoDbTableBillingModeSummary -> Bool
$c== :: AwsDynamoDbTableBillingModeSummary
-> AwsDynamoDbTableBillingModeSummary -> Bool
Prelude.Eq, ReadPrec [AwsDynamoDbTableBillingModeSummary]
ReadPrec AwsDynamoDbTableBillingModeSummary
Int -> ReadS AwsDynamoDbTableBillingModeSummary
ReadS [AwsDynamoDbTableBillingModeSummary]
(Int -> ReadS AwsDynamoDbTableBillingModeSummary)
-> ReadS [AwsDynamoDbTableBillingModeSummary]
-> ReadPrec AwsDynamoDbTableBillingModeSummary
-> ReadPrec [AwsDynamoDbTableBillingModeSummary]
-> Read AwsDynamoDbTableBillingModeSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsDynamoDbTableBillingModeSummary]
$creadListPrec :: ReadPrec [AwsDynamoDbTableBillingModeSummary]
readPrec :: ReadPrec AwsDynamoDbTableBillingModeSummary
$creadPrec :: ReadPrec AwsDynamoDbTableBillingModeSummary
readList :: ReadS [AwsDynamoDbTableBillingModeSummary]
$creadList :: ReadS [AwsDynamoDbTableBillingModeSummary]
readsPrec :: Int -> ReadS AwsDynamoDbTableBillingModeSummary
$creadsPrec :: Int -> ReadS AwsDynamoDbTableBillingModeSummary
Prelude.Read, Int -> AwsDynamoDbTableBillingModeSummary -> ShowS
[AwsDynamoDbTableBillingModeSummary] -> ShowS
AwsDynamoDbTableBillingModeSummary -> String
(Int -> AwsDynamoDbTableBillingModeSummary -> ShowS)
-> (AwsDynamoDbTableBillingModeSummary -> String)
-> ([AwsDynamoDbTableBillingModeSummary] -> ShowS)
-> Show AwsDynamoDbTableBillingModeSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsDynamoDbTableBillingModeSummary] -> ShowS
$cshowList :: [AwsDynamoDbTableBillingModeSummary] -> ShowS
show :: AwsDynamoDbTableBillingModeSummary -> String
$cshow :: AwsDynamoDbTableBillingModeSummary -> String
showsPrec :: Int -> AwsDynamoDbTableBillingModeSummary -> ShowS
$cshowsPrec :: Int -> AwsDynamoDbTableBillingModeSummary -> ShowS
Prelude.Show, (forall x.
AwsDynamoDbTableBillingModeSummary
-> Rep AwsDynamoDbTableBillingModeSummary x)
-> (forall x.
Rep AwsDynamoDbTableBillingModeSummary x
-> AwsDynamoDbTableBillingModeSummary)
-> Generic AwsDynamoDbTableBillingModeSummary
forall x.
Rep AwsDynamoDbTableBillingModeSummary x
-> AwsDynamoDbTableBillingModeSummary
forall x.
AwsDynamoDbTableBillingModeSummary
-> Rep AwsDynamoDbTableBillingModeSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsDynamoDbTableBillingModeSummary x
-> AwsDynamoDbTableBillingModeSummary
$cfrom :: forall x.
AwsDynamoDbTableBillingModeSummary
-> Rep AwsDynamoDbTableBillingModeSummary x
Prelude.Generic)
newAwsDynamoDbTableBillingModeSummary ::
AwsDynamoDbTableBillingModeSummary
newAwsDynamoDbTableBillingModeSummary :: AwsDynamoDbTableBillingModeSummary
newAwsDynamoDbTableBillingModeSummary =
AwsDynamoDbTableBillingModeSummary' :: Maybe Text -> Maybe Text -> AwsDynamoDbTableBillingModeSummary
AwsDynamoDbTableBillingModeSummary'
{ $sel:lastUpdateToPayPerRequestDateTime:AwsDynamoDbTableBillingModeSummary' :: Maybe Text
lastUpdateToPayPerRequestDateTime =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:billingMode:AwsDynamoDbTableBillingModeSummary' :: Maybe Text
billingMode = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsDynamoDbTableBillingModeSummary_lastUpdateToPayPerRequestDateTime :: Lens.Lens' AwsDynamoDbTableBillingModeSummary (Prelude.Maybe Prelude.Text)
awsDynamoDbTableBillingModeSummary_lastUpdateToPayPerRequestDateTime :: (Maybe Text -> f (Maybe Text))
-> AwsDynamoDbTableBillingModeSummary
-> f AwsDynamoDbTableBillingModeSummary
awsDynamoDbTableBillingModeSummary_lastUpdateToPayPerRequestDateTime = (AwsDynamoDbTableBillingModeSummary -> Maybe Text)
-> (AwsDynamoDbTableBillingModeSummary
-> Maybe Text -> AwsDynamoDbTableBillingModeSummary)
-> Lens
AwsDynamoDbTableBillingModeSummary
AwsDynamoDbTableBillingModeSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableBillingModeSummary' {Maybe Text
lastUpdateToPayPerRequestDateTime :: Maybe Text
$sel:lastUpdateToPayPerRequestDateTime:AwsDynamoDbTableBillingModeSummary' :: AwsDynamoDbTableBillingModeSummary -> Maybe Text
lastUpdateToPayPerRequestDateTime} -> Maybe Text
lastUpdateToPayPerRequestDateTime) (\s :: AwsDynamoDbTableBillingModeSummary
s@AwsDynamoDbTableBillingModeSummary' {} Maybe Text
a -> AwsDynamoDbTableBillingModeSummary
s {$sel:lastUpdateToPayPerRequestDateTime:AwsDynamoDbTableBillingModeSummary' :: Maybe Text
lastUpdateToPayPerRequestDateTime = Maybe Text
a} :: AwsDynamoDbTableBillingModeSummary)
awsDynamoDbTableBillingModeSummary_billingMode :: Lens.Lens' AwsDynamoDbTableBillingModeSummary (Prelude.Maybe Prelude.Text)
awsDynamoDbTableBillingModeSummary_billingMode :: (Maybe Text -> f (Maybe Text))
-> AwsDynamoDbTableBillingModeSummary
-> f AwsDynamoDbTableBillingModeSummary
awsDynamoDbTableBillingModeSummary_billingMode = (AwsDynamoDbTableBillingModeSummary -> Maybe Text)
-> (AwsDynamoDbTableBillingModeSummary
-> Maybe Text -> AwsDynamoDbTableBillingModeSummary)
-> Lens
AwsDynamoDbTableBillingModeSummary
AwsDynamoDbTableBillingModeSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableBillingModeSummary' {Maybe Text
billingMode :: Maybe Text
$sel:billingMode:AwsDynamoDbTableBillingModeSummary' :: AwsDynamoDbTableBillingModeSummary -> Maybe Text
billingMode} -> Maybe Text
billingMode) (\s :: AwsDynamoDbTableBillingModeSummary
s@AwsDynamoDbTableBillingModeSummary' {} Maybe Text
a -> AwsDynamoDbTableBillingModeSummary
s {$sel:billingMode:AwsDynamoDbTableBillingModeSummary' :: Maybe Text
billingMode = Maybe Text
a} :: AwsDynamoDbTableBillingModeSummary)
instance
Core.FromJSON
AwsDynamoDbTableBillingModeSummary
where
parseJSON :: Value -> Parser AwsDynamoDbTableBillingModeSummary
parseJSON =
String
-> (Object -> Parser AwsDynamoDbTableBillingModeSummary)
-> Value
-> Parser AwsDynamoDbTableBillingModeSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsDynamoDbTableBillingModeSummary"
( \Object
x ->
Maybe Text -> Maybe Text -> AwsDynamoDbTableBillingModeSummary
AwsDynamoDbTableBillingModeSummary'
(Maybe Text -> Maybe Text -> AwsDynamoDbTableBillingModeSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AwsDynamoDbTableBillingModeSummary)
forall (f :: * -> *) a b. Functor 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
"LastUpdateToPayPerRequestDateTime")
Parser (Maybe Text -> AwsDynamoDbTableBillingModeSummary)
-> Parser (Maybe Text) -> Parser AwsDynamoDbTableBillingModeSummary
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
"BillingMode")
)
instance
Prelude.Hashable
AwsDynamoDbTableBillingModeSummary
instance
Prelude.NFData
AwsDynamoDbTableBillingModeSummary
instance
Core.ToJSON
AwsDynamoDbTableBillingModeSummary
where
toJSON :: AwsDynamoDbTableBillingModeSummary -> Value
toJSON AwsDynamoDbTableBillingModeSummary' {Maybe Text
billingMode :: Maybe Text
lastUpdateToPayPerRequestDateTime :: Maybe Text
$sel:billingMode:AwsDynamoDbTableBillingModeSummary' :: AwsDynamoDbTableBillingModeSummary -> Maybe Text
$sel:lastUpdateToPayPerRequestDateTime:AwsDynamoDbTableBillingModeSummary' :: AwsDynamoDbTableBillingModeSummary -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"LastUpdateToPayPerRequestDateTime" 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
lastUpdateToPayPerRequestDateTime,
(Text
"BillingMode" 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
billingMode
]
)