{-# 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.SavingsPlans.DescribeSavingsPlansOfferings
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the specified Savings Plans offerings.
module Amazonka.SavingsPlans.DescribeSavingsPlansOfferings
  ( -- * Creating a Request
    DescribeSavingsPlansOfferings (..),
    newDescribeSavingsPlansOfferings,

    -- * Request Lenses
    describeSavingsPlansOfferings_currencies,
    describeSavingsPlansOfferings_descriptions,
    describeSavingsPlansOfferings_durations,
    describeSavingsPlansOfferings_filters,
    describeSavingsPlansOfferings_maxResults,
    describeSavingsPlansOfferings_nextToken,
    describeSavingsPlansOfferings_offeringIds,
    describeSavingsPlansOfferings_operations,
    describeSavingsPlansOfferings_paymentOptions,
    describeSavingsPlansOfferings_planTypes,
    describeSavingsPlansOfferings_productType,
    describeSavingsPlansOfferings_serviceCodes,
    describeSavingsPlansOfferings_usageTypes,

    -- * Destructuring the Response
    DescribeSavingsPlansOfferingsResponse (..),
    newDescribeSavingsPlansOfferingsResponse,

    -- * Response Lenses
    describeSavingsPlansOfferingsResponse_nextToken,
    describeSavingsPlansOfferingsResponse_searchResults,
    describeSavingsPlansOfferingsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SavingsPlans.Types

-- | /See:/ 'newDescribeSavingsPlansOfferings' smart constructor.
data DescribeSavingsPlansOfferings = DescribeSavingsPlansOfferings'
  { -- | The currencies.
    DescribeSavingsPlansOfferings -> Maybe [CurrencyCode]
currencies :: Prelude.Maybe [CurrencyCode],
    -- | The descriptions.
    DescribeSavingsPlansOfferings -> Maybe [Text]
descriptions :: Prelude.Maybe [Prelude.Text],
    -- | The durations, in seconds.
    DescribeSavingsPlansOfferings -> Maybe [Natural]
durations :: Prelude.Maybe [Prelude.Natural],
    -- | The filters.
    DescribeSavingsPlansOfferings
-> Maybe [SavingsPlanOfferingFilterElement]
filters :: Prelude.Maybe [SavingsPlanOfferingFilterElement],
    -- | The maximum number of results to return with a single call. To retrieve
    -- additional results, make another call with the returned token value.
    DescribeSavingsPlansOfferings -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next page of results.
    DescribeSavingsPlansOfferings -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The IDs of the offerings.
    DescribeSavingsPlansOfferings -> Maybe [Text]
offeringIds :: Prelude.Maybe [Prelude.Text],
    -- | The specific AWS operation for the line item in the billing report.
    DescribeSavingsPlansOfferings -> Maybe [Text]
operations :: Prelude.Maybe [Prelude.Text],
    -- | The payment options.
    DescribeSavingsPlansOfferings -> Maybe [SavingsPlanPaymentOption]
paymentOptions :: Prelude.Maybe [SavingsPlanPaymentOption],
    -- | The plan type.
    DescribeSavingsPlansOfferings -> Maybe [SavingsPlanType]
planTypes :: Prelude.Maybe [SavingsPlanType],
    -- | The product type.
    DescribeSavingsPlansOfferings -> Maybe SavingsPlanProductType
productType :: Prelude.Maybe SavingsPlanProductType,
    -- | The services.
    DescribeSavingsPlansOfferings -> Maybe [Text]
serviceCodes :: Prelude.Maybe [Prelude.Text],
    -- | The usage details of the line item in the billing report.
    DescribeSavingsPlansOfferings -> Maybe [Text]
usageTypes :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DescribeSavingsPlansOfferings
-> DescribeSavingsPlansOfferings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSavingsPlansOfferings
-> DescribeSavingsPlansOfferings -> Bool
$c/= :: DescribeSavingsPlansOfferings
-> DescribeSavingsPlansOfferings -> Bool
== :: DescribeSavingsPlansOfferings
-> DescribeSavingsPlansOfferings -> Bool
$c== :: DescribeSavingsPlansOfferings
-> DescribeSavingsPlansOfferings -> Bool
Prelude.Eq, ReadPrec [DescribeSavingsPlansOfferings]
ReadPrec DescribeSavingsPlansOfferings
Int -> ReadS DescribeSavingsPlansOfferings
ReadS [DescribeSavingsPlansOfferings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSavingsPlansOfferings]
$creadListPrec :: ReadPrec [DescribeSavingsPlansOfferings]
readPrec :: ReadPrec DescribeSavingsPlansOfferings
$creadPrec :: ReadPrec DescribeSavingsPlansOfferings
readList :: ReadS [DescribeSavingsPlansOfferings]
$creadList :: ReadS [DescribeSavingsPlansOfferings]
readsPrec :: Int -> ReadS DescribeSavingsPlansOfferings
$creadsPrec :: Int -> ReadS DescribeSavingsPlansOfferings
Prelude.Read, Int -> DescribeSavingsPlansOfferings -> ShowS
[DescribeSavingsPlansOfferings] -> ShowS
DescribeSavingsPlansOfferings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSavingsPlansOfferings] -> ShowS
$cshowList :: [DescribeSavingsPlansOfferings] -> ShowS
show :: DescribeSavingsPlansOfferings -> String
$cshow :: DescribeSavingsPlansOfferings -> String
showsPrec :: Int -> DescribeSavingsPlansOfferings -> ShowS
$cshowsPrec :: Int -> DescribeSavingsPlansOfferings -> ShowS
Prelude.Show, forall x.
Rep DescribeSavingsPlansOfferings x
-> DescribeSavingsPlansOfferings
forall x.
DescribeSavingsPlansOfferings
-> Rep DescribeSavingsPlansOfferings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSavingsPlansOfferings x
-> DescribeSavingsPlansOfferings
$cfrom :: forall x.
DescribeSavingsPlansOfferings
-> Rep DescribeSavingsPlansOfferings x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSavingsPlansOfferings' 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:
--
-- 'currencies', 'describeSavingsPlansOfferings_currencies' - The currencies.
--
-- 'descriptions', 'describeSavingsPlansOfferings_descriptions' - The descriptions.
--
-- 'durations', 'describeSavingsPlansOfferings_durations' - The durations, in seconds.
--
-- 'filters', 'describeSavingsPlansOfferings_filters' - The filters.
--
-- 'maxResults', 'describeSavingsPlansOfferings_maxResults' - The maximum number of results to return with a single call. To retrieve
-- additional results, make another call with the returned token value.
--
-- 'nextToken', 'describeSavingsPlansOfferings_nextToken' - The token for the next page of results.
--
-- 'offeringIds', 'describeSavingsPlansOfferings_offeringIds' - The IDs of the offerings.
--
-- 'operations', 'describeSavingsPlansOfferings_operations' - The specific AWS operation for the line item in the billing report.
--
-- 'paymentOptions', 'describeSavingsPlansOfferings_paymentOptions' - The payment options.
--
-- 'planTypes', 'describeSavingsPlansOfferings_planTypes' - The plan type.
--
-- 'productType', 'describeSavingsPlansOfferings_productType' - The product type.
--
-- 'serviceCodes', 'describeSavingsPlansOfferings_serviceCodes' - The services.
--
-- 'usageTypes', 'describeSavingsPlansOfferings_usageTypes' - The usage details of the line item in the billing report.
newDescribeSavingsPlansOfferings ::
  DescribeSavingsPlansOfferings
newDescribeSavingsPlansOfferings :: DescribeSavingsPlansOfferings
newDescribeSavingsPlansOfferings =
  DescribeSavingsPlansOfferings'
    { $sel:currencies:DescribeSavingsPlansOfferings' :: Maybe [CurrencyCode]
currencies =
        forall a. Maybe a
Prelude.Nothing,
      $sel:descriptions:DescribeSavingsPlansOfferings' :: Maybe [Text]
descriptions = forall a. Maybe a
Prelude.Nothing,
      $sel:durations:DescribeSavingsPlansOfferings' :: Maybe [Natural]
durations = forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeSavingsPlansOfferings' :: Maybe [SavingsPlanOfferingFilterElement]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeSavingsPlansOfferings' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeSavingsPlansOfferings' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:offeringIds:DescribeSavingsPlansOfferings' :: Maybe [Text]
offeringIds = forall a. Maybe a
Prelude.Nothing,
      $sel:operations:DescribeSavingsPlansOfferings' :: Maybe [Text]
operations = forall a. Maybe a
Prelude.Nothing,
      $sel:paymentOptions:DescribeSavingsPlansOfferings' :: Maybe [SavingsPlanPaymentOption]
paymentOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:planTypes:DescribeSavingsPlansOfferings' :: Maybe [SavingsPlanType]
planTypes = forall a. Maybe a
Prelude.Nothing,
      $sel:productType:DescribeSavingsPlansOfferings' :: Maybe SavingsPlanProductType
productType = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceCodes:DescribeSavingsPlansOfferings' :: Maybe [Text]
serviceCodes = forall a. Maybe a
Prelude.Nothing,
      $sel:usageTypes:DescribeSavingsPlansOfferings' :: Maybe [Text]
usageTypes = forall a. Maybe a
Prelude.Nothing
    }

-- | The currencies.
describeSavingsPlansOfferings_currencies :: Lens.Lens' DescribeSavingsPlansOfferings (Prelude.Maybe [CurrencyCode])
describeSavingsPlansOfferings_currencies :: Lens' DescribeSavingsPlansOfferings (Maybe [CurrencyCode])
describeSavingsPlansOfferings_currencies = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferings' {Maybe [CurrencyCode]
currencies :: Maybe [CurrencyCode]
$sel:currencies:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [CurrencyCode]
currencies} -> Maybe [CurrencyCode]
currencies) (\s :: DescribeSavingsPlansOfferings
s@DescribeSavingsPlansOfferings' {} Maybe [CurrencyCode]
a -> DescribeSavingsPlansOfferings
s {$sel:currencies:DescribeSavingsPlansOfferings' :: Maybe [CurrencyCode]
currencies = Maybe [CurrencyCode]
a} :: DescribeSavingsPlansOfferings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The descriptions.
describeSavingsPlansOfferings_descriptions :: Lens.Lens' DescribeSavingsPlansOfferings (Prelude.Maybe [Prelude.Text])
describeSavingsPlansOfferings_descriptions :: Lens' DescribeSavingsPlansOfferings (Maybe [Text])
describeSavingsPlansOfferings_descriptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferings' {Maybe [Text]
descriptions :: Maybe [Text]
$sel:descriptions:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
descriptions} -> Maybe [Text]
descriptions) (\s :: DescribeSavingsPlansOfferings
s@DescribeSavingsPlansOfferings' {} Maybe [Text]
a -> DescribeSavingsPlansOfferings
s {$sel:descriptions:DescribeSavingsPlansOfferings' :: Maybe [Text]
descriptions = Maybe [Text]
a} :: DescribeSavingsPlansOfferings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The durations, in seconds.
describeSavingsPlansOfferings_durations :: Lens.Lens' DescribeSavingsPlansOfferings (Prelude.Maybe [Prelude.Natural])
describeSavingsPlansOfferings_durations :: Lens' DescribeSavingsPlansOfferings (Maybe [Natural])
describeSavingsPlansOfferings_durations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferings' {Maybe [Natural]
durations :: Maybe [Natural]
$sel:durations:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Natural]
durations} -> Maybe [Natural]
durations) (\s :: DescribeSavingsPlansOfferings
s@DescribeSavingsPlansOfferings' {} Maybe [Natural]
a -> DescribeSavingsPlansOfferings
s {$sel:durations:DescribeSavingsPlansOfferings' :: Maybe [Natural]
durations = Maybe [Natural]
a} :: DescribeSavingsPlansOfferings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The filters.
describeSavingsPlansOfferings_filters :: Lens.Lens' DescribeSavingsPlansOfferings (Prelude.Maybe [SavingsPlanOfferingFilterElement])
describeSavingsPlansOfferings_filters :: Lens'
  DescribeSavingsPlansOfferings
  (Maybe [SavingsPlanOfferingFilterElement])
describeSavingsPlansOfferings_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferings' {Maybe [SavingsPlanOfferingFilterElement]
filters :: Maybe [SavingsPlanOfferingFilterElement]
$sel:filters:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings
-> Maybe [SavingsPlanOfferingFilterElement]
filters} -> Maybe [SavingsPlanOfferingFilterElement]
filters) (\s :: DescribeSavingsPlansOfferings
s@DescribeSavingsPlansOfferings' {} Maybe [SavingsPlanOfferingFilterElement]
a -> DescribeSavingsPlansOfferings
s {$sel:filters:DescribeSavingsPlansOfferings' :: Maybe [SavingsPlanOfferingFilterElement]
filters = Maybe [SavingsPlanOfferingFilterElement]
a} :: DescribeSavingsPlansOfferings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum number of results to return with a single call. To retrieve
-- additional results, make another call with the returned token value.
describeSavingsPlansOfferings_maxResults :: Lens.Lens' DescribeSavingsPlansOfferings (Prelude.Maybe Prelude.Natural)
describeSavingsPlansOfferings_maxResults :: Lens' DescribeSavingsPlansOfferings (Maybe Natural)
describeSavingsPlansOfferings_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferings' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeSavingsPlansOfferings
s@DescribeSavingsPlansOfferings' {} Maybe Natural
a -> DescribeSavingsPlansOfferings
s {$sel:maxResults:DescribeSavingsPlansOfferings' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeSavingsPlansOfferings)

-- | The token for the next page of results.
describeSavingsPlansOfferings_nextToken :: Lens.Lens' DescribeSavingsPlansOfferings (Prelude.Maybe Prelude.Text)
describeSavingsPlansOfferings_nextToken :: Lens' DescribeSavingsPlansOfferings (Maybe Text)
describeSavingsPlansOfferings_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferings' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeSavingsPlansOfferings
s@DescribeSavingsPlansOfferings' {} Maybe Text
a -> DescribeSavingsPlansOfferings
s {$sel:nextToken:DescribeSavingsPlansOfferings' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeSavingsPlansOfferings)

-- | The IDs of the offerings.
describeSavingsPlansOfferings_offeringIds :: Lens.Lens' DescribeSavingsPlansOfferings (Prelude.Maybe [Prelude.Text])
describeSavingsPlansOfferings_offeringIds :: Lens' DescribeSavingsPlansOfferings (Maybe [Text])
describeSavingsPlansOfferings_offeringIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferings' {Maybe [Text]
offeringIds :: Maybe [Text]
$sel:offeringIds:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
offeringIds} -> Maybe [Text]
offeringIds) (\s :: DescribeSavingsPlansOfferings
s@DescribeSavingsPlansOfferings' {} Maybe [Text]
a -> DescribeSavingsPlansOfferings
s {$sel:offeringIds:DescribeSavingsPlansOfferings' :: Maybe [Text]
offeringIds = Maybe [Text]
a} :: DescribeSavingsPlansOfferings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The specific AWS operation for the line item in the billing report.
describeSavingsPlansOfferings_operations :: Lens.Lens' DescribeSavingsPlansOfferings (Prelude.Maybe [Prelude.Text])
describeSavingsPlansOfferings_operations :: Lens' DescribeSavingsPlansOfferings (Maybe [Text])
describeSavingsPlansOfferings_operations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferings' {Maybe [Text]
operations :: Maybe [Text]
$sel:operations:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
operations} -> Maybe [Text]
operations) (\s :: DescribeSavingsPlansOfferings
s@DescribeSavingsPlansOfferings' {} Maybe [Text]
a -> DescribeSavingsPlansOfferings
s {$sel:operations:DescribeSavingsPlansOfferings' :: Maybe [Text]
operations = Maybe [Text]
a} :: DescribeSavingsPlansOfferings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The payment options.
describeSavingsPlansOfferings_paymentOptions :: Lens.Lens' DescribeSavingsPlansOfferings (Prelude.Maybe [SavingsPlanPaymentOption])
describeSavingsPlansOfferings_paymentOptions :: Lens'
  DescribeSavingsPlansOfferings (Maybe [SavingsPlanPaymentOption])
describeSavingsPlansOfferings_paymentOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferings' {Maybe [SavingsPlanPaymentOption]
paymentOptions :: Maybe [SavingsPlanPaymentOption]
$sel:paymentOptions:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [SavingsPlanPaymentOption]
paymentOptions} -> Maybe [SavingsPlanPaymentOption]
paymentOptions) (\s :: DescribeSavingsPlansOfferings
s@DescribeSavingsPlansOfferings' {} Maybe [SavingsPlanPaymentOption]
a -> DescribeSavingsPlansOfferings
s {$sel:paymentOptions:DescribeSavingsPlansOfferings' :: Maybe [SavingsPlanPaymentOption]
paymentOptions = Maybe [SavingsPlanPaymentOption]
a} :: DescribeSavingsPlansOfferings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The plan type.
describeSavingsPlansOfferings_planTypes :: Lens.Lens' DescribeSavingsPlansOfferings (Prelude.Maybe [SavingsPlanType])
describeSavingsPlansOfferings_planTypes :: Lens' DescribeSavingsPlansOfferings (Maybe [SavingsPlanType])
describeSavingsPlansOfferings_planTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferings' {Maybe [SavingsPlanType]
planTypes :: Maybe [SavingsPlanType]
$sel:planTypes:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [SavingsPlanType]
planTypes} -> Maybe [SavingsPlanType]
planTypes) (\s :: DescribeSavingsPlansOfferings
s@DescribeSavingsPlansOfferings' {} Maybe [SavingsPlanType]
a -> DescribeSavingsPlansOfferings
s {$sel:planTypes:DescribeSavingsPlansOfferings' :: Maybe [SavingsPlanType]
planTypes = Maybe [SavingsPlanType]
a} :: DescribeSavingsPlansOfferings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The product type.
describeSavingsPlansOfferings_productType :: Lens.Lens' DescribeSavingsPlansOfferings (Prelude.Maybe SavingsPlanProductType)
describeSavingsPlansOfferings_productType :: Lens' DescribeSavingsPlansOfferings (Maybe SavingsPlanProductType)
describeSavingsPlansOfferings_productType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferings' {Maybe SavingsPlanProductType
productType :: Maybe SavingsPlanProductType
$sel:productType:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe SavingsPlanProductType
productType} -> Maybe SavingsPlanProductType
productType) (\s :: DescribeSavingsPlansOfferings
s@DescribeSavingsPlansOfferings' {} Maybe SavingsPlanProductType
a -> DescribeSavingsPlansOfferings
s {$sel:productType:DescribeSavingsPlansOfferings' :: Maybe SavingsPlanProductType
productType = Maybe SavingsPlanProductType
a} :: DescribeSavingsPlansOfferings)

-- | The services.
describeSavingsPlansOfferings_serviceCodes :: Lens.Lens' DescribeSavingsPlansOfferings (Prelude.Maybe [Prelude.Text])
describeSavingsPlansOfferings_serviceCodes :: Lens' DescribeSavingsPlansOfferings (Maybe [Text])
describeSavingsPlansOfferings_serviceCodes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferings' {Maybe [Text]
serviceCodes :: Maybe [Text]
$sel:serviceCodes:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
serviceCodes} -> Maybe [Text]
serviceCodes) (\s :: DescribeSavingsPlansOfferings
s@DescribeSavingsPlansOfferings' {} Maybe [Text]
a -> DescribeSavingsPlansOfferings
s {$sel:serviceCodes:DescribeSavingsPlansOfferings' :: Maybe [Text]
serviceCodes = Maybe [Text]
a} :: DescribeSavingsPlansOfferings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The usage details of the line item in the billing report.
describeSavingsPlansOfferings_usageTypes :: Lens.Lens' DescribeSavingsPlansOfferings (Prelude.Maybe [Prelude.Text])
describeSavingsPlansOfferings_usageTypes :: Lens' DescribeSavingsPlansOfferings (Maybe [Text])
describeSavingsPlansOfferings_usageTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferings' {Maybe [Text]
usageTypes :: Maybe [Text]
$sel:usageTypes:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
usageTypes} -> Maybe [Text]
usageTypes) (\s :: DescribeSavingsPlansOfferings
s@DescribeSavingsPlansOfferings' {} Maybe [Text]
a -> DescribeSavingsPlansOfferings
s {$sel:usageTypes:DescribeSavingsPlansOfferings' :: Maybe [Text]
usageTypes = Maybe [Text]
a} :: DescribeSavingsPlansOfferings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.AWSRequest
    DescribeSavingsPlansOfferings
  where
  type
    AWSResponse DescribeSavingsPlansOfferings =
      DescribeSavingsPlansOfferingsResponse
  request :: (Service -> Service)
-> DescribeSavingsPlansOfferings
-> Request DescribeSavingsPlansOfferings
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeSavingsPlansOfferings
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeSavingsPlansOfferings)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [SavingsPlanOffering]
-> Int
-> DescribeSavingsPlansOfferingsResponse
DescribeSavingsPlansOfferingsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"searchResults" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    DescribeSavingsPlansOfferings
  where
  hashWithSalt :: Int -> DescribeSavingsPlansOfferings -> Int
hashWithSalt Int
_salt DescribeSavingsPlansOfferings' {Maybe Natural
Maybe [Natural]
Maybe [Text]
Maybe [CurrencyCode]
Maybe [SavingsPlanOfferingFilterElement]
Maybe [SavingsPlanPaymentOption]
Maybe [SavingsPlanType]
Maybe Text
Maybe SavingsPlanProductType
usageTypes :: Maybe [Text]
serviceCodes :: Maybe [Text]
productType :: Maybe SavingsPlanProductType
planTypes :: Maybe [SavingsPlanType]
paymentOptions :: Maybe [SavingsPlanPaymentOption]
operations :: Maybe [Text]
offeringIds :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [SavingsPlanOfferingFilterElement]
durations :: Maybe [Natural]
descriptions :: Maybe [Text]
currencies :: Maybe [CurrencyCode]
$sel:usageTypes:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:serviceCodes:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:productType:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe SavingsPlanProductType
$sel:planTypes:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [SavingsPlanType]
$sel:paymentOptions:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [SavingsPlanPaymentOption]
$sel:operations:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:offeringIds:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:nextToken:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe Text
$sel:maxResults:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe Natural
$sel:filters:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings
-> Maybe [SavingsPlanOfferingFilterElement]
$sel:durations:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Natural]
$sel:descriptions:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:currencies:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [CurrencyCode]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [CurrencyCode]
currencies
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
descriptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Natural]
durations
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SavingsPlanOfferingFilterElement]
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
offeringIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
operations
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SavingsPlanPaymentOption]
paymentOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SavingsPlanType]
planTypes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SavingsPlanProductType
productType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
serviceCodes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
usageTypes

instance Prelude.NFData DescribeSavingsPlansOfferings where
  rnf :: DescribeSavingsPlansOfferings -> ()
rnf DescribeSavingsPlansOfferings' {Maybe Natural
Maybe [Natural]
Maybe [Text]
Maybe [CurrencyCode]
Maybe [SavingsPlanOfferingFilterElement]
Maybe [SavingsPlanPaymentOption]
Maybe [SavingsPlanType]
Maybe Text
Maybe SavingsPlanProductType
usageTypes :: Maybe [Text]
serviceCodes :: Maybe [Text]
productType :: Maybe SavingsPlanProductType
planTypes :: Maybe [SavingsPlanType]
paymentOptions :: Maybe [SavingsPlanPaymentOption]
operations :: Maybe [Text]
offeringIds :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [SavingsPlanOfferingFilterElement]
durations :: Maybe [Natural]
descriptions :: Maybe [Text]
currencies :: Maybe [CurrencyCode]
$sel:usageTypes:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:serviceCodes:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:productType:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe SavingsPlanProductType
$sel:planTypes:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [SavingsPlanType]
$sel:paymentOptions:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [SavingsPlanPaymentOption]
$sel:operations:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:offeringIds:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:nextToken:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe Text
$sel:maxResults:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe Natural
$sel:filters:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings
-> Maybe [SavingsPlanOfferingFilterElement]
$sel:durations:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Natural]
$sel:descriptions:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:currencies:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [CurrencyCode]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [CurrencyCode]
currencies
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
descriptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Natural]
durations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SavingsPlanOfferingFilterElement]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
offeringIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
operations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SavingsPlanPaymentOption]
paymentOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SavingsPlanType]
planTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SavingsPlanProductType
productType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
serviceCodes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
usageTypes

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

instance Data.ToJSON DescribeSavingsPlansOfferings where
  toJSON :: DescribeSavingsPlansOfferings -> Value
toJSON DescribeSavingsPlansOfferings' {Maybe Natural
Maybe [Natural]
Maybe [Text]
Maybe [CurrencyCode]
Maybe [SavingsPlanOfferingFilterElement]
Maybe [SavingsPlanPaymentOption]
Maybe [SavingsPlanType]
Maybe Text
Maybe SavingsPlanProductType
usageTypes :: Maybe [Text]
serviceCodes :: Maybe [Text]
productType :: Maybe SavingsPlanProductType
planTypes :: Maybe [SavingsPlanType]
paymentOptions :: Maybe [SavingsPlanPaymentOption]
operations :: Maybe [Text]
offeringIds :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [SavingsPlanOfferingFilterElement]
durations :: Maybe [Natural]
descriptions :: Maybe [Text]
currencies :: Maybe [CurrencyCode]
$sel:usageTypes:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:serviceCodes:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:productType:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe SavingsPlanProductType
$sel:planTypes:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [SavingsPlanType]
$sel:paymentOptions:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [SavingsPlanPaymentOption]
$sel:operations:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:offeringIds:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:nextToken:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe Text
$sel:maxResults:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe Natural
$sel:filters:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings
-> Maybe [SavingsPlanOfferingFilterElement]
$sel:durations:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Natural]
$sel:descriptions:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [Text]
$sel:currencies:DescribeSavingsPlansOfferings' :: DescribeSavingsPlansOfferings -> Maybe [CurrencyCode]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"currencies" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CurrencyCode]
currencies,
            (Key
"descriptions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
descriptions,
            (Key
"durations" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Natural]
durations,
            (Key
"filters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SavingsPlanOfferingFilterElement]
filters,
            (Key
"maxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"nextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Key
"offeringIds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
offeringIds,
            (Key
"operations" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
operations,
            (Key
"paymentOptions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SavingsPlanPaymentOption]
paymentOptions,
            (Key
"planTypes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SavingsPlanType]
planTypes,
            (Key
"productType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SavingsPlanProductType
productType,
            (Key
"serviceCodes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
serviceCodes,
            (Key
"usageTypes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
usageTypes
          ]
      )

instance Data.ToPath DescribeSavingsPlansOfferings where
  toPath :: DescribeSavingsPlansOfferings -> ByteString
toPath =
    forall a b. a -> b -> a
Prelude.const ByteString
"/DescribeSavingsPlansOfferings"

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

-- | /See:/ 'newDescribeSavingsPlansOfferingsResponse' smart constructor.
data DescribeSavingsPlansOfferingsResponse = DescribeSavingsPlansOfferingsResponse'
  { -- | The token to use to retrieve the next page of results. This value is
    -- null when there are no more results to return.
    DescribeSavingsPlansOfferingsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the Savings Plans offerings.
    DescribeSavingsPlansOfferingsResponse
-> Maybe [SavingsPlanOffering]
searchResults :: Prelude.Maybe [SavingsPlanOffering],
    -- | The response's http status code.
    DescribeSavingsPlansOfferingsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeSavingsPlansOfferingsResponse
-> DescribeSavingsPlansOfferingsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSavingsPlansOfferingsResponse
-> DescribeSavingsPlansOfferingsResponse -> Bool
$c/= :: DescribeSavingsPlansOfferingsResponse
-> DescribeSavingsPlansOfferingsResponse -> Bool
== :: DescribeSavingsPlansOfferingsResponse
-> DescribeSavingsPlansOfferingsResponse -> Bool
$c== :: DescribeSavingsPlansOfferingsResponse
-> DescribeSavingsPlansOfferingsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeSavingsPlansOfferingsResponse]
ReadPrec DescribeSavingsPlansOfferingsResponse
Int -> ReadS DescribeSavingsPlansOfferingsResponse
ReadS [DescribeSavingsPlansOfferingsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSavingsPlansOfferingsResponse]
$creadListPrec :: ReadPrec [DescribeSavingsPlansOfferingsResponse]
readPrec :: ReadPrec DescribeSavingsPlansOfferingsResponse
$creadPrec :: ReadPrec DescribeSavingsPlansOfferingsResponse
readList :: ReadS [DescribeSavingsPlansOfferingsResponse]
$creadList :: ReadS [DescribeSavingsPlansOfferingsResponse]
readsPrec :: Int -> ReadS DescribeSavingsPlansOfferingsResponse
$creadsPrec :: Int -> ReadS DescribeSavingsPlansOfferingsResponse
Prelude.Read, Int -> DescribeSavingsPlansOfferingsResponse -> ShowS
[DescribeSavingsPlansOfferingsResponse] -> ShowS
DescribeSavingsPlansOfferingsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSavingsPlansOfferingsResponse] -> ShowS
$cshowList :: [DescribeSavingsPlansOfferingsResponse] -> ShowS
show :: DescribeSavingsPlansOfferingsResponse -> String
$cshow :: DescribeSavingsPlansOfferingsResponse -> String
showsPrec :: Int -> DescribeSavingsPlansOfferingsResponse -> ShowS
$cshowsPrec :: Int -> DescribeSavingsPlansOfferingsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeSavingsPlansOfferingsResponse x
-> DescribeSavingsPlansOfferingsResponse
forall x.
DescribeSavingsPlansOfferingsResponse
-> Rep DescribeSavingsPlansOfferingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSavingsPlansOfferingsResponse x
-> DescribeSavingsPlansOfferingsResponse
$cfrom :: forall x.
DescribeSavingsPlansOfferingsResponse
-> Rep DescribeSavingsPlansOfferingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSavingsPlansOfferingsResponse' 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:
--
-- 'nextToken', 'describeSavingsPlansOfferingsResponse_nextToken' - The token to use to retrieve the next page of results. This value is
-- null when there are no more results to return.
--
-- 'searchResults', 'describeSavingsPlansOfferingsResponse_searchResults' - Information about the Savings Plans offerings.
--
-- 'httpStatus', 'describeSavingsPlansOfferingsResponse_httpStatus' - The response's http status code.
newDescribeSavingsPlansOfferingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeSavingsPlansOfferingsResponse
newDescribeSavingsPlansOfferingsResponse :: Int -> DescribeSavingsPlansOfferingsResponse
newDescribeSavingsPlansOfferingsResponse Int
pHttpStatus_ =
  DescribeSavingsPlansOfferingsResponse'
    { $sel:nextToken:DescribeSavingsPlansOfferingsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:searchResults:DescribeSavingsPlansOfferingsResponse' :: Maybe [SavingsPlanOffering]
searchResults = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeSavingsPlansOfferingsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token to use to retrieve the next page of results. This value is
-- null when there are no more results to return.
describeSavingsPlansOfferingsResponse_nextToken :: Lens.Lens' DescribeSavingsPlansOfferingsResponse (Prelude.Maybe Prelude.Text)
describeSavingsPlansOfferingsResponse_nextToken :: Lens' DescribeSavingsPlansOfferingsResponse (Maybe Text)
describeSavingsPlansOfferingsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferingsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeSavingsPlansOfferingsResponse' :: DescribeSavingsPlansOfferingsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeSavingsPlansOfferingsResponse
s@DescribeSavingsPlansOfferingsResponse' {} Maybe Text
a -> DescribeSavingsPlansOfferingsResponse
s {$sel:nextToken:DescribeSavingsPlansOfferingsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeSavingsPlansOfferingsResponse)

-- | Information about the Savings Plans offerings.
describeSavingsPlansOfferingsResponse_searchResults :: Lens.Lens' DescribeSavingsPlansOfferingsResponse (Prelude.Maybe [SavingsPlanOffering])
describeSavingsPlansOfferingsResponse_searchResults :: Lens'
  DescribeSavingsPlansOfferingsResponse (Maybe [SavingsPlanOffering])
describeSavingsPlansOfferingsResponse_searchResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlansOfferingsResponse' {Maybe [SavingsPlanOffering]
searchResults :: Maybe [SavingsPlanOffering]
$sel:searchResults:DescribeSavingsPlansOfferingsResponse' :: DescribeSavingsPlansOfferingsResponse
-> Maybe [SavingsPlanOffering]
searchResults} -> Maybe [SavingsPlanOffering]
searchResults) (\s :: DescribeSavingsPlansOfferingsResponse
s@DescribeSavingsPlansOfferingsResponse' {} Maybe [SavingsPlanOffering]
a -> DescribeSavingsPlansOfferingsResponse
s {$sel:searchResults:DescribeSavingsPlansOfferingsResponse' :: Maybe [SavingsPlanOffering]
searchResults = Maybe [SavingsPlanOffering]
a} :: DescribeSavingsPlansOfferingsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeSavingsPlansOfferingsResponse
  where
  rnf :: DescribeSavingsPlansOfferingsResponse -> ()
rnf DescribeSavingsPlansOfferingsResponse' {Int
Maybe [SavingsPlanOffering]
Maybe Text
httpStatus :: Int
searchResults :: Maybe [SavingsPlanOffering]
nextToken :: Maybe Text
$sel:httpStatus:DescribeSavingsPlansOfferingsResponse' :: DescribeSavingsPlansOfferingsResponse -> Int
$sel:searchResults:DescribeSavingsPlansOfferingsResponse' :: DescribeSavingsPlansOfferingsResponse
-> Maybe [SavingsPlanOffering]
$sel:nextToken:DescribeSavingsPlansOfferingsResponse' :: DescribeSavingsPlansOfferingsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SavingsPlanOffering]
searchResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus