{-# 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.DescribeReservedCacheNodes
-- 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)
--
-- Returns information about reserved cache nodes for this account, or
-- about a specified reserved cache node.
--
-- This operation returns paginated results.
module Amazonka.ElastiCache.DescribeReservedCacheNodes
  ( -- * Creating a Request
    DescribeReservedCacheNodes (..),
    newDescribeReservedCacheNodes,

    -- * Request Lenses
    describeReservedCacheNodes_cacheNodeType,
    describeReservedCacheNodes_productDescription,
    describeReservedCacheNodes_marker,
    describeReservedCacheNodes_maxRecords,
    describeReservedCacheNodes_reservedCacheNodeId,
    describeReservedCacheNodes_offeringType,
    describeReservedCacheNodes_duration,
    describeReservedCacheNodes_reservedCacheNodesOfferingId,

    -- * Destructuring the Response
    DescribeReservedCacheNodesResponse (..),
    newDescribeReservedCacheNodesResponse,

    -- * Response Lenses
    describeReservedCacheNodesResponse_marker,
    describeReservedCacheNodesResponse_reservedCacheNodes,
    describeReservedCacheNodesResponse_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 @DescribeReservedCacheNodes@ operation.
--
-- /See:/ 'newDescribeReservedCacheNodes' smart constructor.
data DescribeReservedCacheNodes = DescribeReservedCacheNodes'
  { -- | The cache node type filter value. Use this parameter to show only those
    -- reservations 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.
    DescribeReservedCacheNodes -> Maybe Text
cacheNodeType :: Prelude.Maybe Prelude.Text,
    -- | The product description filter value. Use this parameter to show only
    -- those reservations matching the specified product description.
    DescribeReservedCacheNodes -> 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@.
    DescribeReservedCacheNodes -> 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.
    DescribeReservedCacheNodes -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | The reserved cache node identifier filter value. Use this parameter to
    -- show only the reservation that matches the specified reservation ID.
    DescribeReservedCacheNodes -> Maybe Text
reservedCacheNodeId :: Prelude.Maybe Prelude.Text,
    -- | 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\"@
    DescribeReservedCacheNodes -> Maybe Text
offeringType :: Prelude.Maybe Prelude.Text,
    -- | The duration filter value, specified in years or seconds. Use this
    -- parameter to show only reservations for this duration.
    --
    -- Valid Values: @1 | 3 | 31536000 | 94608000@
    DescribeReservedCacheNodes -> Maybe Text
duration :: Prelude.Maybe Prelude.Text,
    -- | The offering identifier filter value. Use this parameter to show only
    -- purchased reservations matching the specified offering identifier.
    DescribeReservedCacheNodes -> Maybe Text
reservedCacheNodesOfferingId :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeReservedCacheNodes -> DescribeReservedCacheNodes -> Bool
(DescribeReservedCacheNodes -> DescribeReservedCacheNodes -> Bool)
-> (DescribeReservedCacheNodes
    -> DescribeReservedCacheNodes -> Bool)
-> Eq DescribeReservedCacheNodes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReservedCacheNodes -> DescribeReservedCacheNodes -> Bool
$c/= :: DescribeReservedCacheNodes -> DescribeReservedCacheNodes -> Bool
== :: DescribeReservedCacheNodes -> DescribeReservedCacheNodes -> Bool
$c== :: DescribeReservedCacheNodes -> DescribeReservedCacheNodes -> Bool
Prelude.Eq, ReadPrec [DescribeReservedCacheNodes]
ReadPrec DescribeReservedCacheNodes
Int -> ReadS DescribeReservedCacheNodes
ReadS [DescribeReservedCacheNodes]
(Int -> ReadS DescribeReservedCacheNodes)
-> ReadS [DescribeReservedCacheNodes]
-> ReadPrec DescribeReservedCacheNodes
-> ReadPrec [DescribeReservedCacheNodes]
-> Read DescribeReservedCacheNodes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReservedCacheNodes]
$creadListPrec :: ReadPrec [DescribeReservedCacheNodes]
readPrec :: ReadPrec DescribeReservedCacheNodes
$creadPrec :: ReadPrec DescribeReservedCacheNodes
readList :: ReadS [DescribeReservedCacheNodes]
$creadList :: ReadS [DescribeReservedCacheNodes]
readsPrec :: Int -> ReadS DescribeReservedCacheNodes
$creadsPrec :: Int -> ReadS DescribeReservedCacheNodes
Prelude.Read, Int -> DescribeReservedCacheNodes -> ShowS
[DescribeReservedCacheNodes] -> ShowS
DescribeReservedCacheNodes -> String
(Int -> DescribeReservedCacheNodes -> ShowS)
-> (DescribeReservedCacheNodes -> String)
-> ([DescribeReservedCacheNodes] -> ShowS)
-> Show DescribeReservedCacheNodes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReservedCacheNodes] -> ShowS
$cshowList :: [DescribeReservedCacheNodes] -> ShowS
show :: DescribeReservedCacheNodes -> String
$cshow :: DescribeReservedCacheNodes -> String
showsPrec :: Int -> DescribeReservedCacheNodes -> ShowS
$cshowsPrec :: Int -> DescribeReservedCacheNodes -> ShowS
Prelude.Show, (forall x.
 DescribeReservedCacheNodes -> Rep DescribeReservedCacheNodes x)
-> (forall x.
    Rep DescribeReservedCacheNodes x -> DescribeReservedCacheNodes)
-> Generic DescribeReservedCacheNodes
forall x.
Rep DescribeReservedCacheNodes x -> DescribeReservedCacheNodes
forall x.
DescribeReservedCacheNodes -> Rep DescribeReservedCacheNodes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReservedCacheNodes x -> DescribeReservedCacheNodes
$cfrom :: forall x.
DescribeReservedCacheNodes -> Rep DescribeReservedCacheNodes x
Prelude.Generic)

-- |
-- Create a value of 'DescribeReservedCacheNodes' 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', 'describeReservedCacheNodes_cacheNodeType' - The cache node type filter value. Use this parameter to show only those
-- reservations 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', 'describeReservedCacheNodes_productDescription' - The product description filter value. Use this parameter to show only
-- those reservations matching the specified product description.
--
-- 'marker', 'describeReservedCacheNodes_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', 'describeReservedCacheNodes_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.
--
-- 'reservedCacheNodeId', 'describeReservedCacheNodes_reservedCacheNodeId' - The reserved cache node identifier filter value. Use this parameter to
-- show only the reservation that matches the specified reservation ID.
--
-- 'offeringType', 'describeReservedCacheNodes_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', 'describeReservedCacheNodes_duration' - The duration filter value, specified in years or seconds. Use this
-- parameter to show only reservations for this duration.
--
-- Valid Values: @1 | 3 | 31536000 | 94608000@
--
-- 'reservedCacheNodesOfferingId', 'describeReservedCacheNodes_reservedCacheNodesOfferingId' - The offering identifier filter value. Use this parameter to show only
-- purchased reservations matching the specified offering identifier.
newDescribeReservedCacheNodes ::
  DescribeReservedCacheNodes
newDescribeReservedCacheNodes :: DescribeReservedCacheNodes
newDescribeReservedCacheNodes =
  DescribeReservedCacheNodes' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DescribeReservedCacheNodes
DescribeReservedCacheNodes'
    { $sel:cacheNodeType:DescribeReservedCacheNodes' :: Maybe Text
cacheNodeType =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:productDescription:DescribeReservedCacheNodes' :: Maybe Text
productDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeReservedCacheNodes' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeReservedCacheNodes' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:reservedCacheNodeId:DescribeReservedCacheNodes' :: Maybe Text
reservedCacheNodeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:offeringType:DescribeReservedCacheNodes' :: Maybe Text
offeringType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:duration:DescribeReservedCacheNodes' :: Maybe Text
duration = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodes' :: Maybe Text
reservedCacheNodesOfferingId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The cache node type filter value. Use this parameter to show only those
-- reservations 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.
describeReservedCacheNodes_cacheNodeType :: Lens.Lens' DescribeReservedCacheNodes (Prelude.Maybe Prelude.Text)
describeReservedCacheNodes_cacheNodeType :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodes -> f DescribeReservedCacheNodes
describeReservedCacheNodes_cacheNodeType = (DescribeReservedCacheNodes -> Maybe Text)
-> (DescribeReservedCacheNodes
    -> Maybe Text -> DescribeReservedCacheNodes)
-> Lens
     DescribeReservedCacheNodes
     DescribeReservedCacheNodes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodes' {Maybe Text
cacheNodeType :: Maybe Text
$sel:cacheNodeType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
cacheNodeType} -> Maybe Text
cacheNodeType) (\s :: DescribeReservedCacheNodes
s@DescribeReservedCacheNodes' {} Maybe Text
a -> DescribeReservedCacheNodes
s {$sel:cacheNodeType:DescribeReservedCacheNodes' :: Maybe Text
cacheNodeType = Maybe Text
a} :: DescribeReservedCacheNodes)

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

-- | 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@.
describeReservedCacheNodes_marker :: Lens.Lens' DescribeReservedCacheNodes (Prelude.Maybe Prelude.Text)
describeReservedCacheNodes_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodes -> f DescribeReservedCacheNodes
describeReservedCacheNodes_marker = (DescribeReservedCacheNodes -> Maybe Text)
-> (DescribeReservedCacheNodes
    -> Maybe Text -> DescribeReservedCacheNodes)
-> Lens
     DescribeReservedCacheNodes
     DescribeReservedCacheNodes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodes' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeReservedCacheNodes
s@DescribeReservedCacheNodes' {} Maybe Text
a -> DescribeReservedCacheNodes
s {$sel:marker:DescribeReservedCacheNodes' :: Maybe Text
marker = Maybe Text
a} :: DescribeReservedCacheNodes)

-- | 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.
describeReservedCacheNodes_maxRecords :: Lens.Lens' DescribeReservedCacheNodes (Prelude.Maybe Prelude.Int)
describeReservedCacheNodes_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeReservedCacheNodes -> f DescribeReservedCacheNodes
describeReservedCacheNodes_maxRecords = (DescribeReservedCacheNodes -> Maybe Int)
-> (DescribeReservedCacheNodes
    -> Maybe Int -> DescribeReservedCacheNodes)
-> Lens
     DescribeReservedCacheNodes
     DescribeReservedCacheNodes
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodes' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeReservedCacheNodes
s@DescribeReservedCacheNodes' {} Maybe Int
a -> DescribeReservedCacheNodes
s {$sel:maxRecords:DescribeReservedCacheNodes' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeReservedCacheNodes)

-- | The reserved cache node identifier filter value. Use this parameter to
-- show only the reservation that matches the specified reservation ID.
describeReservedCacheNodes_reservedCacheNodeId :: Lens.Lens' DescribeReservedCacheNodes (Prelude.Maybe Prelude.Text)
describeReservedCacheNodes_reservedCacheNodeId :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodes -> f DescribeReservedCacheNodes
describeReservedCacheNodes_reservedCacheNodeId = (DescribeReservedCacheNodes -> Maybe Text)
-> (DescribeReservedCacheNodes
    -> Maybe Text -> DescribeReservedCacheNodes)
-> Lens
     DescribeReservedCacheNodes
     DescribeReservedCacheNodes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodes' {Maybe Text
reservedCacheNodeId :: Maybe Text
$sel:reservedCacheNodeId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
reservedCacheNodeId} -> Maybe Text
reservedCacheNodeId) (\s :: DescribeReservedCacheNodes
s@DescribeReservedCacheNodes' {} Maybe Text
a -> DescribeReservedCacheNodes
s {$sel:reservedCacheNodeId:DescribeReservedCacheNodes' :: Maybe Text
reservedCacheNodeId = Maybe Text
a} :: DescribeReservedCacheNodes)

-- | 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\"@
describeReservedCacheNodes_offeringType :: Lens.Lens' DescribeReservedCacheNodes (Prelude.Maybe Prelude.Text)
describeReservedCacheNodes_offeringType :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodes -> f DescribeReservedCacheNodes
describeReservedCacheNodes_offeringType = (DescribeReservedCacheNodes -> Maybe Text)
-> (DescribeReservedCacheNodes
    -> Maybe Text -> DescribeReservedCacheNodes)
-> Lens
     DescribeReservedCacheNodes
     DescribeReservedCacheNodes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodes' {Maybe Text
offeringType :: Maybe Text
$sel:offeringType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
offeringType} -> Maybe Text
offeringType) (\s :: DescribeReservedCacheNodes
s@DescribeReservedCacheNodes' {} Maybe Text
a -> DescribeReservedCacheNodes
s {$sel:offeringType:DescribeReservedCacheNodes' :: Maybe Text
offeringType = Maybe Text
a} :: DescribeReservedCacheNodes)

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

-- | The offering identifier filter value. Use this parameter to show only
-- purchased reservations matching the specified offering identifier.
describeReservedCacheNodes_reservedCacheNodesOfferingId :: Lens.Lens' DescribeReservedCacheNodes (Prelude.Maybe Prelude.Text)
describeReservedCacheNodes_reservedCacheNodesOfferingId :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodes -> f DescribeReservedCacheNodes
describeReservedCacheNodes_reservedCacheNodesOfferingId = (DescribeReservedCacheNodes -> Maybe Text)
-> (DescribeReservedCacheNodes
    -> Maybe Text -> DescribeReservedCacheNodes)
-> Lens
     DescribeReservedCacheNodes
     DescribeReservedCacheNodes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodes' {Maybe Text
reservedCacheNodesOfferingId :: Maybe Text
$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
reservedCacheNodesOfferingId} -> Maybe Text
reservedCacheNodesOfferingId) (\s :: DescribeReservedCacheNodes
s@DescribeReservedCacheNodes' {} Maybe Text
a -> DescribeReservedCacheNodes
s {$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodes' :: Maybe Text
reservedCacheNodesOfferingId = Maybe Text
a} :: DescribeReservedCacheNodes)

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

instance Prelude.NFData DescribeReservedCacheNodes

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

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

instance Core.ToQuery DescribeReservedCacheNodes where
  toQuery :: DescribeReservedCacheNodes -> QueryString
toQuery DescribeReservedCacheNodes' {Maybe Int
Maybe Text
reservedCacheNodesOfferingId :: Maybe Text
duration :: Maybe Text
offeringType :: Maybe Text
reservedCacheNodeId :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
productDescription :: Maybe Text
cacheNodeType :: Maybe Text
$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:duration:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:offeringType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:reservedCacheNodeId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:maxRecords:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Int
$sel:marker:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:productDescription:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:cacheNodeType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> 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
"DescribeReservedCacheNodes" :: 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
"ReservedCacheNodeId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
reservedCacheNodeId,
        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 @DescribeReservedCacheNodes@ operation.
--
-- /See:/ 'newDescribeReservedCacheNodesResponse' smart constructor.
data DescribeReservedCacheNodesResponse = DescribeReservedCacheNodesResponse'
  { -- | Provides an identifier to allow retrieval of paginated results.
    DescribeReservedCacheNodesResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | A list of reserved cache nodes. Each element in the list contains
    -- detailed information about one node.
    DescribeReservedCacheNodesResponse -> Maybe [ReservedCacheNode]
reservedCacheNodes :: Prelude.Maybe [ReservedCacheNode],
    -- | The response's http status code.
    DescribeReservedCacheNodesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeReservedCacheNodesResponse
-> DescribeReservedCacheNodesResponse -> Bool
(DescribeReservedCacheNodesResponse
 -> DescribeReservedCacheNodesResponse -> Bool)
-> (DescribeReservedCacheNodesResponse
    -> DescribeReservedCacheNodesResponse -> Bool)
-> Eq DescribeReservedCacheNodesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReservedCacheNodesResponse
-> DescribeReservedCacheNodesResponse -> Bool
$c/= :: DescribeReservedCacheNodesResponse
-> DescribeReservedCacheNodesResponse -> Bool
== :: DescribeReservedCacheNodesResponse
-> DescribeReservedCacheNodesResponse -> Bool
$c== :: DescribeReservedCacheNodesResponse
-> DescribeReservedCacheNodesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeReservedCacheNodesResponse]
ReadPrec DescribeReservedCacheNodesResponse
Int -> ReadS DescribeReservedCacheNodesResponse
ReadS [DescribeReservedCacheNodesResponse]
(Int -> ReadS DescribeReservedCacheNodesResponse)
-> ReadS [DescribeReservedCacheNodesResponse]
-> ReadPrec DescribeReservedCacheNodesResponse
-> ReadPrec [DescribeReservedCacheNodesResponse]
-> Read DescribeReservedCacheNodesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReservedCacheNodesResponse]
$creadListPrec :: ReadPrec [DescribeReservedCacheNodesResponse]
readPrec :: ReadPrec DescribeReservedCacheNodesResponse
$creadPrec :: ReadPrec DescribeReservedCacheNodesResponse
readList :: ReadS [DescribeReservedCacheNodesResponse]
$creadList :: ReadS [DescribeReservedCacheNodesResponse]
readsPrec :: Int -> ReadS DescribeReservedCacheNodesResponse
$creadsPrec :: Int -> ReadS DescribeReservedCacheNodesResponse
Prelude.Read, Int -> DescribeReservedCacheNodesResponse -> ShowS
[DescribeReservedCacheNodesResponse] -> ShowS
DescribeReservedCacheNodesResponse -> String
(Int -> DescribeReservedCacheNodesResponse -> ShowS)
-> (DescribeReservedCacheNodesResponse -> String)
-> ([DescribeReservedCacheNodesResponse] -> ShowS)
-> Show DescribeReservedCacheNodesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReservedCacheNodesResponse] -> ShowS
$cshowList :: [DescribeReservedCacheNodesResponse] -> ShowS
show :: DescribeReservedCacheNodesResponse -> String
$cshow :: DescribeReservedCacheNodesResponse -> String
showsPrec :: Int -> DescribeReservedCacheNodesResponse -> ShowS
$cshowsPrec :: Int -> DescribeReservedCacheNodesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeReservedCacheNodesResponse
 -> Rep DescribeReservedCacheNodesResponse x)
-> (forall x.
    Rep DescribeReservedCacheNodesResponse x
    -> DescribeReservedCacheNodesResponse)
-> Generic DescribeReservedCacheNodesResponse
forall x.
Rep DescribeReservedCacheNodesResponse x
-> DescribeReservedCacheNodesResponse
forall x.
DescribeReservedCacheNodesResponse
-> Rep DescribeReservedCacheNodesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReservedCacheNodesResponse x
-> DescribeReservedCacheNodesResponse
$cfrom :: forall x.
DescribeReservedCacheNodesResponse
-> Rep DescribeReservedCacheNodesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeReservedCacheNodesResponse' 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', 'describeReservedCacheNodesResponse_marker' - Provides an identifier to allow retrieval of paginated results.
--
-- 'reservedCacheNodes', 'describeReservedCacheNodesResponse_reservedCacheNodes' - A list of reserved cache nodes. Each element in the list contains
-- detailed information about one node.
--
-- 'httpStatus', 'describeReservedCacheNodesResponse_httpStatus' - The response's http status code.
newDescribeReservedCacheNodesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeReservedCacheNodesResponse
newDescribeReservedCacheNodesResponse :: Int -> DescribeReservedCacheNodesResponse
newDescribeReservedCacheNodesResponse Int
pHttpStatus_ =
  DescribeReservedCacheNodesResponse' :: Maybe Text
-> Maybe [ReservedCacheNode]
-> Int
-> DescribeReservedCacheNodesResponse
DescribeReservedCacheNodesResponse'
    { $sel:marker:DescribeReservedCacheNodesResponse' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:reservedCacheNodes:DescribeReservedCacheNodesResponse' :: Maybe [ReservedCacheNode]
reservedCacheNodes = Maybe [ReservedCacheNode]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeReservedCacheNodesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

instance
  Prelude.NFData
    DescribeReservedCacheNodesResponse