{-# 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.DescribeOffering
-- 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 an offering.
module Amazonka.MediaLive.DescribeOffering
  ( -- * Creating a Request
    DescribeOffering (..),
    newDescribeOffering,

    -- * Request Lenses
    describeOffering_offeringId,

    -- * Destructuring the Response
    DescribeOfferingResponse (..),
    newDescribeOfferingResponse,

    -- * Response Lenses
    describeOfferingResponse_resourceSpecification,
    describeOfferingResponse_currencyCode,
    describeOfferingResponse_arn,
    describeOfferingResponse_offeringId,
    describeOfferingResponse_region,
    describeOfferingResponse_offeringType,
    describeOfferingResponse_usagePrice,
    describeOfferingResponse_fixedPrice,
    describeOfferingResponse_durationUnits,
    describeOfferingResponse_offeringDescription,
    describeOfferingResponse_duration,
    describeOfferingResponse_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 DescribeOfferingRequest
--
-- /See:/ 'newDescribeOffering' smart constructor.
data DescribeOffering = DescribeOffering'
  { -- | Unique offering ID, e.g. \'87654321\'
    DescribeOffering -> Text
offeringId :: Prelude.Text
  }
  deriving (DescribeOffering -> DescribeOffering -> Bool
(DescribeOffering -> DescribeOffering -> Bool)
-> (DescribeOffering -> DescribeOffering -> Bool)
-> Eq DescribeOffering
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeOffering -> DescribeOffering -> Bool
$c/= :: DescribeOffering -> DescribeOffering -> Bool
== :: DescribeOffering -> DescribeOffering -> Bool
$c== :: DescribeOffering -> DescribeOffering -> Bool
Prelude.Eq, ReadPrec [DescribeOffering]
ReadPrec DescribeOffering
Int -> ReadS DescribeOffering
ReadS [DescribeOffering]
(Int -> ReadS DescribeOffering)
-> ReadS [DescribeOffering]
-> ReadPrec DescribeOffering
-> ReadPrec [DescribeOffering]
-> Read DescribeOffering
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeOffering]
$creadListPrec :: ReadPrec [DescribeOffering]
readPrec :: ReadPrec DescribeOffering
$creadPrec :: ReadPrec DescribeOffering
readList :: ReadS [DescribeOffering]
$creadList :: ReadS [DescribeOffering]
readsPrec :: Int -> ReadS DescribeOffering
$creadsPrec :: Int -> ReadS DescribeOffering
Prelude.Read, Int -> DescribeOffering -> ShowS
[DescribeOffering] -> ShowS
DescribeOffering -> String
(Int -> DescribeOffering -> ShowS)
-> (DescribeOffering -> String)
-> ([DescribeOffering] -> ShowS)
-> Show DescribeOffering
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeOffering] -> ShowS
$cshowList :: [DescribeOffering] -> ShowS
show :: DescribeOffering -> String
$cshow :: DescribeOffering -> String
showsPrec :: Int -> DescribeOffering -> ShowS
$cshowsPrec :: Int -> DescribeOffering -> ShowS
Prelude.Show, (forall x. DescribeOffering -> Rep DescribeOffering x)
-> (forall x. Rep DescribeOffering x -> DescribeOffering)
-> Generic DescribeOffering
forall x. Rep DescribeOffering x -> DescribeOffering
forall x. DescribeOffering -> Rep DescribeOffering x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeOffering x -> DescribeOffering
$cfrom :: forall x. DescribeOffering -> Rep DescribeOffering x
Prelude.Generic)

-- |
-- Create a value of 'DescribeOffering' 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:
--
-- 'offeringId', 'describeOffering_offeringId' - Unique offering ID, e.g. \'87654321\'
newDescribeOffering ::
  -- | 'offeringId'
  Prelude.Text ->
  DescribeOffering
newDescribeOffering :: Text -> DescribeOffering
newDescribeOffering Text
pOfferingId_ =
  DescribeOffering' :: Text -> DescribeOffering
DescribeOffering' {$sel:offeringId:DescribeOffering' :: Text
offeringId = Text
pOfferingId_}

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

instance Core.AWSRequest DescribeOffering where
  type
    AWSResponse DescribeOffering =
      DescribeOfferingResponse
  request :: DescribeOffering -> Request DescribeOffering
request = Service -> DescribeOffering -> Request DescribeOffering
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeOffering
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeOffering)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeOffering))
-> Logger
-> Service
-> Proxy DescribeOffering
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeOffering)))
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 ReservationResourceSpecification
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Int
-> DescribeOfferingResponse
DescribeOfferingResponse'
            (Maybe ReservationResourceSpecification
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe OfferingType
 -> Maybe Double
 -> Maybe Double
 -> Maybe OfferingDurationUnits
 -> Maybe Text
 -> Maybe Int
 -> Int
 -> DescribeOfferingResponse)
-> Either String (Maybe ReservationResourceSpecification)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe OfferingType
      -> Maybe Double
      -> Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Int
      -> DescribeOfferingResponse)
forall (f :: * -> *) a b. Functor 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 Text
   -> Maybe OfferingType
   -> Maybe Double
   -> Maybe Double
   -> Maybe OfferingDurationUnits
   -> Maybe Text
   -> Maybe Int
   -> Int
   -> DescribeOfferingResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe OfferingType
      -> Maybe Double
      -> Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Int
      -> DescribeOfferingResponse)
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 Text
   -> Maybe OfferingType
   -> Maybe Double
   -> Maybe Double
   -> Maybe OfferingDurationUnits
   -> Maybe Text
   -> Maybe Int
   -> Int
   -> DescribeOfferingResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe OfferingType
      -> Maybe Double
      -> Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Int
      -> DescribeOfferingResponse)
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 Text
   -> Maybe OfferingType
   -> Maybe Double
   -> Maybe Double
   -> Maybe OfferingDurationUnits
   -> Maybe Text
   -> Maybe Int
   -> Int
   -> DescribeOfferingResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe OfferingType
      -> Maybe Double
      -> Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Int
      -> DescribeOfferingResponse)
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
   -> Int
   -> DescribeOfferingResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe OfferingType
      -> Maybe Double
      -> Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Int
      -> DescribeOfferingResponse)
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
   -> Int
   -> DescribeOfferingResponse)
-> Either String (Maybe OfferingType)
-> Either
     String
     (Maybe Double
      -> Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Int
      -> DescribeOfferingResponse)
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
   -> Int
   -> DescribeOfferingResponse)
-> Either String (Maybe Double)
-> Either
     String
     (Maybe Double
      -> Maybe OfferingDurationUnits
      -> Maybe Text
      -> Maybe Int
      -> Int
      -> DescribeOfferingResponse)
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
   -> Int
   -> DescribeOfferingResponse)
-> Either String (Maybe Double)
-> Either
     String
     (Maybe OfferingDurationUnits
      -> Maybe Text -> Maybe Int -> Int -> DescribeOfferingResponse)
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 -> Int -> DescribeOfferingResponse)
-> Either String (Maybe OfferingDurationUnits)
-> Either
     String (Maybe Text -> Maybe Int -> Int -> DescribeOfferingResponse)
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 -> Int -> DescribeOfferingResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Int -> Int -> DescribeOfferingResponse)
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 -> Int -> DescribeOfferingResponse)
-> Either String (Maybe Int)
-> Either String (Int -> DescribeOfferingResponse)
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 (Int -> DescribeOfferingResponse)
-> Either String Int -> Either String DescribeOfferingResponse
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 DescribeOffering

instance Prelude.NFData DescribeOffering

instance Core.ToHeaders DescribeOffering where
  toHeaders :: DescribeOffering -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeOffering -> 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 DescribeOffering where
  toPath :: DescribeOffering -> ByteString
toPath DescribeOffering' {Text
offeringId :: Text
$sel:offeringId:DescribeOffering' :: DescribeOffering -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/prod/offerings/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
offeringId]

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

-- | Placeholder documentation for DescribeOfferingResponse
--
-- /See:/ 'newDescribeOfferingResponse' smart constructor.
data DescribeOfferingResponse = DescribeOfferingResponse'
  { -- | Resource configuration details
    DescribeOfferingResponse -> Maybe ReservationResourceSpecification
resourceSpecification :: Prelude.Maybe ReservationResourceSpecification,
    -- | Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g.
    -- \'USD\'
    DescribeOfferingResponse -> Maybe Text
currencyCode :: Prelude.Maybe Prelude.Text,
    -- | Unique offering ARN, e.g.
    -- \'arn:aws:medialive:us-west-2:123456789012:offering:87654321\'
    DescribeOfferingResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Unique offering ID, e.g. \'87654321\'
    DescribeOfferingResponse -> Maybe Text
offeringId :: Prelude.Maybe Prelude.Text,
    -- | AWS region, e.g. \'us-west-2\'
    DescribeOfferingResponse -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
    -- | Offering type, e.g. \'NO_UPFRONT\'
    DescribeOfferingResponse -> Maybe OfferingType
offeringType :: Prelude.Maybe OfferingType,
    -- | Recurring usage charge for each reserved resource, e.g. \'157.0\'
    DescribeOfferingResponse -> Maybe Double
usagePrice :: Prelude.Maybe Prelude.Double,
    -- | One-time charge for each reserved resource, e.g. \'0.0\' for a
    -- NO_UPFRONT offering
    DescribeOfferingResponse -> Maybe Double
fixedPrice :: Prelude.Maybe Prelude.Double,
    -- | Units for duration, e.g. \'MONTHS\'
    DescribeOfferingResponse -> 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)\'
    DescribeOfferingResponse -> Maybe Text
offeringDescription :: Prelude.Maybe Prelude.Text,
    -- | Lease duration, e.g. \'12\'
    DescribeOfferingResponse -> Maybe Int
duration :: Prelude.Maybe Prelude.Int,
    -- | The response's http status code.
    DescribeOfferingResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeOfferingResponse -> DescribeOfferingResponse -> Bool
(DescribeOfferingResponse -> DescribeOfferingResponse -> Bool)
-> (DescribeOfferingResponse -> DescribeOfferingResponse -> Bool)
-> Eq DescribeOfferingResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeOfferingResponse -> DescribeOfferingResponse -> Bool
$c/= :: DescribeOfferingResponse -> DescribeOfferingResponse -> Bool
== :: DescribeOfferingResponse -> DescribeOfferingResponse -> Bool
$c== :: DescribeOfferingResponse -> DescribeOfferingResponse -> Bool
Prelude.Eq, ReadPrec [DescribeOfferingResponse]
ReadPrec DescribeOfferingResponse
Int -> ReadS DescribeOfferingResponse
ReadS [DescribeOfferingResponse]
(Int -> ReadS DescribeOfferingResponse)
-> ReadS [DescribeOfferingResponse]
-> ReadPrec DescribeOfferingResponse
-> ReadPrec [DescribeOfferingResponse]
-> Read DescribeOfferingResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeOfferingResponse]
$creadListPrec :: ReadPrec [DescribeOfferingResponse]
readPrec :: ReadPrec DescribeOfferingResponse
$creadPrec :: ReadPrec DescribeOfferingResponse
readList :: ReadS [DescribeOfferingResponse]
$creadList :: ReadS [DescribeOfferingResponse]
readsPrec :: Int -> ReadS DescribeOfferingResponse
$creadsPrec :: Int -> ReadS DescribeOfferingResponse
Prelude.Read, Int -> DescribeOfferingResponse -> ShowS
[DescribeOfferingResponse] -> ShowS
DescribeOfferingResponse -> String
(Int -> DescribeOfferingResponse -> ShowS)
-> (DescribeOfferingResponse -> String)
-> ([DescribeOfferingResponse] -> ShowS)
-> Show DescribeOfferingResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeOfferingResponse] -> ShowS
$cshowList :: [DescribeOfferingResponse] -> ShowS
show :: DescribeOfferingResponse -> String
$cshow :: DescribeOfferingResponse -> String
showsPrec :: Int -> DescribeOfferingResponse -> ShowS
$cshowsPrec :: Int -> DescribeOfferingResponse -> ShowS
Prelude.Show, (forall x.
 DescribeOfferingResponse -> Rep DescribeOfferingResponse x)
-> (forall x.
    Rep DescribeOfferingResponse x -> DescribeOfferingResponse)
-> Generic DescribeOfferingResponse
forall x.
Rep DescribeOfferingResponse x -> DescribeOfferingResponse
forall x.
DescribeOfferingResponse -> Rep DescribeOfferingResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeOfferingResponse x -> DescribeOfferingResponse
$cfrom :: forall x.
DescribeOfferingResponse -> Rep DescribeOfferingResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeOfferingResponse' 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:
--
-- 'resourceSpecification', 'describeOfferingResponse_resourceSpecification' - Resource configuration details
--
-- 'currencyCode', 'describeOfferingResponse_currencyCode' - Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g.
-- \'USD\'
--
-- 'arn', 'describeOfferingResponse_arn' - Unique offering ARN, e.g.
-- \'arn:aws:medialive:us-west-2:123456789012:offering:87654321\'
--
-- 'offeringId', 'describeOfferingResponse_offeringId' - Unique offering ID, e.g. \'87654321\'
--
-- 'region', 'describeOfferingResponse_region' - AWS region, e.g. \'us-west-2\'
--
-- 'offeringType', 'describeOfferingResponse_offeringType' - Offering type, e.g. \'NO_UPFRONT\'
--
-- 'usagePrice', 'describeOfferingResponse_usagePrice' - Recurring usage charge for each reserved resource, e.g. \'157.0\'
--
-- 'fixedPrice', 'describeOfferingResponse_fixedPrice' - One-time charge for each reserved resource, e.g. \'0.0\' for a
-- NO_UPFRONT offering
--
-- 'durationUnits', 'describeOfferingResponse_durationUnits' - Units for duration, e.g. \'MONTHS\'
--
-- 'offeringDescription', 'describeOfferingResponse_offeringDescription' - Offering description, e.g. \'HD AVC output at 10-20 Mbps, 30 fps, and
-- standard VQ in US West (Oregon)\'
--
-- 'duration', 'describeOfferingResponse_duration' - Lease duration, e.g. \'12\'
--
-- 'httpStatus', 'describeOfferingResponse_httpStatus' - The response's http status code.
newDescribeOfferingResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeOfferingResponse
newDescribeOfferingResponse :: Int -> DescribeOfferingResponse
newDescribeOfferingResponse Int
pHttpStatus_ =
  DescribeOfferingResponse' :: Maybe ReservationResourceSpecification
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OfferingType
-> Maybe Double
-> Maybe Double
-> Maybe OfferingDurationUnits
-> Maybe Text
-> Maybe Int
-> Int
-> DescribeOfferingResponse
DescribeOfferingResponse'
    { $sel:resourceSpecification:DescribeOfferingResponse' :: Maybe ReservationResourceSpecification
resourceSpecification =
        Maybe ReservationResourceSpecification
forall a. Maybe a
Prelude.Nothing,
      $sel:currencyCode:DescribeOfferingResponse' :: Maybe Text
currencyCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeOfferingResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:offeringId:DescribeOfferingResponse' :: Maybe Text
offeringId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:region:DescribeOfferingResponse' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:offeringType:DescribeOfferingResponse' :: Maybe OfferingType
offeringType = Maybe OfferingType
forall a. Maybe a
Prelude.Nothing,
      $sel:usagePrice:DescribeOfferingResponse' :: Maybe Double
usagePrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:fixedPrice:DescribeOfferingResponse' :: Maybe Double
fixedPrice = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:durationUnits:DescribeOfferingResponse' :: Maybe OfferingDurationUnits
durationUnits = Maybe OfferingDurationUnits
forall a. Maybe a
Prelude.Nothing,
      $sel:offeringDescription:DescribeOfferingResponse' :: Maybe Text
offeringDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:duration:DescribeOfferingResponse' :: Maybe Int
duration = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeOfferingResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

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

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

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

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

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

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

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

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

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

instance Prelude.NFData DescribeOfferingResponse