{-# 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.SavingsPlansPurchaseRecommendation where
import qualified Amazonka.Core as Core
import Amazonka.CostExplorer.Types.AccountScope
import Amazonka.CostExplorer.Types.LookbackPeriodInDays
import Amazonka.CostExplorer.Types.PaymentOption
import Amazonka.CostExplorer.Types.SavingsPlansPurchaseRecommendationDetail
import Amazonka.CostExplorer.Types.SavingsPlansPurchaseRecommendationSummary
import Amazonka.CostExplorer.Types.SupportedSavingsPlansType
import Amazonka.CostExplorer.Types.TermInYears
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SavingsPlansPurchaseRecommendation = SavingsPlansPurchaseRecommendation'
{
SavingsPlansPurchaseRecommendation
-> Maybe [SavingsPlansPurchaseRecommendationDetail]
savingsPlansPurchaseRecommendationDetails :: Prelude.Maybe [SavingsPlansPurchaseRecommendationDetail],
SavingsPlansPurchaseRecommendation -> Maybe TermInYears
termInYears :: Prelude.Maybe TermInYears,
SavingsPlansPurchaseRecommendation -> Maybe AccountScope
accountScope :: Prelude.Maybe AccountScope,
SavingsPlansPurchaseRecommendation
-> Maybe SupportedSavingsPlansType
savingsPlansType :: Prelude.Maybe SupportedSavingsPlansType,
SavingsPlansPurchaseRecommendation -> Maybe LookbackPeriodInDays
lookbackPeriodInDays :: Prelude.Maybe LookbackPeriodInDays,
SavingsPlansPurchaseRecommendation -> Maybe PaymentOption
paymentOption :: Prelude.Maybe PaymentOption,
SavingsPlansPurchaseRecommendation
-> Maybe SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary :: Prelude.Maybe SavingsPlansPurchaseRecommendationSummary
}
deriving (SavingsPlansPurchaseRecommendation
-> SavingsPlansPurchaseRecommendation -> Bool
(SavingsPlansPurchaseRecommendation
-> SavingsPlansPurchaseRecommendation -> Bool)
-> (SavingsPlansPurchaseRecommendation
-> SavingsPlansPurchaseRecommendation -> Bool)
-> Eq SavingsPlansPurchaseRecommendation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SavingsPlansPurchaseRecommendation
-> SavingsPlansPurchaseRecommendation -> Bool
$c/= :: SavingsPlansPurchaseRecommendation
-> SavingsPlansPurchaseRecommendation -> Bool
== :: SavingsPlansPurchaseRecommendation
-> SavingsPlansPurchaseRecommendation -> Bool
$c== :: SavingsPlansPurchaseRecommendation
-> SavingsPlansPurchaseRecommendation -> Bool
Prelude.Eq, ReadPrec [SavingsPlansPurchaseRecommendation]
ReadPrec SavingsPlansPurchaseRecommendation
Int -> ReadS SavingsPlansPurchaseRecommendation
ReadS [SavingsPlansPurchaseRecommendation]
(Int -> ReadS SavingsPlansPurchaseRecommendation)
-> ReadS [SavingsPlansPurchaseRecommendation]
-> ReadPrec SavingsPlansPurchaseRecommendation
-> ReadPrec [SavingsPlansPurchaseRecommendation]
-> Read SavingsPlansPurchaseRecommendation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SavingsPlansPurchaseRecommendation]
$creadListPrec :: ReadPrec [SavingsPlansPurchaseRecommendation]
readPrec :: ReadPrec SavingsPlansPurchaseRecommendation
$creadPrec :: ReadPrec SavingsPlansPurchaseRecommendation
readList :: ReadS [SavingsPlansPurchaseRecommendation]
$creadList :: ReadS [SavingsPlansPurchaseRecommendation]
readsPrec :: Int -> ReadS SavingsPlansPurchaseRecommendation
$creadsPrec :: Int -> ReadS SavingsPlansPurchaseRecommendation
Prelude.Read, Int -> SavingsPlansPurchaseRecommendation -> ShowS
[SavingsPlansPurchaseRecommendation] -> ShowS
SavingsPlansPurchaseRecommendation -> String
(Int -> SavingsPlansPurchaseRecommendation -> ShowS)
-> (SavingsPlansPurchaseRecommendation -> String)
-> ([SavingsPlansPurchaseRecommendation] -> ShowS)
-> Show SavingsPlansPurchaseRecommendation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SavingsPlansPurchaseRecommendation] -> ShowS
$cshowList :: [SavingsPlansPurchaseRecommendation] -> ShowS
show :: SavingsPlansPurchaseRecommendation -> String
$cshow :: SavingsPlansPurchaseRecommendation -> String
showsPrec :: Int -> SavingsPlansPurchaseRecommendation -> ShowS
$cshowsPrec :: Int -> SavingsPlansPurchaseRecommendation -> ShowS
Prelude.Show, (forall x.
SavingsPlansPurchaseRecommendation
-> Rep SavingsPlansPurchaseRecommendation x)
-> (forall x.
Rep SavingsPlansPurchaseRecommendation x
-> SavingsPlansPurchaseRecommendation)
-> Generic SavingsPlansPurchaseRecommendation
forall x.
Rep SavingsPlansPurchaseRecommendation x
-> SavingsPlansPurchaseRecommendation
forall x.
SavingsPlansPurchaseRecommendation
-> Rep SavingsPlansPurchaseRecommendation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SavingsPlansPurchaseRecommendation x
-> SavingsPlansPurchaseRecommendation
$cfrom :: forall x.
SavingsPlansPurchaseRecommendation
-> Rep SavingsPlansPurchaseRecommendation x
Prelude.Generic)
newSavingsPlansPurchaseRecommendation ::
SavingsPlansPurchaseRecommendation
newSavingsPlansPurchaseRecommendation :: SavingsPlansPurchaseRecommendation
newSavingsPlansPurchaseRecommendation =
SavingsPlansPurchaseRecommendation' :: Maybe [SavingsPlansPurchaseRecommendationDetail]
-> Maybe TermInYears
-> Maybe AccountScope
-> Maybe SupportedSavingsPlansType
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation
SavingsPlansPurchaseRecommendation'
{ $sel:savingsPlansPurchaseRecommendationDetails:SavingsPlansPurchaseRecommendation' :: Maybe [SavingsPlansPurchaseRecommendationDetail]
savingsPlansPurchaseRecommendationDetails =
Maybe [SavingsPlansPurchaseRecommendationDetail]
forall a. Maybe a
Prelude.Nothing,
$sel:termInYears:SavingsPlansPurchaseRecommendation' :: Maybe TermInYears
termInYears = Maybe TermInYears
forall a. Maybe a
Prelude.Nothing,
$sel:accountScope:SavingsPlansPurchaseRecommendation' :: Maybe AccountScope
accountScope = Maybe AccountScope
forall a. Maybe a
Prelude.Nothing,
$sel:savingsPlansType:SavingsPlansPurchaseRecommendation' :: Maybe SupportedSavingsPlansType
savingsPlansType = Maybe SupportedSavingsPlansType
forall a. Maybe a
Prelude.Nothing,
$sel:lookbackPeriodInDays:SavingsPlansPurchaseRecommendation' :: Maybe LookbackPeriodInDays
lookbackPeriodInDays = Maybe LookbackPeriodInDays
forall a. Maybe a
Prelude.Nothing,
$sel:paymentOption:SavingsPlansPurchaseRecommendation' :: Maybe PaymentOption
paymentOption = Maybe PaymentOption
forall a. Maybe a
Prelude.Nothing,
$sel:savingsPlansPurchaseRecommendationSummary:SavingsPlansPurchaseRecommendation' :: Maybe SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary =
Maybe SavingsPlansPurchaseRecommendationSummary
forall a. Maybe a
Prelude.Nothing
}
savingsPlansPurchaseRecommendation_savingsPlansPurchaseRecommendationDetails :: Lens.Lens' SavingsPlansPurchaseRecommendation (Prelude.Maybe [SavingsPlansPurchaseRecommendationDetail])
savingsPlansPurchaseRecommendation_savingsPlansPurchaseRecommendationDetails :: (Maybe [SavingsPlansPurchaseRecommendationDetail]
-> f (Maybe [SavingsPlansPurchaseRecommendationDetail]))
-> SavingsPlansPurchaseRecommendation
-> f SavingsPlansPurchaseRecommendation
savingsPlansPurchaseRecommendation_savingsPlansPurchaseRecommendationDetails = (SavingsPlansPurchaseRecommendation
-> Maybe [SavingsPlansPurchaseRecommendationDetail])
-> (SavingsPlansPurchaseRecommendation
-> Maybe [SavingsPlansPurchaseRecommendationDetail]
-> SavingsPlansPurchaseRecommendation)
-> Lens
SavingsPlansPurchaseRecommendation
SavingsPlansPurchaseRecommendation
(Maybe [SavingsPlansPurchaseRecommendationDetail])
(Maybe [SavingsPlansPurchaseRecommendationDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendation' {Maybe [SavingsPlansPurchaseRecommendationDetail]
savingsPlansPurchaseRecommendationDetails :: Maybe [SavingsPlansPurchaseRecommendationDetail]
$sel:savingsPlansPurchaseRecommendationDetails:SavingsPlansPurchaseRecommendation' :: SavingsPlansPurchaseRecommendation
-> Maybe [SavingsPlansPurchaseRecommendationDetail]
savingsPlansPurchaseRecommendationDetails} -> Maybe [SavingsPlansPurchaseRecommendationDetail]
savingsPlansPurchaseRecommendationDetails) (\s :: SavingsPlansPurchaseRecommendation
s@SavingsPlansPurchaseRecommendation' {} Maybe [SavingsPlansPurchaseRecommendationDetail]
a -> SavingsPlansPurchaseRecommendation
s {$sel:savingsPlansPurchaseRecommendationDetails:SavingsPlansPurchaseRecommendation' :: Maybe [SavingsPlansPurchaseRecommendationDetail]
savingsPlansPurchaseRecommendationDetails = Maybe [SavingsPlansPurchaseRecommendationDetail]
a} :: SavingsPlansPurchaseRecommendation) ((Maybe [SavingsPlansPurchaseRecommendationDetail]
-> f (Maybe [SavingsPlansPurchaseRecommendationDetail]))
-> SavingsPlansPurchaseRecommendation
-> f SavingsPlansPurchaseRecommendation)
-> ((Maybe [SavingsPlansPurchaseRecommendationDetail]
-> f (Maybe [SavingsPlansPurchaseRecommendationDetail]))
-> Maybe [SavingsPlansPurchaseRecommendationDetail]
-> f (Maybe [SavingsPlansPurchaseRecommendationDetail]))
-> (Maybe [SavingsPlansPurchaseRecommendationDetail]
-> f (Maybe [SavingsPlansPurchaseRecommendationDetail]))
-> SavingsPlansPurchaseRecommendation
-> f SavingsPlansPurchaseRecommendation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[SavingsPlansPurchaseRecommendationDetail]
[SavingsPlansPurchaseRecommendationDetail]
[SavingsPlansPurchaseRecommendationDetail]
[SavingsPlansPurchaseRecommendationDetail]
-> Iso
(Maybe [SavingsPlansPurchaseRecommendationDetail])
(Maybe [SavingsPlansPurchaseRecommendationDetail])
(Maybe [SavingsPlansPurchaseRecommendationDetail])
(Maybe [SavingsPlansPurchaseRecommendationDetail])
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 AnIso
[SavingsPlansPurchaseRecommendationDetail]
[SavingsPlansPurchaseRecommendationDetail]
[SavingsPlansPurchaseRecommendationDetail]
[SavingsPlansPurchaseRecommendationDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
savingsPlansPurchaseRecommendation_termInYears :: Lens.Lens' SavingsPlansPurchaseRecommendation (Prelude.Maybe TermInYears)
savingsPlansPurchaseRecommendation_termInYears :: (Maybe TermInYears -> f (Maybe TermInYears))
-> SavingsPlansPurchaseRecommendation
-> f SavingsPlansPurchaseRecommendation
savingsPlansPurchaseRecommendation_termInYears = (SavingsPlansPurchaseRecommendation -> Maybe TermInYears)
-> (SavingsPlansPurchaseRecommendation
-> Maybe TermInYears -> SavingsPlansPurchaseRecommendation)
-> Lens
SavingsPlansPurchaseRecommendation
SavingsPlansPurchaseRecommendation
(Maybe TermInYears)
(Maybe TermInYears)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendation' {Maybe TermInYears
termInYears :: Maybe TermInYears
$sel:termInYears:SavingsPlansPurchaseRecommendation' :: SavingsPlansPurchaseRecommendation -> Maybe TermInYears
termInYears} -> Maybe TermInYears
termInYears) (\s :: SavingsPlansPurchaseRecommendation
s@SavingsPlansPurchaseRecommendation' {} Maybe TermInYears
a -> SavingsPlansPurchaseRecommendation
s {$sel:termInYears:SavingsPlansPurchaseRecommendation' :: Maybe TermInYears
termInYears = Maybe TermInYears
a} :: SavingsPlansPurchaseRecommendation)
savingsPlansPurchaseRecommendation_accountScope :: Lens.Lens' SavingsPlansPurchaseRecommendation (Prelude.Maybe AccountScope)
savingsPlansPurchaseRecommendation_accountScope :: (Maybe AccountScope -> f (Maybe AccountScope))
-> SavingsPlansPurchaseRecommendation
-> f SavingsPlansPurchaseRecommendation
savingsPlansPurchaseRecommendation_accountScope = (SavingsPlansPurchaseRecommendation -> Maybe AccountScope)
-> (SavingsPlansPurchaseRecommendation
-> Maybe AccountScope -> SavingsPlansPurchaseRecommendation)
-> Lens
SavingsPlansPurchaseRecommendation
SavingsPlansPurchaseRecommendation
(Maybe AccountScope)
(Maybe AccountScope)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendation' {Maybe AccountScope
accountScope :: Maybe AccountScope
$sel:accountScope:SavingsPlansPurchaseRecommendation' :: SavingsPlansPurchaseRecommendation -> Maybe AccountScope
accountScope} -> Maybe AccountScope
accountScope) (\s :: SavingsPlansPurchaseRecommendation
s@SavingsPlansPurchaseRecommendation' {} Maybe AccountScope
a -> SavingsPlansPurchaseRecommendation
s {$sel:accountScope:SavingsPlansPurchaseRecommendation' :: Maybe AccountScope
accountScope = Maybe AccountScope
a} :: SavingsPlansPurchaseRecommendation)
savingsPlansPurchaseRecommendation_savingsPlansType :: Lens.Lens' SavingsPlansPurchaseRecommendation (Prelude.Maybe SupportedSavingsPlansType)
savingsPlansPurchaseRecommendation_savingsPlansType :: (Maybe SupportedSavingsPlansType
-> f (Maybe SupportedSavingsPlansType))
-> SavingsPlansPurchaseRecommendation
-> f SavingsPlansPurchaseRecommendation
savingsPlansPurchaseRecommendation_savingsPlansType = (SavingsPlansPurchaseRecommendation
-> Maybe SupportedSavingsPlansType)
-> (SavingsPlansPurchaseRecommendation
-> Maybe SupportedSavingsPlansType
-> SavingsPlansPurchaseRecommendation)
-> Lens
SavingsPlansPurchaseRecommendation
SavingsPlansPurchaseRecommendation
(Maybe SupportedSavingsPlansType)
(Maybe SupportedSavingsPlansType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendation' {Maybe SupportedSavingsPlansType
savingsPlansType :: Maybe SupportedSavingsPlansType
$sel:savingsPlansType:SavingsPlansPurchaseRecommendation' :: SavingsPlansPurchaseRecommendation
-> Maybe SupportedSavingsPlansType
savingsPlansType} -> Maybe SupportedSavingsPlansType
savingsPlansType) (\s :: SavingsPlansPurchaseRecommendation
s@SavingsPlansPurchaseRecommendation' {} Maybe SupportedSavingsPlansType
a -> SavingsPlansPurchaseRecommendation
s {$sel:savingsPlansType:SavingsPlansPurchaseRecommendation' :: Maybe SupportedSavingsPlansType
savingsPlansType = Maybe SupportedSavingsPlansType
a} :: SavingsPlansPurchaseRecommendation)
savingsPlansPurchaseRecommendation_lookbackPeriodInDays :: Lens.Lens' SavingsPlansPurchaseRecommendation (Prelude.Maybe LookbackPeriodInDays)
savingsPlansPurchaseRecommendation_lookbackPeriodInDays :: (Maybe LookbackPeriodInDays -> f (Maybe LookbackPeriodInDays))
-> SavingsPlansPurchaseRecommendation
-> f SavingsPlansPurchaseRecommendation
savingsPlansPurchaseRecommendation_lookbackPeriodInDays = (SavingsPlansPurchaseRecommendation -> Maybe LookbackPeriodInDays)
-> (SavingsPlansPurchaseRecommendation
-> Maybe LookbackPeriodInDays
-> SavingsPlansPurchaseRecommendation)
-> Lens
SavingsPlansPurchaseRecommendation
SavingsPlansPurchaseRecommendation
(Maybe LookbackPeriodInDays)
(Maybe LookbackPeriodInDays)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendation' {Maybe LookbackPeriodInDays
lookbackPeriodInDays :: Maybe LookbackPeriodInDays
$sel:lookbackPeriodInDays:SavingsPlansPurchaseRecommendation' :: SavingsPlansPurchaseRecommendation -> Maybe LookbackPeriodInDays
lookbackPeriodInDays} -> Maybe LookbackPeriodInDays
lookbackPeriodInDays) (\s :: SavingsPlansPurchaseRecommendation
s@SavingsPlansPurchaseRecommendation' {} Maybe LookbackPeriodInDays
a -> SavingsPlansPurchaseRecommendation
s {$sel:lookbackPeriodInDays:SavingsPlansPurchaseRecommendation' :: Maybe LookbackPeriodInDays
lookbackPeriodInDays = Maybe LookbackPeriodInDays
a} :: SavingsPlansPurchaseRecommendation)
savingsPlansPurchaseRecommendation_paymentOption :: Lens.Lens' SavingsPlansPurchaseRecommendation (Prelude.Maybe PaymentOption)
savingsPlansPurchaseRecommendation_paymentOption :: (Maybe PaymentOption -> f (Maybe PaymentOption))
-> SavingsPlansPurchaseRecommendation
-> f SavingsPlansPurchaseRecommendation
savingsPlansPurchaseRecommendation_paymentOption = (SavingsPlansPurchaseRecommendation -> Maybe PaymentOption)
-> (SavingsPlansPurchaseRecommendation
-> Maybe PaymentOption -> SavingsPlansPurchaseRecommendation)
-> Lens
SavingsPlansPurchaseRecommendation
SavingsPlansPurchaseRecommendation
(Maybe PaymentOption)
(Maybe PaymentOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendation' {Maybe PaymentOption
paymentOption :: Maybe PaymentOption
$sel:paymentOption:SavingsPlansPurchaseRecommendation' :: SavingsPlansPurchaseRecommendation -> Maybe PaymentOption
paymentOption} -> Maybe PaymentOption
paymentOption) (\s :: SavingsPlansPurchaseRecommendation
s@SavingsPlansPurchaseRecommendation' {} Maybe PaymentOption
a -> SavingsPlansPurchaseRecommendation
s {$sel:paymentOption:SavingsPlansPurchaseRecommendation' :: Maybe PaymentOption
paymentOption = Maybe PaymentOption
a} :: SavingsPlansPurchaseRecommendation)
savingsPlansPurchaseRecommendation_savingsPlansPurchaseRecommendationSummary :: Lens.Lens' SavingsPlansPurchaseRecommendation (Prelude.Maybe SavingsPlansPurchaseRecommendationSummary)
savingsPlansPurchaseRecommendation_savingsPlansPurchaseRecommendationSummary :: (Maybe SavingsPlansPurchaseRecommendationSummary
-> f (Maybe SavingsPlansPurchaseRecommendationSummary))
-> SavingsPlansPurchaseRecommendation
-> f SavingsPlansPurchaseRecommendation
savingsPlansPurchaseRecommendation_savingsPlansPurchaseRecommendationSummary = (SavingsPlansPurchaseRecommendation
-> Maybe SavingsPlansPurchaseRecommendationSummary)
-> (SavingsPlansPurchaseRecommendation
-> Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation)
-> Lens
SavingsPlansPurchaseRecommendation
SavingsPlansPurchaseRecommendation
(Maybe SavingsPlansPurchaseRecommendationSummary)
(Maybe SavingsPlansPurchaseRecommendationSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendation' {Maybe SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary :: Maybe SavingsPlansPurchaseRecommendationSummary
$sel:savingsPlansPurchaseRecommendationSummary:SavingsPlansPurchaseRecommendation' :: SavingsPlansPurchaseRecommendation
-> Maybe SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary} -> Maybe SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary) (\s :: SavingsPlansPurchaseRecommendation
s@SavingsPlansPurchaseRecommendation' {} Maybe SavingsPlansPurchaseRecommendationSummary
a -> SavingsPlansPurchaseRecommendation
s {$sel:savingsPlansPurchaseRecommendationSummary:SavingsPlansPurchaseRecommendation' :: Maybe SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary = Maybe SavingsPlansPurchaseRecommendationSummary
a} :: SavingsPlansPurchaseRecommendation)
instance
Core.FromJSON
SavingsPlansPurchaseRecommendation
where
parseJSON :: Value -> Parser SavingsPlansPurchaseRecommendation
parseJSON =
String
-> (Object -> Parser SavingsPlansPurchaseRecommendation)
-> Value
-> Parser SavingsPlansPurchaseRecommendation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SavingsPlansPurchaseRecommendation"
( \Object
x ->
Maybe [SavingsPlansPurchaseRecommendationDetail]
-> Maybe TermInYears
-> Maybe AccountScope
-> Maybe SupportedSavingsPlansType
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation
SavingsPlansPurchaseRecommendation'
(Maybe [SavingsPlansPurchaseRecommendationDetail]
-> Maybe TermInYears
-> Maybe AccountScope
-> Maybe SupportedSavingsPlansType
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation)
-> Parser (Maybe [SavingsPlansPurchaseRecommendationDetail])
-> Parser
(Maybe TermInYears
-> Maybe AccountScope
-> Maybe SupportedSavingsPlansType
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
Object
-> Text
-> Parser
(Maybe (Maybe [SavingsPlansPurchaseRecommendationDetail]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SavingsPlansPurchaseRecommendationDetails"
Parser (Maybe (Maybe [SavingsPlansPurchaseRecommendationDetail]))
-> Maybe [SavingsPlansPurchaseRecommendationDetail]
-> Parser (Maybe [SavingsPlansPurchaseRecommendationDetail])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [SavingsPlansPurchaseRecommendationDetail]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe TermInYears
-> Maybe AccountScope
-> Maybe SupportedSavingsPlansType
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation)
-> Parser (Maybe TermInYears)
-> Parser
(Maybe AccountScope
-> Maybe SupportedSavingsPlansType
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TermInYears)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TermInYears")
Parser
(Maybe AccountScope
-> Maybe SupportedSavingsPlansType
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation)
-> Parser (Maybe AccountScope)
-> Parser
(Maybe SupportedSavingsPlansType
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AccountScope)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AccountScope")
Parser
(Maybe SupportedSavingsPlansType
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation)
-> Parser (Maybe SupportedSavingsPlansType)
-> Parser
(Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SupportedSavingsPlansType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SavingsPlansType")
Parser
(Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation)
-> Parser (Maybe LookbackPeriodInDays)
-> Parser
(Maybe PaymentOption
-> Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LookbackPeriodInDays)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LookbackPeriodInDays")
Parser
(Maybe PaymentOption
-> Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation)
-> Parser (Maybe PaymentOption)
-> Parser
(Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PaymentOption)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PaymentOption")
Parser
(Maybe SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendation)
-> Parser (Maybe SavingsPlansPurchaseRecommendationSummary)
-> Parser SavingsPlansPurchaseRecommendation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
Object
-> Text -> Parser (Maybe SavingsPlansPurchaseRecommendationSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SavingsPlansPurchaseRecommendationSummary"
)
)
instance
Prelude.Hashable
SavingsPlansPurchaseRecommendation
instance
Prelude.NFData
SavingsPlansPurchaseRecommendation