{-# 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.MemoryDb.DescribeEngineVersions
-- 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 a list of the available Redis engine versions.
module Amazonka.MemoryDb.DescribeEngineVersions
  ( -- * Creating a Request
    DescribeEngineVersions (..),
    newDescribeEngineVersions,

    -- * Request Lenses
    describeEngineVersions_engineVersion,
    describeEngineVersions_defaultOnly,
    describeEngineVersions_nextToken,
    describeEngineVersions_parameterGroupFamily,
    describeEngineVersions_maxResults,

    -- * Destructuring the Response
    DescribeEngineVersionsResponse (..),
    newDescribeEngineVersionsResponse,

    -- * Response Lenses
    describeEngineVersionsResponse_nextToken,
    describeEngineVersionsResponse_engineVersions,
    describeEngineVersionsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeEngineVersions' smart constructor.
data DescribeEngineVersions = DescribeEngineVersions'
  { -- | The Redis engine version
    DescribeEngineVersions -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | If true, specifies that only the default version of the specified engine
    -- or engine and major version combination is to be returned.
    DescribeEngineVersions -> Maybe Bool
defaultOnly :: Prelude.Maybe Prelude.Bool,
    -- | An optional argument to pass in case the total number of records exceeds
    -- the value of MaxResults. If nextToken is returned, there are more
    -- results available. The value of nextToken is a unique pagination token
    -- for each page. Make the call again using the returned token to retrieve
    -- the next page. Keep all other arguments unchanged.
    DescribeEngineVersions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of a specific parameter group family to return details for.
    DescribeEngineVersions -> Maybe Text
parameterGroupFamily :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of records to include in the response. If more
    -- records exist than the specified MaxResults value, a token is included
    -- in the response so that the remaining results can be retrieved.
    DescribeEngineVersions -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
  }
  deriving (DescribeEngineVersions -> DescribeEngineVersions -> Bool
(DescribeEngineVersions -> DescribeEngineVersions -> Bool)
-> (DescribeEngineVersions -> DescribeEngineVersions -> Bool)
-> Eq DescribeEngineVersions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEngineVersions -> DescribeEngineVersions -> Bool
$c/= :: DescribeEngineVersions -> DescribeEngineVersions -> Bool
== :: DescribeEngineVersions -> DescribeEngineVersions -> Bool
$c== :: DescribeEngineVersions -> DescribeEngineVersions -> Bool
Prelude.Eq, ReadPrec [DescribeEngineVersions]
ReadPrec DescribeEngineVersions
Int -> ReadS DescribeEngineVersions
ReadS [DescribeEngineVersions]
(Int -> ReadS DescribeEngineVersions)
-> ReadS [DescribeEngineVersions]
-> ReadPrec DescribeEngineVersions
-> ReadPrec [DescribeEngineVersions]
-> Read DescribeEngineVersions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEngineVersions]
$creadListPrec :: ReadPrec [DescribeEngineVersions]
readPrec :: ReadPrec DescribeEngineVersions
$creadPrec :: ReadPrec DescribeEngineVersions
readList :: ReadS [DescribeEngineVersions]
$creadList :: ReadS [DescribeEngineVersions]
readsPrec :: Int -> ReadS DescribeEngineVersions
$creadsPrec :: Int -> ReadS DescribeEngineVersions
Prelude.Read, Int -> DescribeEngineVersions -> ShowS
[DescribeEngineVersions] -> ShowS
DescribeEngineVersions -> String
(Int -> DescribeEngineVersions -> ShowS)
-> (DescribeEngineVersions -> String)
-> ([DescribeEngineVersions] -> ShowS)
-> Show DescribeEngineVersions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEngineVersions] -> ShowS
$cshowList :: [DescribeEngineVersions] -> ShowS
show :: DescribeEngineVersions -> String
$cshow :: DescribeEngineVersions -> String
showsPrec :: Int -> DescribeEngineVersions -> ShowS
$cshowsPrec :: Int -> DescribeEngineVersions -> ShowS
Prelude.Show, (forall x. DescribeEngineVersions -> Rep DescribeEngineVersions x)
-> (forall x.
    Rep DescribeEngineVersions x -> DescribeEngineVersions)
-> Generic DescribeEngineVersions
forall x. Rep DescribeEngineVersions x -> DescribeEngineVersions
forall x. DescribeEngineVersions -> Rep DescribeEngineVersions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeEngineVersions x -> DescribeEngineVersions
$cfrom :: forall x. DescribeEngineVersions -> Rep DescribeEngineVersions x
Prelude.Generic)

-- |
-- Create a value of 'DescribeEngineVersions' 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:
--
-- 'engineVersion', 'describeEngineVersions_engineVersion' - The Redis engine version
--
-- 'defaultOnly', 'describeEngineVersions_defaultOnly' - If true, specifies that only the default version of the specified engine
-- or engine and major version combination is to be returned.
--
-- 'nextToken', 'describeEngineVersions_nextToken' - An optional argument to pass in case the total number of records exceeds
-- the value of MaxResults. If nextToken is returned, there are more
-- results available. The value of nextToken is a unique pagination token
-- for each page. Make the call again using the returned token to retrieve
-- the next page. Keep all other arguments unchanged.
--
-- 'parameterGroupFamily', 'describeEngineVersions_parameterGroupFamily' - The name of a specific parameter group family to return details for.
--
-- 'maxResults', 'describeEngineVersions_maxResults' - The maximum number of records to include in the response. If more
-- records exist than the specified MaxResults value, a token is included
-- in the response so that the remaining results can be retrieved.
newDescribeEngineVersions ::
  DescribeEngineVersions
newDescribeEngineVersions :: DescribeEngineVersions
newDescribeEngineVersions =
  DescribeEngineVersions' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> DescribeEngineVersions
DescribeEngineVersions'
    { $sel:engineVersion:DescribeEngineVersions' :: Maybe Text
engineVersion =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultOnly:DescribeEngineVersions' :: Maybe Bool
defaultOnly = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeEngineVersions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parameterGroupFamily:DescribeEngineVersions' :: Maybe Text
parameterGroupFamily = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeEngineVersions' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The Redis engine version
describeEngineVersions_engineVersion :: Lens.Lens' DescribeEngineVersions (Prelude.Maybe Prelude.Text)
describeEngineVersions_engineVersion :: (Maybe Text -> f (Maybe Text))
-> DescribeEngineVersions -> f DescribeEngineVersions
describeEngineVersions_engineVersion = (DescribeEngineVersions -> Maybe Text)
-> (DescribeEngineVersions -> Maybe Text -> DescribeEngineVersions)
-> Lens
     DescribeEngineVersions
     DescribeEngineVersions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEngineVersions' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:DescribeEngineVersions' :: DescribeEngineVersions -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: DescribeEngineVersions
s@DescribeEngineVersions' {} Maybe Text
a -> DescribeEngineVersions
s {$sel:engineVersion:DescribeEngineVersions' :: Maybe Text
engineVersion = Maybe Text
a} :: DescribeEngineVersions)

-- | If true, specifies that only the default version of the specified engine
-- or engine and major version combination is to be returned.
describeEngineVersions_defaultOnly :: Lens.Lens' DescribeEngineVersions (Prelude.Maybe Prelude.Bool)
describeEngineVersions_defaultOnly :: (Maybe Bool -> f (Maybe Bool))
-> DescribeEngineVersions -> f DescribeEngineVersions
describeEngineVersions_defaultOnly = (DescribeEngineVersions -> Maybe Bool)
-> (DescribeEngineVersions -> Maybe Bool -> DescribeEngineVersions)
-> Lens
     DescribeEngineVersions
     DescribeEngineVersions
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEngineVersions' {Maybe Bool
defaultOnly :: Maybe Bool
$sel:defaultOnly:DescribeEngineVersions' :: DescribeEngineVersions -> Maybe Bool
defaultOnly} -> Maybe Bool
defaultOnly) (\s :: DescribeEngineVersions
s@DescribeEngineVersions' {} Maybe Bool
a -> DescribeEngineVersions
s {$sel:defaultOnly:DescribeEngineVersions' :: Maybe Bool
defaultOnly = Maybe Bool
a} :: DescribeEngineVersions)

-- | An optional argument to pass in case the total number of records exceeds
-- the value of MaxResults. If nextToken is returned, there are more
-- results available. The value of nextToken is a unique pagination token
-- for each page. Make the call again using the returned token to retrieve
-- the next page. Keep all other arguments unchanged.
describeEngineVersions_nextToken :: Lens.Lens' DescribeEngineVersions (Prelude.Maybe Prelude.Text)
describeEngineVersions_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeEngineVersions -> f DescribeEngineVersions
describeEngineVersions_nextToken = (DescribeEngineVersions -> Maybe Text)
-> (DescribeEngineVersions -> Maybe Text -> DescribeEngineVersions)
-> Lens
     DescribeEngineVersions
     DescribeEngineVersions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEngineVersions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeEngineVersions' :: DescribeEngineVersions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeEngineVersions
s@DescribeEngineVersions' {} Maybe Text
a -> DescribeEngineVersions
s {$sel:nextToken:DescribeEngineVersions' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeEngineVersions)

-- | The name of a specific parameter group family to return details for.
describeEngineVersions_parameterGroupFamily :: Lens.Lens' DescribeEngineVersions (Prelude.Maybe Prelude.Text)
describeEngineVersions_parameterGroupFamily :: (Maybe Text -> f (Maybe Text))
-> DescribeEngineVersions -> f DescribeEngineVersions
describeEngineVersions_parameterGroupFamily = (DescribeEngineVersions -> Maybe Text)
-> (DescribeEngineVersions -> Maybe Text -> DescribeEngineVersions)
-> Lens
     DescribeEngineVersions
     DescribeEngineVersions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEngineVersions' {Maybe Text
parameterGroupFamily :: Maybe Text
$sel:parameterGroupFamily:DescribeEngineVersions' :: DescribeEngineVersions -> Maybe Text
parameterGroupFamily} -> Maybe Text
parameterGroupFamily) (\s :: DescribeEngineVersions
s@DescribeEngineVersions' {} Maybe Text
a -> DescribeEngineVersions
s {$sel:parameterGroupFamily:DescribeEngineVersions' :: Maybe Text
parameterGroupFamily = Maybe Text
a} :: DescribeEngineVersions)

-- | The maximum number of records to include in the response. If more
-- records exist than the specified MaxResults value, a token is included
-- in the response so that the remaining results can be retrieved.
describeEngineVersions_maxResults :: Lens.Lens' DescribeEngineVersions (Prelude.Maybe Prelude.Int)
describeEngineVersions_maxResults :: (Maybe Int -> f (Maybe Int))
-> DescribeEngineVersions -> f DescribeEngineVersions
describeEngineVersions_maxResults = (DescribeEngineVersions -> Maybe Int)
-> (DescribeEngineVersions -> Maybe Int -> DescribeEngineVersions)
-> Lens
     DescribeEngineVersions
     DescribeEngineVersions
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEngineVersions' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeEngineVersions' :: DescribeEngineVersions -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeEngineVersions
s@DescribeEngineVersions' {} Maybe Int
a -> DescribeEngineVersions
s {$sel:maxResults:DescribeEngineVersions' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeEngineVersions)

instance Core.AWSRequest DescribeEngineVersions where
  type
    AWSResponse DescribeEngineVersions =
      DescribeEngineVersionsResponse
  request :: DescribeEngineVersions -> Request DescribeEngineVersions
request = Service -> DescribeEngineVersions -> Request DescribeEngineVersions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeEngineVersions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeEngineVersions)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeEngineVersions))
-> Logger
-> Service
-> Proxy DescribeEngineVersions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeEngineVersions)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [EngineVersionInfo]
-> Int
-> DescribeEngineVersionsResponse
DescribeEngineVersionsResponse'
            (Maybe Text
 -> Maybe [EngineVersionInfo]
 -> Int
 -> DescribeEngineVersionsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [EngineVersionInfo]
      -> Int -> DescribeEngineVersionsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either
  String
  (Maybe [EngineVersionInfo]
   -> Int -> DescribeEngineVersionsResponse)
-> Either String (Maybe [EngineVersionInfo])
-> Either String (Int -> DescribeEngineVersionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [EngineVersionInfo]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EngineVersions" Either String (Maybe (Maybe [EngineVersionInfo]))
-> Maybe [EngineVersionInfo]
-> Either String (Maybe [EngineVersionInfo])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [EngineVersionInfo]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeEngineVersionsResponse)
-> Either String Int
-> Either String DescribeEngineVersionsResponse
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 DescribeEngineVersions

instance Prelude.NFData DescribeEngineVersions

instance Core.ToHeaders DescribeEngineVersions where
  toHeaders :: DescribeEngineVersions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeEngineVersions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonMemoryDB.DescribeEngineVersions" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON DescribeEngineVersions where
  toJSON :: DescribeEngineVersions -> Value
toJSON DescribeEngineVersions' {Maybe Bool
Maybe Int
Maybe Text
maxResults :: Maybe Int
parameterGroupFamily :: Maybe Text
nextToken :: Maybe Text
defaultOnly :: Maybe Bool
engineVersion :: Maybe Text
$sel:maxResults:DescribeEngineVersions' :: DescribeEngineVersions -> Maybe Int
$sel:parameterGroupFamily:DescribeEngineVersions' :: DescribeEngineVersions -> Maybe Text
$sel:nextToken:DescribeEngineVersions' :: DescribeEngineVersions -> Maybe Text
$sel:defaultOnly:DescribeEngineVersions' :: DescribeEngineVersions -> Maybe Bool
$sel:engineVersion:DescribeEngineVersions' :: DescribeEngineVersions -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"EngineVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
engineVersion,
            (Text
"DefaultOnly" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
defaultOnly,
            (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"ParameterGroupFamily" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
parameterGroupFamily,
            (Text
"MaxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
          ]
      )

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

instance Core.ToQuery DescribeEngineVersions where
  toQuery :: DescribeEngineVersions -> QueryString
toQuery = QueryString -> DescribeEngineVersions -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeEngineVersionsResponse' smart constructor.
data DescribeEngineVersionsResponse = DescribeEngineVersionsResponse'
  { -- | An optional argument to pass in case the total number of records exceeds
    -- the value of MaxResults. If nextToken is returned, there are more
    -- results available. The value of nextToken is a unique pagination token
    -- for each page. Make the call again using the returned token to retrieve
    -- the next page. Keep all other arguments unchanged.
    DescribeEngineVersionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of engine version details. Each element in the list contains
    -- detailed information about one engine version.
    DescribeEngineVersionsResponse -> Maybe [EngineVersionInfo]
engineVersions :: Prelude.Maybe [EngineVersionInfo],
    -- | The response's http status code.
    DescribeEngineVersionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeEngineVersionsResponse
-> DescribeEngineVersionsResponse -> Bool
(DescribeEngineVersionsResponse
 -> DescribeEngineVersionsResponse -> Bool)
-> (DescribeEngineVersionsResponse
    -> DescribeEngineVersionsResponse -> Bool)
-> Eq DescribeEngineVersionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEngineVersionsResponse
-> DescribeEngineVersionsResponse -> Bool
$c/= :: DescribeEngineVersionsResponse
-> DescribeEngineVersionsResponse -> Bool
== :: DescribeEngineVersionsResponse
-> DescribeEngineVersionsResponse -> Bool
$c== :: DescribeEngineVersionsResponse
-> DescribeEngineVersionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeEngineVersionsResponse]
ReadPrec DescribeEngineVersionsResponse
Int -> ReadS DescribeEngineVersionsResponse
ReadS [DescribeEngineVersionsResponse]
(Int -> ReadS DescribeEngineVersionsResponse)
-> ReadS [DescribeEngineVersionsResponse]
-> ReadPrec DescribeEngineVersionsResponse
-> ReadPrec [DescribeEngineVersionsResponse]
-> Read DescribeEngineVersionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEngineVersionsResponse]
$creadListPrec :: ReadPrec [DescribeEngineVersionsResponse]
readPrec :: ReadPrec DescribeEngineVersionsResponse
$creadPrec :: ReadPrec DescribeEngineVersionsResponse
readList :: ReadS [DescribeEngineVersionsResponse]
$creadList :: ReadS [DescribeEngineVersionsResponse]
readsPrec :: Int -> ReadS DescribeEngineVersionsResponse
$creadsPrec :: Int -> ReadS DescribeEngineVersionsResponse
Prelude.Read, Int -> DescribeEngineVersionsResponse -> ShowS
[DescribeEngineVersionsResponse] -> ShowS
DescribeEngineVersionsResponse -> String
(Int -> DescribeEngineVersionsResponse -> ShowS)
-> (DescribeEngineVersionsResponse -> String)
-> ([DescribeEngineVersionsResponse] -> ShowS)
-> Show DescribeEngineVersionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEngineVersionsResponse] -> ShowS
$cshowList :: [DescribeEngineVersionsResponse] -> ShowS
show :: DescribeEngineVersionsResponse -> String
$cshow :: DescribeEngineVersionsResponse -> String
showsPrec :: Int -> DescribeEngineVersionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeEngineVersionsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeEngineVersionsResponse
 -> Rep DescribeEngineVersionsResponse x)
-> (forall x.
    Rep DescribeEngineVersionsResponse x
    -> DescribeEngineVersionsResponse)
-> Generic DescribeEngineVersionsResponse
forall x.
Rep DescribeEngineVersionsResponse x
-> DescribeEngineVersionsResponse
forall x.
DescribeEngineVersionsResponse
-> Rep DescribeEngineVersionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeEngineVersionsResponse x
-> DescribeEngineVersionsResponse
$cfrom :: forall x.
DescribeEngineVersionsResponse
-> Rep DescribeEngineVersionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeEngineVersionsResponse' 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:
--
-- 'nextToken', 'describeEngineVersionsResponse_nextToken' - An optional argument to pass in case the total number of records exceeds
-- the value of MaxResults. If nextToken is returned, there are more
-- results available. The value of nextToken is a unique pagination token
-- for each page. Make the call again using the returned token to retrieve
-- the next page. Keep all other arguments unchanged.
--
-- 'engineVersions', 'describeEngineVersionsResponse_engineVersions' - A list of engine version details. Each element in the list contains
-- detailed information about one engine version.
--
-- 'httpStatus', 'describeEngineVersionsResponse_httpStatus' - The response's http status code.
newDescribeEngineVersionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeEngineVersionsResponse
newDescribeEngineVersionsResponse :: Int -> DescribeEngineVersionsResponse
newDescribeEngineVersionsResponse Int
pHttpStatus_ =
  DescribeEngineVersionsResponse' :: Maybe Text
-> Maybe [EngineVersionInfo]
-> Int
-> DescribeEngineVersionsResponse
DescribeEngineVersionsResponse'
    { $sel:nextToken:DescribeEngineVersionsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:engineVersions:DescribeEngineVersionsResponse' :: Maybe [EngineVersionInfo]
engineVersions = Maybe [EngineVersionInfo]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeEngineVersionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An optional argument to pass in case the total number of records exceeds
-- the value of MaxResults. If nextToken is returned, there are more
-- results available. The value of nextToken is a unique pagination token
-- for each page. Make the call again using the returned token to retrieve
-- the next page. Keep all other arguments unchanged.
describeEngineVersionsResponse_nextToken :: Lens.Lens' DescribeEngineVersionsResponse (Prelude.Maybe Prelude.Text)
describeEngineVersionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeEngineVersionsResponse
-> f DescribeEngineVersionsResponse
describeEngineVersionsResponse_nextToken = (DescribeEngineVersionsResponse -> Maybe Text)
-> (DescribeEngineVersionsResponse
    -> Maybe Text -> DescribeEngineVersionsResponse)
-> Lens
     DescribeEngineVersionsResponse
     DescribeEngineVersionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEngineVersionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeEngineVersionsResponse' :: DescribeEngineVersionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeEngineVersionsResponse
s@DescribeEngineVersionsResponse' {} Maybe Text
a -> DescribeEngineVersionsResponse
s {$sel:nextToken:DescribeEngineVersionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeEngineVersionsResponse)

-- | A list of engine version details. Each element in the list contains
-- detailed information about one engine version.
describeEngineVersionsResponse_engineVersions :: Lens.Lens' DescribeEngineVersionsResponse (Prelude.Maybe [EngineVersionInfo])
describeEngineVersionsResponse_engineVersions :: (Maybe [EngineVersionInfo] -> f (Maybe [EngineVersionInfo]))
-> DescribeEngineVersionsResponse
-> f DescribeEngineVersionsResponse
describeEngineVersionsResponse_engineVersions = (DescribeEngineVersionsResponse -> Maybe [EngineVersionInfo])
-> (DescribeEngineVersionsResponse
    -> Maybe [EngineVersionInfo] -> DescribeEngineVersionsResponse)
-> Lens
     DescribeEngineVersionsResponse
     DescribeEngineVersionsResponse
     (Maybe [EngineVersionInfo])
     (Maybe [EngineVersionInfo])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEngineVersionsResponse' {Maybe [EngineVersionInfo]
engineVersions :: Maybe [EngineVersionInfo]
$sel:engineVersions:DescribeEngineVersionsResponse' :: DescribeEngineVersionsResponse -> Maybe [EngineVersionInfo]
engineVersions} -> Maybe [EngineVersionInfo]
engineVersions) (\s :: DescribeEngineVersionsResponse
s@DescribeEngineVersionsResponse' {} Maybe [EngineVersionInfo]
a -> DescribeEngineVersionsResponse
s {$sel:engineVersions:DescribeEngineVersionsResponse' :: Maybe [EngineVersionInfo]
engineVersions = Maybe [EngineVersionInfo]
a} :: DescribeEngineVersionsResponse) ((Maybe [EngineVersionInfo] -> f (Maybe [EngineVersionInfo]))
 -> DescribeEngineVersionsResponse
 -> f DescribeEngineVersionsResponse)
-> ((Maybe [EngineVersionInfo] -> f (Maybe [EngineVersionInfo]))
    -> Maybe [EngineVersionInfo] -> f (Maybe [EngineVersionInfo]))
-> (Maybe [EngineVersionInfo] -> f (Maybe [EngineVersionInfo]))
-> DescribeEngineVersionsResponse
-> f DescribeEngineVersionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EngineVersionInfo]
  [EngineVersionInfo]
  [EngineVersionInfo]
  [EngineVersionInfo]
-> Iso
     (Maybe [EngineVersionInfo])
     (Maybe [EngineVersionInfo])
     (Maybe [EngineVersionInfo])
     (Maybe [EngineVersionInfo])
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
  [EngineVersionInfo]
  [EngineVersionInfo]
  [EngineVersionInfo]
  [EngineVersionInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeEngineVersionsResponse