{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaLive.DescribeReservation
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Get details for a reservation.
module Amazonka.MediaLive.DescribeReservation
  ( -- * Creating a Request
    DescribeReservation (..),
    newDescribeReservation,

    -- * Request Lenses
    describeReservation_reservationId,

    -- * Destructuring the Response
    DescribeReservationResponse (..),
    newDescribeReservationResponse,

    -- * Response Lenses
    describeReservationResponse_state,
    describeReservationResponse_resourceSpecification,
    describeReservationResponse_currencyCode,
    describeReservationResponse_arn,
    describeReservationResponse_start,
    describeReservationResponse_count,
    describeReservationResponse_end,
    describeReservationResponse_name,
    describeReservationResponse_reservationId,
    describeReservationResponse_offeringId,
    describeReservationResponse_region,
    describeReservationResponse_offeringType,
    describeReservationResponse_usagePrice,
    describeReservationResponse_fixedPrice,
    describeReservationResponse_durationUnits,
    describeReservationResponse_offeringDescription,
    describeReservationResponse_duration,
    describeReservationResponse_tags,
    describeReservationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Placeholder documentation for DescribeReservationRequest
--
-- /See:/ 'newDescribeReservation' smart constructor.
data DescribeReservation = DescribeReservation'
  { -- | Unique reservation ID, e.g. \'1234567\'
    DescribeReservation -> Text
reservationId :: Prelude.Text
  }
  deriving (DescribeReservation -> DescribeReservation -> Bool
(DescribeReservation -> DescribeReservation -> Bool)
-> (DescribeReservation -> DescribeReservation -> Bool)
-> Eq DescribeReservation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReservation -> DescribeReservation -> Bool
$c/= :: DescribeReservation -> DescribeReservation -> Bool
== :: DescribeReservation -> DescribeReservation -> Bool
$c== :: DescribeReservation -> DescribeReservation -> Bool
Prelude.Eq, ReadPrec [DescribeReservation]
ReadPrec DescribeReservation
Int -> ReadS DescribeReservation
ReadS [DescribeReservation]
(Int -> ReadS DescribeReservation)
-> ReadS [DescribeReservation]
-> ReadPrec DescribeReservation
-> ReadPrec [DescribeReservation]
-> Read DescribeReservation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReservation]
$creadListPrec :: ReadPrec [DescribeReservation]
readPrec :: ReadPrec DescribeReservation
$creadPrec :: ReadPrec DescribeReservation
readList :: ReadS [DescribeReservation]
$creadList :: ReadS [DescribeReservation]
readsPrec :: Int -> ReadS DescribeReservation
$creadsPrec :: Int -> ReadS DescribeReservation
Prelude.Read, Int -> DescribeReservation -> ShowS
[DescribeReservation] -> ShowS
DescribeReservation -> String
(Int -> DescribeReservation -> ShowS)
-> (DescribeReservation -> String)
-> ([DescribeReservation] -> ShowS)
-> Show DescribeReservation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReservation] -> ShowS
$cshowList :: [DescribeReservation] -> ShowS
show :: DescribeReservation -> String
$cshow :: DescribeReservation -> String
showsPrec :: Int -> DescribeReservation -> ShowS
$cshowsPrec :: Int -> DescribeReservation -> ShowS
Prelude.Show, (forall x. DescribeReservation -> Rep DescribeReservation x)
-> (forall x. Rep DescribeReservation x -> DescribeReservation)
-> Generic DescribeReservation
forall x. Rep DescribeReservation x -> DescribeReservation
forall x. DescribeReservation -> Rep DescribeReservation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeReservation x -> DescribeReservation
$cfrom :: forall x. DescribeReservation -> Rep DescribeReservation x
Prelude.Generic)

-- |
-- Create a value of 'DescribeReservation' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'reservationId', 'describeReservation_reservationId' - Unique reservation ID, e.g. \'1234567\'
newDescribeReservation ::
  -- | 'reservationId'
  Prelude.Text ->
  DescribeReservation
newDescribeReservation :: Text -> DescribeReservation
newDescribeReservation Text
pReservationId_ =
  DescribeReservation' :: Text -> DescribeReservation
DescribeReservation'
    { $sel:reservationId:DescribeReservation' :: Text
reservationId =
        Text
pReservationId_
    }

-- | Unique reservation ID, e.g. \'1234567\'
describeReservation_reservationId :: Lens.Lens' DescribeReservation Prelude.Text
describeReservation_reservationId :: (Text -> f Text) -> DescribeReservation -> f DescribeReservation
describeReservation_reservationId = (DescribeReservation -> Text)
-> (DescribeReservation -> Text -> DescribeReservation)
-> Lens DescribeReservation DescribeReservation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservation' {Text
reservationId :: Text
$sel:reservationId:DescribeReservation' :: DescribeReservation -> Text
reservationId} -> Text
reservationId) (\s :: DescribeReservation
s@DescribeReservation' {} Text
a -> DescribeReservation
s {$sel:reservationId:DescribeReservation' :: Text
reservationId = Text
a} :: DescribeReservation)

instance Core.AWSRequest DescribeReservation where
  type
    AWSResponse DescribeReservation =
      DescribeReservationResponse
  request :: DescribeReservation -> Request DescribeReservation
request = Service -> DescribeReservation -> Request DescribeReservation
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeReservation
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeReservation)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeReservation))
-> Logger
-> Service
-> Proxy DescribeReservation
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeReservation)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h 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)
-> Int
-> DescribeReservationResponse
DescribeReservationResponse'
            (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)
 -> Int
 -> DescribeReservationResponse)
-> Either String (Maybe ReservationState)
-> Either
     String
     (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)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ReservationState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"state")
            Either
  String
  (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)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe ReservationResourceSpecification)
-> Either
     String
     (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)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe ReservationResourceSpecification)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"resourceSpecification")
            Either
  String
  (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)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (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)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"currencyCode")
            Either
  String
  (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)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (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)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"arn")
            Either
  String
  (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)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (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)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"start")
            Either
  String
  (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)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe Int)
-> Either
     String
     (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)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"count")
            Either
  String
  (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)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe OfferingType
      -> Maybe Double
      -> Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"end")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe OfferingType
   -> Maybe Double
   -> Maybe Double
   -> Maybe OfferingDurationUnits
   -> Maybe Text
   -> Maybe Int
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe OfferingType
      -> Maybe Double
      -> Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"name")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe OfferingType
   -> Maybe Double
   -> Maybe Double
   -> Maybe OfferingDurationUnits
   -> Maybe Text
   -> Maybe Int
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe OfferingType
      -> Maybe Double
      -> Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"reservationId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe OfferingType
   -> Maybe Double
   -> Maybe Double
   -> Maybe OfferingDurationUnits
   -> Maybe Text
   -> Maybe Int
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe OfferingType
      -> Maybe Double
      -> Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"offeringId")
            Either
  String
  (Maybe Text
   -> Maybe OfferingType
   -> Maybe Double
   -> Maybe Double
   -> Maybe OfferingDurationUnits
   -> Maybe Text
   -> Maybe Int
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe OfferingType
      -> Maybe Double
      -> Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"region")
            Either
  String
  (Maybe OfferingType
   -> Maybe Double
   -> Maybe Double
   -> Maybe OfferingDurationUnits
   -> Maybe Text
   -> Maybe Int
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe OfferingType)
-> Either
     String
     (Maybe Double
      -> Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe OfferingType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"offeringType")
            Either
  String
  (Maybe Double
   -> Maybe Double
   -> Maybe OfferingDurationUnits
   -> Maybe Text
   -> Maybe Int
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe Double)
-> Either
     String
     (Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Double)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"usagePrice")
            Either
  String
  (Maybe Double
   -> Maybe OfferingDurationUnits
   -> Maybe Text
   -> Maybe Int
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe Double)
-> Either
     String
     (Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Double)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"fixedPrice")
            Either
  String
  (Maybe OfferingDurationUnits
   -> Maybe Text
   -> Maybe Int
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe OfferingDurationUnits)
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe OfferingDurationUnits)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"durationUnits")
            Either
  String
  (Maybe Text
   -> Maybe Int
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeReservationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe (HashMap Text Text) -> Int -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"offeringDescription")
            Either
  String
  (Maybe Int
   -> Maybe (HashMap Text Text) -> Int -> DescribeReservationResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe (HashMap Text Text) -> Int -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"duration")
            Either
  String
  (Maybe (HashMap Text Text) -> Int -> DescribeReservationResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> DescribeReservationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeReservationResponse)
-> Either String Int -> Either String DescribeReservationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeReservation

instance Prelude.NFData DescribeReservation

instance Core.ToHeaders DescribeReservation where
  toHeaders :: DescribeReservation -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeReservation -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath DescribeReservation where
  toPath :: DescribeReservation -> ByteString
toPath DescribeReservation' {Text
reservationId :: Text
$sel:reservationId:DescribeReservation' :: DescribeReservation -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/prod/reservations/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
reservationId]

instance Core.ToQuery DescribeReservation where
  toQuery :: DescribeReservation -> QueryString
toQuery = QueryString -> DescribeReservation -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | Placeholder documentation for DescribeReservationResponse
--
-- /See:/ 'newDescribeReservationResponse' smart constructor.
data DescribeReservationResponse = DescribeReservationResponse'
  { -- | Current state of reservation, e.g. \'ACTIVE\'
    DescribeReservationResponse -> Maybe ReservationState
state :: Prelude.Maybe ReservationState,
    -- | Resource configuration details
    DescribeReservationResponse
-> Maybe ReservationResourceSpecification
resourceSpecification :: Prelude.Maybe ReservationResourceSpecification,
    -- | Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g.
    -- \'USD\'
    DescribeReservationResponse -> Maybe Text
currencyCode :: Prelude.Maybe Prelude.Text,
    -- | Unique reservation ARN, e.g.
    -- \'arn:aws:medialive:us-west-2:123456789012:reservation:1234567\'
    DescribeReservationResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Reservation UTC start date and time in ISO-8601 format, e.g.
    -- \'2018-03-01T00:00:00\'
    DescribeReservationResponse -> Maybe Text
start :: Prelude.Maybe Prelude.Text,
    -- | Number of reserved resources
    DescribeReservationResponse -> Maybe Int
count :: Prelude.Maybe Prelude.Int,
    -- | Reservation UTC end date and time in ISO-8601 format, e.g.
    -- \'2019-03-01T00:00:00\'
    DescribeReservationResponse -> Maybe Text
end :: Prelude.Maybe Prelude.Text,
    -- | User specified reservation name
    DescribeReservationResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Unique reservation ID, e.g. \'1234567\'
    DescribeReservationResponse -> Maybe Text
reservationId :: Prelude.Maybe Prelude.Text,
    -- | Unique offering ID, e.g. \'87654321\'
    DescribeReservationResponse -> Maybe Text
offeringId :: Prelude.Maybe Prelude.Text,
    -- | AWS region, e.g. \'us-west-2\'
    DescribeReservationResponse -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
    -- | Offering type, e.g. \'NO_UPFRONT\'
    DescribeReservationResponse -> Maybe OfferingType
offeringType :: Prelude.Maybe OfferingType,
    -- | Recurring usage charge for each reserved resource, e.g. \'157.0\'
    DescribeReservationResponse -> Maybe Double
usagePrice :: Prelude.Maybe Prelude.Double,
    -- | One-time charge for each reserved resource, e.g. \'0.0\' for a
    -- NO_UPFRONT offering
    DescribeReservationResponse -> Maybe Double
fixedPrice :: Prelude.Maybe Prelude.Double,
    -- | Units for duration, e.g. \'MONTHS\'
    DescribeReservationResponse -> Maybe OfferingDurationUnits
durationUnits :: Prelude.Maybe OfferingDurationUnits,
    -- | Offering description, e.g. \'HD AVC output at 10-20 Mbps, 30 fps, and
    -- standard VQ in US West (Oregon)\'
    DescribeReservationResponse -> Maybe Text
offeringDescription :: Prelude.Maybe Prelude.Text,
    -- | Lease duration, e.g. \'12\'
    DescribeReservationResponse -> Maybe Int
duration :: Prelude.Maybe Prelude.Int,
    -- | A collection of key-value pairs
    DescribeReservationResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeReservationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeReservationResponse -> DescribeReservationResponse -> Bool
(DescribeReservationResponse
 -> DescribeReservationResponse -> Bool)
-> (DescribeReservationResponse
    -> DescribeReservationResponse -> Bool)
-> Eq DescribeReservationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReservationResponse -> DescribeReservationResponse -> Bool
$c/= :: DescribeReservationResponse -> DescribeReservationResponse -> Bool
== :: DescribeReservationResponse -> DescribeReservationResponse -> Bool
$c== :: DescribeReservationResponse -> DescribeReservationResponse -> Bool
Prelude.Eq, ReadPrec [DescribeReservationResponse]
ReadPrec DescribeReservationResponse
Int -> ReadS DescribeReservationResponse
ReadS [DescribeReservationResponse]
(Int -> ReadS DescribeReservationResponse)
-> ReadS [DescribeReservationResponse]
-> ReadPrec DescribeReservationResponse
-> ReadPrec [DescribeReservationResponse]
-> Read DescribeReservationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReservationResponse]
$creadListPrec :: ReadPrec [DescribeReservationResponse]
readPrec :: ReadPrec DescribeReservationResponse
$creadPrec :: ReadPrec DescribeReservationResponse
readList :: ReadS [DescribeReservationResponse]
$creadList :: ReadS [DescribeReservationResponse]
readsPrec :: Int -> ReadS DescribeReservationResponse
$creadsPrec :: Int -> ReadS DescribeReservationResponse
Prelude.Read, Int -> DescribeReservationResponse -> ShowS
[DescribeReservationResponse] -> ShowS
DescribeReservationResponse -> String
(Int -> DescribeReservationResponse -> ShowS)
-> (DescribeReservationResponse -> String)
-> ([DescribeReservationResponse] -> ShowS)
-> Show DescribeReservationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReservationResponse] -> ShowS
$cshowList :: [DescribeReservationResponse] -> ShowS
show :: DescribeReservationResponse -> String
$cshow :: DescribeReservationResponse -> String
showsPrec :: Int -> DescribeReservationResponse -> ShowS
$cshowsPrec :: Int -> DescribeReservationResponse -> ShowS
Prelude.Show, (forall x.
 DescribeReservationResponse -> Rep DescribeReservationResponse x)
-> (forall x.
    Rep DescribeReservationResponse x -> DescribeReservationResponse)
-> Generic DescribeReservationResponse
forall x.
Rep DescribeReservationResponse x -> DescribeReservationResponse
forall x.
DescribeReservationResponse -> Rep DescribeReservationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReservationResponse x -> DescribeReservationResponse
$cfrom :: forall x.
DescribeReservationResponse -> Rep DescribeReservationResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeReservationResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'state', 'describeReservationResponse_state' - Current state of reservation, e.g. \'ACTIVE\'
--
-- 'resourceSpecification', 'describeReservationResponse_resourceSpecification' - Resource configuration details
--
-- 'currencyCode', 'describeReservationResponse_currencyCode' - Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g.
-- \'USD\'
--
-- 'arn', 'describeReservationResponse_arn' - Unique reservation ARN, e.g.
-- \'arn:aws:medialive:us-west-2:123456789012:reservation:1234567\'
--
-- 'start', 'describeReservationResponse_start' - Reservation UTC start date and time in ISO-8601 format, e.g.
-- \'2018-03-01T00:00:00\'
--
-- 'count', 'describeReservationResponse_count' - Number of reserved resources
--
-- 'end', 'describeReservationResponse_end' - Reservation UTC end date and time in ISO-8601 format, e.g.
-- \'2019-03-01T00:00:00\'
--
-- 'name', 'describeReservationResponse_name' - User specified reservation name
--
-- 'reservationId', 'describeReservationResponse_reservationId' - Unique reservation ID, e.g. \'1234567\'
--
-- 'offeringId', 'describeReservationResponse_offeringId' - Unique offering ID, e.g. \'87654321\'
--
-- 'region', 'describeReservationResponse_region' - AWS region, e.g. \'us-west-2\'
--
-- 'offeringType', 'describeReservationResponse_offeringType' - Offering type, e.g. \'NO_UPFRONT\'
--
-- 'usagePrice', 'describeReservationResponse_usagePrice' - Recurring usage charge for each reserved resource, e.g. \'157.0\'
--
-- 'fixedPrice', 'describeReservationResponse_fixedPrice' - One-time charge for each reserved resource, e.g. \'0.0\' for a
-- NO_UPFRONT offering
--
-- 'durationUnits', 'describeReservationResponse_durationUnits' - Units for duration, e.g. \'MONTHS\'
--
-- 'offeringDescription', 'describeReservationResponse_offeringDescription' - Offering description, e.g. \'HD AVC output at 10-20 Mbps, 30 fps, and
-- standard VQ in US West (Oregon)\'
--
-- 'duration', 'describeReservationResponse_duration' - Lease duration, e.g. \'12\'
--
-- 'tags', 'describeReservationResponse_tags' - A collection of key-value pairs
--
-- 'httpStatus', 'describeReservationResponse_httpStatus' - The response's http status code.
newDescribeReservationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeReservationResponse
newDescribeReservationResponse :: Int -> DescribeReservationResponse
newDescribeReservationResponse Int
pHttpStatus_ =
  DescribeReservationResponse' :: 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)
-> Int
-> DescribeReservationResponse
DescribeReservationResponse'
    { $sel:state:DescribeReservationResponse' :: Maybe ReservationState
state =
        Maybe ReservationState
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceSpecification:DescribeReservationResponse' :: Maybe ReservationResourceSpecification
resourceSpecification = Maybe ReservationResourceSpecification
forall a. Maybe a
Prelude.Nothing,
      $sel:currencyCode:DescribeReservationResponse' :: Maybe Text
currencyCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeReservationResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:start:DescribeReservationResponse' :: Maybe Text
start = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:count:DescribeReservationResponse' :: Maybe Int
count = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:end:DescribeReservationResponse' :: Maybe Text
end = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DescribeReservationResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:reservationId:DescribeReservationResponse' :: Maybe Text
reservationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:offeringId:DescribeReservationResponse' :: Maybe Text
offeringId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:region:DescribeReservationResponse' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:offeringType:DescribeReservationResponse' :: Maybe OfferingType
offeringType = Maybe OfferingType
forall a. Maybe a
Prelude.Nothing,
      $sel:usagePrice:DescribeReservationResponse' :: Maybe Double
usagePrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:fixedPrice:DescribeReservationResponse' :: Maybe Double
fixedPrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:durationUnits:DescribeReservationResponse' :: Maybe OfferingDurationUnits
durationUnits = Maybe OfferingDurationUnits
forall a. Maybe a
Prelude.Nothing,
      $sel:offeringDescription:DescribeReservationResponse' :: Maybe Text
offeringDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:duration:DescribeReservationResponse' :: Maybe Int
duration = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeReservationResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeReservationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Current state of reservation, e.g. \'ACTIVE\'
describeReservationResponse_state :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe ReservationState)
describeReservationResponse_state :: (Maybe ReservationState -> f (Maybe ReservationState))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_state = (DescribeReservationResponse -> Maybe ReservationState)
-> (DescribeReservationResponse
    -> Maybe ReservationState -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe ReservationState)
     (Maybe ReservationState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe ReservationState
state :: Maybe ReservationState
$sel:state:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe ReservationState
state} -> Maybe ReservationState
state) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe ReservationState
a -> DescribeReservationResponse
s {$sel:state:DescribeReservationResponse' :: Maybe ReservationState
state = Maybe ReservationState
a} :: DescribeReservationResponse)

-- | Resource configuration details
describeReservationResponse_resourceSpecification :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe ReservationResourceSpecification)
describeReservationResponse_resourceSpecification :: (Maybe ReservationResourceSpecification
 -> f (Maybe ReservationResourceSpecification))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_resourceSpecification = (DescribeReservationResponse
 -> Maybe ReservationResourceSpecification)
-> (DescribeReservationResponse
    -> Maybe ReservationResourceSpecification
    -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe ReservationResourceSpecification)
     (Maybe ReservationResourceSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe ReservationResourceSpecification
resourceSpecification :: Maybe ReservationResourceSpecification
$sel:resourceSpecification:DescribeReservationResponse' :: DescribeReservationResponse
-> Maybe ReservationResourceSpecification
resourceSpecification} -> Maybe ReservationResourceSpecification
resourceSpecification) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe ReservationResourceSpecification
a -> DescribeReservationResponse
s {$sel:resourceSpecification:DescribeReservationResponse' :: Maybe ReservationResourceSpecification
resourceSpecification = Maybe ReservationResourceSpecification
a} :: DescribeReservationResponse)

-- | Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g.
-- \'USD\'
describeReservationResponse_currencyCode :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe Prelude.Text)
describeReservationResponse_currencyCode :: (Maybe Text -> f (Maybe Text))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_currencyCode = (DescribeReservationResponse -> Maybe Text)
-> (DescribeReservationResponse
    -> Maybe Text -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe Text
currencyCode :: Maybe Text
$sel:currencyCode:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe Text
currencyCode} -> Maybe Text
currencyCode) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe Text
a -> DescribeReservationResponse
s {$sel:currencyCode:DescribeReservationResponse' :: Maybe Text
currencyCode = Maybe Text
a} :: DescribeReservationResponse)

-- | Unique reservation ARN, e.g.
-- \'arn:aws:medialive:us-west-2:123456789012:reservation:1234567\'
describeReservationResponse_arn :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe Prelude.Text)
describeReservationResponse_arn :: (Maybe Text -> f (Maybe Text))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_arn = (DescribeReservationResponse -> Maybe Text)
-> (DescribeReservationResponse
    -> Maybe Text -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe Text
a -> DescribeReservationResponse
s {$sel:arn:DescribeReservationResponse' :: Maybe Text
arn = Maybe Text
a} :: DescribeReservationResponse)

-- | Reservation UTC start date and time in ISO-8601 format, e.g.
-- \'2018-03-01T00:00:00\'
describeReservationResponse_start :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe Prelude.Text)
describeReservationResponse_start :: (Maybe Text -> f (Maybe Text))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_start = (DescribeReservationResponse -> Maybe Text)
-> (DescribeReservationResponse
    -> Maybe Text -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe Text
start :: Maybe Text
$sel:start:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe Text
start} -> Maybe Text
start) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe Text
a -> DescribeReservationResponse
s {$sel:start:DescribeReservationResponse' :: Maybe Text
start = Maybe Text
a} :: DescribeReservationResponse)

-- | Number of reserved resources
describeReservationResponse_count :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe Prelude.Int)
describeReservationResponse_count :: (Maybe Int -> f (Maybe Int))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_count = (DescribeReservationResponse -> Maybe Int)
-> (DescribeReservationResponse
    -> Maybe Int -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe Int
count :: Maybe Int
$sel:count:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe Int
count} -> Maybe Int
count) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe Int
a -> DescribeReservationResponse
s {$sel:count:DescribeReservationResponse' :: Maybe Int
count = Maybe Int
a} :: DescribeReservationResponse)

-- | Reservation UTC end date and time in ISO-8601 format, e.g.
-- \'2019-03-01T00:00:00\'
describeReservationResponse_end :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe Prelude.Text)
describeReservationResponse_end :: (Maybe Text -> f (Maybe Text))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_end = (DescribeReservationResponse -> Maybe Text)
-> (DescribeReservationResponse
    -> Maybe Text -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe Text
end :: Maybe Text
$sel:end:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe Text
end} -> Maybe Text
end) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe Text
a -> DescribeReservationResponse
s {$sel:end:DescribeReservationResponse' :: Maybe Text
end = Maybe Text
a} :: DescribeReservationResponse)

-- | User specified reservation name
describeReservationResponse_name :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe Prelude.Text)
describeReservationResponse_name :: (Maybe Text -> f (Maybe Text))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_name = (DescribeReservationResponse -> Maybe Text)
-> (DescribeReservationResponse
    -> Maybe Text -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe Text
name :: Maybe Text
$sel:name:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe Text
a -> DescribeReservationResponse
s {$sel:name:DescribeReservationResponse' :: Maybe Text
name = Maybe Text
a} :: DescribeReservationResponse)

-- | Unique reservation ID, e.g. \'1234567\'
describeReservationResponse_reservationId :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe Prelude.Text)
describeReservationResponse_reservationId :: (Maybe Text -> f (Maybe Text))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_reservationId = (DescribeReservationResponse -> Maybe Text)
-> (DescribeReservationResponse
    -> Maybe Text -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe Text
reservationId :: Maybe Text
$sel:reservationId:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe Text
reservationId} -> Maybe Text
reservationId) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe Text
a -> DescribeReservationResponse
s {$sel:reservationId:DescribeReservationResponse' :: Maybe Text
reservationId = Maybe Text
a} :: DescribeReservationResponse)

-- | Unique offering ID, e.g. \'87654321\'
describeReservationResponse_offeringId :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe Prelude.Text)
describeReservationResponse_offeringId :: (Maybe Text -> f (Maybe Text))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_offeringId = (DescribeReservationResponse -> Maybe Text)
-> (DescribeReservationResponse
    -> Maybe Text -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe Text
offeringId :: Maybe Text
$sel:offeringId:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe Text
offeringId} -> Maybe Text
offeringId) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe Text
a -> DescribeReservationResponse
s {$sel:offeringId:DescribeReservationResponse' :: Maybe Text
offeringId = Maybe Text
a} :: DescribeReservationResponse)

-- | AWS region, e.g. \'us-west-2\'
describeReservationResponse_region :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe Prelude.Text)
describeReservationResponse_region :: (Maybe Text -> f (Maybe Text))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_region = (DescribeReservationResponse -> Maybe Text)
-> (DescribeReservationResponse
    -> Maybe Text -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe Text
region :: Maybe Text
$sel:region:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe Text
region} -> Maybe Text
region) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe Text
a -> DescribeReservationResponse
s {$sel:region:DescribeReservationResponse' :: Maybe Text
region = Maybe Text
a} :: DescribeReservationResponse)

-- | Offering type, e.g. \'NO_UPFRONT\'
describeReservationResponse_offeringType :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe OfferingType)
describeReservationResponse_offeringType :: (Maybe OfferingType -> f (Maybe OfferingType))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_offeringType = (DescribeReservationResponse -> Maybe OfferingType)
-> (DescribeReservationResponse
    -> Maybe OfferingType -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe OfferingType)
     (Maybe OfferingType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe OfferingType
offeringType :: Maybe OfferingType
$sel:offeringType:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe OfferingType
offeringType} -> Maybe OfferingType
offeringType) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe OfferingType
a -> DescribeReservationResponse
s {$sel:offeringType:DescribeReservationResponse' :: Maybe OfferingType
offeringType = Maybe OfferingType
a} :: DescribeReservationResponse)

-- | Recurring usage charge for each reserved resource, e.g. \'157.0\'
describeReservationResponse_usagePrice :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe Prelude.Double)
describeReservationResponse_usagePrice :: (Maybe Double -> f (Maybe Double))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_usagePrice = (DescribeReservationResponse -> Maybe Double)
-> (DescribeReservationResponse
    -> Maybe Double -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe Double)
     (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe Double
usagePrice :: Maybe Double
$sel:usagePrice:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe Double
usagePrice} -> Maybe Double
usagePrice) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe Double
a -> DescribeReservationResponse
s {$sel:usagePrice:DescribeReservationResponse' :: Maybe Double
usagePrice = Maybe Double
a} :: DescribeReservationResponse)

-- | One-time charge for each reserved resource, e.g. \'0.0\' for a
-- NO_UPFRONT offering
describeReservationResponse_fixedPrice :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe Prelude.Double)
describeReservationResponse_fixedPrice :: (Maybe Double -> f (Maybe Double))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_fixedPrice = (DescribeReservationResponse -> Maybe Double)
-> (DescribeReservationResponse
    -> Maybe Double -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe Double)
     (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe Double
fixedPrice :: Maybe Double
$sel:fixedPrice:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe Double
fixedPrice} -> Maybe Double
fixedPrice) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe Double
a -> DescribeReservationResponse
s {$sel:fixedPrice:DescribeReservationResponse' :: Maybe Double
fixedPrice = Maybe Double
a} :: DescribeReservationResponse)

-- | Units for duration, e.g. \'MONTHS\'
describeReservationResponse_durationUnits :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe OfferingDurationUnits)
describeReservationResponse_durationUnits :: (Maybe OfferingDurationUnits -> f (Maybe OfferingDurationUnits))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_durationUnits = (DescribeReservationResponse -> Maybe OfferingDurationUnits)
-> (DescribeReservationResponse
    -> Maybe OfferingDurationUnits -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe OfferingDurationUnits)
     (Maybe OfferingDurationUnits)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe OfferingDurationUnits
durationUnits :: Maybe OfferingDurationUnits
$sel:durationUnits:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe OfferingDurationUnits
durationUnits} -> Maybe OfferingDurationUnits
durationUnits) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe OfferingDurationUnits
a -> DescribeReservationResponse
s {$sel:durationUnits:DescribeReservationResponse' :: Maybe OfferingDurationUnits
durationUnits = Maybe OfferingDurationUnits
a} :: DescribeReservationResponse)

-- | Offering description, e.g. \'HD AVC output at 10-20 Mbps, 30 fps, and
-- standard VQ in US West (Oregon)\'
describeReservationResponse_offeringDescription :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe Prelude.Text)
describeReservationResponse_offeringDescription :: (Maybe Text -> f (Maybe Text))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_offeringDescription = (DescribeReservationResponse -> Maybe Text)
-> (DescribeReservationResponse
    -> Maybe Text -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe Text
offeringDescription :: Maybe Text
$sel:offeringDescription:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe Text
offeringDescription} -> Maybe Text
offeringDescription) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe Text
a -> DescribeReservationResponse
s {$sel:offeringDescription:DescribeReservationResponse' :: Maybe Text
offeringDescription = Maybe Text
a} :: DescribeReservationResponse)

-- | Lease duration, e.g. \'12\'
describeReservationResponse_duration :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe Prelude.Int)
describeReservationResponse_duration :: (Maybe Int -> f (Maybe Int))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_duration = (DescribeReservationResponse -> Maybe Int)
-> (DescribeReservationResponse
    -> Maybe Int -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Maybe Int
duration :: Maybe Int
$sel:duration:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe Int
duration} -> Maybe Int
duration) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe Int
a -> DescribeReservationResponse
s {$sel:duration:DescribeReservationResponse' :: Maybe Int
duration = Maybe Int
a} :: DescribeReservationResponse)

-- | A collection of key-value pairs
describeReservationResponse_tags :: Lens.Lens' DescribeReservationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeReservationResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_tags = (DescribeReservationResponse -> Maybe (HashMap Text Text))
-> (DescribeReservationResponse
    -> Maybe (HashMap Text Text) -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse
     DescribeReservationResponse
     (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 (\DescribeReservationResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeReservationResponse' :: DescribeReservationResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Maybe (HashMap Text Text)
a -> DescribeReservationResponse
s {$sel:tags:DescribeReservationResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeReservationResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeReservationResponse -> f DescribeReservationResponse)
-> ((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)))
-> DescribeReservationResponse
-> f DescribeReservationResponse
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

-- | The response's http status code.
describeReservationResponse_httpStatus :: Lens.Lens' DescribeReservationResponse Prelude.Int
describeReservationResponse_httpStatus :: (Int -> f Int)
-> DescribeReservationResponse -> f DescribeReservationResponse
describeReservationResponse_httpStatus = (DescribeReservationResponse -> Int)
-> (DescribeReservationResponse
    -> Int -> DescribeReservationResponse)
-> Lens
     DescribeReservationResponse DescribeReservationResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeReservationResponse' :: DescribeReservationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeReservationResponse
s@DescribeReservationResponse' {} Int
a -> DescribeReservationResponse
s {$sel:httpStatus:DescribeReservationResponse' :: Int
httpStatus = Int
a} :: DescribeReservationResponse)

instance Prelude.NFData DescribeReservationResponse