{-# 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.CodeArtifact.ListPackageVersionAssets
-- 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
-- <https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_AssetSummary.html AssetSummary>
-- objects for assets in a package version.
--
-- This operation returns paginated results.
module Amazonka.CodeArtifact.ListPackageVersionAssets
  ( -- * Creating a Request
    ListPackageVersionAssets (..),
    newListPackageVersionAssets,

    -- * Request Lenses
    listPackageVersionAssets_namespace,
    listPackageVersionAssets_domainOwner,
    listPackageVersionAssets_nextToken,
    listPackageVersionAssets_maxResults,
    listPackageVersionAssets_domain,
    listPackageVersionAssets_repository,
    listPackageVersionAssets_format,
    listPackageVersionAssets_package,
    listPackageVersionAssets_packageVersion,

    -- * Destructuring the Response
    ListPackageVersionAssetsResponse (..),
    newListPackageVersionAssetsResponse,

    -- * Response Lenses
    listPackageVersionAssetsResponse_format,
    listPackageVersionAssetsResponse_namespace,
    listPackageVersionAssetsResponse_versionRevision,
    listPackageVersionAssetsResponse_nextToken,
    listPackageVersionAssetsResponse_version,
    listPackageVersionAssetsResponse_package,
    listPackageVersionAssetsResponse_assets,
    listPackageVersionAssetsResponse_httpStatus,
  )
where

import Amazonka.CodeArtifact.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

-- | /See:/ 'newListPackageVersionAssets' smart constructor.
data ListPackageVersionAssets = ListPackageVersionAssets'
  { -- | The namespace of the package. The package component that specifies its
    -- namespace depends on its type. For example:
    --
    -- -   The namespace of a Maven package is its @groupId@.
    --
    -- -   The namespace of an npm package is its @scope@.
    --
    -- -   A Python package does not contain a corresponding component, so
    --     Python packages do not have a namespace.
    ListPackageVersionAssets -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
    -- | The 12-digit account number of the AWS account that owns the domain. It
    -- does not include dashes or spaces.
    ListPackageVersionAssets -> Maybe Text
domainOwner :: Prelude.Maybe Prelude.Text,
    -- | The token for the next set of results. Use the value returned in the
    -- previous response in the next request to retrieve the next set of
    -- results.
    ListPackageVersionAssets -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return per page.
    ListPackageVersionAssets -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The name of the domain that contains the repository associated with the
    -- package version assets.
    ListPackageVersionAssets -> Text
domain :: Prelude.Text,
    -- | The name of the repository that contains the package that contains the
    -- returned package version assets.
    ListPackageVersionAssets -> Text
repository :: Prelude.Text,
    -- | The format of the package that contains the returned package version
    -- assets. The valid package types are:
    --
    -- -   @npm@: A Node Package Manager (npm) package.
    --
    -- -   @pypi@: A Python Package Index (PyPI) package.
    --
    -- -   @maven@: A Maven package that contains compiled code in a
    --     distributable format, such as a JAR file.
    ListPackageVersionAssets -> PackageFormat
format :: PackageFormat,
    -- | The name of the package that contains the returned package version
    -- assets.
    ListPackageVersionAssets -> Text
package :: Prelude.Text,
    -- | A string that contains the package version (for example, @3.5.2@).
    ListPackageVersionAssets -> Text
packageVersion :: Prelude.Text
  }
  deriving (ListPackageVersionAssets -> ListPackageVersionAssets -> Bool
(ListPackageVersionAssets -> ListPackageVersionAssets -> Bool)
-> (ListPackageVersionAssets -> ListPackageVersionAssets -> Bool)
-> Eq ListPackageVersionAssets
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPackageVersionAssets -> ListPackageVersionAssets -> Bool
$c/= :: ListPackageVersionAssets -> ListPackageVersionAssets -> Bool
== :: ListPackageVersionAssets -> ListPackageVersionAssets -> Bool
$c== :: ListPackageVersionAssets -> ListPackageVersionAssets -> Bool
Prelude.Eq, ReadPrec [ListPackageVersionAssets]
ReadPrec ListPackageVersionAssets
Int -> ReadS ListPackageVersionAssets
ReadS [ListPackageVersionAssets]
(Int -> ReadS ListPackageVersionAssets)
-> ReadS [ListPackageVersionAssets]
-> ReadPrec ListPackageVersionAssets
-> ReadPrec [ListPackageVersionAssets]
-> Read ListPackageVersionAssets
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPackageVersionAssets]
$creadListPrec :: ReadPrec [ListPackageVersionAssets]
readPrec :: ReadPrec ListPackageVersionAssets
$creadPrec :: ReadPrec ListPackageVersionAssets
readList :: ReadS [ListPackageVersionAssets]
$creadList :: ReadS [ListPackageVersionAssets]
readsPrec :: Int -> ReadS ListPackageVersionAssets
$creadsPrec :: Int -> ReadS ListPackageVersionAssets
Prelude.Read, Int -> ListPackageVersionAssets -> ShowS
[ListPackageVersionAssets] -> ShowS
ListPackageVersionAssets -> String
(Int -> ListPackageVersionAssets -> ShowS)
-> (ListPackageVersionAssets -> String)
-> ([ListPackageVersionAssets] -> ShowS)
-> Show ListPackageVersionAssets
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPackageVersionAssets] -> ShowS
$cshowList :: [ListPackageVersionAssets] -> ShowS
show :: ListPackageVersionAssets -> String
$cshow :: ListPackageVersionAssets -> String
showsPrec :: Int -> ListPackageVersionAssets -> ShowS
$cshowsPrec :: Int -> ListPackageVersionAssets -> ShowS
Prelude.Show, (forall x.
 ListPackageVersionAssets -> Rep ListPackageVersionAssets x)
-> (forall x.
    Rep ListPackageVersionAssets x -> ListPackageVersionAssets)
-> Generic ListPackageVersionAssets
forall x.
Rep ListPackageVersionAssets x -> ListPackageVersionAssets
forall x.
ListPackageVersionAssets -> Rep ListPackageVersionAssets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPackageVersionAssets x -> ListPackageVersionAssets
$cfrom :: forall x.
ListPackageVersionAssets -> Rep ListPackageVersionAssets x
Prelude.Generic)

-- |
-- Create a value of 'ListPackageVersionAssets' 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:
--
-- 'namespace', 'listPackageVersionAssets_namespace' - The namespace of the package. The package component that specifies its
-- namespace depends on its type. For example:
--
-- -   The namespace of a Maven package is its @groupId@.
--
-- -   The namespace of an npm package is its @scope@.
--
-- -   A Python package does not contain a corresponding component, so
--     Python packages do not have a namespace.
--
-- 'domainOwner', 'listPackageVersionAssets_domainOwner' - The 12-digit account number of the AWS account that owns the domain. It
-- does not include dashes or spaces.
--
-- 'nextToken', 'listPackageVersionAssets_nextToken' - The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
--
-- 'maxResults', 'listPackageVersionAssets_maxResults' - The maximum number of results to return per page.
--
-- 'domain', 'listPackageVersionAssets_domain' - The name of the domain that contains the repository associated with the
-- package version assets.
--
-- 'repository', 'listPackageVersionAssets_repository' - The name of the repository that contains the package that contains the
-- returned package version assets.
--
-- 'format', 'listPackageVersionAssets_format' - The format of the package that contains the returned package version
-- assets. The valid package types are:
--
-- -   @npm@: A Node Package Manager (npm) package.
--
-- -   @pypi@: A Python Package Index (PyPI) package.
--
-- -   @maven@: A Maven package that contains compiled code in a
--     distributable format, such as a JAR file.
--
-- 'package', 'listPackageVersionAssets_package' - The name of the package that contains the returned package version
-- assets.
--
-- 'packageVersion', 'listPackageVersionAssets_packageVersion' - A string that contains the package version (for example, @3.5.2@).
newListPackageVersionAssets ::
  -- | 'domain'
  Prelude.Text ->
  -- | 'repository'
  Prelude.Text ->
  -- | 'format'
  PackageFormat ->
  -- | 'package'
  Prelude.Text ->
  -- | 'packageVersion'
  Prelude.Text ->
  ListPackageVersionAssets
newListPackageVersionAssets :: Text
-> Text
-> PackageFormat
-> Text
-> Text
-> ListPackageVersionAssets
newListPackageVersionAssets
  Text
pDomain_
  Text
pRepository_
  PackageFormat
pFormat_
  Text
pPackage_
  Text
pPackageVersion_ =
    ListPackageVersionAssets' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Text
-> Text
-> PackageFormat
-> Text
-> Text
-> ListPackageVersionAssets
ListPackageVersionAssets'
      { $sel:namespace:ListPackageVersionAssets' :: Maybe Text
namespace =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:domainOwner:ListPackageVersionAssets' :: Maybe Text
domainOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListPackageVersionAssets' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxResults:ListPackageVersionAssets' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:domain:ListPackageVersionAssets' :: Text
domain = Text
pDomain_,
        $sel:repository:ListPackageVersionAssets' :: Text
repository = Text
pRepository_,
        $sel:format:ListPackageVersionAssets' :: PackageFormat
format = PackageFormat
pFormat_,
        $sel:package:ListPackageVersionAssets' :: Text
package = Text
pPackage_,
        $sel:packageVersion:ListPackageVersionAssets' :: Text
packageVersion = Text
pPackageVersion_
      }

-- | The namespace of the package. The package component that specifies its
-- namespace depends on its type. For example:
--
-- -   The namespace of a Maven package is its @groupId@.
--
-- -   The namespace of an npm package is its @scope@.
--
-- -   A Python package does not contain a corresponding component, so
--     Python packages do not have a namespace.
listPackageVersionAssets_namespace :: Lens.Lens' ListPackageVersionAssets (Prelude.Maybe Prelude.Text)
listPackageVersionAssets_namespace :: (Maybe Text -> f (Maybe Text))
-> ListPackageVersionAssets -> f ListPackageVersionAssets
listPackageVersionAssets_namespace = (ListPackageVersionAssets -> Maybe Text)
-> (ListPackageVersionAssets
    -> Maybe Text -> ListPackageVersionAssets)
-> Lens
     ListPackageVersionAssets
     ListPackageVersionAssets
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssets' {Maybe Text
namespace :: Maybe Text
$sel:namespace:ListPackageVersionAssets' :: ListPackageVersionAssets -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: ListPackageVersionAssets
s@ListPackageVersionAssets' {} Maybe Text
a -> ListPackageVersionAssets
s {$sel:namespace:ListPackageVersionAssets' :: Maybe Text
namespace = Maybe Text
a} :: ListPackageVersionAssets)

-- | The 12-digit account number of the AWS account that owns the domain. It
-- does not include dashes or spaces.
listPackageVersionAssets_domainOwner :: Lens.Lens' ListPackageVersionAssets (Prelude.Maybe Prelude.Text)
listPackageVersionAssets_domainOwner :: (Maybe Text -> f (Maybe Text))
-> ListPackageVersionAssets -> f ListPackageVersionAssets
listPackageVersionAssets_domainOwner = (ListPackageVersionAssets -> Maybe Text)
-> (ListPackageVersionAssets
    -> Maybe Text -> ListPackageVersionAssets)
-> Lens
     ListPackageVersionAssets
     ListPackageVersionAssets
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssets' {Maybe Text
domainOwner :: Maybe Text
$sel:domainOwner:ListPackageVersionAssets' :: ListPackageVersionAssets -> Maybe Text
domainOwner} -> Maybe Text
domainOwner) (\s :: ListPackageVersionAssets
s@ListPackageVersionAssets' {} Maybe Text
a -> ListPackageVersionAssets
s {$sel:domainOwner:ListPackageVersionAssets' :: Maybe Text
domainOwner = Maybe Text
a} :: ListPackageVersionAssets)

-- | The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
listPackageVersionAssets_nextToken :: Lens.Lens' ListPackageVersionAssets (Prelude.Maybe Prelude.Text)
listPackageVersionAssets_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPackageVersionAssets -> f ListPackageVersionAssets
listPackageVersionAssets_nextToken = (ListPackageVersionAssets -> Maybe Text)
-> (ListPackageVersionAssets
    -> Maybe Text -> ListPackageVersionAssets)
-> Lens
     ListPackageVersionAssets
     ListPackageVersionAssets
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssets' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPackageVersionAssets' :: ListPackageVersionAssets -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPackageVersionAssets
s@ListPackageVersionAssets' {} Maybe Text
a -> ListPackageVersionAssets
s {$sel:nextToken:ListPackageVersionAssets' :: Maybe Text
nextToken = Maybe Text
a} :: ListPackageVersionAssets)

-- | The maximum number of results to return per page.
listPackageVersionAssets_maxResults :: Lens.Lens' ListPackageVersionAssets (Prelude.Maybe Prelude.Natural)
listPackageVersionAssets_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListPackageVersionAssets -> f ListPackageVersionAssets
listPackageVersionAssets_maxResults = (ListPackageVersionAssets -> Maybe Natural)
-> (ListPackageVersionAssets
    -> Maybe Natural -> ListPackageVersionAssets)
-> Lens
     ListPackageVersionAssets
     ListPackageVersionAssets
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssets' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListPackageVersionAssets' :: ListPackageVersionAssets -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListPackageVersionAssets
s@ListPackageVersionAssets' {} Maybe Natural
a -> ListPackageVersionAssets
s {$sel:maxResults:ListPackageVersionAssets' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListPackageVersionAssets)

-- | The name of the domain that contains the repository associated with the
-- package version assets.
listPackageVersionAssets_domain :: Lens.Lens' ListPackageVersionAssets Prelude.Text
listPackageVersionAssets_domain :: (Text -> f Text)
-> ListPackageVersionAssets -> f ListPackageVersionAssets
listPackageVersionAssets_domain = (ListPackageVersionAssets -> Text)
-> (ListPackageVersionAssets -> Text -> ListPackageVersionAssets)
-> Lens ListPackageVersionAssets ListPackageVersionAssets Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssets' {Text
domain :: Text
$sel:domain:ListPackageVersionAssets' :: ListPackageVersionAssets -> Text
domain} -> Text
domain) (\s :: ListPackageVersionAssets
s@ListPackageVersionAssets' {} Text
a -> ListPackageVersionAssets
s {$sel:domain:ListPackageVersionAssets' :: Text
domain = Text
a} :: ListPackageVersionAssets)

-- | The name of the repository that contains the package that contains the
-- returned package version assets.
listPackageVersionAssets_repository :: Lens.Lens' ListPackageVersionAssets Prelude.Text
listPackageVersionAssets_repository :: (Text -> f Text)
-> ListPackageVersionAssets -> f ListPackageVersionAssets
listPackageVersionAssets_repository = (ListPackageVersionAssets -> Text)
-> (ListPackageVersionAssets -> Text -> ListPackageVersionAssets)
-> Lens ListPackageVersionAssets ListPackageVersionAssets Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssets' {Text
repository :: Text
$sel:repository:ListPackageVersionAssets' :: ListPackageVersionAssets -> Text
repository} -> Text
repository) (\s :: ListPackageVersionAssets
s@ListPackageVersionAssets' {} Text
a -> ListPackageVersionAssets
s {$sel:repository:ListPackageVersionAssets' :: Text
repository = Text
a} :: ListPackageVersionAssets)

-- | The format of the package that contains the returned package version
-- assets. The valid package types are:
--
-- -   @npm@: A Node Package Manager (npm) package.
--
-- -   @pypi@: A Python Package Index (PyPI) package.
--
-- -   @maven@: A Maven package that contains compiled code in a
--     distributable format, such as a JAR file.
listPackageVersionAssets_format :: Lens.Lens' ListPackageVersionAssets PackageFormat
listPackageVersionAssets_format :: (PackageFormat -> f PackageFormat)
-> ListPackageVersionAssets -> f ListPackageVersionAssets
listPackageVersionAssets_format = (ListPackageVersionAssets -> PackageFormat)
-> (ListPackageVersionAssets
    -> PackageFormat -> ListPackageVersionAssets)
-> Lens
     ListPackageVersionAssets
     ListPackageVersionAssets
     PackageFormat
     PackageFormat
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssets' {PackageFormat
format :: PackageFormat
$sel:format:ListPackageVersionAssets' :: ListPackageVersionAssets -> PackageFormat
format} -> PackageFormat
format) (\s :: ListPackageVersionAssets
s@ListPackageVersionAssets' {} PackageFormat
a -> ListPackageVersionAssets
s {$sel:format:ListPackageVersionAssets' :: PackageFormat
format = PackageFormat
a} :: ListPackageVersionAssets)

-- | The name of the package that contains the returned package version
-- assets.
listPackageVersionAssets_package :: Lens.Lens' ListPackageVersionAssets Prelude.Text
listPackageVersionAssets_package :: (Text -> f Text)
-> ListPackageVersionAssets -> f ListPackageVersionAssets
listPackageVersionAssets_package = (ListPackageVersionAssets -> Text)
-> (ListPackageVersionAssets -> Text -> ListPackageVersionAssets)
-> Lens ListPackageVersionAssets ListPackageVersionAssets Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssets' {Text
package :: Text
$sel:package:ListPackageVersionAssets' :: ListPackageVersionAssets -> Text
package} -> Text
package) (\s :: ListPackageVersionAssets
s@ListPackageVersionAssets' {} Text
a -> ListPackageVersionAssets
s {$sel:package:ListPackageVersionAssets' :: Text
package = Text
a} :: ListPackageVersionAssets)

-- | A string that contains the package version (for example, @3.5.2@).
listPackageVersionAssets_packageVersion :: Lens.Lens' ListPackageVersionAssets Prelude.Text
listPackageVersionAssets_packageVersion :: (Text -> f Text)
-> ListPackageVersionAssets -> f ListPackageVersionAssets
listPackageVersionAssets_packageVersion = (ListPackageVersionAssets -> Text)
-> (ListPackageVersionAssets -> Text -> ListPackageVersionAssets)
-> Lens ListPackageVersionAssets ListPackageVersionAssets Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssets' {Text
packageVersion :: Text
$sel:packageVersion:ListPackageVersionAssets' :: ListPackageVersionAssets -> Text
packageVersion} -> Text
packageVersion) (\s :: ListPackageVersionAssets
s@ListPackageVersionAssets' {} Text
a -> ListPackageVersionAssets
s {$sel:packageVersion:ListPackageVersionAssets' :: Text
packageVersion = Text
a} :: ListPackageVersionAssets)

instance Core.AWSPager ListPackageVersionAssets where
  page :: ListPackageVersionAssets
-> AWSResponse ListPackageVersionAssets
-> Maybe ListPackageVersionAssets
page ListPackageVersionAssets
rq AWSResponse ListPackageVersionAssets
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListPackageVersionAssets
ListPackageVersionAssetsResponse
rs
            ListPackageVersionAssetsResponse
-> Getting (First Text) ListPackageVersionAssetsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListPackageVersionAssetsResponse
-> Const (First Text) ListPackageVersionAssetsResponse
Lens' ListPackageVersionAssetsResponse (Maybe Text)
listPackageVersionAssetsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListPackageVersionAssetsResponse
 -> Const (First Text) ListPackageVersionAssetsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListPackageVersionAssetsResponse 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 ListPackageVersionAssets
forall a. Maybe a
Prelude.Nothing
    | Maybe [AssetSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListPackageVersionAssets
ListPackageVersionAssetsResponse
rs
            ListPackageVersionAssetsResponse
-> Getting
     (First [AssetSummary])
     ListPackageVersionAssetsResponse
     [AssetSummary]
-> Maybe [AssetSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [AssetSummary]
 -> Const (First [AssetSummary]) (Maybe [AssetSummary]))
-> ListPackageVersionAssetsResponse
-> Const (First [AssetSummary]) ListPackageVersionAssetsResponse
Lens' ListPackageVersionAssetsResponse (Maybe [AssetSummary])
listPackageVersionAssetsResponse_assets
              ((Maybe [AssetSummary]
  -> Const (First [AssetSummary]) (Maybe [AssetSummary]))
 -> ListPackageVersionAssetsResponse
 -> Const (First [AssetSummary]) ListPackageVersionAssetsResponse)
-> (([AssetSummary] -> Const (First [AssetSummary]) [AssetSummary])
    -> Maybe [AssetSummary]
    -> Const (First [AssetSummary]) (Maybe [AssetSummary]))
-> Getting
     (First [AssetSummary])
     ListPackageVersionAssetsResponse
     [AssetSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AssetSummary] -> Const (First [AssetSummary]) [AssetSummary])
-> Maybe [AssetSummary]
-> Const (First [AssetSummary]) (Maybe [AssetSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListPackageVersionAssets
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListPackageVersionAssets -> Maybe ListPackageVersionAssets
forall a. a -> Maybe a
Prelude.Just (ListPackageVersionAssets -> Maybe ListPackageVersionAssets)
-> ListPackageVersionAssets -> Maybe ListPackageVersionAssets
forall a b. (a -> b) -> a -> b
Prelude.$
        ListPackageVersionAssets
rq
          ListPackageVersionAssets
-> (ListPackageVersionAssets -> ListPackageVersionAssets)
-> ListPackageVersionAssets
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListPackageVersionAssets -> Identity ListPackageVersionAssets
Lens
  ListPackageVersionAssets
  ListPackageVersionAssets
  (Maybe Text)
  (Maybe Text)
listPackageVersionAssets_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListPackageVersionAssets -> Identity ListPackageVersionAssets)
-> Maybe Text
-> ListPackageVersionAssets
-> ListPackageVersionAssets
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListPackageVersionAssets
ListPackageVersionAssetsResponse
rs
          ListPackageVersionAssetsResponse
-> Getting (First Text) ListPackageVersionAssetsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListPackageVersionAssetsResponse
-> Const (First Text) ListPackageVersionAssetsResponse
Lens' ListPackageVersionAssetsResponse (Maybe Text)
listPackageVersionAssetsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListPackageVersionAssetsResponse
 -> Const (First Text) ListPackageVersionAssetsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListPackageVersionAssetsResponse 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 ListPackageVersionAssets where
  type
    AWSResponse ListPackageVersionAssets =
      ListPackageVersionAssetsResponse
  request :: ListPackageVersionAssets -> Request ListPackageVersionAssets
request = Service
-> ListPackageVersionAssets -> Request ListPackageVersionAssets
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListPackageVersionAssets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListPackageVersionAssets)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListPackageVersionAssets))
-> Logger
-> Service
-> Proxy ListPackageVersionAssets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListPackageVersionAssets)))
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 PackageFormat
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AssetSummary]
-> Int
-> ListPackageVersionAssetsResponse
ListPackageVersionAssetsResponse'
            (Maybe PackageFormat
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [AssetSummary]
 -> Int
 -> ListPackageVersionAssetsResponse)
-> Either String (Maybe PackageFormat)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [AssetSummary]
      -> Int
      -> ListPackageVersionAssetsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe PackageFormat)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"format")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [AssetSummary]
   -> Int
   -> ListPackageVersionAssetsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [AssetSummary]
      -> Int
      -> ListPackageVersionAssetsResponse)
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
"namespace")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [AssetSummary]
   -> Int
   -> ListPackageVersionAssetsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [AssetSummary]
      -> Int
      -> ListPackageVersionAssetsResponse)
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
"versionRevision")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [AssetSummary]
   -> Int
   -> ListPackageVersionAssetsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [AssetSummary]
      -> Int
      -> ListPackageVersionAssetsResponse)
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 Text
   -> Maybe Text
   -> Maybe [AssetSummary]
   -> Int
   -> ListPackageVersionAssetsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [AssetSummary] -> Int -> ListPackageVersionAssetsResponse)
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
"version")
            Either
  String
  (Maybe Text
   -> Maybe [AssetSummary] -> Int -> ListPackageVersionAssetsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [AssetSummary] -> Int -> ListPackageVersionAssetsResponse)
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
"package")
            Either
  String
  (Maybe [AssetSummary] -> Int -> ListPackageVersionAssetsResponse)
-> Either String (Maybe [AssetSummary])
-> Either String (Int -> ListPackageVersionAssetsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [AssetSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"assets" Either String (Maybe (Maybe [AssetSummary]))
-> Maybe [AssetSummary] -> Either String (Maybe [AssetSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AssetSummary]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> ListPackageVersionAssetsResponse)
-> Either String Int
-> Either String ListPackageVersionAssetsResponse
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 ListPackageVersionAssets

instance Prelude.NFData ListPackageVersionAssets

instance Core.ToHeaders ListPackageVersionAssets where
  toHeaders :: ListPackageVersionAssets -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListPackageVersionAssets -> 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 ListPackageVersionAssets where
  toJSON :: ListPackageVersionAssets -> Value
toJSON = Value -> ListPackageVersionAssets -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)

instance Core.ToPath ListPackageVersionAssets where
  toPath :: ListPackageVersionAssets -> ByteString
toPath = ByteString -> ListPackageVersionAssets -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/package/version/assets"

instance Core.ToQuery ListPackageVersionAssets where
  toQuery :: ListPackageVersionAssets -> QueryString
toQuery ListPackageVersionAssets' {Maybe Natural
Maybe Text
Text
PackageFormat
packageVersion :: Text
package :: Text
format :: PackageFormat
repository :: Text
domain :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
domainOwner :: Maybe Text
namespace :: Maybe Text
$sel:packageVersion:ListPackageVersionAssets' :: ListPackageVersionAssets -> Text
$sel:package:ListPackageVersionAssets' :: ListPackageVersionAssets -> Text
$sel:format:ListPackageVersionAssets' :: ListPackageVersionAssets -> PackageFormat
$sel:repository:ListPackageVersionAssets' :: ListPackageVersionAssets -> Text
$sel:domain:ListPackageVersionAssets' :: ListPackageVersionAssets -> Text
$sel:maxResults:ListPackageVersionAssets' :: ListPackageVersionAssets -> Maybe Natural
$sel:nextToken:ListPackageVersionAssets' :: ListPackageVersionAssets -> Maybe Text
$sel:domainOwner:ListPackageVersionAssets' :: ListPackageVersionAssets -> Maybe Text
$sel:namespace:ListPackageVersionAssets' :: ListPackageVersionAssets -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"namespace" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
namespace,
        ByteString
"domain-owner" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
domainOwner,
        ByteString
"next-token" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"max-results" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults,
        ByteString
"domain" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
domain,
        ByteString
"repository" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
repository,
        ByteString
"format" ByteString -> PackageFormat -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: PackageFormat
format,
        ByteString
"package" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
package,
        ByteString
"version" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
packageVersion
      ]

-- | /See:/ 'newListPackageVersionAssetsResponse' smart constructor.
data ListPackageVersionAssetsResponse = ListPackageVersionAssetsResponse'
  { -- | The format of the package that contains the returned package version
    -- assets.
    ListPackageVersionAssetsResponse -> Maybe PackageFormat
format :: Prelude.Maybe PackageFormat,
    -- | The namespace of the package. The package component that specifies its
    -- namespace depends on its type. For example:
    --
    -- -   The namespace of a Maven package is its @groupId@.
    --
    -- -   The namespace of an npm package is its @scope@.
    --
    -- -   A Python package does not contain a corresponding component, so
    --     Python packages do not have a namespace.
    ListPackageVersionAssetsResponse -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
    -- | The current revision associated with the package version.
    ListPackageVersionAssetsResponse -> Maybe Text
versionRevision :: Prelude.Maybe Prelude.Text,
    -- | If there are additional results, this is the token for the next set of
    -- results.
    ListPackageVersionAssetsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The version of the package associated with the returned assets.
    ListPackageVersionAssetsResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The name of the package that contains the returned package version
    -- assets.
    ListPackageVersionAssetsResponse -> Maybe Text
package :: Prelude.Maybe Prelude.Text,
    -- | The returned list of
    -- <https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_AssetSummary.html AssetSummary>
    -- objects.
    ListPackageVersionAssetsResponse -> Maybe [AssetSummary]
assets :: Prelude.Maybe [AssetSummary],
    -- | The response's http status code.
    ListPackageVersionAssetsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListPackageVersionAssetsResponse
-> ListPackageVersionAssetsResponse -> Bool
(ListPackageVersionAssetsResponse
 -> ListPackageVersionAssetsResponse -> Bool)
-> (ListPackageVersionAssetsResponse
    -> ListPackageVersionAssetsResponse -> Bool)
-> Eq ListPackageVersionAssetsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPackageVersionAssetsResponse
-> ListPackageVersionAssetsResponse -> Bool
$c/= :: ListPackageVersionAssetsResponse
-> ListPackageVersionAssetsResponse -> Bool
== :: ListPackageVersionAssetsResponse
-> ListPackageVersionAssetsResponse -> Bool
$c== :: ListPackageVersionAssetsResponse
-> ListPackageVersionAssetsResponse -> Bool
Prelude.Eq, ReadPrec [ListPackageVersionAssetsResponse]
ReadPrec ListPackageVersionAssetsResponse
Int -> ReadS ListPackageVersionAssetsResponse
ReadS [ListPackageVersionAssetsResponse]
(Int -> ReadS ListPackageVersionAssetsResponse)
-> ReadS [ListPackageVersionAssetsResponse]
-> ReadPrec ListPackageVersionAssetsResponse
-> ReadPrec [ListPackageVersionAssetsResponse]
-> Read ListPackageVersionAssetsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPackageVersionAssetsResponse]
$creadListPrec :: ReadPrec [ListPackageVersionAssetsResponse]
readPrec :: ReadPrec ListPackageVersionAssetsResponse
$creadPrec :: ReadPrec ListPackageVersionAssetsResponse
readList :: ReadS [ListPackageVersionAssetsResponse]
$creadList :: ReadS [ListPackageVersionAssetsResponse]
readsPrec :: Int -> ReadS ListPackageVersionAssetsResponse
$creadsPrec :: Int -> ReadS ListPackageVersionAssetsResponse
Prelude.Read, Int -> ListPackageVersionAssetsResponse -> ShowS
[ListPackageVersionAssetsResponse] -> ShowS
ListPackageVersionAssetsResponse -> String
(Int -> ListPackageVersionAssetsResponse -> ShowS)
-> (ListPackageVersionAssetsResponse -> String)
-> ([ListPackageVersionAssetsResponse] -> ShowS)
-> Show ListPackageVersionAssetsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPackageVersionAssetsResponse] -> ShowS
$cshowList :: [ListPackageVersionAssetsResponse] -> ShowS
show :: ListPackageVersionAssetsResponse -> String
$cshow :: ListPackageVersionAssetsResponse -> String
showsPrec :: Int -> ListPackageVersionAssetsResponse -> ShowS
$cshowsPrec :: Int -> ListPackageVersionAssetsResponse -> ShowS
Prelude.Show, (forall x.
 ListPackageVersionAssetsResponse
 -> Rep ListPackageVersionAssetsResponse x)
-> (forall x.
    Rep ListPackageVersionAssetsResponse x
    -> ListPackageVersionAssetsResponse)
-> Generic ListPackageVersionAssetsResponse
forall x.
Rep ListPackageVersionAssetsResponse x
-> ListPackageVersionAssetsResponse
forall x.
ListPackageVersionAssetsResponse
-> Rep ListPackageVersionAssetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPackageVersionAssetsResponse x
-> ListPackageVersionAssetsResponse
$cfrom :: forall x.
ListPackageVersionAssetsResponse
-> Rep ListPackageVersionAssetsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListPackageVersionAssetsResponse' 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:
--
-- 'format', 'listPackageVersionAssetsResponse_format' - The format of the package that contains the returned package version
-- assets.
--
-- 'namespace', 'listPackageVersionAssetsResponse_namespace' - The namespace of the package. The package component that specifies its
-- namespace depends on its type. For example:
--
-- -   The namespace of a Maven package is its @groupId@.
--
-- -   The namespace of an npm package is its @scope@.
--
-- -   A Python package does not contain a corresponding component, so
--     Python packages do not have a namespace.
--
-- 'versionRevision', 'listPackageVersionAssetsResponse_versionRevision' - The current revision associated with the package version.
--
-- 'nextToken', 'listPackageVersionAssetsResponse_nextToken' - If there are additional results, this is the token for the next set of
-- results.
--
-- 'version', 'listPackageVersionAssetsResponse_version' - The version of the package associated with the returned assets.
--
-- 'package', 'listPackageVersionAssetsResponse_package' - The name of the package that contains the returned package version
-- assets.
--
-- 'assets', 'listPackageVersionAssetsResponse_assets' - The returned list of
-- <https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_AssetSummary.html AssetSummary>
-- objects.
--
-- 'httpStatus', 'listPackageVersionAssetsResponse_httpStatus' - The response's http status code.
newListPackageVersionAssetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPackageVersionAssetsResponse
newListPackageVersionAssetsResponse :: Int -> ListPackageVersionAssetsResponse
newListPackageVersionAssetsResponse Int
pHttpStatus_ =
  ListPackageVersionAssetsResponse' :: Maybe PackageFormat
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AssetSummary]
-> Int
-> ListPackageVersionAssetsResponse
ListPackageVersionAssetsResponse'
    { $sel:format:ListPackageVersionAssetsResponse' :: Maybe PackageFormat
format =
        Maybe PackageFormat
forall a. Maybe a
Prelude.Nothing,
      $sel:namespace:ListPackageVersionAssetsResponse' :: Maybe Text
namespace = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:versionRevision:ListPackageVersionAssetsResponse' :: Maybe Text
versionRevision = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListPackageVersionAssetsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:ListPackageVersionAssetsResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:package:ListPackageVersionAssetsResponse' :: Maybe Text
package = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:assets:ListPackageVersionAssetsResponse' :: Maybe [AssetSummary]
assets = Maybe [AssetSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPackageVersionAssetsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The format of the package that contains the returned package version
-- assets.
listPackageVersionAssetsResponse_format :: Lens.Lens' ListPackageVersionAssetsResponse (Prelude.Maybe PackageFormat)
listPackageVersionAssetsResponse_format :: (Maybe PackageFormat -> f (Maybe PackageFormat))
-> ListPackageVersionAssetsResponse
-> f ListPackageVersionAssetsResponse
listPackageVersionAssetsResponse_format = (ListPackageVersionAssetsResponse -> Maybe PackageFormat)
-> (ListPackageVersionAssetsResponse
    -> Maybe PackageFormat -> ListPackageVersionAssetsResponse)
-> Lens
     ListPackageVersionAssetsResponse
     ListPackageVersionAssetsResponse
     (Maybe PackageFormat)
     (Maybe PackageFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssetsResponse' {Maybe PackageFormat
format :: Maybe PackageFormat
$sel:format:ListPackageVersionAssetsResponse' :: ListPackageVersionAssetsResponse -> Maybe PackageFormat
format} -> Maybe PackageFormat
format) (\s :: ListPackageVersionAssetsResponse
s@ListPackageVersionAssetsResponse' {} Maybe PackageFormat
a -> ListPackageVersionAssetsResponse
s {$sel:format:ListPackageVersionAssetsResponse' :: Maybe PackageFormat
format = Maybe PackageFormat
a} :: ListPackageVersionAssetsResponse)

-- | The namespace of the package. The package component that specifies its
-- namespace depends on its type. For example:
--
-- -   The namespace of a Maven package is its @groupId@.
--
-- -   The namespace of an npm package is its @scope@.
--
-- -   A Python package does not contain a corresponding component, so
--     Python packages do not have a namespace.
listPackageVersionAssetsResponse_namespace :: Lens.Lens' ListPackageVersionAssetsResponse (Prelude.Maybe Prelude.Text)
listPackageVersionAssetsResponse_namespace :: (Maybe Text -> f (Maybe Text))
-> ListPackageVersionAssetsResponse
-> f ListPackageVersionAssetsResponse
listPackageVersionAssetsResponse_namespace = (ListPackageVersionAssetsResponse -> Maybe Text)
-> (ListPackageVersionAssetsResponse
    -> Maybe Text -> ListPackageVersionAssetsResponse)
-> Lens' ListPackageVersionAssetsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssetsResponse' {Maybe Text
namespace :: Maybe Text
$sel:namespace:ListPackageVersionAssetsResponse' :: ListPackageVersionAssetsResponse -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: ListPackageVersionAssetsResponse
s@ListPackageVersionAssetsResponse' {} Maybe Text
a -> ListPackageVersionAssetsResponse
s {$sel:namespace:ListPackageVersionAssetsResponse' :: Maybe Text
namespace = Maybe Text
a} :: ListPackageVersionAssetsResponse)

-- | The current revision associated with the package version.
listPackageVersionAssetsResponse_versionRevision :: Lens.Lens' ListPackageVersionAssetsResponse (Prelude.Maybe Prelude.Text)
listPackageVersionAssetsResponse_versionRevision :: (Maybe Text -> f (Maybe Text))
-> ListPackageVersionAssetsResponse
-> f ListPackageVersionAssetsResponse
listPackageVersionAssetsResponse_versionRevision = (ListPackageVersionAssetsResponse -> Maybe Text)
-> (ListPackageVersionAssetsResponse
    -> Maybe Text -> ListPackageVersionAssetsResponse)
-> Lens' ListPackageVersionAssetsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssetsResponse' {Maybe Text
versionRevision :: Maybe Text
$sel:versionRevision:ListPackageVersionAssetsResponse' :: ListPackageVersionAssetsResponse -> Maybe Text
versionRevision} -> Maybe Text
versionRevision) (\s :: ListPackageVersionAssetsResponse
s@ListPackageVersionAssetsResponse' {} Maybe Text
a -> ListPackageVersionAssetsResponse
s {$sel:versionRevision:ListPackageVersionAssetsResponse' :: Maybe Text
versionRevision = Maybe Text
a} :: ListPackageVersionAssetsResponse)

-- | If there are additional results, this is the token for the next set of
-- results.
listPackageVersionAssetsResponse_nextToken :: Lens.Lens' ListPackageVersionAssetsResponse (Prelude.Maybe Prelude.Text)
listPackageVersionAssetsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPackageVersionAssetsResponse
-> f ListPackageVersionAssetsResponse
listPackageVersionAssetsResponse_nextToken = (ListPackageVersionAssetsResponse -> Maybe Text)
-> (ListPackageVersionAssetsResponse
    -> Maybe Text -> ListPackageVersionAssetsResponse)
-> Lens' ListPackageVersionAssetsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssetsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPackageVersionAssetsResponse' :: ListPackageVersionAssetsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPackageVersionAssetsResponse
s@ListPackageVersionAssetsResponse' {} Maybe Text
a -> ListPackageVersionAssetsResponse
s {$sel:nextToken:ListPackageVersionAssetsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListPackageVersionAssetsResponse)

-- | The version of the package associated with the returned assets.
listPackageVersionAssetsResponse_version :: Lens.Lens' ListPackageVersionAssetsResponse (Prelude.Maybe Prelude.Text)
listPackageVersionAssetsResponse_version :: (Maybe Text -> f (Maybe Text))
-> ListPackageVersionAssetsResponse
-> f ListPackageVersionAssetsResponse
listPackageVersionAssetsResponse_version = (ListPackageVersionAssetsResponse -> Maybe Text)
-> (ListPackageVersionAssetsResponse
    -> Maybe Text -> ListPackageVersionAssetsResponse)
-> Lens' ListPackageVersionAssetsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssetsResponse' {Maybe Text
version :: Maybe Text
$sel:version:ListPackageVersionAssetsResponse' :: ListPackageVersionAssetsResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: ListPackageVersionAssetsResponse
s@ListPackageVersionAssetsResponse' {} Maybe Text
a -> ListPackageVersionAssetsResponse
s {$sel:version:ListPackageVersionAssetsResponse' :: Maybe Text
version = Maybe Text
a} :: ListPackageVersionAssetsResponse)

-- | The name of the package that contains the returned package version
-- assets.
listPackageVersionAssetsResponse_package :: Lens.Lens' ListPackageVersionAssetsResponse (Prelude.Maybe Prelude.Text)
listPackageVersionAssetsResponse_package :: (Maybe Text -> f (Maybe Text))
-> ListPackageVersionAssetsResponse
-> f ListPackageVersionAssetsResponse
listPackageVersionAssetsResponse_package = (ListPackageVersionAssetsResponse -> Maybe Text)
-> (ListPackageVersionAssetsResponse
    -> Maybe Text -> ListPackageVersionAssetsResponse)
-> Lens' ListPackageVersionAssetsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssetsResponse' {Maybe Text
package :: Maybe Text
$sel:package:ListPackageVersionAssetsResponse' :: ListPackageVersionAssetsResponse -> Maybe Text
package} -> Maybe Text
package) (\s :: ListPackageVersionAssetsResponse
s@ListPackageVersionAssetsResponse' {} Maybe Text
a -> ListPackageVersionAssetsResponse
s {$sel:package:ListPackageVersionAssetsResponse' :: Maybe Text
package = Maybe Text
a} :: ListPackageVersionAssetsResponse)

-- | The returned list of
-- <https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_AssetSummary.html AssetSummary>
-- objects.
listPackageVersionAssetsResponse_assets :: Lens.Lens' ListPackageVersionAssetsResponse (Prelude.Maybe [AssetSummary])
listPackageVersionAssetsResponse_assets :: (Maybe [AssetSummary] -> f (Maybe [AssetSummary]))
-> ListPackageVersionAssetsResponse
-> f ListPackageVersionAssetsResponse
listPackageVersionAssetsResponse_assets = (ListPackageVersionAssetsResponse -> Maybe [AssetSummary])
-> (ListPackageVersionAssetsResponse
    -> Maybe [AssetSummary] -> ListPackageVersionAssetsResponse)
-> Lens' ListPackageVersionAssetsResponse (Maybe [AssetSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionAssetsResponse' {Maybe [AssetSummary]
assets :: Maybe [AssetSummary]
$sel:assets:ListPackageVersionAssetsResponse' :: ListPackageVersionAssetsResponse -> Maybe [AssetSummary]
assets} -> Maybe [AssetSummary]
assets) (\s :: ListPackageVersionAssetsResponse
s@ListPackageVersionAssetsResponse' {} Maybe [AssetSummary]
a -> ListPackageVersionAssetsResponse
s {$sel:assets:ListPackageVersionAssetsResponse' :: Maybe [AssetSummary]
assets = Maybe [AssetSummary]
a} :: ListPackageVersionAssetsResponse) ((Maybe [AssetSummary] -> f (Maybe [AssetSummary]))
 -> ListPackageVersionAssetsResponse
 -> f ListPackageVersionAssetsResponse)
-> ((Maybe [AssetSummary] -> f (Maybe [AssetSummary]))
    -> Maybe [AssetSummary] -> f (Maybe [AssetSummary]))
-> (Maybe [AssetSummary] -> f (Maybe [AssetSummary]))
-> ListPackageVersionAssetsResponse
-> f ListPackageVersionAssetsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AssetSummary] [AssetSummary] [AssetSummary] [AssetSummary]
-> Iso
     (Maybe [AssetSummary])
     (Maybe [AssetSummary])
     (Maybe [AssetSummary])
     (Maybe [AssetSummary])
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 [AssetSummary] [AssetSummary] [AssetSummary] [AssetSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListPackageVersionAssetsResponse