{-# 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.ReservationPurchaseRecommendation 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.ReservationPurchaseRecommendationDetail
import Amazonka.CostExplorer.Types.ReservationPurchaseRecommendationSummary
import Amazonka.CostExplorer.Types.ServiceSpecification
import Amazonka.CostExplorer.Types.TermInYears
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ReservationPurchaseRecommendation = ReservationPurchaseRecommendation'
{
ReservationPurchaseRecommendation -> Maybe TermInYears
termInYears :: Prelude.Maybe TermInYears,
ReservationPurchaseRecommendation
-> Maybe ReservationPurchaseRecommendationSummary
recommendationSummary :: Prelude.Maybe ReservationPurchaseRecommendationSummary,
ReservationPurchaseRecommendation -> Maybe ServiceSpecification
serviceSpecification :: Prelude.Maybe ServiceSpecification,
ReservationPurchaseRecommendation -> Maybe AccountScope
accountScope :: Prelude.Maybe AccountScope,
ReservationPurchaseRecommendation
-> Maybe [ReservationPurchaseRecommendationDetail]
recommendationDetails :: Prelude.Maybe [ReservationPurchaseRecommendationDetail],
ReservationPurchaseRecommendation -> Maybe LookbackPeriodInDays
lookbackPeriodInDays :: Prelude.Maybe LookbackPeriodInDays,
ReservationPurchaseRecommendation -> Maybe PaymentOption
paymentOption :: Prelude.Maybe PaymentOption
}
deriving (ReservationPurchaseRecommendation
-> ReservationPurchaseRecommendation -> Bool
(ReservationPurchaseRecommendation
-> ReservationPurchaseRecommendation -> Bool)
-> (ReservationPurchaseRecommendation
-> ReservationPurchaseRecommendation -> Bool)
-> Eq ReservationPurchaseRecommendation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReservationPurchaseRecommendation
-> ReservationPurchaseRecommendation -> Bool
$c/= :: ReservationPurchaseRecommendation
-> ReservationPurchaseRecommendation -> Bool
== :: ReservationPurchaseRecommendation
-> ReservationPurchaseRecommendation -> Bool
$c== :: ReservationPurchaseRecommendation
-> ReservationPurchaseRecommendation -> Bool
Prelude.Eq, ReadPrec [ReservationPurchaseRecommendation]
ReadPrec ReservationPurchaseRecommendation
Int -> ReadS ReservationPurchaseRecommendation
ReadS [ReservationPurchaseRecommendation]
(Int -> ReadS ReservationPurchaseRecommendation)
-> ReadS [ReservationPurchaseRecommendation]
-> ReadPrec ReservationPurchaseRecommendation
-> ReadPrec [ReservationPurchaseRecommendation]
-> Read ReservationPurchaseRecommendation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReservationPurchaseRecommendation]
$creadListPrec :: ReadPrec [ReservationPurchaseRecommendation]
readPrec :: ReadPrec ReservationPurchaseRecommendation
$creadPrec :: ReadPrec ReservationPurchaseRecommendation
readList :: ReadS [ReservationPurchaseRecommendation]
$creadList :: ReadS [ReservationPurchaseRecommendation]
readsPrec :: Int -> ReadS ReservationPurchaseRecommendation
$creadsPrec :: Int -> ReadS ReservationPurchaseRecommendation
Prelude.Read, Int -> ReservationPurchaseRecommendation -> ShowS
[ReservationPurchaseRecommendation] -> ShowS
ReservationPurchaseRecommendation -> String
(Int -> ReservationPurchaseRecommendation -> ShowS)
-> (ReservationPurchaseRecommendation -> String)
-> ([ReservationPurchaseRecommendation] -> ShowS)
-> Show ReservationPurchaseRecommendation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReservationPurchaseRecommendation] -> ShowS
$cshowList :: [ReservationPurchaseRecommendation] -> ShowS
show :: ReservationPurchaseRecommendation -> String
$cshow :: ReservationPurchaseRecommendation -> String
showsPrec :: Int -> ReservationPurchaseRecommendation -> ShowS
$cshowsPrec :: Int -> ReservationPurchaseRecommendation -> ShowS
Prelude.Show, (forall x.
ReservationPurchaseRecommendation
-> Rep ReservationPurchaseRecommendation x)
-> (forall x.
Rep ReservationPurchaseRecommendation x
-> ReservationPurchaseRecommendation)
-> Generic ReservationPurchaseRecommendation
forall x.
Rep ReservationPurchaseRecommendation x
-> ReservationPurchaseRecommendation
forall x.
ReservationPurchaseRecommendation
-> Rep ReservationPurchaseRecommendation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReservationPurchaseRecommendation x
-> ReservationPurchaseRecommendation
$cfrom :: forall x.
ReservationPurchaseRecommendation
-> Rep ReservationPurchaseRecommendation x
Prelude.Generic)
newReservationPurchaseRecommendation ::
ReservationPurchaseRecommendation
newReservationPurchaseRecommendation :: ReservationPurchaseRecommendation
newReservationPurchaseRecommendation =
ReservationPurchaseRecommendation' :: Maybe TermInYears
-> Maybe ReservationPurchaseRecommendationSummary
-> Maybe ServiceSpecification
-> Maybe AccountScope
-> Maybe [ReservationPurchaseRecommendationDetail]
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> ReservationPurchaseRecommendation
ReservationPurchaseRecommendation'
{ $sel:termInYears:ReservationPurchaseRecommendation' :: Maybe TermInYears
termInYears =
Maybe TermInYears
forall a. Maybe a
Prelude.Nothing,
$sel:recommendationSummary:ReservationPurchaseRecommendation' :: Maybe ReservationPurchaseRecommendationSummary
recommendationSummary = Maybe ReservationPurchaseRecommendationSummary
forall a. Maybe a
Prelude.Nothing,
$sel:serviceSpecification:ReservationPurchaseRecommendation' :: Maybe ServiceSpecification
serviceSpecification = Maybe ServiceSpecification
forall a. Maybe a
Prelude.Nothing,
$sel:accountScope:ReservationPurchaseRecommendation' :: Maybe AccountScope
accountScope = Maybe AccountScope
forall a. Maybe a
Prelude.Nothing,
$sel:recommendationDetails:ReservationPurchaseRecommendation' :: Maybe [ReservationPurchaseRecommendationDetail]
recommendationDetails = Maybe [ReservationPurchaseRecommendationDetail]
forall a. Maybe a
Prelude.Nothing,
$sel:lookbackPeriodInDays:ReservationPurchaseRecommendation' :: Maybe LookbackPeriodInDays
lookbackPeriodInDays = Maybe LookbackPeriodInDays
forall a. Maybe a
Prelude.Nothing,
$sel:paymentOption:ReservationPurchaseRecommendation' :: Maybe PaymentOption
paymentOption = Maybe PaymentOption
forall a. Maybe a
Prelude.Nothing
}
reservationPurchaseRecommendation_termInYears :: Lens.Lens' ReservationPurchaseRecommendation (Prelude.Maybe TermInYears)
reservationPurchaseRecommendation_termInYears :: (Maybe TermInYears -> f (Maybe TermInYears))
-> ReservationPurchaseRecommendation
-> f ReservationPurchaseRecommendation
reservationPurchaseRecommendation_termInYears = (ReservationPurchaseRecommendation -> Maybe TermInYears)
-> (ReservationPurchaseRecommendation
-> Maybe TermInYears -> ReservationPurchaseRecommendation)
-> Lens
ReservationPurchaseRecommendation
ReservationPurchaseRecommendation
(Maybe TermInYears)
(Maybe TermInYears)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationPurchaseRecommendation' {Maybe TermInYears
termInYears :: Maybe TermInYears
$sel:termInYears:ReservationPurchaseRecommendation' :: ReservationPurchaseRecommendation -> Maybe TermInYears
termInYears} -> Maybe TermInYears
termInYears) (\s :: ReservationPurchaseRecommendation
s@ReservationPurchaseRecommendation' {} Maybe TermInYears
a -> ReservationPurchaseRecommendation
s {$sel:termInYears:ReservationPurchaseRecommendation' :: Maybe TermInYears
termInYears = Maybe TermInYears
a} :: ReservationPurchaseRecommendation)
reservationPurchaseRecommendation_recommendationSummary :: Lens.Lens' ReservationPurchaseRecommendation (Prelude.Maybe ReservationPurchaseRecommendationSummary)
reservationPurchaseRecommendation_recommendationSummary :: (Maybe ReservationPurchaseRecommendationSummary
-> f (Maybe ReservationPurchaseRecommendationSummary))
-> ReservationPurchaseRecommendation
-> f ReservationPurchaseRecommendation
reservationPurchaseRecommendation_recommendationSummary = (ReservationPurchaseRecommendation
-> Maybe ReservationPurchaseRecommendationSummary)
-> (ReservationPurchaseRecommendation
-> Maybe ReservationPurchaseRecommendationSummary
-> ReservationPurchaseRecommendation)
-> Lens
ReservationPurchaseRecommendation
ReservationPurchaseRecommendation
(Maybe ReservationPurchaseRecommendationSummary)
(Maybe ReservationPurchaseRecommendationSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationPurchaseRecommendation' {Maybe ReservationPurchaseRecommendationSummary
recommendationSummary :: Maybe ReservationPurchaseRecommendationSummary
$sel:recommendationSummary:ReservationPurchaseRecommendation' :: ReservationPurchaseRecommendation
-> Maybe ReservationPurchaseRecommendationSummary
recommendationSummary} -> Maybe ReservationPurchaseRecommendationSummary
recommendationSummary) (\s :: ReservationPurchaseRecommendation
s@ReservationPurchaseRecommendation' {} Maybe ReservationPurchaseRecommendationSummary
a -> ReservationPurchaseRecommendation
s {$sel:recommendationSummary:ReservationPurchaseRecommendation' :: Maybe ReservationPurchaseRecommendationSummary
recommendationSummary = Maybe ReservationPurchaseRecommendationSummary
a} :: ReservationPurchaseRecommendation)
reservationPurchaseRecommendation_serviceSpecification :: Lens.Lens' ReservationPurchaseRecommendation (Prelude.Maybe ServiceSpecification)
reservationPurchaseRecommendation_serviceSpecification :: (Maybe ServiceSpecification -> f (Maybe ServiceSpecification))
-> ReservationPurchaseRecommendation
-> f ReservationPurchaseRecommendation
reservationPurchaseRecommendation_serviceSpecification = (ReservationPurchaseRecommendation -> Maybe ServiceSpecification)
-> (ReservationPurchaseRecommendation
-> Maybe ServiceSpecification -> ReservationPurchaseRecommendation)
-> Lens
ReservationPurchaseRecommendation
ReservationPurchaseRecommendation
(Maybe ServiceSpecification)
(Maybe ServiceSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationPurchaseRecommendation' {Maybe ServiceSpecification
serviceSpecification :: Maybe ServiceSpecification
$sel:serviceSpecification:ReservationPurchaseRecommendation' :: ReservationPurchaseRecommendation -> Maybe ServiceSpecification
serviceSpecification} -> Maybe ServiceSpecification
serviceSpecification) (\s :: ReservationPurchaseRecommendation
s@ReservationPurchaseRecommendation' {} Maybe ServiceSpecification
a -> ReservationPurchaseRecommendation
s {$sel:serviceSpecification:ReservationPurchaseRecommendation' :: Maybe ServiceSpecification
serviceSpecification = Maybe ServiceSpecification
a} :: ReservationPurchaseRecommendation)
reservationPurchaseRecommendation_accountScope :: Lens.Lens' ReservationPurchaseRecommendation (Prelude.Maybe AccountScope)
reservationPurchaseRecommendation_accountScope :: (Maybe AccountScope -> f (Maybe AccountScope))
-> ReservationPurchaseRecommendation
-> f ReservationPurchaseRecommendation
reservationPurchaseRecommendation_accountScope = (ReservationPurchaseRecommendation -> Maybe AccountScope)
-> (ReservationPurchaseRecommendation
-> Maybe AccountScope -> ReservationPurchaseRecommendation)
-> Lens
ReservationPurchaseRecommendation
ReservationPurchaseRecommendation
(Maybe AccountScope)
(Maybe AccountScope)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationPurchaseRecommendation' {Maybe AccountScope
accountScope :: Maybe AccountScope
$sel:accountScope:ReservationPurchaseRecommendation' :: ReservationPurchaseRecommendation -> Maybe AccountScope
accountScope} -> Maybe AccountScope
accountScope) (\s :: ReservationPurchaseRecommendation
s@ReservationPurchaseRecommendation' {} Maybe AccountScope
a -> ReservationPurchaseRecommendation
s {$sel:accountScope:ReservationPurchaseRecommendation' :: Maybe AccountScope
accountScope = Maybe AccountScope
a} :: ReservationPurchaseRecommendation)
reservationPurchaseRecommendation_recommendationDetails :: Lens.Lens' ReservationPurchaseRecommendation (Prelude.Maybe [ReservationPurchaseRecommendationDetail])
reservationPurchaseRecommendation_recommendationDetails :: (Maybe [ReservationPurchaseRecommendationDetail]
-> f (Maybe [ReservationPurchaseRecommendationDetail]))
-> ReservationPurchaseRecommendation
-> f ReservationPurchaseRecommendation
reservationPurchaseRecommendation_recommendationDetails = (ReservationPurchaseRecommendation
-> Maybe [ReservationPurchaseRecommendationDetail])
-> (ReservationPurchaseRecommendation
-> Maybe [ReservationPurchaseRecommendationDetail]
-> ReservationPurchaseRecommendation)
-> Lens
ReservationPurchaseRecommendation
ReservationPurchaseRecommendation
(Maybe [ReservationPurchaseRecommendationDetail])
(Maybe [ReservationPurchaseRecommendationDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationPurchaseRecommendation' {Maybe [ReservationPurchaseRecommendationDetail]
recommendationDetails :: Maybe [ReservationPurchaseRecommendationDetail]
$sel:recommendationDetails:ReservationPurchaseRecommendation' :: ReservationPurchaseRecommendation
-> Maybe [ReservationPurchaseRecommendationDetail]
recommendationDetails} -> Maybe [ReservationPurchaseRecommendationDetail]
recommendationDetails) (\s :: ReservationPurchaseRecommendation
s@ReservationPurchaseRecommendation' {} Maybe [ReservationPurchaseRecommendationDetail]
a -> ReservationPurchaseRecommendation
s {$sel:recommendationDetails:ReservationPurchaseRecommendation' :: Maybe [ReservationPurchaseRecommendationDetail]
recommendationDetails = Maybe [ReservationPurchaseRecommendationDetail]
a} :: ReservationPurchaseRecommendation) ((Maybe [ReservationPurchaseRecommendationDetail]
-> f (Maybe [ReservationPurchaseRecommendationDetail]))
-> ReservationPurchaseRecommendation
-> f ReservationPurchaseRecommendation)
-> ((Maybe [ReservationPurchaseRecommendationDetail]
-> f (Maybe [ReservationPurchaseRecommendationDetail]))
-> Maybe [ReservationPurchaseRecommendationDetail]
-> f (Maybe [ReservationPurchaseRecommendationDetail]))
-> (Maybe [ReservationPurchaseRecommendationDetail]
-> f (Maybe [ReservationPurchaseRecommendationDetail]))
-> ReservationPurchaseRecommendation
-> f ReservationPurchaseRecommendation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ReservationPurchaseRecommendationDetail]
[ReservationPurchaseRecommendationDetail]
[ReservationPurchaseRecommendationDetail]
[ReservationPurchaseRecommendationDetail]
-> Iso
(Maybe [ReservationPurchaseRecommendationDetail])
(Maybe [ReservationPurchaseRecommendationDetail])
(Maybe [ReservationPurchaseRecommendationDetail])
(Maybe [ReservationPurchaseRecommendationDetail])
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
[ReservationPurchaseRecommendationDetail]
[ReservationPurchaseRecommendationDetail]
[ReservationPurchaseRecommendationDetail]
[ReservationPurchaseRecommendationDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
reservationPurchaseRecommendation_lookbackPeriodInDays :: Lens.Lens' ReservationPurchaseRecommendation (Prelude.Maybe LookbackPeriodInDays)
reservationPurchaseRecommendation_lookbackPeriodInDays :: (Maybe LookbackPeriodInDays -> f (Maybe LookbackPeriodInDays))
-> ReservationPurchaseRecommendation
-> f ReservationPurchaseRecommendation
reservationPurchaseRecommendation_lookbackPeriodInDays = (ReservationPurchaseRecommendation -> Maybe LookbackPeriodInDays)
-> (ReservationPurchaseRecommendation
-> Maybe LookbackPeriodInDays -> ReservationPurchaseRecommendation)
-> Lens
ReservationPurchaseRecommendation
ReservationPurchaseRecommendation
(Maybe LookbackPeriodInDays)
(Maybe LookbackPeriodInDays)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationPurchaseRecommendation' {Maybe LookbackPeriodInDays
lookbackPeriodInDays :: Maybe LookbackPeriodInDays
$sel:lookbackPeriodInDays:ReservationPurchaseRecommendation' :: ReservationPurchaseRecommendation -> Maybe LookbackPeriodInDays
lookbackPeriodInDays} -> Maybe LookbackPeriodInDays
lookbackPeriodInDays) (\s :: ReservationPurchaseRecommendation
s@ReservationPurchaseRecommendation' {} Maybe LookbackPeriodInDays
a -> ReservationPurchaseRecommendation
s {$sel:lookbackPeriodInDays:ReservationPurchaseRecommendation' :: Maybe LookbackPeriodInDays
lookbackPeriodInDays = Maybe LookbackPeriodInDays
a} :: ReservationPurchaseRecommendation)
reservationPurchaseRecommendation_paymentOption :: Lens.Lens' ReservationPurchaseRecommendation (Prelude.Maybe PaymentOption)
reservationPurchaseRecommendation_paymentOption :: (Maybe PaymentOption -> f (Maybe PaymentOption))
-> ReservationPurchaseRecommendation
-> f ReservationPurchaseRecommendation
reservationPurchaseRecommendation_paymentOption = (ReservationPurchaseRecommendation -> Maybe PaymentOption)
-> (ReservationPurchaseRecommendation
-> Maybe PaymentOption -> ReservationPurchaseRecommendation)
-> Lens
ReservationPurchaseRecommendation
ReservationPurchaseRecommendation
(Maybe PaymentOption)
(Maybe PaymentOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationPurchaseRecommendation' {Maybe PaymentOption
paymentOption :: Maybe PaymentOption
$sel:paymentOption:ReservationPurchaseRecommendation' :: ReservationPurchaseRecommendation -> Maybe PaymentOption
paymentOption} -> Maybe PaymentOption
paymentOption) (\s :: ReservationPurchaseRecommendation
s@ReservationPurchaseRecommendation' {} Maybe PaymentOption
a -> ReservationPurchaseRecommendation
s {$sel:paymentOption:ReservationPurchaseRecommendation' :: Maybe PaymentOption
paymentOption = Maybe PaymentOption
a} :: ReservationPurchaseRecommendation)
instance
Core.FromJSON
ReservationPurchaseRecommendation
where
parseJSON :: Value -> Parser ReservationPurchaseRecommendation
parseJSON =
String
-> (Object -> Parser ReservationPurchaseRecommendation)
-> Value
-> Parser ReservationPurchaseRecommendation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ReservationPurchaseRecommendation"
( \Object
x ->
Maybe TermInYears
-> Maybe ReservationPurchaseRecommendationSummary
-> Maybe ServiceSpecification
-> Maybe AccountScope
-> Maybe [ReservationPurchaseRecommendationDetail]
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> ReservationPurchaseRecommendation
ReservationPurchaseRecommendation'
(Maybe TermInYears
-> Maybe ReservationPurchaseRecommendationSummary
-> Maybe ServiceSpecification
-> Maybe AccountScope
-> Maybe [ReservationPurchaseRecommendationDetail]
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> ReservationPurchaseRecommendation)
-> Parser (Maybe TermInYears)
-> Parser
(Maybe ReservationPurchaseRecommendationSummary
-> Maybe ServiceSpecification
-> Maybe AccountScope
-> Maybe [ReservationPurchaseRecommendationDetail]
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> ReservationPurchaseRecommendation)
forall (f :: * -> *) a b. Functor 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 ReservationPurchaseRecommendationSummary
-> Maybe ServiceSpecification
-> Maybe AccountScope
-> Maybe [ReservationPurchaseRecommendationDetail]
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> ReservationPurchaseRecommendation)
-> Parser (Maybe ReservationPurchaseRecommendationSummary)
-> Parser
(Maybe ServiceSpecification
-> Maybe AccountScope
-> Maybe [ReservationPurchaseRecommendationDetail]
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> ReservationPurchaseRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe ReservationPurchaseRecommendationSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RecommendationSummary")
Parser
(Maybe ServiceSpecification
-> Maybe AccountScope
-> Maybe [ReservationPurchaseRecommendationDetail]
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> ReservationPurchaseRecommendation)
-> Parser (Maybe ServiceSpecification)
-> Parser
(Maybe AccountScope
-> Maybe [ReservationPurchaseRecommendationDetail]
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> ReservationPurchaseRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ServiceSpecification)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceSpecification")
Parser
(Maybe AccountScope
-> Maybe [ReservationPurchaseRecommendationDetail]
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> ReservationPurchaseRecommendation)
-> Parser (Maybe AccountScope)
-> Parser
(Maybe [ReservationPurchaseRecommendationDetail]
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> ReservationPurchaseRecommendation)
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 [ReservationPurchaseRecommendationDetail]
-> Maybe LookbackPeriodInDays
-> Maybe PaymentOption
-> ReservationPurchaseRecommendation)
-> Parser (Maybe [ReservationPurchaseRecommendationDetail])
-> Parser
(Maybe LookbackPeriodInDays
-> Maybe PaymentOption -> ReservationPurchaseRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser (Maybe (Maybe [ReservationPurchaseRecommendationDetail]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RecommendationDetails"
Parser (Maybe (Maybe [ReservationPurchaseRecommendationDetail]))
-> Maybe [ReservationPurchaseRecommendationDetail]
-> Parser (Maybe [ReservationPurchaseRecommendationDetail])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ReservationPurchaseRecommendationDetail]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe LookbackPeriodInDays
-> Maybe PaymentOption -> ReservationPurchaseRecommendation)
-> Parser (Maybe LookbackPeriodInDays)
-> Parser
(Maybe PaymentOption -> ReservationPurchaseRecommendation)
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 -> ReservationPurchaseRecommendation)
-> Parser (Maybe PaymentOption)
-> Parser ReservationPurchaseRecommendation
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")
)
instance
Prelude.Hashable
ReservationPurchaseRecommendation
instance
Prelude.NFData
ReservationPurchaseRecommendation