{-# 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.MediaLive.Types.Reservation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.OfferingDurationUnits
import Amazonka.MediaLive.Types.OfferingType
import Amazonka.MediaLive.Types.RenewalSettings
import Amazonka.MediaLive.Types.ReservationResourceSpecification
import Amazonka.MediaLive.Types.ReservationState
import qualified Amazonka.Prelude as Prelude
data Reservation = Reservation'
{
Reservation -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe Int
count :: Prelude.Maybe Prelude.Int,
Reservation -> Maybe Text
currencyCode :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe Int
duration :: Prelude.Maybe Prelude.Int,
Reservation -> Maybe OfferingDurationUnits
durationUnits :: Prelude.Maybe OfferingDurationUnits,
Reservation -> Maybe Text
end :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe Double
fixedPrice :: Prelude.Maybe Prelude.Double,
Reservation -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe Text
offeringDescription :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe Text
offeringId :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe OfferingType
offeringType :: Prelude.Maybe OfferingType,
Reservation -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe RenewalSettings
renewalSettings :: Prelude.Maybe RenewalSettings,
Reservation -> Maybe Text
reservationId :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe ReservationResourceSpecification
resourceSpecification :: Prelude.Maybe ReservationResourceSpecification,
Reservation -> Maybe Text
start :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe ReservationState
state :: Prelude.Maybe ReservationState,
Reservation -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Reservation -> Maybe Double
usagePrice :: Prelude.Maybe Prelude.Double
}
deriving (Reservation -> Reservation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Reservation -> Reservation -> Bool
$c/= :: Reservation -> Reservation -> Bool
== :: Reservation -> Reservation -> Bool
$c== :: Reservation -> Reservation -> Bool
Prelude.Eq, ReadPrec [Reservation]
ReadPrec Reservation
Int -> ReadS Reservation
ReadS [Reservation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Reservation]
$creadListPrec :: ReadPrec [Reservation]
readPrec :: ReadPrec Reservation
$creadPrec :: ReadPrec Reservation
readList :: ReadS [Reservation]
$creadList :: ReadS [Reservation]
readsPrec :: Int -> ReadS Reservation
$creadsPrec :: Int -> ReadS Reservation
Prelude.Read, Int -> Reservation -> ShowS
[Reservation] -> ShowS
Reservation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Reservation] -> ShowS
$cshowList :: [Reservation] -> ShowS
show :: Reservation -> String
$cshow :: Reservation -> String
showsPrec :: Int -> Reservation -> ShowS
$cshowsPrec :: Int -> Reservation -> ShowS
Prelude.Show, forall x. Rep Reservation x -> Reservation
forall x. Reservation -> Rep Reservation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Reservation x -> Reservation
$cfrom :: forall x. Reservation -> Rep Reservation x
Prelude.Generic)
newReservation ::
Reservation
newReservation :: Reservation
newReservation =
Reservation'
{ $sel:arn:Reservation' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:count:Reservation' :: Maybe Int
count = forall a. Maybe a
Prelude.Nothing,
$sel:currencyCode:Reservation' :: Maybe Text
currencyCode = forall a. Maybe a
Prelude.Nothing,
$sel:duration:Reservation' :: Maybe Int
duration = forall a. Maybe a
Prelude.Nothing,
$sel:durationUnits:Reservation' :: Maybe OfferingDurationUnits
durationUnits = forall a. Maybe a
Prelude.Nothing,
$sel:end:Reservation' :: Maybe Text
end = forall a. Maybe a
Prelude.Nothing,
$sel:fixedPrice:Reservation' :: Maybe Double
fixedPrice = forall a. Maybe a
Prelude.Nothing,
$sel:name:Reservation' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:offeringDescription:Reservation' :: Maybe Text
offeringDescription = forall a. Maybe a
Prelude.Nothing,
$sel:offeringId:Reservation' :: Maybe Text
offeringId = forall a. Maybe a
Prelude.Nothing,
$sel:offeringType:Reservation' :: Maybe OfferingType
offeringType = forall a. Maybe a
Prelude.Nothing,
$sel:region:Reservation' :: Maybe Text
region = forall a. Maybe a
Prelude.Nothing,
$sel:renewalSettings:Reservation' :: Maybe RenewalSettings
renewalSettings = forall a. Maybe a
Prelude.Nothing,
$sel:reservationId:Reservation' :: Maybe Text
reservationId = forall a. Maybe a
Prelude.Nothing,
$sel:resourceSpecification:Reservation' :: Maybe ReservationResourceSpecification
resourceSpecification = forall a. Maybe a
Prelude.Nothing,
$sel:start:Reservation' :: Maybe Text
start = forall a. Maybe a
Prelude.Nothing,
$sel:state:Reservation' :: Maybe ReservationState
state = forall a. Maybe a
Prelude.Nothing,
$sel:tags:Reservation' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:usagePrice:Reservation' :: Maybe Double
usagePrice = forall a. Maybe a
Prelude.Nothing
}
reservation_arn :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_arn :: Lens' Reservation (Maybe Text)
reservation_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe Text
arn :: Maybe Text
$sel:arn:Reservation' :: Reservation -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Reservation
s@Reservation' {} Maybe Text
a -> Reservation
s {$sel:arn:Reservation' :: Maybe Text
arn = Maybe Text
a} :: Reservation)
reservation_count :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Int)
reservation_count :: Lens' Reservation (Maybe Int)
reservation_count = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe Int
count :: Maybe Int
$sel:count:Reservation' :: Reservation -> Maybe Int
count} -> Maybe Int
count) (\s :: Reservation
s@Reservation' {} Maybe Int
a -> Reservation
s {$sel:count:Reservation' :: Maybe Int
count = Maybe Int
a} :: Reservation)
reservation_currencyCode :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_currencyCode :: Lens' Reservation (Maybe Text)
reservation_currencyCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe Text
currencyCode :: Maybe Text
$sel:currencyCode:Reservation' :: Reservation -> Maybe Text
currencyCode} -> Maybe Text
currencyCode) (\s :: Reservation
s@Reservation' {} Maybe Text
a -> Reservation
s {$sel:currencyCode:Reservation' :: Maybe Text
currencyCode = Maybe Text
a} :: Reservation)
reservation_duration :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Int)
reservation_duration :: Lens' Reservation (Maybe Int)
reservation_duration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe Int
duration :: Maybe Int
$sel:duration:Reservation' :: Reservation -> Maybe Int
duration} -> Maybe Int
duration) (\s :: Reservation
s@Reservation' {} Maybe Int
a -> Reservation
s {$sel:duration:Reservation' :: Maybe Int
duration = Maybe Int
a} :: Reservation)
reservation_durationUnits :: Lens.Lens' Reservation (Prelude.Maybe OfferingDurationUnits)
reservation_durationUnits :: Lens' Reservation (Maybe OfferingDurationUnits)
reservation_durationUnits = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe OfferingDurationUnits
durationUnits :: Maybe OfferingDurationUnits
$sel:durationUnits:Reservation' :: Reservation -> Maybe OfferingDurationUnits
durationUnits} -> Maybe OfferingDurationUnits
durationUnits) (\s :: Reservation
s@Reservation' {} Maybe OfferingDurationUnits
a -> Reservation
s {$sel:durationUnits:Reservation' :: Maybe OfferingDurationUnits
durationUnits = Maybe OfferingDurationUnits
a} :: Reservation)
reservation_end :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_end :: Lens' Reservation (Maybe Text)
reservation_end = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe Text
end :: Maybe Text
$sel:end:Reservation' :: Reservation -> Maybe Text
end} -> Maybe Text
end) (\s :: Reservation
s@Reservation' {} Maybe Text
a -> Reservation
s {$sel:end:Reservation' :: Maybe Text
end = Maybe Text
a} :: Reservation)
reservation_fixedPrice :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Double)
reservation_fixedPrice :: Lens' Reservation (Maybe Double)
reservation_fixedPrice = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe Double
fixedPrice :: Maybe Double
$sel:fixedPrice:Reservation' :: Reservation -> Maybe Double
fixedPrice} -> Maybe Double
fixedPrice) (\s :: Reservation
s@Reservation' {} Maybe Double
a -> Reservation
s {$sel:fixedPrice:Reservation' :: Maybe Double
fixedPrice = Maybe Double
a} :: Reservation)
reservation_name :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_name :: Lens' Reservation (Maybe Text)
reservation_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe Text
name :: Maybe Text
$sel:name:Reservation' :: Reservation -> Maybe Text
name} -> Maybe Text
name) (\s :: Reservation
s@Reservation' {} Maybe Text
a -> Reservation
s {$sel:name:Reservation' :: Maybe Text
name = Maybe Text
a} :: Reservation)
reservation_offeringDescription :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_offeringDescription :: Lens' Reservation (Maybe Text)
reservation_offeringDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe Text
offeringDescription :: Maybe Text
$sel:offeringDescription:Reservation' :: Reservation -> Maybe Text
offeringDescription} -> Maybe Text
offeringDescription) (\s :: Reservation
s@Reservation' {} Maybe Text
a -> Reservation
s {$sel:offeringDescription:Reservation' :: Maybe Text
offeringDescription = Maybe Text
a} :: Reservation)
reservation_offeringId :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_offeringId :: Lens' Reservation (Maybe Text)
reservation_offeringId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe Text
offeringId :: Maybe Text
$sel:offeringId:Reservation' :: Reservation -> Maybe Text
offeringId} -> Maybe Text
offeringId) (\s :: Reservation
s@Reservation' {} Maybe Text
a -> Reservation
s {$sel:offeringId:Reservation' :: Maybe Text
offeringId = Maybe Text
a} :: Reservation)
reservation_offeringType :: Lens.Lens' Reservation (Prelude.Maybe OfferingType)
reservation_offeringType :: Lens' Reservation (Maybe OfferingType)
reservation_offeringType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe OfferingType
offeringType :: Maybe OfferingType
$sel:offeringType:Reservation' :: Reservation -> Maybe OfferingType
offeringType} -> Maybe OfferingType
offeringType) (\s :: Reservation
s@Reservation' {} Maybe OfferingType
a -> Reservation
s {$sel:offeringType:Reservation' :: Maybe OfferingType
offeringType = Maybe OfferingType
a} :: Reservation)
reservation_region :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_region :: Lens' Reservation (Maybe Text)
reservation_region = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe Text
region :: Maybe Text
$sel:region:Reservation' :: Reservation -> Maybe Text
region} -> Maybe Text
region) (\s :: Reservation
s@Reservation' {} Maybe Text
a -> Reservation
s {$sel:region:Reservation' :: Maybe Text
region = Maybe Text
a} :: Reservation)
reservation_renewalSettings :: Lens.Lens' Reservation (Prelude.Maybe RenewalSettings)
reservation_renewalSettings :: Lens' Reservation (Maybe RenewalSettings)
reservation_renewalSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe RenewalSettings
renewalSettings :: Maybe RenewalSettings
$sel:renewalSettings:Reservation' :: Reservation -> Maybe RenewalSettings
renewalSettings} -> Maybe RenewalSettings
renewalSettings) (\s :: Reservation
s@Reservation' {} Maybe RenewalSettings
a -> Reservation
s {$sel:renewalSettings:Reservation' :: Maybe RenewalSettings
renewalSettings = Maybe RenewalSettings
a} :: Reservation)
reservation_reservationId :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_reservationId :: Lens' Reservation (Maybe Text)
reservation_reservationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe Text
reservationId :: Maybe Text
$sel:reservationId:Reservation' :: Reservation -> Maybe Text
reservationId} -> Maybe Text
reservationId) (\s :: Reservation
s@Reservation' {} Maybe Text
a -> Reservation
s {$sel:reservationId:Reservation' :: Maybe Text
reservationId = Maybe Text
a} :: Reservation)
reservation_resourceSpecification :: Lens.Lens' Reservation (Prelude.Maybe ReservationResourceSpecification)
reservation_resourceSpecification :: Lens' Reservation (Maybe ReservationResourceSpecification)
reservation_resourceSpecification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe ReservationResourceSpecification
resourceSpecification :: Maybe ReservationResourceSpecification
$sel:resourceSpecification:Reservation' :: Reservation -> Maybe ReservationResourceSpecification
resourceSpecification} -> Maybe ReservationResourceSpecification
resourceSpecification) (\s :: Reservation
s@Reservation' {} Maybe ReservationResourceSpecification
a -> Reservation
s {$sel:resourceSpecification:Reservation' :: Maybe ReservationResourceSpecification
resourceSpecification = Maybe ReservationResourceSpecification
a} :: Reservation)
reservation_start :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_start :: Lens' Reservation (Maybe Text)
reservation_start = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe Text
start :: Maybe Text
$sel:start:Reservation' :: Reservation -> Maybe Text
start} -> Maybe Text
start) (\s :: Reservation
s@Reservation' {} Maybe Text
a -> Reservation
s {$sel:start:Reservation' :: Maybe Text
start = Maybe Text
a} :: Reservation)
reservation_state :: Lens.Lens' Reservation (Prelude.Maybe ReservationState)
reservation_state :: Lens' Reservation (Maybe ReservationState)
reservation_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe ReservationState
state :: Maybe ReservationState
$sel:state:Reservation' :: Reservation -> Maybe ReservationState
state} -> Maybe ReservationState
state) (\s :: Reservation
s@Reservation' {} Maybe ReservationState
a -> Reservation
s {$sel:state:Reservation' :: Maybe ReservationState
state = Maybe ReservationState
a} :: Reservation)
reservation_tags :: Lens.Lens' Reservation (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
reservation_tags :: Lens' Reservation (Maybe (HashMap Text Text))
reservation_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Reservation' :: Reservation -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Reservation
s@Reservation' {} Maybe (HashMap Text Text)
a -> Reservation
s {$sel:tags:Reservation' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Reservation) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
reservation_usagePrice :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Double)
reservation_usagePrice :: Lens' Reservation (Maybe Double)
reservation_usagePrice = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Reservation' {Maybe Double
usagePrice :: Maybe Double
$sel:usagePrice:Reservation' :: Reservation -> Maybe Double
usagePrice} -> Maybe Double
usagePrice) (\s :: Reservation
s@Reservation' {} Maybe Double
a -> Reservation
s {$sel:usagePrice:Reservation' :: Maybe Double
usagePrice = Maybe Double
a} :: Reservation)
instance Data.FromJSON Reservation where
parseJSON :: Value -> Parser Reservation
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Reservation"
( \Object
x ->
Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Text
-> Maybe RenewalSettings
-> Maybe Text
-> Maybe ReservationResourceSpecification
-> Maybe Text
-> Maybe ReservationState
-> Maybe (HashMap Text Text)
-> Maybe Double
-> Reservation
Reservation'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"count")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"currencyCode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"duration")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"durationUnits")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"end")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"fixedPrice")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"offeringDescription")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"offeringId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"offeringType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"region")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"renewalSettings")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"reservationId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"resourceSpecification")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"start")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"state")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"usagePrice")
)
instance Prelude.Hashable Reservation where
hashWithSalt :: Int -> Reservation -> Int
hashWithSalt Int
_salt Reservation' {Maybe Double
Maybe Int
Maybe Text
Maybe (HashMap Text Text)
Maybe OfferingDurationUnits
Maybe OfferingType
Maybe RenewalSettings
Maybe ReservationState
Maybe ReservationResourceSpecification
usagePrice :: Maybe Double
tags :: Maybe (HashMap Text Text)
state :: Maybe ReservationState
start :: Maybe Text
resourceSpecification :: Maybe ReservationResourceSpecification
reservationId :: Maybe Text
renewalSettings :: Maybe RenewalSettings
region :: Maybe Text
offeringType :: Maybe OfferingType
offeringId :: Maybe Text
offeringDescription :: Maybe Text
name :: Maybe Text
fixedPrice :: Maybe Double
end :: Maybe Text
durationUnits :: Maybe OfferingDurationUnits
duration :: Maybe Int
currencyCode :: Maybe Text
count :: Maybe Int
arn :: Maybe Text
$sel:usagePrice:Reservation' :: Reservation -> Maybe Double
$sel:tags:Reservation' :: Reservation -> Maybe (HashMap Text Text)
$sel:state:Reservation' :: Reservation -> Maybe ReservationState
$sel:start:Reservation' :: Reservation -> Maybe Text
$sel:resourceSpecification:Reservation' :: Reservation -> Maybe ReservationResourceSpecification
$sel:reservationId:Reservation' :: Reservation -> Maybe Text
$sel:renewalSettings:Reservation' :: Reservation -> Maybe RenewalSettings
$sel:region:Reservation' :: Reservation -> Maybe Text
$sel:offeringType:Reservation' :: Reservation -> Maybe OfferingType
$sel:offeringId:Reservation' :: Reservation -> Maybe Text
$sel:offeringDescription:Reservation' :: Reservation -> Maybe Text
$sel:name:Reservation' :: Reservation -> Maybe Text
$sel:fixedPrice:Reservation' :: Reservation -> Maybe Double
$sel:end:Reservation' :: Reservation -> Maybe Text
$sel:durationUnits:Reservation' :: Reservation -> Maybe OfferingDurationUnits
$sel:duration:Reservation' :: Reservation -> Maybe Int
$sel:currencyCode:Reservation' :: Reservation -> Maybe Text
$sel:count:Reservation' :: Reservation -> Maybe Int
$sel:arn:Reservation' :: Reservation -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
count
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
currencyCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
duration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OfferingDurationUnits
durationUnits
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
end
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
fixedPrice
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
offeringDescription
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
offeringId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OfferingType
offeringType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
region
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RenewalSettings
renewalSettings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reservationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReservationResourceSpecification
resourceSpecification
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
start
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReservationState
state
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
usagePrice
instance Prelude.NFData Reservation where
rnf :: Reservation -> ()
rnf Reservation' {Maybe Double
Maybe Int
Maybe Text
Maybe (HashMap Text Text)
Maybe OfferingDurationUnits
Maybe OfferingType
Maybe RenewalSettings
Maybe ReservationState
Maybe ReservationResourceSpecification
usagePrice :: Maybe Double
tags :: Maybe (HashMap Text Text)
state :: Maybe ReservationState
start :: Maybe Text
resourceSpecification :: Maybe ReservationResourceSpecification
reservationId :: Maybe Text
renewalSettings :: Maybe RenewalSettings
region :: Maybe Text
offeringType :: Maybe OfferingType
offeringId :: Maybe Text
offeringDescription :: Maybe Text
name :: Maybe Text
fixedPrice :: Maybe Double
end :: Maybe Text
durationUnits :: Maybe OfferingDurationUnits
duration :: Maybe Int
currencyCode :: Maybe Text
count :: Maybe Int
arn :: Maybe Text
$sel:usagePrice:Reservation' :: Reservation -> Maybe Double
$sel:tags:Reservation' :: Reservation -> Maybe (HashMap Text Text)
$sel:state:Reservation' :: Reservation -> Maybe ReservationState
$sel:start:Reservation' :: Reservation -> Maybe Text
$sel:resourceSpecification:Reservation' :: Reservation -> Maybe ReservationResourceSpecification
$sel:reservationId:Reservation' :: Reservation -> Maybe Text
$sel:renewalSettings:Reservation' :: Reservation -> Maybe RenewalSettings
$sel:region:Reservation' :: Reservation -> Maybe Text
$sel:offeringType:Reservation' :: Reservation -> Maybe OfferingType
$sel:offeringId:Reservation' :: Reservation -> Maybe Text
$sel:offeringDescription:Reservation' :: Reservation -> Maybe Text
$sel:name:Reservation' :: Reservation -> Maybe Text
$sel:fixedPrice:Reservation' :: Reservation -> Maybe Double
$sel:end:Reservation' :: Reservation -> Maybe Text
$sel:durationUnits:Reservation' :: Reservation -> Maybe OfferingDurationUnits
$sel:duration:Reservation' :: Reservation -> Maybe Int
$sel:currencyCode:Reservation' :: Reservation -> Maybe Text
$sel:count:Reservation' :: Reservation -> Maybe Int
$sel:arn:Reservation' :: Reservation -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
count
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
currencyCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
duration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OfferingDurationUnits
durationUnits
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
end
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
fixedPrice
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
offeringDescription
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
offeringId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OfferingType
offeringType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
region
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RenewalSettings
renewalSettings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reservationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReservationResourceSpecification
resourceSpecification
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
start
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReservationState
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
usagePrice