{-# 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.ImageBuilder.ListComponentBuildVersions
-- 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 list of component build versions for the specified semantic
-- version.
--
-- The semantic version has four nodes:
-- \<major>.\<minor>.\<patch>\/\<build>. You can assign values for the
-- first three, and can filter on all of them.
--
-- __Filtering:__ With semantic versioning, you have the flexibility to use
-- wildcards (x) to specify the most recent versions or nodes when
-- selecting the base image or components for your recipe. When you use a
-- wildcard in any node, all nodes to the right of the first wildcard must
-- also be wildcards.
module Amazonka.ImageBuilder.ListComponentBuildVersions
  ( -- * Creating a Request
    ListComponentBuildVersions (..),
    newListComponentBuildVersions,

    -- * Request Lenses
    listComponentBuildVersions_nextToken,
    listComponentBuildVersions_maxResults,
    listComponentBuildVersions_componentVersionArn,

    -- * Destructuring the Response
    ListComponentBuildVersionsResponse (..),
    newListComponentBuildVersionsResponse,

    -- * Response Lenses
    listComponentBuildVersionsResponse_requestId,
    listComponentBuildVersionsResponse_nextToken,
    listComponentBuildVersionsResponse_componentSummaryList,
    listComponentBuildVersionsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.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:/ 'newListComponentBuildVersions' smart constructor.
data ListComponentBuildVersions = ListComponentBuildVersions'
  { -- | A token to specify where to start paginating. This is the NextToken from
    -- a previously truncated response.
    ListComponentBuildVersions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum items to return in a request.
    ListComponentBuildVersions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The component version Amazon Resource Name (ARN) whose versions you want
    -- to list.
    ListComponentBuildVersions -> Text
componentVersionArn :: Prelude.Text
  }
  deriving (ListComponentBuildVersions -> ListComponentBuildVersions -> Bool
(ListComponentBuildVersions -> ListComponentBuildVersions -> Bool)
-> (ListComponentBuildVersions
    -> ListComponentBuildVersions -> Bool)
-> Eq ListComponentBuildVersions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListComponentBuildVersions -> ListComponentBuildVersions -> Bool
$c/= :: ListComponentBuildVersions -> ListComponentBuildVersions -> Bool
== :: ListComponentBuildVersions -> ListComponentBuildVersions -> Bool
$c== :: ListComponentBuildVersions -> ListComponentBuildVersions -> Bool
Prelude.Eq, ReadPrec [ListComponentBuildVersions]
ReadPrec ListComponentBuildVersions
Int -> ReadS ListComponentBuildVersions
ReadS [ListComponentBuildVersions]
(Int -> ReadS ListComponentBuildVersions)
-> ReadS [ListComponentBuildVersions]
-> ReadPrec ListComponentBuildVersions
-> ReadPrec [ListComponentBuildVersions]
-> Read ListComponentBuildVersions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListComponentBuildVersions]
$creadListPrec :: ReadPrec [ListComponentBuildVersions]
readPrec :: ReadPrec ListComponentBuildVersions
$creadPrec :: ReadPrec ListComponentBuildVersions
readList :: ReadS [ListComponentBuildVersions]
$creadList :: ReadS [ListComponentBuildVersions]
readsPrec :: Int -> ReadS ListComponentBuildVersions
$creadsPrec :: Int -> ReadS ListComponentBuildVersions
Prelude.Read, Int -> ListComponentBuildVersions -> ShowS
[ListComponentBuildVersions] -> ShowS
ListComponentBuildVersions -> String
(Int -> ListComponentBuildVersions -> ShowS)
-> (ListComponentBuildVersions -> String)
-> ([ListComponentBuildVersions] -> ShowS)
-> Show ListComponentBuildVersions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListComponentBuildVersions] -> ShowS
$cshowList :: [ListComponentBuildVersions] -> ShowS
show :: ListComponentBuildVersions -> String
$cshow :: ListComponentBuildVersions -> String
showsPrec :: Int -> ListComponentBuildVersions -> ShowS
$cshowsPrec :: Int -> ListComponentBuildVersions -> ShowS
Prelude.Show, (forall x.
 ListComponentBuildVersions -> Rep ListComponentBuildVersions x)
-> (forall x.
    Rep ListComponentBuildVersions x -> ListComponentBuildVersions)
-> Generic ListComponentBuildVersions
forall x.
Rep ListComponentBuildVersions x -> ListComponentBuildVersions
forall x.
ListComponentBuildVersions -> Rep ListComponentBuildVersions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListComponentBuildVersions x -> ListComponentBuildVersions
$cfrom :: forall x.
ListComponentBuildVersions -> Rep ListComponentBuildVersions x
Prelude.Generic)

-- |
-- Create a value of 'ListComponentBuildVersions' 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', 'listComponentBuildVersions_nextToken' - A token to specify where to start paginating. This is the NextToken from
-- a previously truncated response.
--
-- 'maxResults', 'listComponentBuildVersions_maxResults' - The maximum items to return in a request.
--
-- 'componentVersionArn', 'listComponentBuildVersions_componentVersionArn' - The component version Amazon Resource Name (ARN) whose versions you want
-- to list.
newListComponentBuildVersions ::
  -- | 'componentVersionArn'
  Prelude.Text ->
  ListComponentBuildVersions
newListComponentBuildVersions :: Text -> ListComponentBuildVersions
newListComponentBuildVersions Text
pComponentVersionArn_ =
  ListComponentBuildVersions' :: Maybe Text -> Maybe Natural -> Text -> ListComponentBuildVersions
ListComponentBuildVersions'
    { $sel:nextToken:ListComponentBuildVersions' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListComponentBuildVersions' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:componentVersionArn:ListComponentBuildVersions' :: Text
componentVersionArn = Text
pComponentVersionArn_
    }

-- | A token to specify where to start paginating. This is the NextToken from
-- a previously truncated response.
listComponentBuildVersions_nextToken :: Lens.Lens' ListComponentBuildVersions (Prelude.Maybe Prelude.Text)
listComponentBuildVersions_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListComponentBuildVersions -> f ListComponentBuildVersions
listComponentBuildVersions_nextToken = (ListComponentBuildVersions -> Maybe Text)
-> (ListComponentBuildVersions
    -> Maybe Text -> ListComponentBuildVersions)
-> Lens
     ListComponentBuildVersions
     ListComponentBuildVersions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListComponentBuildVersions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListComponentBuildVersions' :: ListComponentBuildVersions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListComponentBuildVersions
s@ListComponentBuildVersions' {} Maybe Text
a -> ListComponentBuildVersions
s {$sel:nextToken:ListComponentBuildVersions' :: Maybe Text
nextToken = Maybe Text
a} :: ListComponentBuildVersions)

-- | The maximum items to return in a request.
listComponentBuildVersions_maxResults :: Lens.Lens' ListComponentBuildVersions (Prelude.Maybe Prelude.Natural)
listComponentBuildVersions_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListComponentBuildVersions -> f ListComponentBuildVersions
listComponentBuildVersions_maxResults = (ListComponentBuildVersions -> Maybe Natural)
-> (ListComponentBuildVersions
    -> Maybe Natural -> ListComponentBuildVersions)
-> Lens
     ListComponentBuildVersions
     ListComponentBuildVersions
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListComponentBuildVersions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListComponentBuildVersions' :: ListComponentBuildVersions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListComponentBuildVersions
s@ListComponentBuildVersions' {} Maybe Natural
a -> ListComponentBuildVersions
s {$sel:maxResults:ListComponentBuildVersions' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListComponentBuildVersions)

-- | The component version Amazon Resource Name (ARN) whose versions you want
-- to list.
listComponentBuildVersions_componentVersionArn :: Lens.Lens' ListComponentBuildVersions Prelude.Text
listComponentBuildVersions_componentVersionArn :: (Text -> f Text)
-> ListComponentBuildVersions -> f ListComponentBuildVersions
listComponentBuildVersions_componentVersionArn = (ListComponentBuildVersions -> Text)
-> (ListComponentBuildVersions
    -> Text -> ListComponentBuildVersions)
-> Lens
     ListComponentBuildVersions ListComponentBuildVersions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListComponentBuildVersions' {Text
componentVersionArn :: Text
$sel:componentVersionArn:ListComponentBuildVersions' :: ListComponentBuildVersions -> Text
componentVersionArn} -> Text
componentVersionArn) (\s :: ListComponentBuildVersions
s@ListComponentBuildVersions' {} Text
a -> ListComponentBuildVersions
s {$sel:componentVersionArn:ListComponentBuildVersions' :: Text
componentVersionArn = Text
a} :: ListComponentBuildVersions)

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

instance Prelude.NFData ListComponentBuildVersions

instance Core.ToHeaders ListComponentBuildVersions where
  toHeaders :: ListComponentBuildVersions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListComponentBuildVersions -> 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.ToJSON ListComponentBuildVersions where
  toJSON :: ListComponentBuildVersions -> Value
toJSON ListComponentBuildVersions' {Maybe Natural
Maybe Text
Text
componentVersionArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:componentVersionArn:ListComponentBuildVersions' :: ListComponentBuildVersions -> Text
$sel:maxResults:ListComponentBuildVersions' :: ListComponentBuildVersions -> Maybe Natural
$sel:nextToken:ListComponentBuildVersions' :: ListComponentBuildVersions -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"componentVersionArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
componentVersionArn)
          ]
      )

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

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

-- | /See:/ 'newListComponentBuildVersionsResponse' smart constructor.
data ListComponentBuildVersionsResponse = ListComponentBuildVersionsResponse'
  { -- | The request ID that uniquely identifies this request.
    ListComponentBuildVersionsResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The next token used for paginated responses. When this is not empty,
    -- there are additional elements that the service has not included in this
    -- request. Use this token with the next request to retrieve additional
    -- objects.
    ListComponentBuildVersionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The list of component summaries for the specified semantic version.
    ListComponentBuildVersionsResponse -> Maybe [ComponentSummary]
componentSummaryList :: Prelude.Maybe [ComponentSummary],
    -- | The response's http status code.
    ListComponentBuildVersionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListComponentBuildVersionsResponse
-> ListComponentBuildVersionsResponse -> Bool
(ListComponentBuildVersionsResponse
 -> ListComponentBuildVersionsResponse -> Bool)
-> (ListComponentBuildVersionsResponse
    -> ListComponentBuildVersionsResponse -> Bool)
-> Eq ListComponentBuildVersionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListComponentBuildVersionsResponse
-> ListComponentBuildVersionsResponse -> Bool
$c/= :: ListComponentBuildVersionsResponse
-> ListComponentBuildVersionsResponse -> Bool
== :: ListComponentBuildVersionsResponse
-> ListComponentBuildVersionsResponse -> Bool
$c== :: ListComponentBuildVersionsResponse
-> ListComponentBuildVersionsResponse -> Bool
Prelude.Eq, ReadPrec [ListComponentBuildVersionsResponse]
ReadPrec ListComponentBuildVersionsResponse
Int -> ReadS ListComponentBuildVersionsResponse
ReadS [ListComponentBuildVersionsResponse]
(Int -> ReadS ListComponentBuildVersionsResponse)
-> ReadS [ListComponentBuildVersionsResponse]
-> ReadPrec ListComponentBuildVersionsResponse
-> ReadPrec [ListComponentBuildVersionsResponse]
-> Read ListComponentBuildVersionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListComponentBuildVersionsResponse]
$creadListPrec :: ReadPrec [ListComponentBuildVersionsResponse]
readPrec :: ReadPrec ListComponentBuildVersionsResponse
$creadPrec :: ReadPrec ListComponentBuildVersionsResponse
readList :: ReadS [ListComponentBuildVersionsResponse]
$creadList :: ReadS [ListComponentBuildVersionsResponse]
readsPrec :: Int -> ReadS ListComponentBuildVersionsResponse
$creadsPrec :: Int -> ReadS ListComponentBuildVersionsResponse
Prelude.Read, Int -> ListComponentBuildVersionsResponse -> ShowS
[ListComponentBuildVersionsResponse] -> ShowS
ListComponentBuildVersionsResponse -> String
(Int -> ListComponentBuildVersionsResponse -> ShowS)
-> (ListComponentBuildVersionsResponse -> String)
-> ([ListComponentBuildVersionsResponse] -> ShowS)
-> Show ListComponentBuildVersionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListComponentBuildVersionsResponse] -> ShowS
$cshowList :: [ListComponentBuildVersionsResponse] -> ShowS
show :: ListComponentBuildVersionsResponse -> String
$cshow :: ListComponentBuildVersionsResponse -> String
showsPrec :: Int -> ListComponentBuildVersionsResponse -> ShowS
$cshowsPrec :: Int -> ListComponentBuildVersionsResponse -> ShowS
Prelude.Show, (forall x.
 ListComponentBuildVersionsResponse
 -> Rep ListComponentBuildVersionsResponse x)
-> (forall x.
    Rep ListComponentBuildVersionsResponse x
    -> ListComponentBuildVersionsResponse)
-> Generic ListComponentBuildVersionsResponse
forall x.
Rep ListComponentBuildVersionsResponse x
-> ListComponentBuildVersionsResponse
forall x.
ListComponentBuildVersionsResponse
-> Rep ListComponentBuildVersionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListComponentBuildVersionsResponse x
-> ListComponentBuildVersionsResponse
$cfrom :: forall x.
ListComponentBuildVersionsResponse
-> Rep ListComponentBuildVersionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListComponentBuildVersionsResponse' 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:
--
-- 'requestId', 'listComponentBuildVersionsResponse_requestId' - The request ID that uniquely identifies this request.
--
-- 'nextToken', 'listComponentBuildVersionsResponse_nextToken' - The next token used for paginated responses. When this is not empty,
-- there are additional elements that the service has not included in this
-- request. Use this token with the next request to retrieve additional
-- objects.
--
-- 'componentSummaryList', 'listComponentBuildVersionsResponse_componentSummaryList' - The list of component summaries for the specified semantic version.
--
-- 'httpStatus', 'listComponentBuildVersionsResponse_httpStatus' - The response's http status code.
newListComponentBuildVersionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListComponentBuildVersionsResponse
newListComponentBuildVersionsResponse :: Int -> ListComponentBuildVersionsResponse
newListComponentBuildVersionsResponse Int
pHttpStatus_ =
  ListComponentBuildVersionsResponse' :: Maybe Text
-> Maybe Text
-> Maybe [ComponentSummary]
-> Int
-> ListComponentBuildVersionsResponse
ListComponentBuildVersionsResponse'
    { $sel:requestId:ListComponentBuildVersionsResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListComponentBuildVersionsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:componentSummaryList:ListComponentBuildVersionsResponse' :: Maybe [ComponentSummary]
componentSummaryList = Maybe [ComponentSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListComponentBuildVersionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The request ID that uniquely identifies this request.
listComponentBuildVersionsResponse_requestId :: Lens.Lens' ListComponentBuildVersionsResponse (Prelude.Maybe Prelude.Text)
listComponentBuildVersionsResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> ListComponentBuildVersionsResponse
-> f ListComponentBuildVersionsResponse
listComponentBuildVersionsResponse_requestId = (ListComponentBuildVersionsResponse -> Maybe Text)
-> (ListComponentBuildVersionsResponse
    -> Maybe Text -> ListComponentBuildVersionsResponse)
-> Lens
     ListComponentBuildVersionsResponse
     ListComponentBuildVersionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListComponentBuildVersionsResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:ListComponentBuildVersionsResponse' :: ListComponentBuildVersionsResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: ListComponentBuildVersionsResponse
s@ListComponentBuildVersionsResponse' {} Maybe Text
a -> ListComponentBuildVersionsResponse
s {$sel:requestId:ListComponentBuildVersionsResponse' :: Maybe Text
requestId = Maybe Text
a} :: ListComponentBuildVersionsResponse)

-- | The next token used for paginated responses. When this is not empty,
-- there are additional elements that the service has not included in this
-- request. Use this token with the next request to retrieve additional
-- objects.
listComponentBuildVersionsResponse_nextToken :: Lens.Lens' ListComponentBuildVersionsResponse (Prelude.Maybe Prelude.Text)
listComponentBuildVersionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListComponentBuildVersionsResponse
-> f ListComponentBuildVersionsResponse
listComponentBuildVersionsResponse_nextToken = (ListComponentBuildVersionsResponse -> Maybe Text)
-> (ListComponentBuildVersionsResponse
    -> Maybe Text -> ListComponentBuildVersionsResponse)
-> Lens
     ListComponentBuildVersionsResponse
     ListComponentBuildVersionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListComponentBuildVersionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListComponentBuildVersionsResponse' :: ListComponentBuildVersionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListComponentBuildVersionsResponse
s@ListComponentBuildVersionsResponse' {} Maybe Text
a -> ListComponentBuildVersionsResponse
s {$sel:nextToken:ListComponentBuildVersionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListComponentBuildVersionsResponse)

-- | The list of component summaries for the specified semantic version.
listComponentBuildVersionsResponse_componentSummaryList :: Lens.Lens' ListComponentBuildVersionsResponse (Prelude.Maybe [ComponentSummary])
listComponentBuildVersionsResponse_componentSummaryList :: (Maybe [ComponentSummary] -> f (Maybe [ComponentSummary]))
-> ListComponentBuildVersionsResponse
-> f ListComponentBuildVersionsResponse
listComponentBuildVersionsResponse_componentSummaryList = (ListComponentBuildVersionsResponse -> Maybe [ComponentSummary])
-> (ListComponentBuildVersionsResponse
    -> Maybe [ComponentSummary] -> ListComponentBuildVersionsResponse)
-> Lens
     ListComponentBuildVersionsResponse
     ListComponentBuildVersionsResponse
     (Maybe [ComponentSummary])
     (Maybe [ComponentSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListComponentBuildVersionsResponse' {Maybe [ComponentSummary]
componentSummaryList :: Maybe [ComponentSummary]
$sel:componentSummaryList:ListComponentBuildVersionsResponse' :: ListComponentBuildVersionsResponse -> Maybe [ComponentSummary]
componentSummaryList} -> Maybe [ComponentSummary]
componentSummaryList) (\s :: ListComponentBuildVersionsResponse
s@ListComponentBuildVersionsResponse' {} Maybe [ComponentSummary]
a -> ListComponentBuildVersionsResponse
s {$sel:componentSummaryList:ListComponentBuildVersionsResponse' :: Maybe [ComponentSummary]
componentSummaryList = Maybe [ComponentSummary]
a} :: ListComponentBuildVersionsResponse) ((Maybe [ComponentSummary] -> f (Maybe [ComponentSummary]))
 -> ListComponentBuildVersionsResponse
 -> f ListComponentBuildVersionsResponse)
-> ((Maybe [ComponentSummary] -> f (Maybe [ComponentSummary]))
    -> Maybe [ComponentSummary] -> f (Maybe [ComponentSummary]))
-> (Maybe [ComponentSummary] -> f (Maybe [ComponentSummary]))
-> ListComponentBuildVersionsResponse
-> f ListComponentBuildVersionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ComponentSummary]
  [ComponentSummary]
  [ComponentSummary]
  [ComponentSummary]
-> Iso
     (Maybe [ComponentSummary])
     (Maybe [ComponentSummary])
     (Maybe [ComponentSummary])
     (Maybe [ComponentSummary])
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
  [ComponentSummary]
  [ComponentSummary]
  [ComponentSummary]
  [ComponentSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListComponentBuildVersionsResponse