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