{-# 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.Kafka.ListConfigurationRevisions
-- 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 all the MSK configurations in this Region.
--
-- This operation returns paginated results.
module Amazonka.Kafka.ListConfigurationRevisions
  ( -- * Creating a Request
    ListConfigurationRevisions (..),
    newListConfigurationRevisions,

    -- * Request Lenses
    listConfigurationRevisions_nextToken,
    listConfigurationRevisions_maxResults,
    listConfigurationRevisions_arn,

    -- * Destructuring the Response
    ListConfigurationRevisionsResponse (..),
    newListConfigurationRevisionsResponse,

    -- * Response Lenses
    listConfigurationRevisionsResponse_nextToken,
    listConfigurationRevisionsResponse_revisions,
    listConfigurationRevisionsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Kafka.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

-- | /See:/ 'newListConfigurationRevisions' smart constructor.
data ListConfigurationRevisions = ListConfigurationRevisions'
  { -- | The paginated results marker. When the result of the operation is
    -- truncated, the call returns NextToken in the response. To get the next
    -- batch, provide this token in your next request.
    ListConfigurationRevisions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in the response. If there are
    -- more results, the response includes a NextToken parameter.
    ListConfigurationRevisions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon Resource Name (ARN) that uniquely identifies an MSK
    -- configuration and all of its revisions.
    ListConfigurationRevisions -> Text
arn :: Prelude.Text
  }
  deriving (ListConfigurationRevisions -> ListConfigurationRevisions -> Bool
(ListConfigurationRevisions -> ListConfigurationRevisions -> Bool)
-> (ListConfigurationRevisions
    -> ListConfigurationRevisions -> Bool)
-> Eq ListConfigurationRevisions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListConfigurationRevisions -> ListConfigurationRevisions -> Bool
$c/= :: ListConfigurationRevisions -> ListConfigurationRevisions -> Bool
== :: ListConfigurationRevisions -> ListConfigurationRevisions -> Bool
$c== :: ListConfigurationRevisions -> ListConfigurationRevisions -> Bool
Prelude.Eq, ReadPrec [ListConfigurationRevisions]
ReadPrec ListConfigurationRevisions
Int -> ReadS ListConfigurationRevisions
ReadS [ListConfigurationRevisions]
(Int -> ReadS ListConfigurationRevisions)
-> ReadS [ListConfigurationRevisions]
-> ReadPrec ListConfigurationRevisions
-> ReadPrec [ListConfigurationRevisions]
-> Read ListConfigurationRevisions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListConfigurationRevisions]
$creadListPrec :: ReadPrec [ListConfigurationRevisions]
readPrec :: ReadPrec ListConfigurationRevisions
$creadPrec :: ReadPrec ListConfigurationRevisions
readList :: ReadS [ListConfigurationRevisions]
$creadList :: ReadS [ListConfigurationRevisions]
readsPrec :: Int -> ReadS ListConfigurationRevisions
$creadsPrec :: Int -> ReadS ListConfigurationRevisions
Prelude.Read, Int -> ListConfigurationRevisions -> ShowS
[ListConfigurationRevisions] -> ShowS
ListConfigurationRevisions -> String
(Int -> ListConfigurationRevisions -> ShowS)
-> (ListConfigurationRevisions -> String)
-> ([ListConfigurationRevisions] -> ShowS)
-> Show ListConfigurationRevisions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListConfigurationRevisions] -> ShowS
$cshowList :: [ListConfigurationRevisions] -> ShowS
show :: ListConfigurationRevisions -> String
$cshow :: ListConfigurationRevisions -> String
showsPrec :: Int -> ListConfigurationRevisions -> ShowS
$cshowsPrec :: Int -> ListConfigurationRevisions -> ShowS
Prelude.Show, (forall x.
 ListConfigurationRevisions -> Rep ListConfigurationRevisions x)
-> (forall x.
    Rep ListConfigurationRevisions x -> ListConfigurationRevisions)
-> Generic ListConfigurationRevisions
forall x.
Rep ListConfigurationRevisions x -> ListConfigurationRevisions
forall x.
ListConfigurationRevisions -> Rep ListConfigurationRevisions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListConfigurationRevisions x -> ListConfigurationRevisions
$cfrom :: forall x.
ListConfigurationRevisions -> Rep ListConfigurationRevisions x
Prelude.Generic)

-- |
-- Create a value of 'ListConfigurationRevisions' 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', 'listConfigurationRevisions_nextToken' - The paginated results marker. When the result of the operation is
-- truncated, the call returns NextToken in the response. To get the next
-- batch, provide this token in your next request.
--
-- 'maxResults', 'listConfigurationRevisions_maxResults' - The maximum number of results to return in the response. If there are
-- more results, the response includes a NextToken parameter.
--
-- 'arn', 'listConfigurationRevisions_arn' - The Amazon Resource Name (ARN) that uniquely identifies an MSK
-- configuration and all of its revisions.
newListConfigurationRevisions ::
  -- | 'arn'
  Prelude.Text ->
  ListConfigurationRevisions
newListConfigurationRevisions :: Text -> ListConfigurationRevisions
newListConfigurationRevisions Text
pArn_ =
  ListConfigurationRevisions' :: Maybe Text -> Maybe Natural -> Text -> ListConfigurationRevisions
ListConfigurationRevisions'
    { $sel:nextToken:ListConfigurationRevisions' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListConfigurationRevisions' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ListConfigurationRevisions' :: Text
arn = Text
pArn_
    }

-- | The paginated results marker. When the result of the operation is
-- truncated, the call returns NextToken in the response. To get the next
-- batch, provide this token in your next request.
listConfigurationRevisions_nextToken :: Lens.Lens' ListConfigurationRevisions (Prelude.Maybe Prelude.Text)
listConfigurationRevisions_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListConfigurationRevisions -> f ListConfigurationRevisions
listConfigurationRevisions_nextToken = (ListConfigurationRevisions -> Maybe Text)
-> (ListConfigurationRevisions
    -> Maybe Text -> ListConfigurationRevisions)
-> Lens
     ListConfigurationRevisions
     ListConfigurationRevisions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConfigurationRevisions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListConfigurationRevisions' :: ListConfigurationRevisions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListConfigurationRevisions
s@ListConfigurationRevisions' {} Maybe Text
a -> ListConfigurationRevisions
s {$sel:nextToken:ListConfigurationRevisions' :: Maybe Text
nextToken = Maybe Text
a} :: ListConfigurationRevisions)

-- | The maximum number of results to return in the response. If there are
-- more results, the response includes a NextToken parameter.
listConfigurationRevisions_maxResults :: Lens.Lens' ListConfigurationRevisions (Prelude.Maybe Prelude.Natural)
listConfigurationRevisions_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListConfigurationRevisions -> f ListConfigurationRevisions
listConfigurationRevisions_maxResults = (ListConfigurationRevisions -> Maybe Natural)
-> (ListConfigurationRevisions
    -> Maybe Natural -> ListConfigurationRevisions)
-> Lens
     ListConfigurationRevisions
     ListConfigurationRevisions
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConfigurationRevisions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListConfigurationRevisions' :: ListConfigurationRevisions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListConfigurationRevisions
s@ListConfigurationRevisions' {} Maybe Natural
a -> ListConfigurationRevisions
s {$sel:maxResults:ListConfigurationRevisions' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListConfigurationRevisions)

-- | The Amazon Resource Name (ARN) that uniquely identifies an MSK
-- configuration and all of its revisions.
listConfigurationRevisions_arn :: Lens.Lens' ListConfigurationRevisions Prelude.Text
listConfigurationRevisions_arn :: (Text -> f Text)
-> ListConfigurationRevisions -> f ListConfigurationRevisions
listConfigurationRevisions_arn = (ListConfigurationRevisions -> Text)
-> (ListConfigurationRevisions
    -> Text -> ListConfigurationRevisions)
-> Lens
     ListConfigurationRevisions ListConfigurationRevisions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConfigurationRevisions' {Text
arn :: Text
$sel:arn:ListConfigurationRevisions' :: ListConfigurationRevisions -> Text
arn} -> Text
arn) (\s :: ListConfigurationRevisions
s@ListConfigurationRevisions' {} Text
a -> ListConfigurationRevisions
s {$sel:arn:ListConfigurationRevisions' :: Text
arn = Text
a} :: ListConfigurationRevisions)

instance Core.AWSPager ListConfigurationRevisions where
  page :: ListConfigurationRevisions
-> AWSResponse ListConfigurationRevisions
-> Maybe ListConfigurationRevisions
page ListConfigurationRevisions
rq AWSResponse ListConfigurationRevisions
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListConfigurationRevisions
ListConfigurationRevisionsResponse
rs
            ListConfigurationRevisionsResponse
-> Getting (First Text) ListConfigurationRevisionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListConfigurationRevisionsResponse
-> Const (First Text) ListConfigurationRevisionsResponse
Lens' ListConfigurationRevisionsResponse (Maybe Text)
listConfigurationRevisionsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListConfigurationRevisionsResponse
 -> Const (First Text) ListConfigurationRevisionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListConfigurationRevisionsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListConfigurationRevisions
forall a. Maybe a
Prelude.Nothing
    | Maybe [ConfigurationRevision] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListConfigurationRevisions
ListConfigurationRevisionsResponse
rs
            ListConfigurationRevisionsResponse
-> Getting
     (First [ConfigurationRevision])
     ListConfigurationRevisionsResponse
     [ConfigurationRevision]
-> Maybe [ConfigurationRevision]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ConfigurationRevision]
 -> Const
      (First [ConfigurationRevision]) (Maybe [ConfigurationRevision]))
-> ListConfigurationRevisionsResponse
-> Const
     (First [ConfigurationRevision]) ListConfigurationRevisionsResponse
Lens'
  ListConfigurationRevisionsResponse (Maybe [ConfigurationRevision])
listConfigurationRevisionsResponse_revisions
              ((Maybe [ConfigurationRevision]
  -> Const
       (First [ConfigurationRevision]) (Maybe [ConfigurationRevision]))
 -> ListConfigurationRevisionsResponse
 -> Const
      (First [ConfigurationRevision]) ListConfigurationRevisionsResponse)
-> (([ConfigurationRevision]
     -> Const (First [ConfigurationRevision]) [ConfigurationRevision])
    -> Maybe [ConfigurationRevision]
    -> Const
         (First [ConfigurationRevision]) (Maybe [ConfigurationRevision]))
-> Getting
     (First [ConfigurationRevision])
     ListConfigurationRevisionsResponse
     [ConfigurationRevision]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ConfigurationRevision]
 -> Const (First [ConfigurationRevision]) [ConfigurationRevision])
-> Maybe [ConfigurationRevision]
-> Const
     (First [ConfigurationRevision]) (Maybe [ConfigurationRevision])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListConfigurationRevisions
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListConfigurationRevisions -> Maybe ListConfigurationRevisions
forall a. a -> Maybe a
Prelude.Just (ListConfigurationRevisions -> Maybe ListConfigurationRevisions)
-> ListConfigurationRevisions -> Maybe ListConfigurationRevisions
forall a b. (a -> b) -> a -> b
Prelude.$
        ListConfigurationRevisions
rq
          ListConfigurationRevisions
-> (ListConfigurationRevisions -> ListConfigurationRevisions)
-> ListConfigurationRevisions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListConfigurationRevisions
-> Identity ListConfigurationRevisions
Lens
  ListConfigurationRevisions
  ListConfigurationRevisions
  (Maybe Text)
  (Maybe Text)
listConfigurationRevisions_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListConfigurationRevisions
 -> Identity ListConfigurationRevisions)
-> Maybe Text
-> ListConfigurationRevisions
-> ListConfigurationRevisions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListConfigurationRevisions
ListConfigurationRevisionsResponse
rs
          ListConfigurationRevisionsResponse
-> Getting (First Text) ListConfigurationRevisionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListConfigurationRevisionsResponse
-> Const (First Text) ListConfigurationRevisionsResponse
Lens' ListConfigurationRevisionsResponse (Maybe Text)
listConfigurationRevisionsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListConfigurationRevisionsResponse
 -> Const (First Text) ListConfigurationRevisionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListConfigurationRevisionsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListConfigurationRevisions where
  type
    AWSResponse ListConfigurationRevisions =
      ListConfigurationRevisionsResponse
  request :: ListConfigurationRevisions -> Request ListConfigurationRevisions
request = Service
-> ListConfigurationRevisions -> Request ListConfigurationRevisions
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListConfigurationRevisions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListConfigurationRevisions)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListConfigurationRevisions))
-> Logger
-> Service
-> Proxy ListConfigurationRevisions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListConfigurationRevisions)))
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 [ConfigurationRevision]
-> Int
-> ListConfigurationRevisionsResponse
ListConfigurationRevisionsResponse'
            (Maybe Text
 -> Maybe [ConfigurationRevision]
 -> Int
 -> ListConfigurationRevisionsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ConfigurationRevision]
      -> Int -> ListConfigurationRevisionsResponse)
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 [ConfigurationRevision]
   -> Int -> ListConfigurationRevisionsResponse)
-> Either String (Maybe [ConfigurationRevision])
-> Either String (Int -> ListConfigurationRevisionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe (Maybe [ConfigurationRevision]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"revisions" Either String (Maybe (Maybe [ConfigurationRevision]))
-> Maybe [ConfigurationRevision]
-> Either String (Maybe [ConfigurationRevision])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ConfigurationRevision]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> ListConfigurationRevisionsResponse)
-> Either String Int
-> Either String ListConfigurationRevisionsResponse
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 ListConfigurationRevisions

instance Prelude.NFData ListConfigurationRevisions

instance Core.ToHeaders ListConfigurationRevisions where
  toHeaders :: ListConfigurationRevisions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListConfigurationRevisions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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.ToPath ListConfigurationRevisions where
  toPath :: ListConfigurationRevisions -> ByteString
toPath ListConfigurationRevisions' {Maybe Natural
Maybe Text
Text
arn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:arn:ListConfigurationRevisions' :: ListConfigurationRevisions -> Text
$sel:maxResults:ListConfigurationRevisions' :: ListConfigurationRevisions -> Maybe Natural
$sel:nextToken:ListConfigurationRevisions' :: ListConfigurationRevisions -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v1/configurations/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
arn, ByteString
"/revisions"]

instance Core.ToQuery ListConfigurationRevisions where
  toQuery :: ListConfigurationRevisions -> QueryString
toQuery ListConfigurationRevisions' {Maybe Natural
Maybe Text
Text
arn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:arn:ListConfigurationRevisions' :: ListConfigurationRevisions -> Text
$sel:maxResults:ListConfigurationRevisions' :: ListConfigurationRevisions -> Maybe Natural
$sel:nextToken:ListConfigurationRevisions' :: ListConfigurationRevisions -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListConfigurationRevisionsResponse' smart constructor.
data ListConfigurationRevisionsResponse = ListConfigurationRevisionsResponse'
  { -- | Paginated results marker.
    ListConfigurationRevisionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | List of ConfigurationRevision objects.
    ListConfigurationRevisionsResponse -> Maybe [ConfigurationRevision]
revisions :: Prelude.Maybe [ConfigurationRevision],
    -- | The response's http status code.
    ListConfigurationRevisionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListConfigurationRevisionsResponse
-> ListConfigurationRevisionsResponse -> Bool
(ListConfigurationRevisionsResponse
 -> ListConfigurationRevisionsResponse -> Bool)
-> (ListConfigurationRevisionsResponse
    -> ListConfigurationRevisionsResponse -> Bool)
-> Eq ListConfigurationRevisionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListConfigurationRevisionsResponse
-> ListConfigurationRevisionsResponse -> Bool
$c/= :: ListConfigurationRevisionsResponse
-> ListConfigurationRevisionsResponse -> Bool
== :: ListConfigurationRevisionsResponse
-> ListConfigurationRevisionsResponse -> Bool
$c== :: ListConfigurationRevisionsResponse
-> ListConfigurationRevisionsResponse -> Bool
Prelude.Eq, ReadPrec [ListConfigurationRevisionsResponse]
ReadPrec ListConfigurationRevisionsResponse
Int -> ReadS ListConfigurationRevisionsResponse
ReadS [ListConfigurationRevisionsResponse]
(Int -> ReadS ListConfigurationRevisionsResponse)
-> ReadS [ListConfigurationRevisionsResponse]
-> ReadPrec ListConfigurationRevisionsResponse
-> ReadPrec [ListConfigurationRevisionsResponse]
-> Read ListConfigurationRevisionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListConfigurationRevisionsResponse]
$creadListPrec :: ReadPrec [ListConfigurationRevisionsResponse]
readPrec :: ReadPrec ListConfigurationRevisionsResponse
$creadPrec :: ReadPrec ListConfigurationRevisionsResponse
readList :: ReadS [ListConfigurationRevisionsResponse]
$creadList :: ReadS [ListConfigurationRevisionsResponse]
readsPrec :: Int -> ReadS ListConfigurationRevisionsResponse
$creadsPrec :: Int -> ReadS ListConfigurationRevisionsResponse
Prelude.Read, Int -> ListConfigurationRevisionsResponse -> ShowS
[ListConfigurationRevisionsResponse] -> ShowS
ListConfigurationRevisionsResponse -> String
(Int -> ListConfigurationRevisionsResponse -> ShowS)
-> (ListConfigurationRevisionsResponse -> String)
-> ([ListConfigurationRevisionsResponse] -> ShowS)
-> Show ListConfigurationRevisionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListConfigurationRevisionsResponse] -> ShowS
$cshowList :: [ListConfigurationRevisionsResponse] -> ShowS
show :: ListConfigurationRevisionsResponse -> String
$cshow :: ListConfigurationRevisionsResponse -> String
showsPrec :: Int -> ListConfigurationRevisionsResponse -> ShowS
$cshowsPrec :: Int -> ListConfigurationRevisionsResponse -> ShowS
Prelude.Show, (forall x.
 ListConfigurationRevisionsResponse
 -> Rep ListConfigurationRevisionsResponse x)
-> (forall x.
    Rep ListConfigurationRevisionsResponse x
    -> ListConfigurationRevisionsResponse)
-> Generic ListConfigurationRevisionsResponse
forall x.
Rep ListConfigurationRevisionsResponse x
-> ListConfigurationRevisionsResponse
forall x.
ListConfigurationRevisionsResponse
-> Rep ListConfigurationRevisionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListConfigurationRevisionsResponse x
-> ListConfigurationRevisionsResponse
$cfrom :: forall x.
ListConfigurationRevisionsResponse
-> Rep ListConfigurationRevisionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListConfigurationRevisionsResponse' 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', 'listConfigurationRevisionsResponse_nextToken' - Paginated results marker.
--
-- 'revisions', 'listConfigurationRevisionsResponse_revisions' - List of ConfigurationRevision objects.
--
-- 'httpStatus', 'listConfigurationRevisionsResponse_httpStatus' - The response's http status code.
newListConfigurationRevisionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListConfigurationRevisionsResponse
newListConfigurationRevisionsResponse :: Int -> ListConfigurationRevisionsResponse
newListConfigurationRevisionsResponse Int
pHttpStatus_ =
  ListConfigurationRevisionsResponse' :: Maybe Text
-> Maybe [ConfigurationRevision]
-> Int
-> ListConfigurationRevisionsResponse
ListConfigurationRevisionsResponse'
    { $sel:nextToken:ListConfigurationRevisionsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:revisions:ListConfigurationRevisionsResponse' :: Maybe [ConfigurationRevision]
revisions = Maybe [ConfigurationRevision]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListConfigurationRevisionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Paginated results marker.
listConfigurationRevisionsResponse_nextToken :: Lens.Lens' ListConfigurationRevisionsResponse (Prelude.Maybe Prelude.Text)
listConfigurationRevisionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListConfigurationRevisionsResponse
-> f ListConfigurationRevisionsResponse
listConfigurationRevisionsResponse_nextToken = (ListConfigurationRevisionsResponse -> Maybe Text)
-> (ListConfigurationRevisionsResponse
    -> Maybe Text -> ListConfigurationRevisionsResponse)
-> Lens' ListConfigurationRevisionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConfigurationRevisionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListConfigurationRevisionsResponse' :: ListConfigurationRevisionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListConfigurationRevisionsResponse
s@ListConfigurationRevisionsResponse' {} Maybe Text
a -> ListConfigurationRevisionsResponse
s {$sel:nextToken:ListConfigurationRevisionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListConfigurationRevisionsResponse)

-- | List of ConfigurationRevision objects.
listConfigurationRevisionsResponse_revisions :: Lens.Lens' ListConfigurationRevisionsResponse (Prelude.Maybe [ConfigurationRevision])
listConfigurationRevisionsResponse_revisions :: (Maybe [ConfigurationRevision]
 -> f (Maybe [ConfigurationRevision]))
-> ListConfigurationRevisionsResponse
-> f ListConfigurationRevisionsResponse
listConfigurationRevisionsResponse_revisions = (ListConfigurationRevisionsResponse
 -> Maybe [ConfigurationRevision])
-> (ListConfigurationRevisionsResponse
    -> Maybe [ConfigurationRevision]
    -> ListConfigurationRevisionsResponse)
-> Lens'
     ListConfigurationRevisionsResponse (Maybe [ConfigurationRevision])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConfigurationRevisionsResponse' {Maybe [ConfigurationRevision]
revisions :: Maybe [ConfigurationRevision]
$sel:revisions:ListConfigurationRevisionsResponse' :: ListConfigurationRevisionsResponse -> Maybe [ConfigurationRevision]
revisions} -> Maybe [ConfigurationRevision]
revisions) (\s :: ListConfigurationRevisionsResponse
s@ListConfigurationRevisionsResponse' {} Maybe [ConfigurationRevision]
a -> ListConfigurationRevisionsResponse
s {$sel:revisions:ListConfigurationRevisionsResponse' :: Maybe [ConfigurationRevision]
revisions = Maybe [ConfigurationRevision]
a} :: ListConfigurationRevisionsResponse) ((Maybe [ConfigurationRevision]
  -> f (Maybe [ConfigurationRevision]))
 -> ListConfigurationRevisionsResponse
 -> f ListConfigurationRevisionsResponse)
-> ((Maybe [ConfigurationRevision]
     -> f (Maybe [ConfigurationRevision]))
    -> Maybe [ConfigurationRevision]
    -> f (Maybe [ConfigurationRevision]))
-> (Maybe [ConfigurationRevision]
    -> f (Maybe [ConfigurationRevision]))
-> ListConfigurationRevisionsResponse
-> f ListConfigurationRevisionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ConfigurationRevision]
  [ConfigurationRevision]
  [ConfigurationRevision]
  [ConfigurationRevision]
-> Iso
     (Maybe [ConfigurationRevision])
     (Maybe [ConfigurationRevision])
     (Maybe [ConfigurationRevision])
     (Maybe [ConfigurationRevision])
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
  [ConfigurationRevision]
  [ConfigurationRevision]
  [ConfigurationRevision]
  [ConfigurationRevision]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListConfigurationRevisionsResponse