{-# 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.DeleteReservation
-- 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)
--
-- Delete an expired reservation.
module Amazonka.MediaLive.DeleteReservation
  ( -- * Creating a Request
    DeleteReservation (..),
    newDeleteReservation,

    -- * Request Lenses
    deleteReservation_reservationId,

    -- * Destructuring the Response
    DeleteReservationResponse (..),
    newDeleteReservationResponse,

    -- * Response Lenses
    deleteReservationResponse_state,
    deleteReservationResponse_resourceSpecification,
    deleteReservationResponse_currencyCode,
    deleteReservationResponse_arn,
    deleteReservationResponse_start,
    deleteReservationResponse_count,
    deleteReservationResponse_end,
    deleteReservationResponse_name,
    deleteReservationResponse_reservationId,
    deleteReservationResponse_offeringId,
    deleteReservationResponse_region,
    deleteReservationResponse_offeringType,
    deleteReservationResponse_usagePrice,
    deleteReservationResponse_fixedPrice,
    deleteReservationResponse_durationUnits,
    deleteReservationResponse_offeringDescription,
    deleteReservationResponse_duration,
    deleteReservationResponse_tags,
    deleteReservationResponse_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 DeleteReservationRequest
--
-- /See:/ 'newDeleteReservation' smart constructor.
data DeleteReservation = DeleteReservation'
  { -- | Unique reservation ID, e.g. \'1234567\'
    DeleteReservation -> Text
reservationId :: Prelude.Text
  }
  deriving (DeleteReservation -> DeleteReservation -> Bool
(DeleteReservation -> DeleteReservation -> Bool)
-> (DeleteReservation -> DeleteReservation -> Bool)
-> Eq DeleteReservation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReservation -> DeleteReservation -> Bool
$c/= :: DeleteReservation -> DeleteReservation -> Bool
== :: DeleteReservation -> DeleteReservation -> Bool
$c== :: DeleteReservation -> DeleteReservation -> Bool
Prelude.Eq, ReadPrec [DeleteReservation]
ReadPrec DeleteReservation
Int -> ReadS DeleteReservation
ReadS [DeleteReservation]
(Int -> ReadS DeleteReservation)
-> ReadS [DeleteReservation]
-> ReadPrec DeleteReservation
-> ReadPrec [DeleteReservation]
-> Read DeleteReservation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReservation]
$creadListPrec :: ReadPrec [DeleteReservation]
readPrec :: ReadPrec DeleteReservation
$creadPrec :: ReadPrec DeleteReservation
readList :: ReadS [DeleteReservation]
$creadList :: ReadS [DeleteReservation]
readsPrec :: Int -> ReadS DeleteReservation
$creadsPrec :: Int -> ReadS DeleteReservation
Prelude.Read, Int -> DeleteReservation -> ShowS
[DeleteReservation] -> ShowS
DeleteReservation -> String
(Int -> DeleteReservation -> ShowS)
-> (DeleteReservation -> String)
-> ([DeleteReservation] -> ShowS)
-> Show DeleteReservation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReservation] -> ShowS
$cshowList :: [DeleteReservation] -> ShowS
show :: DeleteReservation -> String
$cshow :: DeleteReservation -> String
showsPrec :: Int -> DeleteReservation -> ShowS
$cshowsPrec :: Int -> DeleteReservation -> ShowS
Prelude.Show, (forall x. DeleteReservation -> Rep DeleteReservation x)
-> (forall x. Rep DeleteReservation x -> DeleteReservation)
-> Generic DeleteReservation
forall x. Rep DeleteReservation x -> DeleteReservation
forall x. DeleteReservation -> Rep DeleteReservation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteReservation x -> DeleteReservation
$cfrom :: forall x. DeleteReservation -> Rep DeleteReservation x
Prelude.Generic)

-- |
-- Create a value of 'DeleteReservation' 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', 'deleteReservation_reservationId' - Unique reservation ID, e.g. \'1234567\'
newDeleteReservation ::
  -- | 'reservationId'
  Prelude.Text ->
  DeleteReservation
newDeleteReservation :: Text -> DeleteReservation
newDeleteReservation Text
pReservationId_ =
  DeleteReservation' :: Text -> DeleteReservation
DeleteReservation' {$sel:reservationId:DeleteReservation' :: Text
reservationId = Text
pReservationId_}

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

instance Core.AWSRequest DeleteReservation where
  type
    AWSResponse DeleteReservation =
      DeleteReservationResponse
  request :: DeleteReservation -> Request DeleteReservation
request = Service -> DeleteReservation -> Request DeleteReservation
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteReservation
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteReservation)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DeleteReservation))
-> Logger
-> Service
-> Proxy DeleteReservation
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteReservation)))
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
-> DeleteReservationResponse
DeleteReservationResponse'
            (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
 -> DeleteReservationResponse)
-> 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
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> 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
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> 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
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> 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
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> 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
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> 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
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> 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
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> 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
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> 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
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> 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
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe OfferingType
      -> Maybe Double
      -> Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Int
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> Either String (Maybe OfferingType)
-> Either
     String
     (Maybe Double
      -> Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Int
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> Either String (Maybe Double)
-> Either
     String
     (Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Int
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> Either String (Maybe Double)
-> Either
     String
     (Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Int
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> Either String (Maybe OfferingDurationUnits)
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Maybe (HashMap Text Text)
      -> Int
      -> DeleteReservationResponse)
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
   -> DeleteReservationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe (HashMap Text Text) -> Int -> DeleteReservationResponse)
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 -> DeleteReservationResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe (HashMap Text Text) -> Int -> DeleteReservationResponse)
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 -> DeleteReservationResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> DeleteReservationResponse)
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 -> DeleteReservationResponse)
-> Either String Int -> Either String DeleteReservationResponse
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 DeleteReservation

instance Prelude.NFData DeleteReservation

instance Core.ToHeaders DeleteReservation where
  toHeaders :: DeleteReservation -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DeleteReservation -> 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 DeleteReservation where
  toPath :: DeleteReservation -> ByteString
toPath DeleteReservation' {Text
reservationId :: Text
$sel:reservationId:DeleteReservation' :: DeleteReservation -> 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 DeleteReservation where
  toQuery :: DeleteReservation -> QueryString
toQuery = QueryString -> DeleteReservation -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

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

-- |
-- Create a value of 'DeleteReservationResponse' 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', 'deleteReservationResponse_state' - Current state of reservation, e.g. \'ACTIVE\'
--
-- 'resourceSpecification', 'deleteReservationResponse_resourceSpecification' - Resource configuration details
--
-- 'currencyCode', 'deleteReservationResponse_currencyCode' - Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g.
-- \'USD\'
--
-- 'arn', 'deleteReservationResponse_arn' - Unique reservation ARN, e.g.
-- \'arn:aws:medialive:us-west-2:123456789012:reservation:1234567\'
--
-- 'start', 'deleteReservationResponse_start' - Reservation UTC start date and time in ISO-8601 format, e.g.
-- \'2018-03-01T00:00:00\'
--
-- 'count', 'deleteReservationResponse_count' - Number of reserved resources
--
-- 'end', 'deleteReservationResponse_end' - Reservation UTC end date and time in ISO-8601 format, e.g.
-- \'2019-03-01T00:00:00\'
--
-- 'name', 'deleteReservationResponse_name' - User specified reservation name
--
-- 'reservationId', 'deleteReservationResponse_reservationId' - Unique reservation ID, e.g. \'1234567\'
--
-- 'offeringId', 'deleteReservationResponse_offeringId' - Unique offering ID, e.g. \'87654321\'
--
-- 'region', 'deleteReservationResponse_region' - AWS region, e.g. \'us-west-2\'
--
-- 'offeringType', 'deleteReservationResponse_offeringType' - Offering type, e.g. \'NO_UPFRONT\'
--
-- 'usagePrice', 'deleteReservationResponse_usagePrice' - Recurring usage charge for each reserved resource, e.g. \'157.0\'
--
-- 'fixedPrice', 'deleteReservationResponse_fixedPrice' - One-time charge for each reserved resource, e.g. \'0.0\' for a
-- NO_UPFRONT offering
--
-- 'durationUnits', 'deleteReservationResponse_durationUnits' - Units for duration, e.g. \'MONTHS\'
--
-- 'offeringDescription', 'deleteReservationResponse_offeringDescription' - Offering description, e.g. \'HD AVC output at 10-20 Mbps, 30 fps, and
-- standard VQ in US West (Oregon)\'
--
-- 'duration', 'deleteReservationResponse_duration' - Lease duration, e.g. \'12\'
--
-- 'tags', 'deleteReservationResponse_tags' - A collection of key-value pairs
--
-- 'httpStatus', 'deleteReservationResponse_httpStatus' - The response's http status code.
newDeleteReservationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteReservationResponse
newDeleteReservationResponse :: Int -> DeleteReservationResponse
newDeleteReservationResponse Int
pHttpStatus_ =
  DeleteReservationResponse' :: 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
-> DeleteReservationResponse
DeleteReservationResponse'
    { $sel:state:DeleteReservationResponse' :: Maybe ReservationState
state = Maybe ReservationState
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceSpecification:DeleteReservationResponse' :: Maybe ReservationResourceSpecification
resourceSpecification = Maybe ReservationResourceSpecification
forall a. Maybe a
Prelude.Nothing,
      $sel:currencyCode:DeleteReservationResponse' :: Maybe Text
currencyCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DeleteReservationResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:start:DeleteReservationResponse' :: Maybe Text
start = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:count:DeleteReservationResponse' :: Maybe Int
count = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:end:DeleteReservationResponse' :: Maybe Text
end = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DeleteReservationResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:reservationId:DeleteReservationResponse' :: Maybe Text
reservationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:offeringId:DeleteReservationResponse' :: Maybe Text
offeringId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:region:DeleteReservationResponse' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:offeringType:DeleteReservationResponse' :: Maybe OfferingType
offeringType = Maybe OfferingType
forall a. Maybe a
Prelude.Nothing,
      $sel:usagePrice:DeleteReservationResponse' :: Maybe Double
usagePrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:fixedPrice:DeleteReservationResponse' :: Maybe Double
fixedPrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:durationUnits:DeleteReservationResponse' :: Maybe OfferingDurationUnits
durationUnits = Maybe OfferingDurationUnits
forall a. Maybe a
Prelude.Nothing,
      $sel:offeringDescription:DeleteReservationResponse' :: Maybe Text
offeringDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:duration:DeleteReservationResponse' :: Maybe Int
duration = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DeleteReservationResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteReservationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

-- | A collection of key-value pairs
deleteReservationResponse_tags :: Lens.Lens' DeleteReservationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
deleteReservationResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DeleteReservationResponse -> f DeleteReservationResponse
deleteReservationResponse_tags = (DeleteReservationResponse -> Maybe (HashMap Text Text))
-> (DeleteReservationResponse
    -> Maybe (HashMap Text Text) -> DeleteReservationResponse)
-> Lens
     DeleteReservationResponse
     DeleteReservationResponse
     (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 (\DeleteReservationResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DeleteReservationResponse' :: DeleteReservationResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DeleteReservationResponse
s@DeleteReservationResponse' {} Maybe (HashMap Text Text)
a -> DeleteReservationResponse
s {$sel:tags:DeleteReservationResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DeleteReservationResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DeleteReservationResponse -> f DeleteReservationResponse)
-> ((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)))
-> DeleteReservationResponse
-> f DeleteReservationResponse
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.
deleteReservationResponse_httpStatus :: Lens.Lens' DeleteReservationResponse Prelude.Int
deleteReservationResponse_httpStatus :: (Int -> f Int)
-> DeleteReservationResponse -> f DeleteReservationResponse
deleteReservationResponse_httpStatus = (DeleteReservationResponse -> Int)
-> (DeleteReservationResponse -> Int -> DeleteReservationResponse)
-> Lens DeleteReservationResponse DeleteReservationResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReservationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteReservationResponse' :: DeleteReservationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteReservationResponse
s@DeleteReservationResponse' {} Int
a -> DeleteReservationResponse
s {$sel:httpStatus:DeleteReservationResponse' :: Int
httpStatus = Int
a} :: DeleteReservationResponse)

instance Prelude.NFData DeleteReservationResponse