{-# 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.Lens as Lens
import Amazonka.MediaLive.Types.OfferingDurationUnits
import Amazonka.MediaLive.Types.OfferingType
import Amazonka.MediaLive.Types.ReservationResourceSpecification
import Amazonka.MediaLive.Types.ReservationState
import qualified Amazonka.Prelude as Prelude
data Reservation = Reservation'
{
Reservation -> Maybe ReservationState
state :: Prelude.Maybe ReservationState,
Reservation -> Maybe ReservationResourceSpecification
resourceSpecification :: Prelude.Maybe ReservationResourceSpecification,
Reservation -> Maybe Text
currencyCode :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe Text
start :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe Int
count :: Prelude.Maybe Prelude.Int,
Reservation -> Maybe Text
end :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe Text
reservationId :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe Text
offeringId :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe OfferingType
offeringType :: Prelude.Maybe OfferingType,
Reservation -> Maybe Double
usagePrice :: Prelude.Maybe Prelude.Double,
Reservation -> Maybe Double
fixedPrice :: Prelude.Maybe Prelude.Double,
Reservation -> Maybe OfferingDurationUnits
durationUnits :: Prelude.Maybe OfferingDurationUnits,
Reservation -> Maybe Text
offeringDescription :: Prelude.Maybe Prelude.Text,
Reservation -> Maybe Int
duration :: Prelude.Maybe Prelude.Int,
Reservation -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (Reservation -> Reservation -> Bool
(Reservation -> Reservation -> Bool)
-> (Reservation -> Reservation -> Bool) -> Eq Reservation
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]
(Int -> ReadS Reservation)
-> ReadS [Reservation]
-> ReadPrec Reservation
-> ReadPrec [Reservation]
-> Read 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
(Int -> Reservation -> ShowS)
-> (Reservation -> String)
-> ([Reservation] -> ShowS)
-> Show Reservation
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. Reservation -> Rep Reservation x)
-> (forall x. Rep Reservation x -> Reservation)
-> Generic Reservation
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' :: Maybe ReservationState
-> Maybe ReservationResourceSpecification
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation
Reservation'
{ $sel:state:Reservation' :: Maybe ReservationState
state = Maybe ReservationState
forall a. Maybe a
Prelude.Nothing,
$sel:resourceSpecification:Reservation' :: Maybe ReservationResourceSpecification
resourceSpecification = Maybe ReservationResourceSpecification
forall a. Maybe a
Prelude.Nothing,
$sel:currencyCode:Reservation' :: Maybe Text
currencyCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Reservation' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:start:Reservation' :: Maybe Text
start = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:count:Reservation' :: Maybe Int
count = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:end:Reservation' :: Maybe Text
end = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:Reservation' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reservationId:Reservation' :: Maybe Text
reservationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:offeringId:Reservation' :: Maybe Text
offeringId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:region:Reservation' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:offeringType:Reservation' :: Maybe OfferingType
offeringType = Maybe OfferingType
forall a. Maybe a
Prelude.Nothing,
$sel:usagePrice:Reservation' :: Maybe Double
usagePrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:fixedPrice:Reservation' :: Maybe Double
fixedPrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:durationUnits:Reservation' :: Maybe OfferingDurationUnits
durationUnits = Maybe OfferingDurationUnits
forall a. Maybe a
Prelude.Nothing,
$sel:offeringDescription:Reservation' :: Maybe Text
offeringDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:duration:Reservation' :: Maybe Int
duration = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:tags:Reservation' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
}
reservation_state :: Lens.Lens' Reservation (Prelude.Maybe ReservationState)
reservation_state :: (Maybe ReservationState -> f (Maybe ReservationState))
-> Reservation -> f Reservation
reservation_state = (Reservation -> Maybe ReservationState)
-> (Reservation -> Maybe ReservationState -> Reservation)
-> Lens
Reservation
Reservation
(Maybe ReservationState)
(Maybe ReservationState)
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_resourceSpecification :: Lens.Lens' Reservation (Prelude.Maybe ReservationResourceSpecification)
reservation_resourceSpecification :: (Maybe ReservationResourceSpecification
-> f (Maybe ReservationResourceSpecification))
-> Reservation -> f Reservation
reservation_resourceSpecification = (Reservation -> Maybe ReservationResourceSpecification)
-> (Reservation
-> Maybe ReservationResourceSpecification -> Reservation)
-> Lens
Reservation
Reservation
(Maybe ReservationResourceSpecification)
(Maybe ReservationResourceSpecification)
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_currencyCode :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_currencyCode :: (Maybe Text -> f (Maybe Text)) -> Reservation -> f Reservation
reservation_currencyCode = (Reservation -> Maybe Text)
-> (Reservation -> Maybe Text -> Reservation)
-> Lens Reservation Reservation (Maybe Text) (Maybe Text)
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_arn :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_arn :: (Maybe Text -> f (Maybe Text)) -> Reservation -> f Reservation
reservation_arn = (Reservation -> Maybe Text)
-> (Reservation -> Maybe Text -> Reservation)
-> Lens Reservation Reservation (Maybe Text) (Maybe Text)
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_start :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_start :: (Maybe Text -> f (Maybe Text)) -> Reservation -> f Reservation
reservation_start = (Reservation -> Maybe Text)
-> (Reservation -> Maybe Text -> Reservation)
-> Lens Reservation Reservation (Maybe Text) (Maybe Text)
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_count :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Int)
reservation_count :: (Maybe Int -> f (Maybe Int)) -> Reservation -> f Reservation
reservation_count = (Reservation -> Maybe Int)
-> (Reservation -> Maybe Int -> Reservation)
-> Lens Reservation Reservation (Maybe Int) (Maybe Int)
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_end :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_end :: (Maybe Text -> f (Maybe Text)) -> Reservation -> f Reservation
reservation_end = (Reservation -> Maybe Text)
-> (Reservation -> Maybe Text -> Reservation)
-> Lens Reservation Reservation (Maybe Text) (Maybe Text)
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_name :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_name :: (Maybe Text -> f (Maybe Text)) -> Reservation -> f Reservation
reservation_name = (Reservation -> Maybe Text)
-> (Reservation -> Maybe Text -> Reservation)
-> Lens Reservation Reservation (Maybe Text) (Maybe Text)
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_reservationId :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_reservationId :: (Maybe Text -> f (Maybe Text)) -> Reservation -> f Reservation
reservation_reservationId = (Reservation -> Maybe Text)
-> (Reservation -> Maybe Text -> Reservation)
-> Lens Reservation Reservation (Maybe Text) (Maybe Text)
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_offeringId :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_offeringId :: (Maybe Text -> f (Maybe Text)) -> Reservation -> f Reservation
reservation_offeringId = (Reservation -> Maybe Text)
-> (Reservation -> Maybe Text -> Reservation)
-> Lens Reservation Reservation (Maybe Text) (Maybe Text)
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_region :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_region :: (Maybe Text -> f (Maybe Text)) -> Reservation -> f Reservation
reservation_region = (Reservation -> Maybe Text)
-> (Reservation -> Maybe Text -> Reservation)
-> Lens Reservation Reservation (Maybe Text) (Maybe Text)
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_offeringType :: Lens.Lens' Reservation (Prelude.Maybe OfferingType)
reservation_offeringType :: (Maybe OfferingType -> f (Maybe OfferingType))
-> Reservation -> f Reservation
reservation_offeringType = (Reservation -> Maybe OfferingType)
-> (Reservation -> Maybe OfferingType -> Reservation)
-> Lens
Reservation Reservation (Maybe OfferingType) (Maybe 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_usagePrice :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Double)
reservation_usagePrice :: (Maybe Double -> f (Maybe Double)) -> Reservation -> f Reservation
reservation_usagePrice = (Reservation -> Maybe Double)
-> (Reservation -> Maybe Double -> Reservation)
-> Lens Reservation Reservation (Maybe Double) (Maybe Double)
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)
reservation_fixedPrice :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Double)
reservation_fixedPrice :: (Maybe Double -> f (Maybe Double)) -> Reservation -> f Reservation
reservation_fixedPrice = (Reservation -> Maybe Double)
-> (Reservation -> Maybe Double -> Reservation)
-> Lens Reservation Reservation (Maybe Double) (Maybe Double)
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_durationUnits :: Lens.Lens' Reservation (Prelude.Maybe OfferingDurationUnits)
reservation_durationUnits :: (Maybe OfferingDurationUnits -> f (Maybe OfferingDurationUnits))
-> Reservation -> f Reservation
reservation_durationUnits = (Reservation -> Maybe OfferingDurationUnits)
-> (Reservation -> Maybe OfferingDurationUnits -> Reservation)
-> Lens
Reservation
Reservation
(Maybe OfferingDurationUnits)
(Maybe OfferingDurationUnits)
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_offeringDescription :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Text)
reservation_offeringDescription :: (Maybe Text -> f (Maybe Text)) -> Reservation -> f Reservation
reservation_offeringDescription = (Reservation -> Maybe Text)
-> (Reservation -> Maybe Text -> Reservation)
-> Lens Reservation Reservation (Maybe Text) (Maybe Text)
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_duration :: Lens.Lens' Reservation (Prelude.Maybe Prelude.Int)
reservation_duration :: (Maybe Int -> f (Maybe Int)) -> Reservation -> f Reservation
reservation_duration = (Reservation -> Maybe Int)
-> (Reservation -> Maybe Int -> Reservation)
-> Lens Reservation Reservation (Maybe Int) (Maybe Int)
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_tags :: Lens.Lens' Reservation (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
reservation_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Reservation -> f Reservation
reservation_tags = (Reservation -> Maybe (HashMap Text Text))
-> (Reservation -> Maybe (HashMap Text Text) -> Reservation)
-> Lens
Reservation
Reservation
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Reservation -> f Reservation)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Reservation
-> f Reservation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON Reservation where
parseJSON :: Value -> Parser Reservation
parseJSON =
String
-> (Object -> Parser Reservation) -> Value -> Parser Reservation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Reservation"
( \Object
x ->
Maybe ReservationState
-> Maybe ReservationResourceSpecification
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation
Reservation'
(Maybe ReservationState
-> Maybe ReservationResourceSpecification
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe ReservationState)
-> Parser
(Maybe ReservationResourceSpecification
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ReservationState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
Parser
(Maybe ReservationResourceSpecification
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe ReservationResourceSpecification)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReservationResourceSpecification)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceSpecification")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
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
"currencyCode")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
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
"arn")
Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
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
"start")
Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"count")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
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
"end")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
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
"name")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
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
"reservationId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
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
"offeringId")
Parser
(Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe Text)
-> Parser
(Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
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
"region")
Parser
(Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe OfferingType)
-> Parser
(Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OfferingType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"offeringType")
Parser
(Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe Double)
-> Parser
(Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"usagePrice")
Parser
(Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe Double)
-> Parser
(Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"fixedPrice")
Parser
(Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Maybe (HashMap Text Text)
-> Reservation)
-> Parser (Maybe OfferingDurationUnits)
-> Parser
(Maybe Text
-> Maybe Int -> Maybe (HashMap Text Text) -> Reservation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OfferingDurationUnits)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"durationUnits")
Parser
(Maybe Text
-> Maybe Int -> Maybe (HashMap Text Text) -> Reservation)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> Maybe (HashMap Text Text) -> Reservation)
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
"offeringDescription")
Parser (Maybe Int -> Maybe (HashMap Text Text) -> Reservation)
-> Parser (Maybe Int)
-> Parser (Maybe (HashMap Text Text) -> Reservation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"duration")
Parser (Maybe (HashMap Text Text) -> Reservation)
-> Parser (Maybe (HashMap Text Text)) -> Parser Reservation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable Reservation
instance Prelude.NFData Reservation