{-# 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.EMR.ListReleaseLabels
-- 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)
--
-- Retrieves release labels of EMR services in the region where the API is
-- called.
module Amazonka.EMR.ListReleaseLabels
  ( -- * Creating a Request
    ListReleaseLabels (..),
    newListReleaseLabels,

    -- * Request Lenses
    listReleaseLabels_filters,
    listReleaseLabels_nextToken,
    listReleaseLabels_maxResults,

    -- * Destructuring the Response
    ListReleaseLabelsResponse (..),
    newListReleaseLabelsResponse,

    -- * Response Lenses
    listReleaseLabelsResponse_releaseLabels,
    listReleaseLabelsResponse_nextToken,
    listReleaseLabelsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.EMR.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:/ 'newListReleaseLabels' smart constructor.
data ListReleaseLabels = ListReleaseLabels'
  { -- | Filters the results of the request. @Prefix@ specifies the prefix of
    -- release labels to return. @Application@ specifies the application
    -- (with\/without version) of release labels to return.
    ListReleaseLabels -> Maybe ReleaseLabelFilter
filters :: Prelude.Maybe ReleaseLabelFilter,
    -- | Specifies the next page of results. If @NextToken@ is not specified,
    -- which is usually the case for the first request of ListReleaseLabels,
    -- the first page of results are determined by other filtering parameters
    -- or by the latest version. The @ListReleaseLabels@ request fails if the
    -- identity (Amazon Web Services account ID) and all filtering parameters
    -- are different from the original request, or if the @NextToken@ is
    -- expired or tampered with.
    ListReleaseLabels -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Defines the maximum number of release labels to return in a single
    -- response. The default is @100@.
    ListReleaseLabels -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListReleaseLabels -> ListReleaseLabels -> Bool
(ListReleaseLabels -> ListReleaseLabels -> Bool)
-> (ListReleaseLabels -> ListReleaseLabels -> Bool)
-> Eq ListReleaseLabels
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReleaseLabels -> ListReleaseLabels -> Bool
$c/= :: ListReleaseLabels -> ListReleaseLabels -> Bool
== :: ListReleaseLabels -> ListReleaseLabels -> Bool
$c== :: ListReleaseLabels -> ListReleaseLabels -> Bool
Prelude.Eq, ReadPrec [ListReleaseLabels]
ReadPrec ListReleaseLabels
Int -> ReadS ListReleaseLabels
ReadS [ListReleaseLabels]
(Int -> ReadS ListReleaseLabels)
-> ReadS [ListReleaseLabels]
-> ReadPrec ListReleaseLabels
-> ReadPrec [ListReleaseLabels]
-> Read ListReleaseLabels
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReleaseLabels]
$creadListPrec :: ReadPrec [ListReleaseLabels]
readPrec :: ReadPrec ListReleaseLabels
$creadPrec :: ReadPrec ListReleaseLabels
readList :: ReadS [ListReleaseLabels]
$creadList :: ReadS [ListReleaseLabels]
readsPrec :: Int -> ReadS ListReleaseLabels
$creadsPrec :: Int -> ReadS ListReleaseLabels
Prelude.Read, Int -> ListReleaseLabels -> ShowS
[ListReleaseLabels] -> ShowS
ListReleaseLabels -> String
(Int -> ListReleaseLabels -> ShowS)
-> (ListReleaseLabels -> String)
-> ([ListReleaseLabels] -> ShowS)
-> Show ListReleaseLabels
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReleaseLabels] -> ShowS
$cshowList :: [ListReleaseLabels] -> ShowS
show :: ListReleaseLabels -> String
$cshow :: ListReleaseLabels -> String
showsPrec :: Int -> ListReleaseLabels -> ShowS
$cshowsPrec :: Int -> ListReleaseLabels -> ShowS
Prelude.Show, (forall x. ListReleaseLabels -> Rep ListReleaseLabels x)
-> (forall x. Rep ListReleaseLabels x -> ListReleaseLabels)
-> Generic ListReleaseLabels
forall x. Rep ListReleaseLabels x -> ListReleaseLabels
forall x. ListReleaseLabels -> Rep ListReleaseLabels x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListReleaseLabels x -> ListReleaseLabels
$cfrom :: forall x. ListReleaseLabels -> Rep ListReleaseLabels x
Prelude.Generic)

-- |
-- Create a value of 'ListReleaseLabels' 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:
--
-- 'filters', 'listReleaseLabels_filters' - Filters the results of the request. @Prefix@ specifies the prefix of
-- release labels to return. @Application@ specifies the application
-- (with\/without version) of release labels to return.
--
-- 'nextToken', 'listReleaseLabels_nextToken' - Specifies the next page of results. If @NextToken@ is not specified,
-- which is usually the case for the first request of ListReleaseLabels,
-- the first page of results are determined by other filtering parameters
-- or by the latest version. The @ListReleaseLabels@ request fails if the
-- identity (Amazon Web Services account ID) and all filtering parameters
-- are different from the original request, or if the @NextToken@ is
-- expired or tampered with.
--
-- 'maxResults', 'listReleaseLabels_maxResults' - Defines the maximum number of release labels to return in a single
-- response. The default is @100@.
newListReleaseLabels ::
  ListReleaseLabels
newListReleaseLabels :: ListReleaseLabels
newListReleaseLabels =
  ListReleaseLabels' :: Maybe ReleaseLabelFilter
-> Maybe Text -> Maybe Natural -> ListReleaseLabels
ListReleaseLabels'
    { $sel:filters:ListReleaseLabels' :: Maybe ReleaseLabelFilter
filters = Maybe ReleaseLabelFilter
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListReleaseLabels' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListReleaseLabels' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Filters the results of the request. @Prefix@ specifies the prefix of
-- release labels to return. @Application@ specifies the application
-- (with\/without version) of release labels to return.
listReleaseLabels_filters :: Lens.Lens' ListReleaseLabels (Prelude.Maybe ReleaseLabelFilter)
listReleaseLabels_filters :: (Maybe ReleaseLabelFilter -> f (Maybe ReleaseLabelFilter))
-> ListReleaseLabels -> f ListReleaseLabels
listReleaseLabels_filters = (ListReleaseLabels -> Maybe ReleaseLabelFilter)
-> (ListReleaseLabels
    -> Maybe ReleaseLabelFilter -> ListReleaseLabels)
-> Lens
     ListReleaseLabels
     ListReleaseLabels
     (Maybe ReleaseLabelFilter)
     (Maybe ReleaseLabelFilter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReleaseLabels' {Maybe ReleaseLabelFilter
filters :: Maybe ReleaseLabelFilter
$sel:filters:ListReleaseLabels' :: ListReleaseLabels -> Maybe ReleaseLabelFilter
filters} -> Maybe ReleaseLabelFilter
filters) (\s :: ListReleaseLabels
s@ListReleaseLabels' {} Maybe ReleaseLabelFilter
a -> ListReleaseLabels
s {$sel:filters:ListReleaseLabels' :: Maybe ReleaseLabelFilter
filters = Maybe ReleaseLabelFilter
a} :: ListReleaseLabels)

-- | Specifies the next page of results. If @NextToken@ is not specified,
-- which is usually the case for the first request of ListReleaseLabels,
-- the first page of results are determined by other filtering parameters
-- or by the latest version. The @ListReleaseLabels@ request fails if the
-- identity (Amazon Web Services account ID) and all filtering parameters
-- are different from the original request, or if the @NextToken@ is
-- expired or tampered with.
listReleaseLabels_nextToken :: Lens.Lens' ListReleaseLabels (Prelude.Maybe Prelude.Text)
listReleaseLabels_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListReleaseLabels -> f ListReleaseLabels
listReleaseLabels_nextToken = (ListReleaseLabels -> Maybe Text)
-> (ListReleaseLabels -> Maybe Text -> ListReleaseLabels)
-> Lens
     ListReleaseLabels ListReleaseLabels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReleaseLabels' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListReleaseLabels' :: ListReleaseLabels -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListReleaseLabels
s@ListReleaseLabels' {} Maybe Text
a -> ListReleaseLabels
s {$sel:nextToken:ListReleaseLabels' :: Maybe Text
nextToken = Maybe Text
a} :: ListReleaseLabels)

-- | Defines the maximum number of release labels to return in a single
-- response. The default is @100@.
listReleaseLabels_maxResults :: Lens.Lens' ListReleaseLabels (Prelude.Maybe Prelude.Natural)
listReleaseLabels_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListReleaseLabels -> f ListReleaseLabels
listReleaseLabels_maxResults = (ListReleaseLabels -> Maybe Natural)
-> (ListReleaseLabels -> Maybe Natural -> ListReleaseLabels)
-> Lens
     ListReleaseLabels ListReleaseLabels (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReleaseLabels' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListReleaseLabels' :: ListReleaseLabels -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListReleaseLabels
s@ListReleaseLabels' {} Maybe Natural
a -> ListReleaseLabels
s {$sel:maxResults:ListReleaseLabels' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListReleaseLabels)

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

instance Prelude.NFData ListReleaseLabels

instance Core.ToHeaders ListReleaseLabels where
  toHeaders :: ListReleaseLabels -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListReleaseLabels -> 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
"ElasticMapReduce.ListReleaseLabels" ::
                          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 ListReleaseLabels where
  toJSON :: ListReleaseLabels -> Value
toJSON ListReleaseLabels' {Maybe Natural
Maybe Text
Maybe ReleaseLabelFilter
maxResults :: Maybe Natural
nextToken :: Maybe Text
filters :: Maybe ReleaseLabelFilter
$sel:maxResults:ListReleaseLabels' :: ListReleaseLabels -> Maybe Natural
$sel:nextToken:ListReleaseLabels' :: ListReleaseLabels -> Maybe Text
$sel:filters:ListReleaseLabels' :: ListReleaseLabels -> Maybe ReleaseLabelFilter
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Filters" Text -> ReleaseLabelFilter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ReleaseLabelFilter -> Pair)
-> Maybe ReleaseLabelFilter -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReleaseLabelFilter
filters,
            (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
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

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

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

-- | /See:/ 'newListReleaseLabelsResponse' smart constructor.
data ListReleaseLabelsResponse = ListReleaseLabelsResponse'
  { -- | The returned release labels.
    ListReleaseLabelsResponse -> Maybe [Text]
releaseLabels :: Prelude.Maybe [Prelude.Text],
    -- | Used to paginate the next page of results if specified in the next
    -- @ListReleaseLabels@ request.
    ListReleaseLabelsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListReleaseLabelsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListReleaseLabelsResponse -> ListReleaseLabelsResponse -> Bool
(ListReleaseLabelsResponse -> ListReleaseLabelsResponse -> Bool)
-> (ListReleaseLabelsResponse -> ListReleaseLabelsResponse -> Bool)
-> Eq ListReleaseLabelsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReleaseLabelsResponse -> ListReleaseLabelsResponse -> Bool
$c/= :: ListReleaseLabelsResponse -> ListReleaseLabelsResponse -> Bool
== :: ListReleaseLabelsResponse -> ListReleaseLabelsResponse -> Bool
$c== :: ListReleaseLabelsResponse -> ListReleaseLabelsResponse -> Bool
Prelude.Eq, ReadPrec [ListReleaseLabelsResponse]
ReadPrec ListReleaseLabelsResponse
Int -> ReadS ListReleaseLabelsResponse
ReadS [ListReleaseLabelsResponse]
(Int -> ReadS ListReleaseLabelsResponse)
-> ReadS [ListReleaseLabelsResponse]
-> ReadPrec ListReleaseLabelsResponse
-> ReadPrec [ListReleaseLabelsResponse]
-> Read ListReleaseLabelsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReleaseLabelsResponse]
$creadListPrec :: ReadPrec [ListReleaseLabelsResponse]
readPrec :: ReadPrec ListReleaseLabelsResponse
$creadPrec :: ReadPrec ListReleaseLabelsResponse
readList :: ReadS [ListReleaseLabelsResponse]
$creadList :: ReadS [ListReleaseLabelsResponse]
readsPrec :: Int -> ReadS ListReleaseLabelsResponse
$creadsPrec :: Int -> ReadS ListReleaseLabelsResponse
Prelude.Read, Int -> ListReleaseLabelsResponse -> ShowS
[ListReleaseLabelsResponse] -> ShowS
ListReleaseLabelsResponse -> String
(Int -> ListReleaseLabelsResponse -> ShowS)
-> (ListReleaseLabelsResponse -> String)
-> ([ListReleaseLabelsResponse] -> ShowS)
-> Show ListReleaseLabelsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReleaseLabelsResponse] -> ShowS
$cshowList :: [ListReleaseLabelsResponse] -> ShowS
show :: ListReleaseLabelsResponse -> String
$cshow :: ListReleaseLabelsResponse -> String
showsPrec :: Int -> ListReleaseLabelsResponse -> ShowS
$cshowsPrec :: Int -> ListReleaseLabelsResponse -> ShowS
Prelude.Show, (forall x.
 ListReleaseLabelsResponse -> Rep ListReleaseLabelsResponse x)
-> (forall x.
    Rep ListReleaseLabelsResponse x -> ListReleaseLabelsResponse)
-> Generic ListReleaseLabelsResponse
forall x.
Rep ListReleaseLabelsResponse x -> ListReleaseLabelsResponse
forall x.
ListReleaseLabelsResponse -> Rep ListReleaseLabelsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListReleaseLabelsResponse x -> ListReleaseLabelsResponse
$cfrom :: forall x.
ListReleaseLabelsResponse -> Rep ListReleaseLabelsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListReleaseLabelsResponse' 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:
--
-- 'releaseLabels', 'listReleaseLabelsResponse_releaseLabels' - The returned release labels.
--
-- 'nextToken', 'listReleaseLabelsResponse_nextToken' - Used to paginate the next page of results if specified in the next
-- @ListReleaseLabels@ request.
--
-- 'httpStatus', 'listReleaseLabelsResponse_httpStatus' - The response's http status code.
newListReleaseLabelsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListReleaseLabelsResponse
newListReleaseLabelsResponse :: Int -> ListReleaseLabelsResponse
newListReleaseLabelsResponse Int
pHttpStatus_ =
  ListReleaseLabelsResponse' :: Maybe [Text] -> Maybe Text -> Int -> ListReleaseLabelsResponse
ListReleaseLabelsResponse'
    { $sel:releaseLabels:ListReleaseLabelsResponse' :: Maybe [Text]
releaseLabels =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListReleaseLabelsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListReleaseLabelsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The returned release labels.
listReleaseLabelsResponse_releaseLabels :: Lens.Lens' ListReleaseLabelsResponse (Prelude.Maybe [Prelude.Text])
listReleaseLabelsResponse_releaseLabels :: (Maybe [Text] -> f (Maybe [Text]))
-> ListReleaseLabelsResponse -> f ListReleaseLabelsResponse
listReleaseLabelsResponse_releaseLabels = (ListReleaseLabelsResponse -> Maybe [Text])
-> (ListReleaseLabelsResponse
    -> Maybe [Text] -> ListReleaseLabelsResponse)
-> Lens
     ListReleaseLabelsResponse
     ListReleaseLabelsResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReleaseLabelsResponse' {Maybe [Text]
releaseLabels :: Maybe [Text]
$sel:releaseLabels:ListReleaseLabelsResponse' :: ListReleaseLabelsResponse -> Maybe [Text]
releaseLabels} -> Maybe [Text]
releaseLabels) (\s :: ListReleaseLabelsResponse
s@ListReleaseLabelsResponse' {} Maybe [Text]
a -> ListReleaseLabelsResponse
s {$sel:releaseLabels:ListReleaseLabelsResponse' :: Maybe [Text]
releaseLabels = Maybe [Text]
a} :: ListReleaseLabelsResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ListReleaseLabelsResponse -> f ListReleaseLabelsResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListReleaseLabelsResponse
-> f ListReleaseLabelsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Used to paginate the next page of results if specified in the next
-- @ListReleaseLabels@ request.
listReleaseLabelsResponse_nextToken :: Lens.Lens' ListReleaseLabelsResponse (Prelude.Maybe Prelude.Text)
listReleaseLabelsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListReleaseLabelsResponse -> f ListReleaseLabelsResponse
listReleaseLabelsResponse_nextToken = (ListReleaseLabelsResponse -> Maybe Text)
-> (ListReleaseLabelsResponse
    -> Maybe Text -> ListReleaseLabelsResponse)
-> Lens
     ListReleaseLabelsResponse
     ListReleaseLabelsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReleaseLabelsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListReleaseLabelsResponse' :: ListReleaseLabelsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListReleaseLabelsResponse
s@ListReleaseLabelsResponse' {} Maybe Text
a -> ListReleaseLabelsResponse
s {$sel:nextToken:ListReleaseLabelsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListReleaseLabelsResponse)

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

instance Prelude.NFData ListReleaseLabelsResponse