{-# 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.DescribeEngineDefaultParameters
-- 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 the default engine and system parameter information for the
-- specified cache engine.
--
-- This operation returns paginated results.
module Amazonka.ElastiCache.DescribeEngineDefaultParameters
  ( -- * Creating a Request
    DescribeEngineDefaultParameters (..),
    newDescribeEngineDefaultParameters,

    -- * Request Lenses
    describeEngineDefaultParameters_marker,
    describeEngineDefaultParameters_maxRecords,
    describeEngineDefaultParameters_cacheParameterGroupFamily,

    -- * Destructuring the Response
    DescribeEngineDefaultParametersResponse (..),
    newDescribeEngineDefaultParametersResponse,

    -- * Response Lenses
    describeEngineDefaultParametersResponse_httpStatus,
    describeEngineDefaultParametersResponse_engineDefaults,
  )
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 @DescribeEngineDefaultParameters@ operation.
--
-- /See:/ 'newDescribeEngineDefaultParameters' smart constructor.
data DescribeEngineDefaultParameters = DescribeEngineDefaultParameters'
  { -- | 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@.
    DescribeEngineDefaultParameters -> 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.
    DescribeEngineDefaultParameters -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | The name of the cache parameter group family.
    --
    -- Valid values are: @memcached1.4@ | @memcached1.5@ | @memcached1.6@ |
    -- @redis2.6@ | @redis2.8@ | @redis3.2@ | @redis4.0@ | @redis5.0@ |
    -- @redis6.x@ |
    DescribeEngineDefaultParameters -> Text
cacheParameterGroupFamily :: Prelude.Text
  }
  deriving (DescribeEngineDefaultParameters
-> DescribeEngineDefaultParameters -> Bool
(DescribeEngineDefaultParameters
 -> DescribeEngineDefaultParameters -> Bool)
-> (DescribeEngineDefaultParameters
    -> DescribeEngineDefaultParameters -> Bool)
-> Eq DescribeEngineDefaultParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEngineDefaultParameters
-> DescribeEngineDefaultParameters -> Bool
$c/= :: DescribeEngineDefaultParameters
-> DescribeEngineDefaultParameters -> Bool
== :: DescribeEngineDefaultParameters
-> DescribeEngineDefaultParameters -> Bool
$c== :: DescribeEngineDefaultParameters
-> DescribeEngineDefaultParameters -> Bool
Prelude.Eq, ReadPrec [DescribeEngineDefaultParameters]
ReadPrec DescribeEngineDefaultParameters
Int -> ReadS DescribeEngineDefaultParameters
ReadS [DescribeEngineDefaultParameters]
(Int -> ReadS DescribeEngineDefaultParameters)
-> ReadS [DescribeEngineDefaultParameters]
-> ReadPrec DescribeEngineDefaultParameters
-> ReadPrec [DescribeEngineDefaultParameters]
-> Read DescribeEngineDefaultParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEngineDefaultParameters]
$creadListPrec :: ReadPrec [DescribeEngineDefaultParameters]
readPrec :: ReadPrec DescribeEngineDefaultParameters
$creadPrec :: ReadPrec DescribeEngineDefaultParameters
readList :: ReadS [DescribeEngineDefaultParameters]
$creadList :: ReadS [DescribeEngineDefaultParameters]
readsPrec :: Int -> ReadS DescribeEngineDefaultParameters
$creadsPrec :: Int -> ReadS DescribeEngineDefaultParameters
Prelude.Read, Int -> DescribeEngineDefaultParameters -> ShowS
[DescribeEngineDefaultParameters] -> ShowS
DescribeEngineDefaultParameters -> String
(Int -> DescribeEngineDefaultParameters -> ShowS)
-> (DescribeEngineDefaultParameters -> String)
-> ([DescribeEngineDefaultParameters] -> ShowS)
-> Show DescribeEngineDefaultParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEngineDefaultParameters] -> ShowS
$cshowList :: [DescribeEngineDefaultParameters] -> ShowS
show :: DescribeEngineDefaultParameters -> String
$cshow :: DescribeEngineDefaultParameters -> String
showsPrec :: Int -> DescribeEngineDefaultParameters -> ShowS
$cshowsPrec :: Int -> DescribeEngineDefaultParameters -> ShowS
Prelude.Show, (forall x.
 DescribeEngineDefaultParameters
 -> Rep DescribeEngineDefaultParameters x)
-> (forall x.
    Rep DescribeEngineDefaultParameters x
    -> DescribeEngineDefaultParameters)
-> Generic DescribeEngineDefaultParameters
forall x.
Rep DescribeEngineDefaultParameters x
-> DescribeEngineDefaultParameters
forall x.
DescribeEngineDefaultParameters
-> Rep DescribeEngineDefaultParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeEngineDefaultParameters x
-> DescribeEngineDefaultParameters
$cfrom :: forall x.
DescribeEngineDefaultParameters
-> Rep DescribeEngineDefaultParameters x
Prelude.Generic)

-- |
-- Create a value of 'DescribeEngineDefaultParameters' 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', 'describeEngineDefaultParameters_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', 'describeEngineDefaultParameters_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.
--
-- 'cacheParameterGroupFamily', 'describeEngineDefaultParameters_cacheParameterGroupFamily' - The name of the cache parameter group family.
--
-- Valid values are: @memcached1.4@ | @memcached1.5@ | @memcached1.6@ |
-- @redis2.6@ | @redis2.8@ | @redis3.2@ | @redis4.0@ | @redis5.0@ |
-- @redis6.x@ |
newDescribeEngineDefaultParameters ::
  -- | 'cacheParameterGroupFamily'
  Prelude.Text ->
  DescribeEngineDefaultParameters
newDescribeEngineDefaultParameters :: Text -> DescribeEngineDefaultParameters
newDescribeEngineDefaultParameters
  Text
pCacheParameterGroupFamily_ =
    DescribeEngineDefaultParameters' :: Maybe Text -> Maybe Int -> Text -> DescribeEngineDefaultParameters
DescribeEngineDefaultParameters'
      { $sel:marker:DescribeEngineDefaultParameters' :: Maybe Text
marker =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxRecords:DescribeEngineDefaultParameters' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:cacheParameterGroupFamily:DescribeEngineDefaultParameters' :: Text
cacheParameterGroupFamily =
          Text
pCacheParameterGroupFamily_
      }

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

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

-- | The name of the cache parameter group family.
--
-- Valid values are: @memcached1.4@ | @memcached1.5@ | @memcached1.6@ |
-- @redis2.6@ | @redis2.8@ | @redis3.2@ | @redis4.0@ | @redis5.0@ |
-- @redis6.x@ |
describeEngineDefaultParameters_cacheParameterGroupFamily :: Lens.Lens' DescribeEngineDefaultParameters Prelude.Text
describeEngineDefaultParameters_cacheParameterGroupFamily :: (Text -> f Text)
-> DescribeEngineDefaultParameters
-> f DescribeEngineDefaultParameters
describeEngineDefaultParameters_cacheParameterGroupFamily = (DescribeEngineDefaultParameters -> Text)
-> (DescribeEngineDefaultParameters
    -> Text -> DescribeEngineDefaultParameters)
-> Lens
     DescribeEngineDefaultParameters
     DescribeEngineDefaultParameters
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEngineDefaultParameters' {Text
cacheParameterGroupFamily :: Text
$sel:cacheParameterGroupFamily:DescribeEngineDefaultParameters' :: DescribeEngineDefaultParameters -> Text
cacheParameterGroupFamily} -> Text
cacheParameterGroupFamily) (\s :: DescribeEngineDefaultParameters
s@DescribeEngineDefaultParameters' {} Text
a -> DescribeEngineDefaultParameters
s {$sel:cacheParameterGroupFamily:DescribeEngineDefaultParameters' :: Text
cacheParameterGroupFamily = Text
a} :: DescribeEngineDefaultParameters)

instance
  Core.AWSPager
    DescribeEngineDefaultParameters
  where
  page :: DescribeEngineDefaultParameters
-> AWSResponse DescribeEngineDefaultParameters
-> Maybe DescribeEngineDefaultParameters
page DescribeEngineDefaultParameters
rq AWSResponse DescribeEngineDefaultParameters
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeEngineDefaultParameters
DescribeEngineDefaultParametersResponse
rs
            DescribeEngineDefaultParametersResponse
-> Getting
     (First Text) DescribeEngineDefaultParametersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (EngineDefaults -> Const (First Text) EngineDefaults)
-> DescribeEngineDefaultParametersResponse
-> Const (First Text) DescribeEngineDefaultParametersResponse
Lens' DescribeEngineDefaultParametersResponse EngineDefaults
describeEngineDefaultParametersResponse_engineDefaults
              ((EngineDefaults -> Const (First Text) EngineDefaults)
 -> DescribeEngineDefaultParametersResponse
 -> Const (First Text) DescribeEngineDefaultParametersResponse)
-> ((Text -> Const (First Text) Text)
    -> EngineDefaults -> Const (First Text) EngineDefaults)
-> Getting
     (First Text) DescribeEngineDefaultParametersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> Const (First Text) (Maybe Text))
-> EngineDefaults -> Const (First Text) EngineDefaults
Lens' EngineDefaults (Maybe Text)
engineDefaults_marker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> EngineDefaults -> Const (First Text) EngineDefaults)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> (Text -> Const (First Text) Text)
-> EngineDefaults
-> Const (First Text) EngineDefaults
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 DescribeEngineDefaultParameters
forall a. Maybe a
Prelude.Nothing
    | Maybe [Parameter] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeEngineDefaultParameters
DescribeEngineDefaultParametersResponse
rs
            DescribeEngineDefaultParametersResponse
-> Getting
     (First [Parameter])
     DescribeEngineDefaultParametersResponse
     [Parameter]
-> Maybe [Parameter]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (EngineDefaults -> Const (First [Parameter]) EngineDefaults)
-> DescribeEngineDefaultParametersResponse
-> Const
     (First [Parameter]) DescribeEngineDefaultParametersResponse
Lens' DescribeEngineDefaultParametersResponse EngineDefaults
describeEngineDefaultParametersResponse_engineDefaults
              ((EngineDefaults -> Const (First [Parameter]) EngineDefaults)
 -> DescribeEngineDefaultParametersResponse
 -> Const
      (First [Parameter]) DescribeEngineDefaultParametersResponse)
-> (([Parameter] -> Const (First [Parameter]) [Parameter])
    -> EngineDefaults -> Const (First [Parameter]) EngineDefaults)
-> Getting
     (First [Parameter])
     DescribeEngineDefaultParametersResponse
     [Parameter]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe [Parameter]
 -> Const (First [Parameter]) (Maybe [Parameter]))
-> EngineDefaults -> Const (First [Parameter]) EngineDefaults
Lens' EngineDefaults (Maybe [Parameter])
engineDefaults_parameters
              ((Maybe [Parameter]
  -> Const (First [Parameter]) (Maybe [Parameter]))
 -> EngineDefaults -> Const (First [Parameter]) EngineDefaults)
-> (([Parameter] -> Const (First [Parameter]) [Parameter])
    -> Maybe [Parameter]
    -> Const (First [Parameter]) (Maybe [Parameter]))
-> ([Parameter] -> Const (First [Parameter]) [Parameter])
-> EngineDefaults
-> Const (First [Parameter]) EngineDefaults
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Parameter] -> Const (First [Parameter]) [Parameter])
-> Maybe [Parameter]
-> Const (First [Parameter]) (Maybe [Parameter])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeEngineDefaultParameters
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeEngineDefaultParameters
-> Maybe DescribeEngineDefaultParameters
forall a. a -> Maybe a
Prelude.Just (DescribeEngineDefaultParameters
 -> Maybe DescribeEngineDefaultParameters)
-> DescribeEngineDefaultParameters
-> Maybe DescribeEngineDefaultParameters
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeEngineDefaultParameters
rq
          DescribeEngineDefaultParameters
-> (DescribeEngineDefaultParameters
    -> DescribeEngineDefaultParameters)
-> DescribeEngineDefaultParameters
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeEngineDefaultParameters
-> Identity DescribeEngineDefaultParameters
Lens
  DescribeEngineDefaultParameters
  DescribeEngineDefaultParameters
  (Maybe Text)
  (Maybe Text)
describeEngineDefaultParameters_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeEngineDefaultParameters
 -> Identity DescribeEngineDefaultParameters)
-> Maybe Text
-> DescribeEngineDefaultParameters
-> DescribeEngineDefaultParameters
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeEngineDefaultParameters
DescribeEngineDefaultParametersResponse
rs
          DescribeEngineDefaultParametersResponse
-> Getting
     (First Text) DescribeEngineDefaultParametersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (EngineDefaults -> Const (First Text) EngineDefaults)
-> DescribeEngineDefaultParametersResponse
-> Const (First Text) DescribeEngineDefaultParametersResponse
Lens' DescribeEngineDefaultParametersResponse EngineDefaults
describeEngineDefaultParametersResponse_engineDefaults
            ((EngineDefaults -> Const (First Text) EngineDefaults)
 -> DescribeEngineDefaultParametersResponse
 -> Const (First Text) DescribeEngineDefaultParametersResponse)
-> ((Text -> Const (First Text) Text)
    -> EngineDefaults -> Const (First Text) EngineDefaults)
-> Getting
     (First Text) DescribeEngineDefaultParametersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> Const (First Text) (Maybe Text))
-> EngineDefaults -> Const (First Text) EngineDefaults
Lens' EngineDefaults (Maybe Text)
engineDefaults_marker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> EngineDefaults -> Const (First Text) EngineDefaults)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> (Text -> Const (First Text) Text)
-> EngineDefaults
-> Const (First Text) EngineDefaults
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
    DescribeEngineDefaultParameters
  where
  type
    AWSResponse DescribeEngineDefaultParameters =
      DescribeEngineDefaultParametersResponse
  request :: DescribeEngineDefaultParameters
-> Request DescribeEngineDefaultParameters
request = Service
-> DescribeEngineDefaultParameters
-> Request DescribeEngineDefaultParameters
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeEngineDefaultParameters
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeEngineDefaultParameters)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeEngineDefaultParameters))
-> Logger
-> Service
-> Proxy DescribeEngineDefaultParameters
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeEngineDefaultParameters)))
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
"DescribeEngineDefaultParametersResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Int -> EngineDefaults -> DescribeEngineDefaultParametersResponse
DescribeEngineDefaultParametersResponse'
            (Int -> EngineDefaults -> DescribeEngineDefaultParametersResponse)
-> Either String Int
-> Either
     String (EngineDefaults -> DescribeEngineDefaultParametersResponse)
forall (f :: * -> *) a b. Functor 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))
            Either
  String (EngineDefaults -> DescribeEngineDefaultParametersResponse)
-> Either String EngineDefaults
-> Either String DescribeEngineDefaultParametersResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String EngineDefaults
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"EngineDefaults")
      )

instance
  Prelude.Hashable
    DescribeEngineDefaultParameters

instance
  Prelude.NFData
    DescribeEngineDefaultParameters

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

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

instance Core.ToQuery DescribeEngineDefaultParameters where
  toQuery :: DescribeEngineDefaultParameters -> QueryString
toQuery DescribeEngineDefaultParameters' {Maybe Int
Maybe Text
Text
cacheParameterGroupFamily :: Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:cacheParameterGroupFamily:DescribeEngineDefaultParameters' :: DescribeEngineDefaultParameters -> Text
$sel:maxRecords:DescribeEngineDefaultParameters' :: DescribeEngineDefaultParameters -> Maybe Int
$sel:marker:DescribeEngineDefaultParameters' :: DescribeEngineDefaultParameters -> 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
"DescribeEngineDefaultParameters" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        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
"CacheParameterGroupFamily"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
cacheParameterGroupFamily
      ]

-- | /See:/ 'newDescribeEngineDefaultParametersResponse' smart constructor.
data DescribeEngineDefaultParametersResponse = DescribeEngineDefaultParametersResponse'
  { -- | The response's http status code.
    DescribeEngineDefaultParametersResponse -> Int
httpStatus :: Prelude.Int,
    DescribeEngineDefaultParametersResponse -> EngineDefaults
engineDefaults :: EngineDefaults
  }
  deriving (DescribeEngineDefaultParametersResponse
-> DescribeEngineDefaultParametersResponse -> Bool
(DescribeEngineDefaultParametersResponse
 -> DescribeEngineDefaultParametersResponse -> Bool)
-> (DescribeEngineDefaultParametersResponse
    -> DescribeEngineDefaultParametersResponse -> Bool)
-> Eq DescribeEngineDefaultParametersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEngineDefaultParametersResponse
-> DescribeEngineDefaultParametersResponse -> Bool
$c/= :: DescribeEngineDefaultParametersResponse
-> DescribeEngineDefaultParametersResponse -> Bool
== :: DescribeEngineDefaultParametersResponse
-> DescribeEngineDefaultParametersResponse -> Bool
$c== :: DescribeEngineDefaultParametersResponse
-> DescribeEngineDefaultParametersResponse -> Bool
Prelude.Eq, ReadPrec [DescribeEngineDefaultParametersResponse]
ReadPrec DescribeEngineDefaultParametersResponse
Int -> ReadS DescribeEngineDefaultParametersResponse
ReadS [DescribeEngineDefaultParametersResponse]
(Int -> ReadS DescribeEngineDefaultParametersResponse)
-> ReadS [DescribeEngineDefaultParametersResponse]
-> ReadPrec DescribeEngineDefaultParametersResponse
-> ReadPrec [DescribeEngineDefaultParametersResponse]
-> Read DescribeEngineDefaultParametersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEngineDefaultParametersResponse]
$creadListPrec :: ReadPrec [DescribeEngineDefaultParametersResponse]
readPrec :: ReadPrec DescribeEngineDefaultParametersResponse
$creadPrec :: ReadPrec DescribeEngineDefaultParametersResponse
readList :: ReadS [DescribeEngineDefaultParametersResponse]
$creadList :: ReadS [DescribeEngineDefaultParametersResponse]
readsPrec :: Int -> ReadS DescribeEngineDefaultParametersResponse
$creadsPrec :: Int -> ReadS DescribeEngineDefaultParametersResponse
Prelude.Read, Int -> DescribeEngineDefaultParametersResponse -> ShowS
[DescribeEngineDefaultParametersResponse] -> ShowS
DescribeEngineDefaultParametersResponse -> String
(Int -> DescribeEngineDefaultParametersResponse -> ShowS)
-> (DescribeEngineDefaultParametersResponse -> String)
-> ([DescribeEngineDefaultParametersResponse] -> ShowS)
-> Show DescribeEngineDefaultParametersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEngineDefaultParametersResponse] -> ShowS
$cshowList :: [DescribeEngineDefaultParametersResponse] -> ShowS
show :: DescribeEngineDefaultParametersResponse -> String
$cshow :: DescribeEngineDefaultParametersResponse -> String
showsPrec :: Int -> DescribeEngineDefaultParametersResponse -> ShowS
$cshowsPrec :: Int -> DescribeEngineDefaultParametersResponse -> ShowS
Prelude.Show, (forall x.
 DescribeEngineDefaultParametersResponse
 -> Rep DescribeEngineDefaultParametersResponse x)
-> (forall x.
    Rep DescribeEngineDefaultParametersResponse x
    -> DescribeEngineDefaultParametersResponse)
-> Generic DescribeEngineDefaultParametersResponse
forall x.
Rep DescribeEngineDefaultParametersResponse x
-> DescribeEngineDefaultParametersResponse
forall x.
DescribeEngineDefaultParametersResponse
-> Rep DescribeEngineDefaultParametersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeEngineDefaultParametersResponse x
-> DescribeEngineDefaultParametersResponse
$cfrom :: forall x.
DescribeEngineDefaultParametersResponse
-> Rep DescribeEngineDefaultParametersResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeEngineDefaultParametersResponse' 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:
--
-- 'httpStatus', 'describeEngineDefaultParametersResponse_httpStatus' - The response's http status code.
--
-- 'engineDefaults', 'describeEngineDefaultParametersResponse_engineDefaults' - Undocumented member.
newDescribeEngineDefaultParametersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'engineDefaults'
  EngineDefaults ->
  DescribeEngineDefaultParametersResponse
newDescribeEngineDefaultParametersResponse :: Int -> EngineDefaults -> DescribeEngineDefaultParametersResponse
newDescribeEngineDefaultParametersResponse
  Int
pHttpStatus_
  EngineDefaults
pEngineDefaults_ =
    DescribeEngineDefaultParametersResponse' :: Int -> EngineDefaults -> DescribeEngineDefaultParametersResponse
DescribeEngineDefaultParametersResponse'
      { $sel:httpStatus:DescribeEngineDefaultParametersResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:engineDefaults:DescribeEngineDefaultParametersResponse' :: EngineDefaults
engineDefaults = EngineDefaults
pEngineDefaults_
      }

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

-- | Undocumented member.
describeEngineDefaultParametersResponse_engineDefaults :: Lens.Lens' DescribeEngineDefaultParametersResponse EngineDefaults
describeEngineDefaultParametersResponse_engineDefaults :: (EngineDefaults -> f EngineDefaults)
-> DescribeEngineDefaultParametersResponse
-> f DescribeEngineDefaultParametersResponse
describeEngineDefaultParametersResponse_engineDefaults = (DescribeEngineDefaultParametersResponse -> EngineDefaults)
-> (DescribeEngineDefaultParametersResponse
    -> EngineDefaults -> DescribeEngineDefaultParametersResponse)
-> Lens' DescribeEngineDefaultParametersResponse EngineDefaults
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEngineDefaultParametersResponse' {EngineDefaults
engineDefaults :: EngineDefaults
$sel:engineDefaults:DescribeEngineDefaultParametersResponse' :: DescribeEngineDefaultParametersResponse -> EngineDefaults
engineDefaults} -> EngineDefaults
engineDefaults) (\s :: DescribeEngineDefaultParametersResponse
s@DescribeEngineDefaultParametersResponse' {} EngineDefaults
a -> DescribeEngineDefaultParametersResponse
s {$sel:engineDefaults:DescribeEngineDefaultParametersResponse' :: EngineDefaults
engineDefaults = EngineDefaults
a} :: DescribeEngineDefaultParametersResponse)

instance
  Prelude.NFData
    DescribeEngineDefaultParametersResponse