{-# 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.RDS.DescribeReservedDBInstancesOfferings
-- 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)
--
-- Lists available reserved DB instance offerings.
--
-- This operation returns paginated results.
module Amazonka.RDS.DescribeReservedDBInstancesOfferings
  ( -- * Creating a Request
    DescribeReservedDBInstancesOfferings (..),
    newDescribeReservedDBInstancesOfferings,

    -- * Request Lenses
    describeReservedDBInstancesOfferings_productDescription,
    describeReservedDBInstancesOfferings_filters,
    describeReservedDBInstancesOfferings_dbInstanceClass,
    describeReservedDBInstancesOfferings_marker,
    describeReservedDBInstancesOfferings_maxRecords,
    describeReservedDBInstancesOfferings_multiAZ,
    describeReservedDBInstancesOfferings_reservedDBInstancesOfferingId,
    describeReservedDBInstancesOfferings_offeringType,
    describeReservedDBInstancesOfferings_duration,

    -- * Destructuring the Response
    DescribeReservedDBInstancesOfferingsResponse (..),
    newDescribeReservedDBInstancesOfferingsResponse,

    -- * Response Lenses
    describeReservedDBInstancesOfferingsResponse_marker,
    describeReservedDBInstancesOfferingsResponse_reservedDBInstancesOfferings,
    describeReservedDBInstancesOfferingsResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newDescribeReservedDBInstancesOfferings' smart constructor.
data DescribeReservedDBInstancesOfferings = DescribeReservedDBInstancesOfferings'
  { -- | Product description filter value. Specify this parameter to show only
    -- the available offerings that contain the specified product description.
    --
    -- The results show offerings that partially match the filter value.
    DescribeReservedDBInstancesOfferings -> Maybe Text
productDescription :: Prelude.Maybe Prelude.Text,
    -- | This parameter isn\'t currently supported.
    DescribeReservedDBInstancesOfferings -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The DB instance class filter value. Specify this parameter to show only
    -- the available offerings matching the specified DB instance class.
    DescribeReservedDBInstancesOfferings -> Maybe Text
dbInstanceClass :: Prelude.Maybe Prelude.Text,
    -- | An optional pagination token provided by a previous request. If this
    -- parameter is specified, the response includes only records beyond the
    -- marker, up to the value specified by @MaxRecords@.
    DescribeReservedDBInstancesOfferings -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of records to include in the response. If more than
    -- the @MaxRecords@ value is available, a pagination token called a marker
    -- is included in the response so you can retrieve the remaining results.
    --
    -- Default: 100
    --
    -- Constraints: Minimum 20, maximum 100.
    DescribeReservedDBInstancesOfferings -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | A value that indicates whether to show only those reservations that
    -- support Multi-AZ.
    DescribeReservedDBInstancesOfferings -> Maybe Bool
multiAZ :: Prelude.Maybe Prelude.Bool,
    -- | The offering identifier filter value. Specify this parameter to show
    -- only the available offering that matches the specified reservation
    -- identifier.
    --
    -- Example: @438012d3-4052-4cc7-b2e3-8d3372e0e706@
    DescribeReservedDBInstancesOfferings -> Maybe Text
reservedDBInstancesOfferingId :: Prelude.Maybe Prelude.Text,
    -- | The offering type filter value. Specify this parameter to show only the
    -- available offerings matching the specified offering type.
    --
    -- Valid Values: @\"Partial Upfront\" | \"All Upfront\" | \"No Upfront\" @
    DescribeReservedDBInstancesOfferings -> Maybe Text
offeringType :: Prelude.Maybe Prelude.Text,
    -- | Duration filter value, specified in years or seconds. Specify this
    -- parameter to show only reservations for this duration.
    --
    -- Valid Values: @1 | 3 | 31536000 | 94608000@
    DescribeReservedDBInstancesOfferings -> Maybe Text
duration :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeReservedDBInstancesOfferings
-> DescribeReservedDBInstancesOfferings -> Bool
(DescribeReservedDBInstancesOfferings
 -> DescribeReservedDBInstancesOfferings -> Bool)
-> (DescribeReservedDBInstancesOfferings
    -> DescribeReservedDBInstancesOfferings -> Bool)
-> Eq DescribeReservedDBInstancesOfferings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReservedDBInstancesOfferings
-> DescribeReservedDBInstancesOfferings -> Bool
$c/= :: DescribeReservedDBInstancesOfferings
-> DescribeReservedDBInstancesOfferings -> Bool
== :: DescribeReservedDBInstancesOfferings
-> DescribeReservedDBInstancesOfferings -> Bool
$c== :: DescribeReservedDBInstancesOfferings
-> DescribeReservedDBInstancesOfferings -> Bool
Prelude.Eq, ReadPrec [DescribeReservedDBInstancesOfferings]
ReadPrec DescribeReservedDBInstancesOfferings
Int -> ReadS DescribeReservedDBInstancesOfferings
ReadS [DescribeReservedDBInstancesOfferings]
(Int -> ReadS DescribeReservedDBInstancesOfferings)
-> ReadS [DescribeReservedDBInstancesOfferings]
-> ReadPrec DescribeReservedDBInstancesOfferings
-> ReadPrec [DescribeReservedDBInstancesOfferings]
-> Read DescribeReservedDBInstancesOfferings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReservedDBInstancesOfferings]
$creadListPrec :: ReadPrec [DescribeReservedDBInstancesOfferings]
readPrec :: ReadPrec DescribeReservedDBInstancesOfferings
$creadPrec :: ReadPrec DescribeReservedDBInstancesOfferings
readList :: ReadS [DescribeReservedDBInstancesOfferings]
$creadList :: ReadS [DescribeReservedDBInstancesOfferings]
readsPrec :: Int -> ReadS DescribeReservedDBInstancesOfferings
$creadsPrec :: Int -> ReadS DescribeReservedDBInstancesOfferings
Prelude.Read, Int -> DescribeReservedDBInstancesOfferings -> ShowS
[DescribeReservedDBInstancesOfferings] -> ShowS
DescribeReservedDBInstancesOfferings -> String
(Int -> DescribeReservedDBInstancesOfferings -> ShowS)
-> (DescribeReservedDBInstancesOfferings -> String)
-> ([DescribeReservedDBInstancesOfferings] -> ShowS)
-> Show DescribeReservedDBInstancesOfferings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReservedDBInstancesOfferings] -> ShowS
$cshowList :: [DescribeReservedDBInstancesOfferings] -> ShowS
show :: DescribeReservedDBInstancesOfferings -> String
$cshow :: DescribeReservedDBInstancesOfferings -> String
showsPrec :: Int -> DescribeReservedDBInstancesOfferings -> ShowS
$cshowsPrec :: Int -> DescribeReservedDBInstancesOfferings -> ShowS
Prelude.Show, (forall x.
 DescribeReservedDBInstancesOfferings
 -> Rep DescribeReservedDBInstancesOfferings x)
-> (forall x.
    Rep DescribeReservedDBInstancesOfferings x
    -> DescribeReservedDBInstancesOfferings)
-> Generic DescribeReservedDBInstancesOfferings
forall x.
Rep DescribeReservedDBInstancesOfferings x
-> DescribeReservedDBInstancesOfferings
forall x.
DescribeReservedDBInstancesOfferings
-> Rep DescribeReservedDBInstancesOfferings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReservedDBInstancesOfferings x
-> DescribeReservedDBInstancesOfferings
$cfrom :: forall x.
DescribeReservedDBInstancesOfferings
-> Rep DescribeReservedDBInstancesOfferings x
Prelude.Generic)

-- |
-- Create a value of 'DescribeReservedDBInstancesOfferings' 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:
--
-- 'productDescription', 'describeReservedDBInstancesOfferings_productDescription' - Product description filter value. Specify this parameter to show only
-- the available offerings that contain the specified product description.
--
-- The results show offerings that partially match the filter value.
--
-- 'filters', 'describeReservedDBInstancesOfferings_filters' - This parameter isn\'t currently supported.
--
-- 'dbInstanceClass', 'describeReservedDBInstancesOfferings_dbInstanceClass' - The DB instance class filter value. Specify this parameter to show only
-- the available offerings matching the specified DB instance class.
--
-- 'marker', 'describeReservedDBInstancesOfferings_marker' - An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- marker, up to the value specified by @MaxRecords@.
--
-- 'maxRecords', 'describeReservedDBInstancesOfferings_maxRecords' - The maximum number of records to include in the response. If more than
-- the @MaxRecords@ value is available, a pagination token called a marker
-- is included in the response so you can retrieve the remaining results.
--
-- Default: 100
--
-- Constraints: Minimum 20, maximum 100.
--
-- 'multiAZ', 'describeReservedDBInstancesOfferings_multiAZ' - A value that indicates whether to show only those reservations that
-- support Multi-AZ.
--
-- 'reservedDBInstancesOfferingId', 'describeReservedDBInstancesOfferings_reservedDBInstancesOfferingId' - The offering identifier filter value. Specify this parameter to show
-- only the available offering that matches the specified reservation
-- identifier.
--
-- Example: @438012d3-4052-4cc7-b2e3-8d3372e0e706@
--
-- 'offeringType', 'describeReservedDBInstancesOfferings_offeringType' - The offering type filter value. Specify this parameter to show only the
-- available offerings matching the specified offering type.
--
-- Valid Values: @\"Partial Upfront\" | \"All Upfront\" | \"No Upfront\" @
--
-- 'duration', 'describeReservedDBInstancesOfferings_duration' - Duration filter value, specified in years or seconds. Specify this
-- parameter to show only reservations for this duration.
--
-- Valid Values: @1 | 3 | 31536000 | 94608000@
newDescribeReservedDBInstancesOfferings ::
  DescribeReservedDBInstancesOfferings
newDescribeReservedDBInstancesOfferings :: DescribeReservedDBInstancesOfferings
newDescribeReservedDBInstancesOfferings =
  DescribeReservedDBInstancesOfferings' :: Maybe Text
-> Maybe [Filter]
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DescribeReservedDBInstancesOfferings
DescribeReservedDBInstancesOfferings'
    { $sel:productDescription:DescribeReservedDBInstancesOfferings' :: Maybe Text
productDescription =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeReservedDBInstancesOfferings' :: Maybe [Filter]
filters = Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
      $sel:dbInstanceClass:DescribeReservedDBInstancesOfferings' :: Maybe Text
dbInstanceClass = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeReservedDBInstancesOfferings' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeReservedDBInstancesOfferings' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:multiAZ:DescribeReservedDBInstancesOfferings' :: Maybe Bool
multiAZ = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:reservedDBInstancesOfferingId:DescribeReservedDBInstancesOfferings' :: Maybe Text
reservedDBInstancesOfferingId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:offeringType:DescribeReservedDBInstancesOfferings' :: Maybe Text
offeringType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:duration:DescribeReservedDBInstancesOfferings' :: Maybe Text
duration = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Product description filter value. Specify this parameter to show only
-- the available offerings that contain the specified product description.
--
-- The results show offerings that partially match the filter value.
describeReservedDBInstancesOfferings_productDescription :: Lens.Lens' DescribeReservedDBInstancesOfferings (Prelude.Maybe Prelude.Text)
describeReservedDBInstancesOfferings_productDescription :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedDBInstancesOfferings
-> f DescribeReservedDBInstancesOfferings
describeReservedDBInstancesOfferings_productDescription = (DescribeReservedDBInstancesOfferings -> Maybe Text)
-> (DescribeReservedDBInstancesOfferings
    -> Maybe Text -> DescribeReservedDBInstancesOfferings)
-> Lens
     DescribeReservedDBInstancesOfferings
     DescribeReservedDBInstancesOfferings
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedDBInstancesOfferings' {Maybe Text
productDescription :: Maybe Text
$sel:productDescription:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Text
productDescription} -> Maybe Text
productDescription) (\s :: DescribeReservedDBInstancesOfferings
s@DescribeReservedDBInstancesOfferings' {} Maybe Text
a -> DescribeReservedDBInstancesOfferings
s {$sel:productDescription:DescribeReservedDBInstancesOfferings' :: Maybe Text
productDescription = Maybe Text
a} :: DescribeReservedDBInstancesOfferings)

-- | This parameter isn\'t currently supported.
describeReservedDBInstancesOfferings_filters :: Lens.Lens' DescribeReservedDBInstancesOfferings (Prelude.Maybe [Filter])
describeReservedDBInstancesOfferings_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeReservedDBInstancesOfferings
-> f DescribeReservedDBInstancesOfferings
describeReservedDBInstancesOfferings_filters = (DescribeReservedDBInstancesOfferings -> Maybe [Filter])
-> (DescribeReservedDBInstancesOfferings
    -> Maybe [Filter] -> DescribeReservedDBInstancesOfferings)
-> Lens
     DescribeReservedDBInstancesOfferings
     DescribeReservedDBInstancesOfferings
     (Maybe [Filter])
     (Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedDBInstancesOfferings' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeReservedDBInstancesOfferings
s@DescribeReservedDBInstancesOfferings' {} Maybe [Filter]
a -> DescribeReservedDBInstancesOfferings
s {$sel:filters:DescribeReservedDBInstancesOfferings' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeReservedDBInstancesOfferings) ((Maybe [Filter] -> f (Maybe [Filter]))
 -> DescribeReservedDBInstancesOfferings
 -> f DescribeReservedDBInstancesOfferings)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
    -> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeReservedDBInstancesOfferings
-> f DescribeReservedDBInstancesOfferings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
     (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
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 [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The DB instance class filter value. Specify this parameter to show only
-- the available offerings matching the specified DB instance class.
describeReservedDBInstancesOfferings_dbInstanceClass :: Lens.Lens' DescribeReservedDBInstancesOfferings (Prelude.Maybe Prelude.Text)
describeReservedDBInstancesOfferings_dbInstanceClass :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedDBInstancesOfferings
-> f DescribeReservedDBInstancesOfferings
describeReservedDBInstancesOfferings_dbInstanceClass = (DescribeReservedDBInstancesOfferings -> Maybe Text)
-> (DescribeReservedDBInstancesOfferings
    -> Maybe Text -> DescribeReservedDBInstancesOfferings)
-> Lens
     DescribeReservedDBInstancesOfferings
     DescribeReservedDBInstancesOfferings
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedDBInstancesOfferings' {Maybe Text
dbInstanceClass :: Maybe Text
$sel:dbInstanceClass:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Text
dbInstanceClass} -> Maybe Text
dbInstanceClass) (\s :: DescribeReservedDBInstancesOfferings
s@DescribeReservedDBInstancesOfferings' {} Maybe Text
a -> DescribeReservedDBInstancesOfferings
s {$sel:dbInstanceClass:DescribeReservedDBInstancesOfferings' :: Maybe Text
dbInstanceClass = Maybe Text
a} :: DescribeReservedDBInstancesOfferings)

-- | An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- marker, up to the value specified by @MaxRecords@.
describeReservedDBInstancesOfferings_marker :: Lens.Lens' DescribeReservedDBInstancesOfferings (Prelude.Maybe Prelude.Text)
describeReservedDBInstancesOfferings_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedDBInstancesOfferings
-> f DescribeReservedDBInstancesOfferings
describeReservedDBInstancesOfferings_marker = (DescribeReservedDBInstancesOfferings -> Maybe Text)
-> (DescribeReservedDBInstancesOfferings
    -> Maybe Text -> DescribeReservedDBInstancesOfferings)
-> Lens
     DescribeReservedDBInstancesOfferings
     DescribeReservedDBInstancesOfferings
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedDBInstancesOfferings' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeReservedDBInstancesOfferings
s@DescribeReservedDBInstancesOfferings' {} Maybe Text
a -> DescribeReservedDBInstancesOfferings
s {$sel:marker:DescribeReservedDBInstancesOfferings' :: Maybe Text
marker = Maybe Text
a} :: DescribeReservedDBInstancesOfferings)

-- | The maximum number of records to include in the response. If more than
-- the @MaxRecords@ value is available, a pagination token called a marker
-- is included in the response so you can retrieve the remaining results.
--
-- Default: 100
--
-- Constraints: Minimum 20, maximum 100.
describeReservedDBInstancesOfferings_maxRecords :: Lens.Lens' DescribeReservedDBInstancesOfferings (Prelude.Maybe Prelude.Int)
describeReservedDBInstancesOfferings_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeReservedDBInstancesOfferings
-> f DescribeReservedDBInstancesOfferings
describeReservedDBInstancesOfferings_maxRecords = (DescribeReservedDBInstancesOfferings -> Maybe Int)
-> (DescribeReservedDBInstancesOfferings
    -> Maybe Int -> DescribeReservedDBInstancesOfferings)
-> Lens
     DescribeReservedDBInstancesOfferings
     DescribeReservedDBInstancesOfferings
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedDBInstancesOfferings' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeReservedDBInstancesOfferings
s@DescribeReservedDBInstancesOfferings' {} Maybe Int
a -> DescribeReservedDBInstancesOfferings
s {$sel:maxRecords:DescribeReservedDBInstancesOfferings' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeReservedDBInstancesOfferings)

-- | A value that indicates whether to show only those reservations that
-- support Multi-AZ.
describeReservedDBInstancesOfferings_multiAZ :: Lens.Lens' DescribeReservedDBInstancesOfferings (Prelude.Maybe Prelude.Bool)
describeReservedDBInstancesOfferings_multiAZ :: (Maybe Bool -> f (Maybe Bool))
-> DescribeReservedDBInstancesOfferings
-> f DescribeReservedDBInstancesOfferings
describeReservedDBInstancesOfferings_multiAZ = (DescribeReservedDBInstancesOfferings -> Maybe Bool)
-> (DescribeReservedDBInstancesOfferings
    -> Maybe Bool -> DescribeReservedDBInstancesOfferings)
-> Lens
     DescribeReservedDBInstancesOfferings
     DescribeReservedDBInstancesOfferings
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedDBInstancesOfferings' {Maybe Bool
multiAZ :: Maybe Bool
$sel:multiAZ:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Bool
multiAZ} -> Maybe Bool
multiAZ) (\s :: DescribeReservedDBInstancesOfferings
s@DescribeReservedDBInstancesOfferings' {} Maybe Bool
a -> DescribeReservedDBInstancesOfferings
s {$sel:multiAZ:DescribeReservedDBInstancesOfferings' :: Maybe Bool
multiAZ = Maybe Bool
a} :: DescribeReservedDBInstancesOfferings)

-- | The offering identifier filter value. Specify this parameter to show
-- only the available offering that matches the specified reservation
-- identifier.
--
-- Example: @438012d3-4052-4cc7-b2e3-8d3372e0e706@
describeReservedDBInstancesOfferings_reservedDBInstancesOfferingId :: Lens.Lens' DescribeReservedDBInstancesOfferings (Prelude.Maybe Prelude.Text)
describeReservedDBInstancesOfferings_reservedDBInstancesOfferingId :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedDBInstancesOfferings
-> f DescribeReservedDBInstancesOfferings
describeReservedDBInstancesOfferings_reservedDBInstancesOfferingId = (DescribeReservedDBInstancesOfferings -> Maybe Text)
-> (DescribeReservedDBInstancesOfferings
    -> Maybe Text -> DescribeReservedDBInstancesOfferings)
-> Lens
     DescribeReservedDBInstancesOfferings
     DescribeReservedDBInstancesOfferings
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedDBInstancesOfferings' {Maybe Text
reservedDBInstancesOfferingId :: Maybe Text
$sel:reservedDBInstancesOfferingId:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Text
reservedDBInstancesOfferingId} -> Maybe Text
reservedDBInstancesOfferingId) (\s :: DescribeReservedDBInstancesOfferings
s@DescribeReservedDBInstancesOfferings' {} Maybe Text
a -> DescribeReservedDBInstancesOfferings
s {$sel:reservedDBInstancesOfferingId:DescribeReservedDBInstancesOfferings' :: Maybe Text
reservedDBInstancesOfferingId = Maybe Text
a} :: DescribeReservedDBInstancesOfferings)

-- | The offering type filter value. Specify this parameter to show only the
-- available offerings matching the specified offering type.
--
-- Valid Values: @\"Partial Upfront\" | \"All Upfront\" | \"No Upfront\" @
describeReservedDBInstancesOfferings_offeringType :: Lens.Lens' DescribeReservedDBInstancesOfferings (Prelude.Maybe Prelude.Text)
describeReservedDBInstancesOfferings_offeringType :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedDBInstancesOfferings
-> f DescribeReservedDBInstancesOfferings
describeReservedDBInstancesOfferings_offeringType = (DescribeReservedDBInstancesOfferings -> Maybe Text)
-> (DescribeReservedDBInstancesOfferings
    -> Maybe Text -> DescribeReservedDBInstancesOfferings)
-> Lens
     DescribeReservedDBInstancesOfferings
     DescribeReservedDBInstancesOfferings
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedDBInstancesOfferings' {Maybe Text
offeringType :: Maybe Text
$sel:offeringType:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Text
offeringType} -> Maybe Text
offeringType) (\s :: DescribeReservedDBInstancesOfferings
s@DescribeReservedDBInstancesOfferings' {} Maybe Text
a -> DescribeReservedDBInstancesOfferings
s {$sel:offeringType:DescribeReservedDBInstancesOfferings' :: Maybe Text
offeringType = Maybe Text
a} :: DescribeReservedDBInstancesOfferings)

-- | Duration filter value, specified in years or seconds. Specify this
-- parameter to show only reservations for this duration.
--
-- Valid Values: @1 | 3 | 31536000 | 94608000@
describeReservedDBInstancesOfferings_duration :: Lens.Lens' DescribeReservedDBInstancesOfferings (Prelude.Maybe Prelude.Text)
describeReservedDBInstancesOfferings_duration :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedDBInstancesOfferings
-> f DescribeReservedDBInstancesOfferings
describeReservedDBInstancesOfferings_duration = (DescribeReservedDBInstancesOfferings -> Maybe Text)
-> (DescribeReservedDBInstancesOfferings
    -> Maybe Text -> DescribeReservedDBInstancesOfferings)
-> Lens
     DescribeReservedDBInstancesOfferings
     DescribeReservedDBInstancesOfferings
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedDBInstancesOfferings' {Maybe Text
duration :: Maybe Text
$sel:duration:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Text
duration} -> Maybe Text
duration) (\s :: DescribeReservedDBInstancesOfferings
s@DescribeReservedDBInstancesOfferings' {} Maybe Text
a -> DescribeReservedDBInstancesOfferings
s {$sel:duration:DescribeReservedDBInstancesOfferings' :: Maybe Text
duration = Maybe Text
a} :: DescribeReservedDBInstancesOfferings)

instance
  Core.AWSPager
    DescribeReservedDBInstancesOfferings
  where
  page :: DescribeReservedDBInstancesOfferings
-> AWSResponse DescribeReservedDBInstancesOfferings
-> Maybe DescribeReservedDBInstancesOfferings
page DescribeReservedDBInstancesOfferings
rq AWSResponse DescribeReservedDBInstancesOfferings
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeReservedDBInstancesOfferings
DescribeReservedDBInstancesOfferingsResponse
rs
            DescribeReservedDBInstancesOfferingsResponse
-> Getting
     (First Text) DescribeReservedDBInstancesOfferingsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeReservedDBInstancesOfferingsResponse
-> Const (First Text) DescribeReservedDBInstancesOfferingsResponse
Lens' DescribeReservedDBInstancesOfferingsResponse (Maybe Text)
describeReservedDBInstancesOfferingsResponse_marker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeReservedDBInstancesOfferingsResponse
 -> Const (First Text) DescribeReservedDBInstancesOfferingsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) DescribeReservedDBInstancesOfferingsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeReservedDBInstancesOfferings
forall a. Maybe a
Prelude.Nothing
    | Maybe [ReservedDBInstancesOffering] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeReservedDBInstancesOfferings
DescribeReservedDBInstancesOfferingsResponse
rs
            DescribeReservedDBInstancesOfferingsResponse
-> Getting
     (First [ReservedDBInstancesOffering])
     DescribeReservedDBInstancesOfferingsResponse
     [ReservedDBInstancesOffering]
-> Maybe [ReservedDBInstancesOffering]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ReservedDBInstancesOffering]
 -> Const
      (First [ReservedDBInstancesOffering])
      (Maybe [ReservedDBInstancesOffering]))
-> DescribeReservedDBInstancesOfferingsResponse
-> Const
     (First [ReservedDBInstancesOffering])
     DescribeReservedDBInstancesOfferingsResponse
Lens'
  DescribeReservedDBInstancesOfferingsResponse
  (Maybe [ReservedDBInstancesOffering])
describeReservedDBInstancesOfferingsResponse_reservedDBInstancesOfferings
              ((Maybe [ReservedDBInstancesOffering]
  -> Const
       (First [ReservedDBInstancesOffering])
       (Maybe [ReservedDBInstancesOffering]))
 -> DescribeReservedDBInstancesOfferingsResponse
 -> Const
      (First [ReservedDBInstancesOffering])
      DescribeReservedDBInstancesOfferingsResponse)
-> (([ReservedDBInstancesOffering]
     -> Const
          (First [ReservedDBInstancesOffering])
          [ReservedDBInstancesOffering])
    -> Maybe [ReservedDBInstancesOffering]
    -> Const
         (First [ReservedDBInstancesOffering])
         (Maybe [ReservedDBInstancesOffering]))
-> Getting
     (First [ReservedDBInstancesOffering])
     DescribeReservedDBInstancesOfferingsResponse
     [ReservedDBInstancesOffering]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ReservedDBInstancesOffering]
 -> Const
      (First [ReservedDBInstancesOffering])
      [ReservedDBInstancesOffering])
-> Maybe [ReservedDBInstancesOffering]
-> Const
     (First [ReservedDBInstancesOffering])
     (Maybe [ReservedDBInstancesOffering])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeReservedDBInstancesOfferings
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeReservedDBInstancesOfferings
-> Maybe DescribeReservedDBInstancesOfferings
forall a. a -> Maybe a
Prelude.Just (DescribeReservedDBInstancesOfferings
 -> Maybe DescribeReservedDBInstancesOfferings)
-> DescribeReservedDBInstancesOfferings
-> Maybe DescribeReservedDBInstancesOfferings
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeReservedDBInstancesOfferings
rq
          DescribeReservedDBInstancesOfferings
-> (DescribeReservedDBInstancesOfferings
    -> DescribeReservedDBInstancesOfferings)
-> DescribeReservedDBInstancesOfferings
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeReservedDBInstancesOfferings
-> Identity DescribeReservedDBInstancesOfferings
Lens
  DescribeReservedDBInstancesOfferings
  DescribeReservedDBInstancesOfferings
  (Maybe Text)
  (Maybe Text)
describeReservedDBInstancesOfferings_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeReservedDBInstancesOfferings
 -> Identity DescribeReservedDBInstancesOfferings)
-> Maybe Text
-> DescribeReservedDBInstancesOfferings
-> DescribeReservedDBInstancesOfferings
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeReservedDBInstancesOfferings
DescribeReservedDBInstancesOfferingsResponse
rs
          DescribeReservedDBInstancesOfferingsResponse
-> Getting
     (First Text) DescribeReservedDBInstancesOfferingsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeReservedDBInstancesOfferingsResponse
-> Const (First Text) DescribeReservedDBInstancesOfferingsResponse
Lens' DescribeReservedDBInstancesOfferingsResponse (Maybe Text)
describeReservedDBInstancesOfferingsResponse_marker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeReservedDBInstancesOfferingsResponse
 -> Const (First Text) DescribeReservedDBInstancesOfferingsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) DescribeReservedDBInstancesOfferingsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance
  Core.AWSRequest
    DescribeReservedDBInstancesOfferings
  where
  type
    AWSResponse DescribeReservedDBInstancesOfferings =
      DescribeReservedDBInstancesOfferingsResponse
  request :: DescribeReservedDBInstancesOfferings
-> Request DescribeReservedDBInstancesOfferings
request = Service
-> DescribeReservedDBInstancesOfferings
-> Request DescribeReservedDBInstancesOfferings
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeReservedDBInstancesOfferings
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeReservedDBInstancesOfferings)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either
         String (AWSResponse DescribeReservedDBInstancesOfferings))
-> Logger
-> Service
-> Proxy DescribeReservedDBInstancesOfferings
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeReservedDBInstancesOfferings)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeReservedDBInstancesOfferingsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [ReservedDBInstancesOffering]
-> Int
-> DescribeReservedDBInstancesOfferingsResponse
DescribeReservedDBInstancesOfferingsResponse'
            (Maybe Text
 -> Maybe [ReservedDBInstancesOffering]
 -> Int
 -> DescribeReservedDBInstancesOfferingsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ReservedDBInstancesOffering]
      -> Int -> DescribeReservedDBInstancesOfferingsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Marker")
              Either
  String
  (Maybe [ReservedDBInstancesOffering]
   -> Int -> DescribeReservedDBInstancesOfferingsResponse)
-> Either String (Maybe [ReservedDBInstancesOffering])
-> Either
     String (Int -> DescribeReservedDBInstancesOfferingsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ReservedDBInstancesOfferings"
                              Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                              Either String [Node]
-> ([Node] -> Either String (Maybe [ReservedDBInstancesOffering]))
-> Either String (Maybe [ReservedDBInstancesOffering])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ReservedDBInstancesOffering])
-> [Node] -> Either String (Maybe [ReservedDBInstancesOffering])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
                                (Text -> [Node] -> Either String [ReservedDBInstancesOffering]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"ReservedDBInstancesOffering")
                          )
              Either String (Int -> DescribeReservedDBInstancesOfferingsResponse)
-> Either String Int
-> Either String DescribeReservedDBInstancesOfferingsResponse
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
    DescribeReservedDBInstancesOfferings

instance
  Prelude.NFData
    DescribeReservedDBInstancesOfferings

instance
  Core.ToHeaders
    DescribeReservedDBInstancesOfferings
  where
  toHeaders :: DescribeReservedDBInstancesOfferings -> ResponseHeaders
toHeaders = ResponseHeaders
-> DescribeReservedDBInstancesOfferings -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance
  Core.ToQuery
    DescribeReservedDBInstancesOfferings
  where
  toQuery :: DescribeReservedDBInstancesOfferings -> QueryString
toQuery DescribeReservedDBInstancesOfferings' {Maybe Bool
Maybe Int
Maybe [Filter]
Maybe Text
duration :: Maybe Text
offeringType :: Maybe Text
reservedDBInstancesOfferingId :: Maybe Text
multiAZ :: Maybe Bool
maxRecords :: Maybe Int
marker :: Maybe Text
dbInstanceClass :: Maybe Text
filters :: Maybe [Filter]
productDescription :: Maybe Text
$sel:duration:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Text
$sel:offeringType:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Text
$sel:reservedDBInstancesOfferingId:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Text
$sel:multiAZ:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Bool
$sel:maxRecords:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Int
$sel:marker:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Text
$sel:dbInstanceClass:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Text
$sel:filters:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe [Filter]
$sel:productDescription:DescribeReservedDBInstancesOfferings' :: DescribeReservedDBInstancesOfferings -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"DescribeReservedDBInstancesOfferings" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"ProductDescription" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
productDescription,
        ByteString
"Filters"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Filter] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Filter" ([Filter] -> QueryString) -> Maybe [Filter] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters),
        ByteString
"DBInstanceClass" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dbInstanceClass,
        ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"MaxRecords" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxRecords,
        ByteString
"MultiAZ" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
multiAZ,
        ByteString
"ReservedDBInstancesOfferingId"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
reservedDBInstancesOfferingId,
        ByteString
"OfferingType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
offeringType,
        ByteString
"Duration" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
duration
      ]

-- | Contains the result of a successful invocation of the
-- @DescribeReservedDBInstancesOfferings@ action.
--
-- /See:/ 'newDescribeReservedDBInstancesOfferingsResponse' smart constructor.
data DescribeReservedDBInstancesOfferingsResponse = DescribeReservedDBInstancesOfferingsResponse'
  { -- | An optional pagination token provided by a previous request. If this
    -- parameter is specified, the response includes only records beyond the
    -- marker, up to the value specified by @MaxRecords@.
    DescribeReservedDBInstancesOfferingsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | A list of reserved DB instance offerings.
    DescribeReservedDBInstancesOfferingsResponse
-> Maybe [ReservedDBInstancesOffering]
reservedDBInstancesOfferings :: Prelude.Maybe [ReservedDBInstancesOffering],
    -- | The response's http status code.
    DescribeReservedDBInstancesOfferingsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeReservedDBInstancesOfferingsResponse
-> DescribeReservedDBInstancesOfferingsResponse -> Bool
(DescribeReservedDBInstancesOfferingsResponse
 -> DescribeReservedDBInstancesOfferingsResponse -> Bool)
-> (DescribeReservedDBInstancesOfferingsResponse
    -> DescribeReservedDBInstancesOfferingsResponse -> Bool)
-> Eq DescribeReservedDBInstancesOfferingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReservedDBInstancesOfferingsResponse
-> DescribeReservedDBInstancesOfferingsResponse -> Bool
$c/= :: DescribeReservedDBInstancesOfferingsResponse
-> DescribeReservedDBInstancesOfferingsResponse -> Bool
== :: DescribeReservedDBInstancesOfferingsResponse
-> DescribeReservedDBInstancesOfferingsResponse -> Bool
$c== :: DescribeReservedDBInstancesOfferingsResponse
-> DescribeReservedDBInstancesOfferingsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeReservedDBInstancesOfferingsResponse]
ReadPrec DescribeReservedDBInstancesOfferingsResponse
Int -> ReadS DescribeReservedDBInstancesOfferingsResponse
ReadS [DescribeReservedDBInstancesOfferingsResponse]
(Int -> ReadS DescribeReservedDBInstancesOfferingsResponse)
-> ReadS [DescribeReservedDBInstancesOfferingsResponse]
-> ReadPrec DescribeReservedDBInstancesOfferingsResponse
-> ReadPrec [DescribeReservedDBInstancesOfferingsResponse]
-> Read DescribeReservedDBInstancesOfferingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReservedDBInstancesOfferingsResponse]
$creadListPrec :: ReadPrec [DescribeReservedDBInstancesOfferingsResponse]
readPrec :: ReadPrec DescribeReservedDBInstancesOfferingsResponse
$creadPrec :: ReadPrec DescribeReservedDBInstancesOfferingsResponse
readList :: ReadS [DescribeReservedDBInstancesOfferingsResponse]
$creadList :: ReadS [DescribeReservedDBInstancesOfferingsResponse]
readsPrec :: Int -> ReadS DescribeReservedDBInstancesOfferingsResponse
$creadsPrec :: Int -> ReadS DescribeReservedDBInstancesOfferingsResponse
Prelude.Read, Int -> DescribeReservedDBInstancesOfferingsResponse -> ShowS
[DescribeReservedDBInstancesOfferingsResponse] -> ShowS
DescribeReservedDBInstancesOfferingsResponse -> String
(Int -> DescribeReservedDBInstancesOfferingsResponse -> ShowS)
-> (DescribeReservedDBInstancesOfferingsResponse -> String)
-> ([DescribeReservedDBInstancesOfferingsResponse] -> ShowS)
-> Show DescribeReservedDBInstancesOfferingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReservedDBInstancesOfferingsResponse] -> ShowS
$cshowList :: [DescribeReservedDBInstancesOfferingsResponse] -> ShowS
show :: DescribeReservedDBInstancesOfferingsResponse -> String
$cshow :: DescribeReservedDBInstancesOfferingsResponse -> String
showsPrec :: Int -> DescribeReservedDBInstancesOfferingsResponse -> ShowS
$cshowsPrec :: Int -> DescribeReservedDBInstancesOfferingsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeReservedDBInstancesOfferingsResponse
 -> Rep DescribeReservedDBInstancesOfferingsResponse x)
-> (forall x.
    Rep DescribeReservedDBInstancesOfferingsResponse x
    -> DescribeReservedDBInstancesOfferingsResponse)
-> Generic DescribeReservedDBInstancesOfferingsResponse
forall x.
Rep DescribeReservedDBInstancesOfferingsResponse x
-> DescribeReservedDBInstancesOfferingsResponse
forall x.
DescribeReservedDBInstancesOfferingsResponse
-> Rep DescribeReservedDBInstancesOfferingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReservedDBInstancesOfferingsResponse x
-> DescribeReservedDBInstancesOfferingsResponse
$cfrom :: forall x.
DescribeReservedDBInstancesOfferingsResponse
-> Rep DescribeReservedDBInstancesOfferingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeReservedDBInstancesOfferingsResponse' 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:
--
-- 'marker', 'describeReservedDBInstancesOfferingsResponse_marker' - An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- marker, up to the value specified by @MaxRecords@.
--
-- 'reservedDBInstancesOfferings', 'describeReservedDBInstancesOfferingsResponse_reservedDBInstancesOfferings' - A list of reserved DB instance offerings.
--
-- 'httpStatus', 'describeReservedDBInstancesOfferingsResponse_httpStatus' - The response's http status code.
newDescribeReservedDBInstancesOfferingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeReservedDBInstancesOfferingsResponse
newDescribeReservedDBInstancesOfferingsResponse :: Int -> DescribeReservedDBInstancesOfferingsResponse
newDescribeReservedDBInstancesOfferingsResponse
  Int
pHttpStatus_ =
    DescribeReservedDBInstancesOfferingsResponse' :: Maybe Text
-> Maybe [ReservedDBInstancesOffering]
-> Int
-> DescribeReservedDBInstancesOfferingsResponse
DescribeReservedDBInstancesOfferingsResponse'
      { $sel:marker:DescribeReservedDBInstancesOfferingsResponse' :: Maybe Text
marker =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:reservedDBInstancesOfferings:DescribeReservedDBInstancesOfferingsResponse' :: Maybe [ReservedDBInstancesOffering]
reservedDBInstancesOfferings =
          Maybe [ReservedDBInstancesOffering]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeReservedDBInstancesOfferingsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- marker, up to the value specified by @MaxRecords@.
describeReservedDBInstancesOfferingsResponse_marker :: Lens.Lens' DescribeReservedDBInstancesOfferingsResponse (Prelude.Maybe Prelude.Text)
describeReservedDBInstancesOfferingsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedDBInstancesOfferingsResponse
-> f DescribeReservedDBInstancesOfferingsResponse
describeReservedDBInstancesOfferingsResponse_marker = (DescribeReservedDBInstancesOfferingsResponse -> Maybe Text)
-> (DescribeReservedDBInstancesOfferingsResponse
    -> Maybe Text -> DescribeReservedDBInstancesOfferingsResponse)
-> Lens' DescribeReservedDBInstancesOfferingsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedDBInstancesOfferingsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeReservedDBInstancesOfferingsResponse' :: DescribeReservedDBInstancesOfferingsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeReservedDBInstancesOfferingsResponse
s@DescribeReservedDBInstancesOfferingsResponse' {} Maybe Text
a -> DescribeReservedDBInstancesOfferingsResponse
s {$sel:marker:DescribeReservedDBInstancesOfferingsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeReservedDBInstancesOfferingsResponse)

-- | A list of reserved DB instance offerings.
describeReservedDBInstancesOfferingsResponse_reservedDBInstancesOfferings :: Lens.Lens' DescribeReservedDBInstancesOfferingsResponse (Prelude.Maybe [ReservedDBInstancesOffering])
describeReservedDBInstancesOfferingsResponse_reservedDBInstancesOfferings :: (Maybe [ReservedDBInstancesOffering]
 -> f (Maybe [ReservedDBInstancesOffering]))
-> DescribeReservedDBInstancesOfferingsResponse
-> f DescribeReservedDBInstancesOfferingsResponse
describeReservedDBInstancesOfferingsResponse_reservedDBInstancesOfferings = (DescribeReservedDBInstancesOfferingsResponse
 -> Maybe [ReservedDBInstancesOffering])
-> (DescribeReservedDBInstancesOfferingsResponse
    -> Maybe [ReservedDBInstancesOffering]
    -> DescribeReservedDBInstancesOfferingsResponse)
-> Lens'
     DescribeReservedDBInstancesOfferingsResponse
     (Maybe [ReservedDBInstancesOffering])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedDBInstancesOfferingsResponse' {Maybe [ReservedDBInstancesOffering]
reservedDBInstancesOfferings :: Maybe [ReservedDBInstancesOffering]
$sel:reservedDBInstancesOfferings:DescribeReservedDBInstancesOfferingsResponse' :: DescribeReservedDBInstancesOfferingsResponse
-> Maybe [ReservedDBInstancesOffering]
reservedDBInstancesOfferings} -> Maybe [ReservedDBInstancesOffering]
reservedDBInstancesOfferings) (\s :: DescribeReservedDBInstancesOfferingsResponse
s@DescribeReservedDBInstancesOfferingsResponse' {} Maybe [ReservedDBInstancesOffering]
a -> DescribeReservedDBInstancesOfferingsResponse
s {$sel:reservedDBInstancesOfferings:DescribeReservedDBInstancesOfferingsResponse' :: Maybe [ReservedDBInstancesOffering]
reservedDBInstancesOfferings = Maybe [ReservedDBInstancesOffering]
a} :: DescribeReservedDBInstancesOfferingsResponse) ((Maybe [ReservedDBInstancesOffering]
  -> f (Maybe [ReservedDBInstancesOffering]))
 -> DescribeReservedDBInstancesOfferingsResponse
 -> f DescribeReservedDBInstancesOfferingsResponse)
-> ((Maybe [ReservedDBInstancesOffering]
     -> f (Maybe [ReservedDBInstancesOffering]))
    -> Maybe [ReservedDBInstancesOffering]
    -> f (Maybe [ReservedDBInstancesOffering]))
-> (Maybe [ReservedDBInstancesOffering]
    -> f (Maybe [ReservedDBInstancesOffering]))
-> DescribeReservedDBInstancesOfferingsResponse
-> f DescribeReservedDBInstancesOfferingsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ReservedDBInstancesOffering]
  [ReservedDBInstancesOffering]
  [ReservedDBInstancesOffering]
  [ReservedDBInstancesOffering]
-> Iso
     (Maybe [ReservedDBInstancesOffering])
     (Maybe [ReservedDBInstancesOffering])
     (Maybe [ReservedDBInstancesOffering])
     (Maybe [ReservedDBInstancesOffering])
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
  [ReservedDBInstancesOffering]
  [ReservedDBInstancesOffering]
  [ReservedDBInstancesOffering]
  [ReservedDBInstancesOffering]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeReservedDBInstancesOfferingsResponse