{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_duration,
    describeReservedCacheNodes_marker,
    describeReservedCacheNodes_maxRecords,
    describeReservedCacheNodes_offeringType,
    describeReservedCacheNodes_productDescription,
    describeReservedCacheNodes_reservedCacheNodeId,
    describeReservedCacheNodes_reservedCacheNodesOfferingId,

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

    -- * Response Lenses
    describeReservedCacheNodesResponse_marker,
    describeReservedCacheNodesResponse_reservedCacheNodes,
    describeReservedCacheNodesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElastiCache.Types
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@
    --
    --         __T4g node types__ (available only for Redis engine version
    --         5.0.6 onward and Memcached engine version 1.5.16 onward):
    --         @cache.t4g.micro@, @cache.t4g.small@, @cache.t4g.medium@
    --
    --         __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. Existing clusters are
    --         still supported but creation of new clusters is not supported
    --         for these types.)
    --
    --         __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. Existing clusters are
    --         still supported but creation of new clusters is not supported
    --         for these types.)
    --
    --         __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. Existing clusters are
    --         still supported but creation of new clusters is not supported
    --         for these types.)
    --
    --         __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 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,
    -- | 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 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 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,
    -- | 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 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
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]
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
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.
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@
--
--         __T4g node types__ (available only for Redis engine version
--         5.0.6 onward and Memcached engine version 1.5.16 onward):
--         @cache.t4g.micro@, @cache.t4g.small@, @cache.t4g.medium@
--
--         __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. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __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. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __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. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __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.
--
-- '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@
--
-- '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.
--
-- '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\"@
--
-- 'productDescription', 'describeReservedCacheNodes_productDescription' - The product description filter value. Use this parameter to show only
-- those reservations matching the specified product description.
--
-- 'reservedCacheNodeId', 'describeReservedCacheNodes_reservedCacheNodeId' - The reserved cache node identifier filter value. Use this parameter to
-- show only the reservation that matches the specified reservation ID.
--
-- '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'
    { $sel:cacheNodeType:DescribeReservedCacheNodes' :: Maybe Text
cacheNodeType =
        forall a. Maybe a
Prelude.Nothing,
      $sel:duration:DescribeReservedCacheNodes' :: Maybe Text
duration = forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeReservedCacheNodes' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeReservedCacheNodes' :: Maybe Int
maxRecords = forall a. Maybe a
Prelude.Nothing,
      $sel:offeringType:DescribeReservedCacheNodes' :: Maybe Text
offeringType = forall a. Maybe a
Prelude.Nothing,
      $sel:productDescription:DescribeReservedCacheNodes' :: Maybe Text
productDescription = forall a. Maybe a
Prelude.Nothing,
      $sel:reservedCacheNodeId:DescribeReservedCacheNodes' :: Maybe Text
reservedCacheNodeId = forall a. Maybe a
Prelude.Nothing,
      $sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodes' :: Maybe Text
reservedCacheNodesOfferingId = 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@
--
--         __T4g node types__ (available only for Redis engine version
--         5.0.6 onward and Memcached engine version 1.5.16 onward):
--         @cache.t4g.micro@, @cache.t4g.small@, @cache.t4g.medium@
--
--         __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. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __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. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __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. Existing clusters are
--         still supported but creation of new clusters is not supported
--         for these types.)
--
--         __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 :: Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_cacheNodeType = 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 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 :: Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_duration = 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)

-- | 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 :: Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_marker = 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 :: Lens' DescribeReservedCacheNodes (Maybe Int)
describeReservedCacheNodes_maxRecords = 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 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 :: Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_offeringType = 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 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 :: Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_productDescription = 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)

-- | 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 :: Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_reservedCacheNodeId = 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 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 :: Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_reservedCacheNodesOfferingId = 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
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeReservedCacheNodes
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeReservedCacheNodesResponse (Maybe Text)
describeReservedCacheNodesResponse_marker
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeReservedCacheNodes
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeReservedCacheNodesResponse (Maybe [ReservedCacheNode])
describeReservedCacheNodesResponse_reservedCacheNodes
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeReservedCacheNodes
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeReservedCacheNodes
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeReservedCacheNodesResponse (Maybe Text)
describeReservedCacheNodesResponse_marker
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeReservedCacheNodes where
  type
    AWSResponse DescribeReservedCacheNodes =
      DescribeReservedCacheNodesResponse
  request :: (Service -> Service)
-> DescribeReservedCacheNodes -> Request DescribeReservedCacheNodes
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeReservedCacheNodes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeReservedCacheNodes)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> 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'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Marker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ReservedCacheNodes"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"ReservedCacheNode")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeReservedCacheNodes where
  hashWithSalt :: Int -> DescribeReservedCacheNodes -> Int
hashWithSalt Int
_salt DescribeReservedCacheNodes' {Maybe Int
Maybe Text
reservedCacheNodesOfferingId :: Maybe Text
reservedCacheNodeId :: Maybe Text
productDescription :: Maybe Text
offeringType :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
duration :: Maybe Text
cacheNodeType :: Maybe Text
$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:reservedCacheNodeId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:productDescription:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:offeringType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:maxRecords:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Int
$sel:marker:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:duration:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:cacheNodeType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cacheNodeType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
duration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxRecords
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
offeringType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
productDescription
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reservedCacheNodeId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reservedCacheNodesOfferingId

instance Prelude.NFData DescribeReservedCacheNodes where
  rnf :: DescribeReservedCacheNodes -> ()
rnf DescribeReservedCacheNodes' {Maybe Int
Maybe Text
reservedCacheNodesOfferingId :: Maybe Text
reservedCacheNodeId :: Maybe Text
productDescription :: Maybe Text
offeringType :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
duration :: Maybe Text
cacheNodeType :: Maybe Text
$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:reservedCacheNodeId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:productDescription:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:offeringType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:maxRecords:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Int
$sel:marker:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:duration:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:cacheNodeType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cacheNodeType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
duration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxRecords
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
offeringType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
productDescription
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reservedCacheNodeId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reservedCacheNodesOfferingId

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

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

instance Data.ToQuery DescribeReservedCacheNodes where
  toQuery :: DescribeReservedCacheNodes -> QueryString
toQuery DescribeReservedCacheNodes' {Maybe Int
Maybe Text
reservedCacheNodesOfferingId :: Maybe Text
reservedCacheNodeId :: Maybe Text
productDescription :: Maybe Text
offeringType :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
duration :: Maybe Text
cacheNodeType :: Maybe Text
$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:reservedCacheNodeId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:productDescription:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:offeringType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:maxRecords:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Int
$sel:marker:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:duration:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:cacheNodeType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeReservedCacheNodes" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"CacheNodeType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
cacheNodeType,
        ByteString
"Duration" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
duration,
        ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
        ByteString
"MaxRecords" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxRecords,
        ByteString
"OfferingType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
offeringType,
        ByteString
"ProductDescription" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
productDescription,
        ByteString
"ReservedCacheNodeId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
reservedCacheNodeId,
        ByteString
"ReservedCacheNodesOfferingId"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: 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
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]
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
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.
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'
    { $sel:marker:DescribeReservedCacheNodesResponse' :: Maybe Text
marker =
        forall a. Maybe a
Prelude.Nothing,
      $sel:reservedCacheNodes:DescribeReservedCacheNodesResponse' :: Maybe [ReservedCacheNode]
reservedCacheNodes = 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 :: Lens' DescribeReservedCacheNodesResponse (Maybe Text)
describeReservedCacheNodesResponse_marker = 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 :: Lens'
  DescribeReservedCacheNodesResponse (Maybe [ReservedCacheNode])
describeReservedCacheNodesResponse_reservedCacheNodes = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
describeReservedCacheNodesResponse_httpStatus :: Lens.Lens' DescribeReservedCacheNodesResponse Prelude.Int
describeReservedCacheNodesResponse_httpStatus :: Lens' DescribeReservedCacheNodesResponse Int
describeReservedCacheNodesResponse_httpStatus = 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
  where
  rnf :: DescribeReservedCacheNodesResponse -> ()
rnf DescribeReservedCacheNodesResponse' {Int
Maybe [ReservedCacheNode]
Maybe Text
httpStatus :: Int
reservedCacheNodes :: Maybe [ReservedCacheNode]
marker :: Maybe Text
$sel:httpStatus:DescribeReservedCacheNodesResponse' :: DescribeReservedCacheNodesResponse -> Int
$sel:reservedCacheNodes:DescribeReservedCacheNodesResponse' :: DescribeReservedCacheNodesResponse -> Maybe [ReservedCacheNode]
$sel:marker:DescribeReservedCacheNodesResponse' :: DescribeReservedCacheNodesResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ReservedCacheNode]
reservedCacheNodes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus