{-# 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.ElastiCache.DescribeReservedCacheNodesOfferings
-- 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 cache node offerings.
--
-- This operation returns paginated results.
module Amazonka.ElastiCache.DescribeReservedCacheNodesOfferings
  ( -- * Creating a Request
    DescribeReservedCacheNodesOfferings (..),
    newDescribeReservedCacheNodesOfferings,

    -- * Request Lenses
    describeReservedCacheNodesOfferings_cacheNodeType,
    describeReservedCacheNodesOfferings_productDescription,
    describeReservedCacheNodesOfferings_marker,
    describeReservedCacheNodesOfferings_maxRecords,
    describeReservedCacheNodesOfferings_offeringType,
    describeReservedCacheNodesOfferings_duration,
    describeReservedCacheNodesOfferings_reservedCacheNodesOfferingId,

    -- * Destructuring the Response
    DescribeReservedCacheNodesOfferingsResponse (..),
    newDescribeReservedCacheNodesOfferingsResponse,

    -- * Response Lenses
    describeReservedCacheNodesOfferingsResponse_marker,
    describeReservedCacheNodesOfferingsResponse_reservedCacheNodesOfferings,
    describeReservedCacheNodesOfferingsResponse_httpStatus,
  )
where

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

-- | Represents the input of a @DescribeReservedCacheNodesOfferings@
-- operation.
--
-- /See:/ 'newDescribeReservedCacheNodesOfferings' smart constructor.
data DescribeReservedCacheNodesOfferings = DescribeReservedCacheNodesOfferings'
  { -- | The cache node type filter value. Use this parameter to show only the
    -- available offerings matching the specified cache node type.
    --
    -- The following node types are supported by ElastiCache. Generally
    -- speaking, the current generation types provide more memory and
    -- computational power at lower cost when compared to their equivalent
    -- previous generation counterparts.
    --
    -- -   General purpose:
    --
    --     -   Current generation:
    --
    --         __M6g node types__ (available only for Redis engine version
    --         5.0.6 onward and for Memcached engine version 1.5.16 onward).
    --
    --         @cache.m6g.large@, @cache.m6g.xlarge@, @cache.m6g.2xlarge@,
    --         @cache.m6g.4xlarge@, @cache.m6g.8xlarge@, @cache.m6g.12xlarge@,
    --         @cache.m6g.16xlarge@
    --
    --         For region availability, see
    --         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
    --
    --         __M5 node types:__ @cache.m5.large@, @cache.m5.xlarge@,
    --         @cache.m5.2xlarge@, @cache.m5.4xlarge@, @cache.m5.12xlarge@,
    --         @cache.m5.24xlarge@
    --
    --         __M4 node types:__ @cache.m4.large@, @cache.m4.xlarge@,
    --         @cache.m4.2xlarge@, @cache.m4.4xlarge@, @cache.m4.10xlarge@
    --
    --         __T3 node types:__ @cache.t3.micro@, @cache.t3.small@,
    --         @cache.t3.medium@
    --
    --         __T2 node types:__ @cache.t2.micro@, @cache.t2.small@,
    --         @cache.t2.medium@
    --
    --     -   Previous generation: (not recommended)
    --
    --         __T1 node types:__ @cache.t1.micro@
    --
    --         __M1 node types:__ @cache.m1.small@, @cache.m1.medium@,
    --         @cache.m1.large@, @cache.m1.xlarge@
    --
    --         __M3 node types:__ @cache.m3.medium@, @cache.m3.large@,
    --         @cache.m3.xlarge@, @cache.m3.2xlarge@
    --
    -- -   Compute optimized:
    --
    --     -   Previous generation: (not recommended)
    --
    --         __C1 node types:__ @cache.c1.xlarge@
    --
    -- -   Memory optimized:
    --
    --     -   Current generation:
    --
    --         __R6g node types__ (available only for Redis engine version
    --         5.0.6 onward and for Memcached engine version 1.5.16 onward).
    --
    --         @cache.r6g.large@, @cache.r6g.xlarge@, @cache.r6g.2xlarge@,
    --         @cache.r6g.4xlarge@, @cache.r6g.8xlarge@, @cache.r6g.12xlarge@,
    --         @cache.r6g.16xlarge@
    --
    --         For region availability, see
    --         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
    --
    --         __R5 node types:__ @cache.r5.large@, @cache.r5.xlarge@,
    --         @cache.r5.2xlarge@, @cache.r5.4xlarge@, @cache.r5.12xlarge@,
    --         @cache.r5.24xlarge@
    --
    --         __R4 node types:__ @cache.r4.large@, @cache.r4.xlarge@,
    --         @cache.r4.2xlarge@, @cache.r4.4xlarge@, @cache.r4.8xlarge@,
    --         @cache.r4.16xlarge@
    --
    --     -   Previous generation: (not recommended)
    --
    --         __M2 node types:__ @cache.m2.xlarge@, @cache.m2.2xlarge@,
    --         @cache.m2.4xlarge@
    --
    --         __R3 node types:__ @cache.r3.large@, @cache.r3.xlarge@,
    --         @cache.r3.2xlarge@, @cache.r3.4xlarge@, @cache.r3.8xlarge@
    --
    -- __Additional node type info__
    --
    -- -   All current generation instance types are created in Amazon VPC by
    --     default.
    --
    -- -   Redis append-only files (AOF) are not supported for T1 or T2
    --     instances.
    --
    -- -   Redis Multi-AZ with automatic failover is not supported on T1
    --     instances.
    --
    -- -   Redis configuration variables @appendonly@ and @appendfsync@ are not
    --     supported on Redis version 2.8.22 and later.
    DescribeReservedCacheNodesOfferings -> Maybe Text
cacheNodeType :: Prelude.Maybe Prelude.Text,
    -- | The product description filter value. Use this parameter to show only
    -- the available offerings matching the specified product description.
    DescribeReservedCacheNodesOfferings -> Maybe Text
productDescription :: Prelude.Maybe Prelude.Text,
    -- | An optional marker returned from a prior request. Use this marker for
    -- pagination of results from this operation. If this parameter is
    -- specified, the response includes only records beyond the marker, up to
    -- the value specified by @MaxRecords@.
    DescribeReservedCacheNodesOfferings -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of records to include in the response. If more
    -- records exist than the specified @MaxRecords@ value, a marker is
    -- included in the response so that the remaining results can be retrieved.
    --
    -- Default: 100
    --
    -- Constraints: minimum 20; maximum 100.
    DescribeReservedCacheNodesOfferings -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | The offering type filter value. Use this parameter to show only the
    -- available offerings matching the specified offering type.
    --
    -- Valid Values:
    -- @\"Light Utilization\"|\"Medium Utilization\"|\"Heavy Utilization\" |\"All Upfront\"|\"Partial Upfront\"| \"No Upfront\"@
    DescribeReservedCacheNodesOfferings -> Maybe Text
offeringType :: Prelude.Maybe Prelude.Text,
    -- | Duration filter value, specified in years or seconds. Use this parameter
    -- to show only reservations for a given duration.
    --
    -- Valid Values: @1 | 3 | 31536000 | 94608000@
    DescribeReservedCacheNodesOfferings -> Maybe Text
duration :: Prelude.Maybe Prelude.Text,
    -- | The offering identifier filter value. Use this parameter to show only
    -- the available offering that matches the specified reservation
    -- identifier.
    --
    -- Example: @438012d3-4052-4cc7-b2e3-8d3372e0e706@
    DescribeReservedCacheNodesOfferings -> Maybe Text
reservedCacheNodesOfferingId :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings -> Bool
(DescribeReservedCacheNodesOfferings
 -> DescribeReservedCacheNodesOfferings -> Bool)
-> (DescribeReservedCacheNodesOfferings
    -> DescribeReservedCacheNodesOfferings -> Bool)
-> Eq DescribeReservedCacheNodesOfferings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings -> Bool
$c/= :: DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings -> Bool
== :: DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings -> Bool
$c== :: DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings -> Bool
Prelude.Eq, ReadPrec [DescribeReservedCacheNodesOfferings]
ReadPrec DescribeReservedCacheNodesOfferings
Int -> ReadS DescribeReservedCacheNodesOfferings
ReadS [DescribeReservedCacheNodesOfferings]
(Int -> ReadS DescribeReservedCacheNodesOfferings)
-> ReadS [DescribeReservedCacheNodesOfferings]
-> ReadPrec DescribeReservedCacheNodesOfferings
-> ReadPrec [DescribeReservedCacheNodesOfferings]
-> Read DescribeReservedCacheNodesOfferings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReservedCacheNodesOfferings]
$creadListPrec :: ReadPrec [DescribeReservedCacheNodesOfferings]
readPrec :: ReadPrec DescribeReservedCacheNodesOfferings
$creadPrec :: ReadPrec DescribeReservedCacheNodesOfferings
readList :: ReadS [DescribeReservedCacheNodesOfferings]
$creadList :: ReadS [DescribeReservedCacheNodesOfferings]
readsPrec :: Int -> ReadS DescribeReservedCacheNodesOfferings
$creadsPrec :: Int -> ReadS DescribeReservedCacheNodesOfferings
Prelude.Read, Int -> DescribeReservedCacheNodesOfferings -> ShowS
[DescribeReservedCacheNodesOfferings] -> ShowS
DescribeReservedCacheNodesOfferings -> String
(Int -> DescribeReservedCacheNodesOfferings -> ShowS)
-> (DescribeReservedCacheNodesOfferings -> String)
-> ([DescribeReservedCacheNodesOfferings] -> ShowS)
-> Show DescribeReservedCacheNodesOfferings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReservedCacheNodesOfferings] -> ShowS
$cshowList :: [DescribeReservedCacheNodesOfferings] -> ShowS
show :: DescribeReservedCacheNodesOfferings -> String
$cshow :: DescribeReservedCacheNodesOfferings -> String
showsPrec :: Int -> DescribeReservedCacheNodesOfferings -> ShowS
$cshowsPrec :: Int -> DescribeReservedCacheNodesOfferings -> ShowS
Prelude.Show, (forall x.
 DescribeReservedCacheNodesOfferings
 -> Rep DescribeReservedCacheNodesOfferings x)
-> (forall x.
    Rep DescribeReservedCacheNodesOfferings x
    -> DescribeReservedCacheNodesOfferings)
-> Generic DescribeReservedCacheNodesOfferings
forall x.
Rep DescribeReservedCacheNodesOfferings x
-> DescribeReservedCacheNodesOfferings
forall x.
DescribeReservedCacheNodesOfferings
-> Rep DescribeReservedCacheNodesOfferings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReservedCacheNodesOfferings x
-> DescribeReservedCacheNodesOfferings
$cfrom :: forall x.
DescribeReservedCacheNodesOfferings
-> Rep DescribeReservedCacheNodesOfferings x
Prelude.Generic)

-- |
-- Create a value of 'DescribeReservedCacheNodesOfferings' 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:
--
-- 'cacheNodeType', 'describeReservedCacheNodesOfferings_cacheNodeType' - The cache node type filter value. Use this parameter to show only the
-- available offerings matching the specified cache node type.
--
-- The following node types are supported by ElastiCache. Generally
-- speaking, the current generation types provide more memory and
-- computational power at lower cost when compared to their equivalent
-- previous generation counterparts.
--
-- -   General purpose:
--
--     -   Current generation:
--
--         __M6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward).
--
--         @cache.m6g.large@, @cache.m6g.xlarge@, @cache.m6g.2xlarge@,
--         @cache.m6g.4xlarge@, @cache.m6g.8xlarge@, @cache.m6g.12xlarge@,
--         @cache.m6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __M5 node types:__ @cache.m5.large@, @cache.m5.xlarge@,
--         @cache.m5.2xlarge@, @cache.m5.4xlarge@, @cache.m5.12xlarge@,
--         @cache.m5.24xlarge@
--
--         __M4 node types:__ @cache.m4.large@, @cache.m4.xlarge@,
--         @cache.m4.2xlarge@, @cache.m4.4xlarge@, @cache.m4.10xlarge@
--
--         __T3 node types:__ @cache.t3.micro@, @cache.t3.small@,
--         @cache.t3.medium@
--
--         __T2 node types:__ @cache.t2.micro@, @cache.t2.small@,
--         @cache.t2.medium@
--
--     -   Previous generation: (not recommended)
--
--         __T1 node types:__ @cache.t1.micro@
--
--         __M1 node types:__ @cache.m1.small@, @cache.m1.medium@,
--         @cache.m1.large@, @cache.m1.xlarge@
--
--         __M3 node types:__ @cache.m3.medium@, @cache.m3.large@,
--         @cache.m3.xlarge@, @cache.m3.2xlarge@
--
-- -   Compute optimized:
--
--     -   Previous generation: (not recommended)
--
--         __C1 node types:__ @cache.c1.xlarge@
--
-- -   Memory optimized:
--
--     -   Current generation:
--
--         __R6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward).
--
--         @cache.r6g.large@, @cache.r6g.xlarge@, @cache.r6g.2xlarge@,
--         @cache.r6g.4xlarge@, @cache.r6g.8xlarge@, @cache.r6g.12xlarge@,
--         @cache.r6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __R5 node types:__ @cache.r5.large@, @cache.r5.xlarge@,
--         @cache.r5.2xlarge@, @cache.r5.4xlarge@, @cache.r5.12xlarge@,
--         @cache.r5.24xlarge@
--
--         __R4 node types:__ @cache.r4.large@, @cache.r4.xlarge@,
--         @cache.r4.2xlarge@, @cache.r4.4xlarge@, @cache.r4.8xlarge@,
--         @cache.r4.16xlarge@
--
--     -   Previous generation: (not recommended)
--
--         __M2 node types:__ @cache.m2.xlarge@, @cache.m2.2xlarge@,
--         @cache.m2.4xlarge@
--
--         __R3 node types:__ @cache.r3.large@, @cache.r3.xlarge@,
--         @cache.r3.2xlarge@, @cache.r3.4xlarge@, @cache.r3.8xlarge@
--
-- __Additional node type info__
--
-- -   All current generation instance types are created in Amazon VPC by
--     default.
--
-- -   Redis append-only files (AOF) are not supported for T1 or T2
--     instances.
--
-- -   Redis Multi-AZ with automatic failover is not supported on T1
--     instances.
--
-- -   Redis configuration variables @appendonly@ and @appendfsync@ are not
--     supported on Redis version 2.8.22 and later.
--
-- 'productDescription', 'describeReservedCacheNodesOfferings_productDescription' - The product description filter value. Use this parameter to show only
-- the available offerings matching the specified product description.
--
-- 'marker', 'describeReservedCacheNodesOfferings_marker' - An optional marker returned from a prior request. Use this marker for
-- pagination of results from this operation. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by @MaxRecords@.
--
-- 'maxRecords', 'describeReservedCacheNodesOfferings_maxRecords' - The maximum number of records to include in the response. If more
-- records exist than the specified @MaxRecords@ value, a marker is
-- included in the response so that the remaining results can be retrieved.
--
-- Default: 100
--
-- Constraints: minimum 20; maximum 100.
--
-- 'offeringType', 'describeReservedCacheNodesOfferings_offeringType' - The offering type filter value. Use this parameter to show only the
-- available offerings matching the specified offering type.
--
-- Valid Values:
-- @\"Light Utilization\"|\"Medium Utilization\"|\"Heavy Utilization\" |\"All Upfront\"|\"Partial Upfront\"| \"No Upfront\"@
--
-- 'duration', 'describeReservedCacheNodesOfferings_duration' - Duration filter value, specified in years or seconds. Use this parameter
-- to show only reservations for a given duration.
--
-- Valid Values: @1 | 3 | 31536000 | 94608000@
--
-- 'reservedCacheNodesOfferingId', 'describeReservedCacheNodesOfferings_reservedCacheNodesOfferingId' - The offering identifier filter value. Use this parameter to show only
-- the available offering that matches the specified reservation
-- identifier.
--
-- Example: @438012d3-4052-4cc7-b2e3-8d3372e0e706@
newDescribeReservedCacheNodesOfferings ::
  DescribeReservedCacheNodesOfferings
newDescribeReservedCacheNodesOfferings :: DescribeReservedCacheNodesOfferings
newDescribeReservedCacheNodesOfferings =
  DescribeReservedCacheNodesOfferings' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferings'
    { $sel:cacheNodeType:DescribeReservedCacheNodesOfferings' :: Maybe Text
cacheNodeType =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:productDescription:DescribeReservedCacheNodesOfferings' :: Maybe Text
productDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeReservedCacheNodesOfferings' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeReservedCacheNodesOfferings' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:offeringType:DescribeReservedCacheNodesOfferings' :: Maybe Text
offeringType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:duration:DescribeReservedCacheNodesOfferings' :: Maybe Text
duration = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodesOfferings' :: Maybe Text
reservedCacheNodesOfferingId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The cache node type filter value. Use this parameter to show only the
-- available offerings matching the specified cache node type.
--
-- The following node types are supported by ElastiCache. Generally
-- speaking, the current generation types provide more memory and
-- computational power at lower cost when compared to their equivalent
-- previous generation counterparts.
--
-- -   General purpose:
--
--     -   Current generation:
--
--         __M6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward).
--
--         @cache.m6g.large@, @cache.m6g.xlarge@, @cache.m6g.2xlarge@,
--         @cache.m6g.4xlarge@, @cache.m6g.8xlarge@, @cache.m6g.12xlarge@,
--         @cache.m6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __M5 node types:__ @cache.m5.large@, @cache.m5.xlarge@,
--         @cache.m5.2xlarge@, @cache.m5.4xlarge@, @cache.m5.12xlarge@,
--         @cache.m5.24xlarge@
--
--         __M4 node types:__ @cache.m4.large@, @cache.m4.xlarge@,
--         @cache.m4.2xlarge@, @cache.m4.4xlarge@, @cache.m4.10xlarge@
--
--         __T3 node types:__ @cache.t3.micro@, @cache.t3.small@,
--         @cache.t3.medium@
--
--         __T2 node types:__ @cache.t2.micro@, @cache.t2.small@,
--         @cache.t2.medium@
--
--     -   Previous generation: (not recommended)
--
--         __T1 node types:__ @cache.t1.micro@
--
--         __M1 node types:__ @cache.m1.small@, @cache.m1.medium@,
--         @cache.m1.large@, @cache.m1.xlarge@
--
--         __M3 node types:__ @cache.m3.medium@, @cache.m3.large@,
--         @cache.m3.xlarge@, @cache.m3.2xlarge@
--
-- -   Compute optimized:
--
--     -   Previous generation: (not recommended)
--
--         __C1 node types:__ @cache.c1.xlarge@
--
-- -   Memory optimized:
--
--     -   Current generation:
--
--         __R6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward).
--
--         @cache.r6g.large@, @cache.r6g.xlarge@, @cache.r6g.2xlarge@,
--         @cache.r6g.4xlarge@, @cache.r6g.8xlarge@, @cache.r6g.12xlarge@,
--         @cache.r6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __R5 node types:__ @cache.r5.large@, @cache.r5.xlarge@,
--         @cache.r5.2xlarge@, @cache.r5.4xlarge@, @cache.r5.12xlarge@,
--         @cache.r5.24xlarge@
--
--         __R4 node types:__ @cache.r4.large@, @cache.r4.xlarge@,
--         @cache.r4.2xlarge@, @cache.r4.4xlarge@, @cache.r4.8xlarge@,
--         @cache.r4.16xlarge@
--
--     -   Previous generation: (not recommended)
--
--         __M2 node types:__ @cache.m2.xlarge@, @cache.m2.2xlarge@,
--         @cache.m2.4xlarge@
--
--         __R3 node types:__ @cache.r3.large@, @cache.r3.xlarge@,
--         @cache.r3.2xlarge@, @cache.r3.4xlarge@, @cache.r3.8xlarge@
--
-- __Additional node type info__
--
-- -   All current generation instance types are created in Amazon VPC by
--     default.
--
-- -   Redis append-only files (AOF) are not supported for T1 or T2
--     instances.
--
-- -   Redis Multi-AZ with automatic failover is not supported on T1
--     instances.
--
-- -   Redis configuration variables @appendonly@ and @appendfsync@ are not
--     supported on Redis version 2.8.22 and later.
describeReservedCacheNodesOfferings_cacheNodeType :: Lens.Lens' DescribeReservedCacheNodesOfferings (Prelude.Maybe Prelude.Text)
describeReservedCacheNodesOfferings_cacheNodeType :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodesOfferings
-> f DescribeReservedCacheNodesOfferings
describeReservedCacheNodesOfferings_cacheNodeType = (DescribeReservedCacheNodesOfferings -> Maybe Text)
-> (DescribeReservedCacheNodesOfferings
    -> Maybe Text -> DescribeReservedCacheNodesOfferings)
-> Lens
     DescribeReservedCacheNodesOfferings
     DescribeReservedCacheNodesOfferings
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferings' {Maybe Text
cacheNodeType :: Maybe Text
$sel:cacheNodeType:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
cacheNodeType} -> Maybe Text
cacheNodeType) (\s :: DescribeReservedCacheNodesOfferings
s@DescribeReservedCacheNodesOfferings' {} Maybe Text
a -> DescribeReservedCacheNodesOfferings
s {$sel:cacheNodeType:DescribeReservedCacheNodesOfferings' :: Maybe Text
cacheNodeType = Maybe Text
a} :: DescribeReservedCacheNodesOfferings)

-- | The product description filter value. Use this parameter to show only
-- the available offerings matching the specified product description.
describeReservedCacheNodesOfferings_productDescription :: Lens.Lens' DescribeReservedCacheNodesOfferings (Prelude.Maybe Prelude.Text)
describeReservedCacheNodesOfferings_productDescription :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodesOfferings
-> f DescribeReservedCacheNodesOfferings
describeReservedCacheNodesOfferings_productDescription = (DescribeReservedCacheNodesOfferings -> Maybe Text)
-> (DescribeReservedCacheNodesOfferings
    -> Maybe Text -> DescribeReservedCacheNodesOfferings)
-> Lens
     DescribeReservedCacheNodesOfferings
     DescribeReservedCacheNodesOfferings
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferings' {Maybe Text
productDescription :: Maybe Text
$sel:productDescription:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
productDescription} -> Maybe Text
productDescription) (\s :: DescribeReservedCacheNodesOfferings
s@DescribeReservedCacheNodesOfferings' {} Maybe Text
a -> DescribeReservedCacheNodesOfferings
s {$sel:productDescription:DescribeReservedCacheNodesOfferings' :: Maybe Text
productDescription = Maybe Text
a} :: DescribeReservedCacheNodesOfferings)

-- | An optional marker returned from a prior request. Use this marker for
-- pagination of results from this operation. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by @MaxRecords@.
describeReservedCacheNodesOfferings_marker :: Lens.Lens' DescribeReservedCacheNodesOfferings (Prelude.Maybe Prelude.Text)
describeReservedCacheNodesOfferings_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodesOfferings
-> f DescribeReservedCacheNodesOfferings
describeReservedCacheNodesOfferings_marker = (DescribeReservedCacheNodesOfferings -> Maybe Text)
-> (DescribeReservedCacheNodesOfferings
    -> Maybe Text -> DescribeReservedCacheNodesOfferings)
-> Lens
     DescribeReservedCacheNodesOfferings
     DescribeReservedCacheNodesOfferings
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferings' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeReservedCacheNodesOfferings
s@DescribeReservedCacheNodesOfferings' {} Maybe Text
a -> DescribeReservedCacheNodesOfferings
s {$sel:marker:DescribeReservedCacheNodesOfferings' :: Maybe Text
marker = Maybe Text
a} :: DescribeReservedCacheNodesOfferings)

-- | The maximum number of records to include in the response. If more
-- records exist than the specified @MaxRecords@ value, a marker is
-- included in the response so that the remaining results can be retrieved.
--
-- Default: 100
--
-- Constraints: minimum 20; maximum 100.
describeReservedCacheNodesOfferings_maxRecords :: Lens.Lens' DescribeReservedCacheNodesOfferings (Prelude.Maybe Prelude.Int)
describeReservedCacheNodesOfferings_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeReservedCacheNodesOfferings
-> f DescribeReservedCacheNodesOfferings
describeReservedCacheNodesOfferings_maxRecords = (DescribeReservedCacheNodesOfferings -> Maybe Int)
-> (DescribeReservedCacheNodesOfferings
    -> Maybe Int -> DescribeReservedCacheNodesOfferings)
-> Lens
     DescribeReservedCacheNodesOfferings
     DescribeReservedCacheNodesOfferings
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferings' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeReservedCacheNodesOfferings
s@DescribeReservedCacheNodesOfferings' {} Maybe Int
a -> DescribeReservedCacheNodesOfferings
s {$sel:maxRecords:DescribeReservedCacheNodesOfferings' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeReservedCacheNodesOfferings)

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

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

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

instance
  Core.AWSPager
    DescribeReservedCacheNodesOfferings
  where
  page :: DescribeReservedCacheNodesOfferings
-> AWSResponse DescribeReservedCacheNodesOfferings
-> Maybe DescribeReservedCacheNodesOfferings
page DescribeReservedCacheNodesOfferings
rq AWSResponse DescribeReservedCacheNodesOfferings
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferingsResponse
rs
            DescribeReservedCacheNodesOfferingsResponse
-> Getting
     (First Text) DescribeReservedCacheNodesOfferingsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeReservedCacheNodesOfferingsResponse
-> Const (First Text) DescribeReservedCacheNodesOfferingsResponse
Lens' DescribeReservedCacheNodesOfferingsResponse (Maybe Text)
describeReservedCacheNodesOfferingsResponse_marker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeReservedCacheNodesOfferingsResponse
 -> Const (First Text) DescribeReservedCacheNodesOfferingsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) DescribeReservedCacheNodesOfferingsResponse 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 DescribeReservedCacheNodesOfferings
forall a. Maybe a
Prelude.Nothing
    | Maybe [ReservedCacheNodesOffering] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferingsResponse
rs
            DescribeReservedCacheNodesOfferingsResponse
-> Getting
     (First [ReservedCacheNodesOffering])
     DescribeReservedCacheNodesOfferingsResponse
     [ReservedCacheNodesOffering]
-> Maybe [ReservedCacheNodesOffering]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ReservedCacheNodesOffering]
 -> Const
      (First [ReservedCacheNodesOffering])
      (Maybe [ReservedCacheNodesOffering]))
-> DescribeReservedCacheNodesOfferingsResponse
-> Const
     (First [ReservedCacheNodesOffering])
     DescribeReservedCacheNodesOfferingsResponse
Lens'
  DescribeReservedCacheNodesOfferingsResponse
  (Maybe [ReservedCacheNodesOffering])
describeReservedCacheNodesOfferingsResponse_reservedCacheNodesOfferings
              ((Maybe [ReservedCacheNodesOffering]
  -> Const
       (First [ReservedCacheNodesOffering])
       (Maybe [ReservedCacheNodesOffering]))
 -> DescribeReservedCacheNodesOfferingsResponse
 -> Const
      (First [ReservedCacheNodesOffering])
      DescribeReservedCacheNodesOfferingsResponse)
-> (([ReservedCacheNodesOffering]
     -> Const
          (First [ReservedCacheNodesOffering]) [ReservedCacheNodesOffering])
    -> Maybe [ReservedCacheNodesOffering]
    -> Const
         (First [ReservedCacheNodesOffering])
         (Maybe [ReservedCacheNodesOffering]))
-> Getting
     (First [ReservedCacheNodesOffering])
     DescribeReservedCacheNodesOfferingsResponse
     [ReservedCacheNodesOffering]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ReservedCacheNodesOffering]
 -> Const
      (First [ReservedCacheNodesOffering]) [ReservedCacheNodesOffering])
-> Maybe [ReservedCacheNodesOffering]
-> Const
     (First [ReservedCacheNodesOffering])
     (Maybe [ReservedCacheNodesOffering])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeReservedCacheNodesOfferings
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeReservedCacheNodesOfferings
-> Maybe DescribeReservedCacheNodesOfferings
forall a. a -> Maybe a
Prelude.Just (DescribeReservedCacheNodesOfferings
 -> Maybe DescribeReservedCacheNodesOfferings)
-> DescribeReservedCacheNodesOfferings
-> Maybe DescribeReservedCacheNodesOfferings
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeReservedCacheNodesOfferings
rq
          DescribeReservedCacheNodesOfferings
-> (DescribeReservedCacheNodesOfferings
    -> DescribeReservedCacheNodesOfferings)
-> DescribeReservedCacheNodesOfferings
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeReservedCacheNodesOfferings
-> Identity DescribeReservedCacheNodesOfferings
Lens
  DescribeReservedCacheNodesOfferings
  DescribeReservedCacheNodesOfferings
  (Maybe Text)
  (Maybe Text)
describeReservedCacheNodesOfferings_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeReservedCacheNodesOfferings
 -> Identity DescribeReservedCacheNodesOfferings)
-> Maybe Text
-> DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferingsResponse
rs
          DescribeReservedCacheNodesOfferingsResponse
-> Getting
     (First Text) DescribeReservedCacheNodesOfferingsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeReservedCacheNodesOfferingsResponse
-> Const (First Text) DescribeReservedCacheNodesOfferingsResponse
Lens' DescribeReservedCacheNodesOfferingsResponse (Maybe Text)
describeReservedCacheNodesOfferingsResponse_marker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeReservedCacheNodesOfferingsResponse
 -> Const (First Text) DescribeReservedCacheNodesOfferingsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) DescribeReservedCacheNodesOfferingsResponse 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
    DescribeReservedCacheNodesOfferings
  where
  type
    AWSResponse DescribeReservedCacheNodesOfferings =
      DescribeReservedCacheNodesOfferingsResponse
  request :: DescribeReservedCacheNodesOfferings
-> Request DescribeReservedCacheNodesOfferings
request = Service
-> DescribeReservedCacheNodesOfferings
-> Request DescribeReservedCacheNodesOfferings
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeReservedCacheNodesOfferings
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeReservedCacheNodesOfferings)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeReservedCacheNodesOfferings))
-> Logger
-> Service
-> Proxy DescribeReservedCacheNodesOfferings
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeReservedCacheNodesOfferings)))
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
"DescribeReservedCacheNodesOfferingsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [ReservedCacheNodesOffering]
-> Int
-> DescribeReservedCacheNodesOfferingsResponse
DescribeReservedCacheNodesOfferingsResponse'
            (Maybe Text
 -> Maybe [ReservedCacheNodesOffering]
 -> Int
 -> DescribeReservedCacheNodesOfferingsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ReservedCacheNodesOffering]
      -> Int -> DescribeReservedCacheNodesOfferingsResponse)
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 [ReservedCacheNodesOffering]
   -> Int -> DescribeReservedCacheNodesOfferingsResponse)
-> Either String (Maybe [ReservedCacheNodesOffering])
-> Either
     String (Int -> DescribeReservedCacheNodesOfferingsResponse)
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
"ReservedCacheNodesOfferings"
                              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 [ReservedCacheNodesOffering]))
-> Either String (Maybe [ReservedCacheNodesOffering])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ReservedCacheNodesOffering])
-> [Node] -> Either String (Maybe [ReservedCacheNodesOffering])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
                                (Text -> [Node] -> Either String [ReservedCacheNodesOffering]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"ReservedCacheNodesOffering")
                          )
              Either String (Int -> DescribeReservedCacheNodesOfferingsResponse)
-> Either String Int
-> Either String DescribeReservedCacheNodesOfferingsResponse
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
    DescribeReservedCacheNodesOfferings

instance
  Prelude.NFData
    DescribeReservedCacheNodesOfferings

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

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

instance
  Core.ToQuery
    DescribeReservedCacheNodesOfferings
  where
  toQuery :: DescribeReservedCacheNodesOfferings -> QueryString
toQuery DescribeReservedCacheNodesOfferings' {Maybe Int
Maybe Text
reservedCacheNodesOfferingId :: Maybe Text
duration :: Maybe Text
offeringType :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
productDescription :: Maybe Text
cacheNodeType :: Maybe Text
$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
$sel:duration:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
$sel:offeringType:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
$sel:maxRecords:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Int
$sel:marker:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
$sel:productDescription:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
$sel:cacheNodeType:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> 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
"DescribeReservedCacheNodesOfferings" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"CacheNodeType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
cacheNodeType,
        ByteString
"ProductDescription" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
productDescription,
        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
"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,
        ByteString
"ReservedCacheNodesOfferingId"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
reservedCacheNodesOfferingId
      ]

-- | Represents the output of a @DescribeReservedCacheNodesOfferings@
-- operation.
--
-- /See:/ 'newDescribeReservedCacheNodesOfferingsResponse' smart constructor.
data DescribeReservedCacheNodesOfferingsResponse = DescribeReservedCacheNodesOfferingsResponse'
  { -- | Provides an identifier to allow retrieval of paginated results.
    DescribeReservedCacheNodesOfferingsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | A list of reserved cache node offerings. Each element in the list
    -- contains detailed information about one offering.
    DescribeReservedCacheNodesOfferingsResponse
-> Maybe [ReservedCacheNodesOffering]
reservedCacheNodesOfferings :: Prelude.Maybe [ReservedCacheNodesOffering],
    -- | The response's http status code.
    DescribeReservedCacheNodesOfferingsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeReservedCacheNodesOfferingsResponse
-> DescribeReservedCacheNodesOfferingsResponse -> Bool
(DescribeReservedCacheNodesOfferingsResponse
 -> DescribeReservedCacheNodesOfferingsResponse -> Bool)
-> (DescribeReservedCacheNodesOfferingsResponse
    -> DescribeReservedCacheNodesOfferingsResponse -> Bool)
-> Eq DescribeReservedCacheNodesOfferingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReservedCacheNodesOfferingsResponse
-> DescribeReservedCacheNodesOfferingsResponse -> Bool
$c/= :: DescribeReservedCacheNodesOfferingsResponse
-> DescribeReservedCacheNodesOfferingsResponse -> Bool
== :: DescribeReservedCacheNodesOfferingsResponse
-> DescribeReservedCacheNodesOfferingsResponse -> Bool
$c== :: DescribeReservedCacheNodesOfferingsResponse
-> DescribeReservedCacheNodesOfferingsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeReservedCacheNodesOfferingsResponse]
ReadPrec DescribeReservedCacheNodesOfferingsResponse
Int -> ReadS DescribeReservedCacheNodesOfferingsResponse
ReadS [DescribeReservedCacheNodesOfferingsResponse]
(Int -> ReadS DescribeReservedCacheNodesOfferingsResponse)
-> ReadS [DescribeReservedCacheNodesOfferingsResponse]
-> ReadPrec DescribeReservedCacheNodesOfferingsResponse
-> ReadPrec [DescribeReservedCacheNodesOfferingsResponse]
-> Read DescribeReservedCacheNodesOfferingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReservedCacheNodesOfferingsResponse]
$creadListPrec :: ReadPrec [DescribeReservedCacheNodesOfferingsResponse]
readPrec :: ReadPrec DescribeReservedCacheNodesOfferingsResponse
$creadPrec :: ReadPrec DescribeReservedCacheNodesOfferingsResponse
readList :: ReadS [DescribeReservedCacheNodesOfferingsResponse]
$creadList :: ReadS [DescribeReservedCacheNodesOfferingsResponse]
readsPrec :: Int -> ReadS DescribeReservedCacheNodesOfferingsResponse
$creadsPrec :: Int -> ReadS DescribeReservedCacheNodesOfferingsResponse
Prelude.Read, Int -> DescribeReservedCacheNodesOfferingsResponse -> ShowS
[DescribeReservedCacheNodesOfferingsResponse] -> ShowS
DescribeReservedCacheNodesOfferingsResponse -> String
(Int -> DescribeReservedCacheNodesOfferingsResponse -> ShowS)
-> (DescribeReservedCacheNodesOfferingsResponse -> String)
-> ([DescribeReservedCacheNodesOfferingsResponse] -> ShowS)
-> Show DescribeReservedCacheNodesOfferingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReservedCacheNodesOfferingsResponse] -> ShowS
$cshowList :: [DescribeReservedCacheNodesOfferingsResponse] -> ShowS
show :: DescribeReservedCacheNodesOfferingsResponse -> String
$cshow :: DescribeReservedCacheNodesOfferingsResponse -> String
showsPrec :: Int -> DescribeReservedCacheNodesOfferingsResponse -> ShowS
$cshowsPrec :: Int -> DescribeReservedCacheNodesOfferingsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeReservedCacheNodesOfferingsResponse
 -> Rep DescribeReservedCacheNodesOfferingsResponse x)
-> (forall x.
    Rep DescribeReservedCacheNodesOfferingsResponse x
    -> DescribeReservedCacheNodesOfferingsResponse)
-> Generic DescribeReservedCacheNodesOfferingsResponse
forall x.
Rep DescribeReservedCacheNodesOfferingsResponse x
-> DescribeReservedCacheNodesOfferingsResponse
forall x.
DescribeReservedCacheNodesOfferingsResponse
-> Rep DescribeReservedCacheNodesOfferingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReservedCacheNodesOfferingsResponse x
-> DescribeReservedCacheNodesOfferingsResponse
$cfrom :: forall x.
DescribeReservedCacheNodesOfferingsResponse
-> Rep DescribeReservedCacheNodesOfferingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeReservedCacheNodesOfferingsResponse' 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', 'describeReservedCacheNodesOfferingsResponse_marker' - Provides an identifier to allow retrieval of paginated results.
--
-- 'reservedCacheNodesOfferings', 'describeReservedCacheNodesOfferingsResponse_reservedCacheNodesOfferings' - A list of reserved cache node offerings. Each element in the list
-- contains detailed information about one offering.
--
-- 'httpStatus', 'describeReservedCacheNodesOfferingsResponse_httpStatus' - The response's http status code.
newDescribeReservedCacheNodesOfferingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeReservedCacheNodesOfferingsResponse
newDescribeReservedCacheNodesOfferingsResponse :: Int -> DescribeReservedCacheNodesOfferingsResponse
newDescribeReservedCacheNodesOfferingsResponse
  Int
pHttpStatus_ =
    DescribeReservedCacheNodesOfferingsResponse' :: Maybe Text
-> Maybe [ReservedCacheNodesOffering]
-> Int
-> DescribeReservedCacheNodesOfferingsResponse
DescribeReservedCacheNodesOfferingsResponse'
      { $sel:marker:DescribeReservedCacheNodesOfferingsResponse' :: Maybe Text
marker =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:reservedCacheNodesOfferings:DescribeReservedCacheNodesOfferingsResponse' :: Maybe [ReservedCacheNodesOffering]
reservedCacheNodesOfferings =
          Maybe [ReservedCacheNodesOffering]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeReservedCacheNodesOfferingsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Provides an identifier to allow retrieval of paginated results.
describeReservedCacheNodesOfferingsResponse_marker :: Lens.Lens' DescribeReservedCacheNodesOfferingsResponse (Prelude.Maybe Prelude.Text)
describeReservedCacheNodesOfferingsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodesOfferingsResponse
-> f DescribeReservedCacheNodesOfferingsResponse
describeReservedCacheNodesOfferingsResponse_marker = (DescribeReservedCacheNodesOfferingsResponse -> Maybe Text)
-> (DescribeReservedCacheNodesOfferingsResponse
    -> Maybe Text -> DescribeReservedCacheNodesOfferingsResponse)
-> Lens' DescribeReservedCacheNodesOfferingsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferingsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeReservedCacheNodesOfferingsResponse' :: DescribeReservedCacheNodesOfferingsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeReservedCacheNodesOfferingsResponse
s@DescribeReservedCacheNodesOfferingsResponse' {} Maybe Text
a -> DescribeReservedCacheNodesOfferingsResponse
s {$sel:marker:DescribeReservedCacheNodesOfferingsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeReservedCacheNodesOfferingsResponse)

-- | A list of reserved cache node offerings. Each element in the list
-- contains detailed information about one offering.
describeReservedCacheNodesOfferingsResponse_reservedCacheNodesOfferings :: Lens.Lens' DescribeReservedCacheNodesOfferingsResponse (Prelude.Maybe [ReservedCacheNodesOffering])
describeReservedCacheNodesOfferingsResponse_reservedCacheNodesOfferings :: (Maybe [ReservedCacheNodesOffering]
 -> f (Maybe [ReservedCacheNodesOffering]))
-> DescribeReservedCacheNodesOfferingsResponse
-> f DescribeReservedCacheNodesOfferingsResponse
describeReservedCacheNodesOfferingsResponse_reservedCacheNodesOfferings = (DescribeReservedCacheNodesOfferingsResponse
 -> Maybe [ReservedCacheNodesOffering])
-> (DescribeReservedCacheNodesOfferingsResponse
    -> Maybe [ReservedCacheNodesOffering]
    -> DescribeReservedCacheNodesOfferingsResponse)
-> Lens'
     DescribeReservedCacheNodesOfferingsResponse
     (Maybe [ReservedCacheNodesOffering])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferingsResponse' {Maybe [ReservedCacheNodesOffering]
reservedCacheNodesOfferings :: Maybe [ReservedCacheNodesOffering]
$sel:reservedCacheNodesOfferings:DescribeReservedCacheNodesOfferingsResponse' :: DescribeReservedCacheNodesOfferingsResponse
-> Maybe [ReservedCacheNodesOffering]
reservedCacheNodesOfferings} -> Maybe [ReservedCacheNodesOffering]
reservedCacheNodesOfferings) (\s :: DescribeReservedCacheNodesOfferingsResponse
s@DescribeReservedCacheNodesOfferingsResponse' {} Maybe [ReservedCacheNodesOffering]
a -> DescribeReservedCacheNodesOfferingsResponse
s {$sel:reservedCacheNodesOfferings:DescribeReservedCacheNodesOfferingsResponse' :: Maybe [ReservedCacheNodesOffering]
reservedCacheNodesOfferings = Maybe [ReservedCacheNodesOffering]
a} :: DescribeReservedCacheNodesOfferingsResponse) ((Maybe [ReservedCacheNodesOffering]
  -> f (Maybe [ReservedCacheNodesOffering]))
 -> DescribeReservedCacheNodesOfferingsResponse
 -> f DescribeReservedCacheNodesOfferingsResponse)
-> ((Maybe [ReservedCacheNodesOffering]
     -> f (Maybe [ReservedCacheNodesOffering]))
    -> Maybe [ReservedCacheNodesOffering]
    -> f (Maybe [ReservedCacheNodesOffering]))
-> (Maybe [ReservedCacheNodesOffering]
    -> f (Maybe [ReservedCacheNodesOffering]))
-> DescribeReservedCacheNodesOfferingsResponse
-> f DescribeReservedCacheNodesOfferingsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ReservedCacheNodesOffering]
  [ReservedCacheNodesOffering]
  [ReservedCacheNodesOffering]
  [ReservedCacheNodesOffering]
-> Iso
     (Maybe [ReservedCacheNodesOffering])
     (Maybe [ReservedCacheNodesOffering])
     (Maybe [ReservedCacheNodesOffering])
     (Maybe [ReservedCacheNodesOffering])
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
  [ReservedCacheNodesOffering]
  [ReservedCacheNodesOffering]
  [ReservedCacheNodesOffering]
  [ReservedCacheNodesOffering]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeReservedCacheNodesOfferingsResponse