{-# 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.CostExplorer.Types.SavingsPlansAmortizedCommitment where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SavingsPlansAmortizedCommitment = SavingsPlansAmortizedCommitment'
{
SavingsPlansAmortizedCommitment -> Maybe Text
amortizedUpfrontCommitment :: Prelude.Maybe Prelude.Text,
SavingsPlansAmortizedCommitment -> Maybe Text
totalAmortizedCommitment :: Prelude.Maybe Prelude.Text,
SavingsPlansAmortizedCommitment -> Maybe Text
amortizedRecurringCommitment :: Prelude.Maybe Prelude.Text
}
deriving (SavingsPlansAmortizedCommitment
-> SavingsPlansAmortizedCommitment -> Bool
(SavingsPlansAmortizedCommitment
-> SavingsPlansAmortizedCommitment -> Bool)
-> (SavingsPlansAmortizedCommitment
-> SavingsPlansAmortizedCommitment -> Bool)
-> Eq SavingsPlansAmortizedCommitment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SavingsPlansAmortizedCommitment
-> SavingsPlansAmortizedCommitment -> Bool
$c/= :: SavingsPlansAmortizedCommitment
-> SavingsPlansAmortizedCommitment -> Bool
== :: SavingsPlansAmortizedCommitment
-> SavingsPlansAmortizedCommitment -> Bool
$c== :: SavingsPlansAmortizedCommitment
-> SavingsPlansAmortizedCommitment -> Bool
Prelude.Eq, ReadPrec [SavingsPlansAmortizedCommitment]
ReadPrec SavingsPlansAmortizedCommitment
Int -> ReadS SavingsPlansAmortizedCommitment
ReadS [SavingsPlansAmortizedCommitment]
(Int -> ReadS SavingsPlansAmortizedCommitment)
-> ReadS [SavingsPlansAmortizedCommitment]
-> ReadPrec SavingsPlansAmortizedCommitment
-> ReadPrec [SavingsPlansAmortizedCommitment]
-> Read SavingsPlansAmortizedCommitment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SavingsPlansAmortizedCommitment]
$creadListPrec :: ReadPrec [SavingsPlansAmortizedCommitment]
readPrec :: ReadPrec SavingsPlansAmortizedCommitment
$creadPrec :: ReadPrec SavingsPlansAmortizedCommitment
readList :: ReadS [SavingsPlansAmortizedCommitment]
$creadList :: ReadS [SavingsPlansAmortizedCommitment]
readsPrec :: Int -> ReadS SavingsPlansAmortizedCommitment
$creadsPrec :: Int -> ReadS SavingsPlansAmortizedCommitment
Prelude.Read, Int -> SavingsPlansAmortizedCommitment -> ShowS
[SavingsPlansAmortizedCommitment] -> ShowS
SavingsPlansAmortizedCommitment -> String
(Int -> SavingsPlansAmortizedCommitment -> ShowS)
-> (SavingsPlansAmortizedCommitment -> String)
-> ([SavingsPlansAmortizedCommitment] -> ShowS)
-> Show SavingsPlansAmortizedCommitment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SavingsPlansAmortizedCommitment] -> ShowS
$cshowList :: [SavingsPlansAmortizedCommitment] -> ShowS
show :: SavingsPlansAmortizedCommitment -> String
$cshow :: SavingsPlansAmortizedCommitment -> String
showsPrec :: Int -> SavingsPlansAmortizedCommitment -> ShowS
$cshowsPrec :: Int -> SavingsPlansAmortizedCommitment -> ShowS
Prelude.Show, (forall x.
SavingsPlansAmortizedCommitment
-> Rep SavingsPlansAmortizedCommitment x)
-> (forall x.
Rep SavingsPlansAmortizedCommitment x
-> SavingsPlansAmortizedCommitment)
-> Generic SavingsPlansAmortizedCommitment
forall x.
Rep SavingsPlansAmortizedCommitment x
-> SavingsPlansAmortizedCommitment
forall x.
SavingsPlansAmortizedCommitment
-> Rep SavingsPlansAmortizedCommitment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SavingsPlansAmortizedCommitment x
-> SavingsPlansAmortizedCommitment
$cfrom :: forall x.
SavingsPlansAmortizedCommitment
-> Rep SavingsPlansAmortizedCommitment x
Prelude.Generic)
newSavingsPlansAmortizedCommitment ::
SavingsPlansAmortizedCommitment
newSavingsPlansAmortizedCommitment :: SavingsPlansAmortizedCommitment
newSavingsPlansAmortizedCommitment =
SavingsPlansAmortizedCommitment' :: Maybe Text
-> Maybe Text -> Maybe Text -> SavingsPlansAmortizedCommitment
SavingsPlansAmortizedCommitment'
{ $sel:amortizedUpfrontCommitment:SavingsPlansAmortizedCommitment' :: Maybe Text
amortizedUpfrontCommitment =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:totalAmortizedCommitment:SavingsPlansAmortizedCommitment' :: Maybe Text
totalAmortizedCommitment = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:amortizedRecurringCommitment:SavingsPlansAmortizedCommitment' :: Maybe Text
amortizedRecurringCommitment =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
savingsPlansAmortizedCommitment_amortizedUpfrontCommitment :: Lens.Lens' SavingsPlansAmortizedCommitment (Prelude.Maybe Prelude.Text)
savingsPlansAmortizedCommitment_amortizedUpfrontCommitment :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansAmortizedCommitment
-> f SavingsPlansAmortizedCommitment
savingsPlansAmortizedCommitment_amortizedUpfrontCommitment = (SavingsPlansAmortizedCommitment -> Maybe Text)
-> (SavingsPlansAmortizedCommitment
-> Maybe Text -> SavingsPlansAmortizedCommitment)
-> Lens
SavingsPlansAmortizedCommitment
SavingsPlansAmortizedCommitment
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansAmortizedCommitment' {Maybe Text
amortizedUpfrontCommitment :: Maybe Text
$sel:amortizedUpfrontCommitment:SavingsPlansAmortizedCommitment' :: SavingsPlansAmortizedCommitment -> Maybe Text
amortizedUpfrontCommitment} -> Maybe Text
amortizedUpfrontCommitment) (\s :: SavingsPlansAmortizedCommitment
s@SavingsPlansAmortizedCommitment' {} Maybe Text
a -> SavingsPlansAmortizedCommitment
s {$sel:amortizedUpfrontCommitment:SavingsPlansAmortizedCommitment' :: Maybe Text
amortizedUpfrontCommitment = Maybe Text
a} :: SavingsPlansAmortizedCommitment)
savingsPlansAmortizedCommitment_totalAmortizedCommitment :: Lens.Lens' SavingsPlansAmortizedCommitment (Prelude.Maybe Prelude.Text)
savingsPlansAmortizedCommitment_totalAmortizedCommitment :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansAmortizedCommitment
-> f SavingsPlansAmortizedCommitment
savingsPlansAmortizedCommitment_totalAmortizedCommitment = (SavingsPlansAmortizedCommitment -> Maybe Text)
-> (SavingsPlansAmortizedCommitment
-> Maybe Text -> SavingsPlansAmortizedCommitment)
-> Lens
SavingsPlansAmortizedCommitment
SavingsPlansAmortizedCommitment
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansAmortizedCommitment' {Maybe Text
totalAmortizedCommitment :: Maybe Text
$sel:totalAmortizedCommitment:SavingsPlansAmortizedCommitment' :: SavingsPlansAmortizedCommitment -> Maybe Text
totalAmortizedCommitment} -> Maybe Text
totalAmortizedCommitment) (\s :: SavingsPlansAmortizedCommitment
s@SavingsPlansAmortizedCommitment' {} Maybe Text
a -> SavingsPlansAmortizedCommitment
s {$sel:totalAmortizedCommitment:SavingsPlansAmortizedCommitment' :: Maybe Text
totalAmortizedCommitment = Maybe Text
a} :: SavingsPlansAmortizedCommitment)
savingsPlansAmortizedCommitment_amortizedRecurringCommitment :: Lens.Lens' SavingsPlansAmortizedCommitment (Prelude.Maybe Prelude.Text)
savingsPlansAmortizedCommitment_amortizedRecurringCommitment :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansAmortizedCommitment
-> f SavingsPlansAmortizedCommitment
savingsPlansAmortizedCommitment_amortizedRecurringCommitment = (SavingsPlansAmortizedCommitment -> Maybe Text)
-> (SavingsPlansAmortizedCommitment
-> Maybe Text -> SavingsPlansAmortizedCommitment)
-> Lens
SavingsPlansAmortizedCommitment
SavingsPlansAmortizedCommitment
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansAmortizedCommitment' {Maybe Text
amortizedRecurringCommitment :: Maybe Text
$sel:amortizedRecurringCommitment:SavingsPlansAmortizedCommitment' :: SavingsPlansAmortizedCommitment -> Maybe Text
amortizedRecurringCommitment} -> Maybe Text
amortizedRecurringCommitment) (\s :: SavingsPlansAmortizedCommitment
s@SavingsPlansAmortizedCommitment' {} Maybe Text
a -> SavingsPlansAmortizedCommitment
s {$sel:amortizedRecurringCommitment:SavingsPlansAmortizedCommitment' :: Maybe Text
amortizedRecurringCommitment = Maybe Text
a} :: SavingsPlansAmortizedCommitment)
instance
Core.FromJSON
SavingsPlansAmortizedCommitment
where
parseJSON :: Value -> Parser SavingsPlansAmortizedCommitment
parseJSON =
String
-> (Object -> Parser SavingsPlansAmortizedCommitment)
-> Value
-> Parser SavingsPlansAmortizedCommitment
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SavingsPlansAmortizedCommitment"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> SavingsPlansAmortizedCommitment
SavingsPlansAmortizedCommitment'
(Maybe Text
-> Maybe Text -> Maybe Text -> SavingsPlansAmortizedCommitment)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> SavingsPlansAmortizedCommitment)
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
"AmortizedUpfrontCommitment")
Parser
(Maybe Text -> Maybe Text -> SavingsPlansAmortizedCommitment)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> SavingsPlansAmortizedCommitment)
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
"TotalAmortizedCommitment")
Parser (Maybe Text -> SavingsPlansAmortizedCommitment)
-> Parser (Maybe Text) -> Parser SavingsPlansAmortizedCommitment
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
"AmortizedRecurringCommitment")
)
instance
Prelude.Hashable
SavingsPlansAmortizedCommitment
instance
Prelude.NFData
SavingsPlansAmortizedCommitment