{-# 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.Amplify.ListArtifacts
-- 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 artifacts for a specified app, branch, and job.
module Amazonka.Amplify.ListArtifacts
  ( -- * Creating a Request
    ListArtifacts (..),
    newListArtifacts,

    -- * Request Lenses
    listArtifacts_nextToken,
    listArtifacts_maxResults,
    listArtifacts_appId,
    listArtifacts_branchName,
    listArtifacts_jobId,

    -- * Destructuring the Response
    ListArtifactsResponse (..),
    newListArtifactsResponse,

    -- * Response Lenses
    listArtifactsResponse_nextToken,
    listArtifactsResponse_httpStatus,
    listArtifactsResponse_artifacts,
  )
where

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

-- | Describes the request structure for the list artifacts request.
--
-- /See:/ 'newListArtifacts' smart constructor.
data ListArtifacts = ListArtifacts'
  { -- | A pagination token. Set to null to start listing artifacts from start.
    -- If a non-null pagination token is returned in a result, pass its value
    -- in here to list more artifacts.
    ListArtifacts -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of records to list in a single response.
    ListArtifacts -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The unique ID for an Amplify app.
    ListArtifacts -> Text
appId :: Prelude.Text,
    -- | The name of a branch that is part of an Amplify app.
    ListArtifacts -> Text
branchName :: Prelude.Text,
    -- | The unique ID for a job.
    ListArtifacts -> Text
jobId :: Prelude.Text
  }
  deriving (ListArtifacts -> ListArtifacts -> Bool
(ListArtifacts -> ListArtifacts -> Bool)
-> (ListArtifacts -> ListArtifacts -> Bool) -> Eq ListArtifacts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListArtifacts -> ListArtifacts -> Bool
$c/= :: ListArtifacts -> ListArtifacts -> Bool
== :: ListArtifacts -> ListArtifacts -> Bool
$c== :: ListArtifacts -> ListArtifacts -> Bool
Prelude.Eq, ReadPrec [ListArtifacts]
ReadPrec ListArtifacts
Int -> ReadS ListArtifacts
ReadS [ListArtifacts]
(Int -> ReadS ListArtifacts)
-> ReadS [ListArtifacts]
-> ReadPrec ListArtifacts
-> ReadPrec [ListArtifacts]
-> Read ListArtifacts
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListArtifacts]
$creadListPrec :: ReadPrec [ListArtifacts]
readPrec :: ReadPrec ListArtifacts
$creadPrec :: ReadPrec ListArtifacts
readList :: ReadS [ListArtifacts]
$creadList :: ReadS [ListArtifacts]
readsPrec :: Int -> ReadS ListArtifacts
$creadsPrec :: Int -> ReadS ListArtifacts
Prelude.Read, Int -> ListArtifacts -> ShowS
[ListArtifacts] -> ShowS
ListArtifacts -> String
(Int -> ListArtifacts -> ShowS)
-> (ListArtifacts -> String)
-> ([ListArtifacts] -> ShowS)
-> Show ListArtifacts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListArtifacts] -> ShowS
$cshowList :: [ListArtifacts] -> ShowS
show :: ListArtifacts -> String
$cshow :: ListArtifacts -> String
showsPrec :: Int -> ListArtifacts -> ShowS
$cshowsPrec :: Int -> ListArtifacts -> ShowS
Prelude.Show, (forall x. ListArtifacts -> Rep ListArtifacts x)
-> (forall x. Rep ListArtifacts x -> ListArtifacts)
-> Generic ListArtifacts
forall x. Rep ListArtifacts x -> ListArtifacts
forall x. ListArtifacts -> Rep ListArtifacts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListArtifacts x -> ListArtifacts
$cfrom :: forall x. ListArtifacts -> Rep ListArtifacts x
Prelude.Generic)

-- |
-- Create a value of 'ListArtifacts' 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', 'listArtifacts_nextToken' - A pagination token. Set to null to start listing artifacts from start.
-- If a non-null pagination token is returned in a result, pass its value
-- in here to list more artifacts.
--
-- 'maxResults', 'listArtifacts_maxResults' - The maximum number of records to list in a single response.
--
-- 'appId', 'listArtifacts_appId' - The unique ID for an Amplify app.
--
-- 'branchName', 'listArtifacts_branchName' - The name of a branch that is part of an Amplify app.
--
-- 'jobId', 'listArtifacts_jobId' - The unique ID for a job.
newListArtifacts ::
  -- | 'appId'
  Prelude.Text ->
  -- | 'branchName'
  Prelude.Text ->
  -- | 'jobId'
  Prelude.Text ->
  ListArtifacts
newListArtifacts :: Text -> Text -> Text -> ListArtifacts
newListArtifacts Text
pAppId_ Text
pBranchName_ Text
pJobId_ =
  ListArtifacts' :: Maybe Text
-> Maybe Natural -> Text -> Text -> Text -> ListArtifacts
ListArtifacts'
    { $sel:nextToken:ListArtifacts' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListArtifacts' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:appId:ListArtifacts' :: Text
appId = Text
pAppId_,
      $sel:branchName:ListArtifacts' :: Text
branchName = Text
pBranchName_,
      $sel:jobId:ListArtifacts' :: Text
jobId = Text
pJobId_
    }

-- | A pagination token. Set to null to start listing artifacts from start.
-- If a non-null pagination token is returned in a result, pass its value
-- in here to list more artifacts.
listArtifacts_nextToken :: Lens.Lens' ListArtifacts (Prelude.Maybe Prelude.Text)
listArtifacts_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListArtifacts -> f ListArtifacts
listArtifacts_nextToken = (ListArtifacts -> Maybe Text)
-> (ListArtifacts -> Maybe Text -> ListArtifacts)
-> Lens ListArtifacts ListArtifacts (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListArtifacts' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListArtifacts' :: ListArtifacts -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListArtifacts
s@ListArtifacts' {} Maybe Text
a -> ListArtifacts
s {$sel:nextToken:ListArtifacts' :: Maybe Text
nextToken = Maybe Text
a} :: ListArtifacts)

-- | The maximum number of records to list in a single response.
listArtifacts_maxResults :: Lens.Lens' ListArtifacts (Prelude.Maybe Prelude.Natural)
listArtifacts_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListArtifacts -> f ListArtifacts
listArtifacts_maxResults = (ListArtifacts -> Maybe Natural)
-> (ListArtifacts -> Maybe Natural -> ListArtifacts)
-> Lens ListArtifacts ListArtifacts (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListArtifacts' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListArtifacts' :: ListArtifacts -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListArtifacts
s@ListArtifacts' {} Maybe Natural
a -> ListArtifacts
s {$sel:maxResults:ListArtifacts' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListArtifacts)

-- | The unique ID for an Amplify app.
listArtifacts_appId :: Lens.Lens' ListArtifacts Prelude.Text
listArtifacts_appId :: (Text -> f Text) -> ListArtifacts -> f ListArtifacts
listArtifacts_appId = (ListArtifacts -> Text)
-> (ListArtifacts -> Text -> ListArtifacts)
-> Lens ListArtifacts ListArtifacts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListArtifacts' {Text
appId :: Text
$sel:appId:ListArtifacts' :: ListArtifacts -> Text
appId} -> Text
appId) (\s :: ListArtifacts
s@ListArtifacts' {} Text
a -> ListArtifacts
s {$sel:appId:ListArtifacts' :: Text
appId = Text
a} :: ListArtifacts)

-- | The name of a branch that is part of an Amplify app.
listArtifacts_branchName :: Lens.Lens' ListArtifacts Prelude.Text
listArtifacts_branchName :: (Text -> f Text) -> ListArtifacts -> f ListArtifacts
listArtifacts_branchName = (ListArtifacts -> Text)
-> (ListArtifacts -> Text -> ListArtifacts)
-> Lens ListArtifacts ListArtifacts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListArtifacts' {Text
branchName :: Text
$sel:branchName:ListArtifacts' :: ListArtifacts -> Text
branchName} -> Text
branchName) (\s :: ListArtifacts
s@ListArtifacts' {} Text
a -> ListArtifacts
s {$sel:branchName:ListArtifacts' :: Text
branchName = Text
a} :: ListArtifacts)

-- | The unique ID for a job.
listArtifacts_jobId :: Lens.Lens' ListArtifacts Prelude.Text
listArtifacts_jobId :: (Text -> f Text) -> ListArtifacts -> f ListArtifacts
listArtifacts_jobId = (ListArtifacts -> Text)
-> (ListArtifacts -> Text -> ListArtifacts)
-> Lens ListArtifacts ListArtifacts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListArtifacts' {Text
jobId :: Text
$sel:jobId:ListArtifacts' :: ListArtifacts -> Text
jobId} -> Text
jobId) (\s :: ListArtifacts
s@ListArtifacts' {} Text
a -> ListArtifacts
s {$sel:jobId:ListArtifacts' :: Text
jobId = Text
a} :: ListArtifacts)

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

instance Prelude.Hashable ListArtifacts

instance Prelude.NFData ListArtifacts

instance Core.ToHeaders ListArtifacts where
  toHeaders :: ListArtifacts -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListArtifacts -> 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 ListArtifacts where
  toPath :: ListArtifacts -> ByteString
toPath ListArtifacts' {Maybe Natural
Maybe Text
Text
jobId :: Text
branchName :: Text
appId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:jobId:ListArtifacts' :: ListArtifacts -> Text
$sel:branchName:ListArtifacts' :: ListArtifacts -> Text
$sel:appId:ListArtifacts' :: ListArtifacts -> Text
$sel:maxResults:ListArtifacts' :: ListArtifacts -> Maybe Natural
$sel:nextToken:ListArtifacts' :: ListArtifacts -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/apps/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
appId,
        ByteString
"/branches/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
branchName,
        ByteString
"/jobs/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
jobId,
        ByteString
"/artifacts"
      ]

instance Core.ToQuery ListArtifacts where
  toQuery :: ListArtifacts -> QueryString
toQuery ListArtifacts' {Maybe Natural
Maybe Text
Text
jobId :: Text
branchName :: Text
appId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:jobId:ListArtifacts' :: ListArtifacts -> Text
$sel:branchName:ListArtifacts' :: ListArtifacts -> Text
$sel:appId:ListArtifacts' :: ListArtifacts -> Text
$sel:maxResults:ListArtifacts' :: ListArtifacts -> Maybe Natural
$sel:nextToken:ListArtifacts' :: ListArtifacts -> 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
      ]

-- | The result structure for the list artifacts request.
--
-- /See:/ 'newListArtifactsResponse' smart constructor.
data ListArtifactsResponse = ListArtifactsResponse'
  { -- | A pagination token. If a non-null pagination token is returned in a
    -- result, pass its value in another request to retrieve more entries.
    ListArtifactsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListArtifactsResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of artifacts.
    ListArtifactsResponse -> [Artifact]
artifacts :: [Artifact]
  }
  deriving (ListArtifactsResponse -> ListArtifactsResponse -> Bool
(ListArtifactsResponse -> ListArtifactsResponse -> Bool)
-> (ListArtifactsResponse -> ListArtifactsResponse -> Bool)
-> Eq ListArtifactsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListArtifactsResponse -> ListArtifactsResponse -> Bool
$c/= :: ListArtifactsResponse -> ListArtifactsResponse -> Bool
== :: ListArtifactsResponse -> ListArtifactsResponse -> Bool
$c== :: ListArtifactsResponse -> ListArtifactsResponse -> Bool
Prelude.Eq, ReadPrec [ListArtifactsResponse]
ReadPrec ListArtifactsResponse
Int -> ReadS ListArtifactsResponse
ReadS [ListArtifactsResponse]
(Int -> ReadS ListArtifactsResponse)
-> ReadS [ListArtifactsResponse]
-> ReadPrec ListArtifactsResponse
-> ReadPrec [ListArtifactsResponse]
-> Read ListArtifactsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListArtifactsResponse]
$creadListPrec :: ReadPrec [ListArtifactsResponse]
readPrec :: ReadPrec ListArtifactsResponse
$creadPrec :: ReadPrec ListArtifactsResponse
readList :: ReadS [ListArtifactsResponse]
$creadList :: ReadS [ListArtifactsResponse]
readsPrec :: Int -> ReadS ListArtifactsResponse
$creadsPrec :: Int -> ReadS ListArtifactsResponse
Prelude.Read, Int -> ListArtifactsResponse -> ShowS
[ListArtifactsResponse] -> ShowS
ListArtifactsResponse -> String
(Int -> ListArtifactsResponse -> ShowS)
-> (ListArtifactsResponse -> String)
-> ([ListArtifactsResponse] -> ShowS)
-> Show ListArtifactsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListArtifactsResponse] -> ShowS
$cshowList :: [ListArtifactsResponse] -> ShowS
show :: ListArtifactsResponse -> String
$cshow :: ListArtifactsResponse -> String
showsPrec :: Int -> ListArtifactsResponse -> ShowS
$cshowsPrec :: Int -> ListArtifactsResponse -> ShowS
Prelude.Show, (forall x. ListArtifactsResponse -> Rep ListArtifactsResponse x)
-> (forall x. Rep ListArtifactsResponse x -> ListArtifactsResponse)
-> Generic ListArtifactsResponse
forall x. Rep ListArtifactsResponse x -> ListArtifactsResponse
forall x. ListArtifactsResponse -> Rep ListArtifactsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListArtifactsResponse x -> ListArtifactsResponse
$cfrom :: forall x. ListArtifactsResponse -> Rep ListArtifactsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListArtifactsResponse' 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', 'listArtifactsResponse_nextToken' - A pagination token. If a non-null pagination token is returned in a
-- result, pass its value in another request to retrieve more entries.
--
-- 'httpStatus', 'listArtifactsResponse_httpStatus' - The response's http status code.
--
-- 'artifacts', 'listArtifactsResponse_artifacts' - A list of artifacts.
newListArtifactsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListArtifactsResponse
newListArtifactsResponse :: Int -> ListArtifactsResponse
newListArtifactsResponse Int
pHttpStatus_ =
  ListArtifactsResponse' :: Maybe Text -> Int -> [Artifact] -> ListArtifactsResponse
ListArtifactsResponse'
    { $sel:nextToken:ListArtifactsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListArtifactsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:artifacts:ListArtifactsResponse' :: [Artifact]
artifacts = [Artifact]
forall a. Monoid a => a
Prelude.mempty
    }

-- | A pagination token. If a non-null pagination token is returned in a
-- result, pass its value in another request to retrieve more entries.
listArtifactsResponse_nextToken :: Lens.Lens' ListArtifactsResponse (Prelude.Maybe Prelude.Text)
listArtifactsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListArtifactsResponse -> f ListArtifactsResponse
listArtifactsResponse_nextToken = (ListArtifactsResponse -> Maybe Text)
-> (ListArtifactsResponse -> Maybe Text -> ListArtifactsResponse)
-> Lens
     ListArtifactsResponse
     ListArtifactsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListArtifactsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListArtifactsResponse' :: ListArtifactsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListArtifactsResponse
s@ListArtifactsResponse' {} Maybe Text
a -> ListArtifactsResponse
s {$sel:nextToken:ListArtifactsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListArtifactsResponse)

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

-- | A list of artifacts.
listArtifactsResponse_artifacts :: Lens.Lens' ListArtifactsResponse [Artifact]
listArtifactsResponse_artifacts :: ([Artifact] -> f [Artifact])
-> ListArtifactsResponse -> f ListArtifactsResponse
listArtifactsResponse_artifacts = (ListArtifactsResponse -> [Artifact])
-> (ListArtifactsResponse -> [Artifact] -> ListArtifactsResponse)
-> Lens
     ListArtifactsResponse ListArtifactsResponse [Artifact] [Artifact]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListArtifactsResponse' {[Artifact]
artifacts :: [Artifact]
$sel:artifacts:ListArtifactsResponse' :: ListArtifactsResponse -> [Artifact]
artifacts} -> [Artifact]
artifacts) (\s :: ListArtifactsResponse
s@ListArtifactsResponse' {} [Artifact]
a -> ListArtifactsResponse
s {$sel:artifacts:ListArtifactsResponse' :: [Artifact]
artifacts = [Artifact]
a} :: ListArtifactsResponse) (([Artifact] -> f [Artifact])
 -> ListArtifactsResponse -> f ListArtifactsResponse)
-> (([Artifact] -> f [Artifact]) -> [Artifact] -> f [Artifact])
-> ([Artifact] -> f [Artifact])
-> ListArtifactsResponse
-> f ListArtifactsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Artifact] -> f [Artifact]) -> [Artifact] -> f [Artifact]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListArtifactsResponse