{-# 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.ListPackageVersionDependencies
-- 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 direct dependencies for a package version. The dependencies
-- are returned as
-- <https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageDependency.html PackageDependency>
-- objects. CodeArtifact extracts the dependencies for a package version
-- from the metadata file for the package format (for example, the
-- @package.json@ file for npm packages and the @pom.xml@ file for Maven).
-- Any package version dependencies that are not listed in the
-- configuration file are not returned.
module Amazonka.CodeArtifact.ListPackageVersionDependencies
  ( -- * Creating a Request
    ListPackageVersionDependencies (..),
    newListPackageVersionDependencies,

    -- * Request Lenses
    listPackageVersionDependencies_namespace,
    listPackageVersionDependencies_domainOwner,
    listPackageVersionDependencies_nextToken,
    listPackageVersionDependencies_domain,
    listPackageVersionDependencies_repository,
    listPackageVersionDependencies_format,
    listPackageVersionDependencies_package,
    listPackageVersionDependencies_packageVersion,

    -- * Destructuring the Response
    ListPackageVersionDependenciesResponse (..),
    newListPackageVersionDependenciesResponse,

    -- * Response Lenses
    listPackageVersionDependenciesResponse_format,
    listPackageVersionDependenciesResponse_namespace,
    listPackageVersionDependenciesResponse_versionRevision,
    listPackageVersionDependenciesResponse_dependencies,
    listPackageVersionDependenciesResponse_nextToken,
    listPackageVersionDependenciesResponse_version,
    listPackageVersionDependenciesResponse_package,
    listPackageVersionDependenciesResponse_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:/ 'newListPackageVersionDependencies' smart constructor.
data ListPackageVersionDependencies = ListPackageVersionDependencies'
  { -- | 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.
    ListPackageVersionDependencies -> 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.
    ListPackageVersionDependencies -> 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.
    ListPackageVersionDependencies -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the domain that contains the repository that contains the
    -- requested package version dependencies.
    ListPackageVersionDependencies -> Text
domain :: Prelude.Text,
    -- | The name of the repository that contains the requested package version.
    ListPackageVersionDependencies -> Text
repository :: Prelude.Text,
    -- | The format of the package with the requested dependencies. 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.
    ListPackageVersionDependencies -> PackageFormat
format :: PackageFormat,
    -- | The name of the package versions\' package.
    ListPackageVersionDependencies -> Text
package :: Prelude.Text,
    -- | A string that contains the package version (for example, @3.5.2@).
    ListPackageVersionDependencies -> Text
packageVersion :: Prelude.Text
  }
  deriving (ListPackageVersionDependencies
-> ListPackageVersionDependencies -> Bool
(ListPackageVersionDependencies
 -> ListPackageVersionDependencies -> Bool)
-> (ListPackageVersionDependencies
    -> ListPackageVersionDependencies -> Bool)
-> Eq ListPackageVersionDependencies
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPackageVersionDependencies
-> ListPackageVersionDependencies -> Bool
$c/= :: ListPackageVersionDependencies
-> ListPackageVersionDependencies -> Bool
== :: ListPackageVersionDependencies
-> ListPackageVersionDependencies -> Bool
$c== :: ListPackageVersionDependencies
-> ListPackageVersionDependencies -> Bool
Prelude.Eq, ReadPrec [ListPackageVersionDependencies]
ReadPrec ListPackageVersionDependencies
Int -> ReadS ListPackageVersionDependencies
ReadS [ListPackageVersionDependencies]
(Int -> ReadS ListPackageVersionDependencies)
-> ReadS [ListPackageVersionDependencies]
-> ReadPrec ListPackageVersionDependencies
-> ReadPrec [ListPackageVersionDependencies]
-> Read ListPackageVersionDependencies
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPackageVersionDependencies]
$creadListPrec :: ReadPrec [ListPackageVersionDependencies]
readPrec :: ReadPrec ListPackageVersionDependencies
$creadPrec :: ReadPrec ListPackageVersionDependencies
readList :: ReadS [ListPackageVersionDependencies]
$creadList :: ReadS [ListPackageVersionDependencies]
readsPrec :: Int -> ReadS ListPackageVersionDependencies
$creadsPrec :: Int -> ReadS ListPackageVersionDependencies
Prelude.Read, Int -> ListPackageVersionDependencies -> ShowS
[ListPackageVersionDependencies] -> ShowS
ListPackageVersionDependencies -> String
(Int -> ListPackageVersionDependencies -> ShowS)
-> (ListPackageVersionDependencies -> String)
-> ([ListPackageVersionDependencies] -> ShowS)
-> Show ListPackageVersionDependencies
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPackageVersionDependencies] -> ShowS
$cshowList :: [ListPackageVersionDependencies] -> ShowS
show :: ListPackageVersionDependencies -> String
$cshow :: ListPackageVersionDependencies -> String
showsPrec :: Int -> ListPackageVersionDependencies -> ShowS
$cshowsPrec :: Int -> ListPackageVersionDependencies -> ShowS
Prelude.Show, (forall x.
 ListPackageVersionDependencies
 -> Rep ListPackageVersionDependencies x)
-> (forall x.
    Rep ListPackageVersionDependencies x
    -> ListPackageVersionDependencies)
-> Generic ListPackageVersionDependencies
forall x.
Rep ListPackageVersionDependencies x
-> ListPackageVersionDependencies
forall x.
ListPackageVersionDependencies
-> Rep ListPackageVersionDependencies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPackageVersionDependencies x
-> ListPackageVersionDependencies
$cfrom :: forall x.
ListPackageVersionDependencies
-> Rep ListPackageVersionDependencies x
Prelude.Generic)

-- |
-- Create a value of 'ListPackageVersionDependencies' 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', 'listPackageVersionDependencies_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', 'listPackageVersionDependencies_domainOwner' - The 12-digit account number of the AWS account that owns the domain. It
-- does not include dashes or spaces.
--
-- 'nextToken', 'listPackageVersionDependencies_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.
--
-- 'domain', 'listPackageVersionDependencies_domain' - The name of the domain that contains the repository that contains the
-- requested package version dependencies.
--
-- 'repository', 'listPackageVersionDependencies_repository' - The name of the repository that contains the requested package version.
--
-- 'format', 'listPackageVersionDependencies_format' - The format of the package with the requested dependencies. 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', 'listPackageVersionDependencies_package' - The name of the package versions\' package.
--
-- 'packageVersion', 'listPackageVersionDependencies_packageVersion' - A string that contains the package version (for example, @3.5.2@).
newListPackageVersionDependencies ::
  -- | 'domain'
  Prelude.Text ->
  -- | 'repository'
  Prelude.Text ->
  -- | 'format'
  PackageFormat ->
  -- | 'package'
  Prelude.Text ->
  -- | 'packageVersion'
  Prelude.Text ->
  ListPackageVersionDependencies
newListPackageVersionDependencies :: Text
-> Text
-> PackageFormat
-> Text
-> Text
-> ListPackageVersionDependencies
newListPackageVersionDependencies
  Text
pDomain_
  Text
pRepository_
  PackageFormat
pFormat_
  Text
pPackage_
  Text
pPackageVersion_ =
    ListPackageVersionDependencies' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> PackageFormat
-> Text
-> Text
-> ListPackageVersionDependencies
ListPackageVersionDependencies'
      { $sel:namespace:ListPackageVersionDependencies' :: Maybe Text
namespace =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:domainOwner:ListPackageVersionDependencies' :: Maybe Text
domainOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListPackageVersionDependencies' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:domain:ListPackageVersionDependencies' :: Text
domain = Text
pDomain_,
        $sel:repository:ListPackageVersionDependencies' :: Text
repository = Text
pRepository_,
        $sel:format:ListPackageVersionDependencies' :: PackageFormat
format = PackageFormat
pFormat_,
        $sel:package:ListPackageVersionDependencies' :: Text
package = Text
pPackage_,
        $sel:packageVersion:ListPackageVersionDependencies' :: 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.
listPackageVersionDependencies_namespace :: Lens.Lens' ListPackageVersionDependencies (Prelude.Maybe Prelude.Text)
listPackageVersionDependencies_namespace :: (Maybe Text -> f (Maybe Text))
-> ListPackageVersionDependencies
-> f ListPackageVersionDependencies
listPackageVersionDependencies_namespace = (ListPackageVersionDependencies -> Maybe Text)
-> (ListPackageVersionDependencies
    -> Maybe Text -> ListPackageVersionDependencies)
-> Lens
     ListPackageVersionDependencies
     ListPackageVersionDependencies
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionDependencies' {Maybe Text
namespace :: Maybe Text
$sel:namespace:ListPackageVersionDependencies' :: ListPackageVersionDependencies -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: ListPackageVersionDependencies
s@ListPackageVersionDependencies' {} Maybe Text
a -> ListPackageVersionDependencies
s {$sel:namespace:ListPackageVersionDependencies' :: Maybe Text
namespace = Maybe Text
a} :: ListPackageVersionDependencies)

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

-- | 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.
listPackageVersionDependencies_nextToken :: Lens.Lens' ListPackageVersionDependencies (Prelude.Maybe Prelude.Text)
listPackageVersionDependencies_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPackageVersionDependencies
-> f ListPackageVersionDependencies
listPackageVersionDependencies_nextToken = (ListPackageVersionDependencies -> Maybe Text)
-> (ListPackageVersionDependencies
    -> Maybe Text -> ListPackageVersionDependencies)
-> Lens
     ListPackageVersionDependencies
     ListPackageVersionDependencies
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionDependencies' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPackageVersionDependencies' :: ListPackageVersionDependencies -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPackageVersionDependencies
s@ListPackageVersionDependencies' {} Maybe Text
a -> ListPackageVersionDependencies
s {$sel:nextToken:ListPackageVersionDependencies' :: Maybe Text
nextToken = Maybe Text
a} :: ListPackageVersionDependencies)

-- | The name of the domain that contains the repository that contains the
-- requested package version dependencies.
listPackageVersionDependencies_domain :: Lens.Lens' ListPackageVersionDependencies Prelude.Text
listPackageVersionDependencies_domain :: (Text -> f Text)
-> ListPackageVersionDependencies
-> f ListPackageVersionDependencies
listPackageVersionDependencies_domain = (ListPackageVersionDependencies -> Text)
-> (ListPackageVersionDependencies
    -> Text -> ListPackageVersionDependencies)
-> Lens
     ListPackageVersionDependencies
     ListPackageVersionDependencies
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionDependencies' {Text
domain :: Text
$sel:domain:ListPackageVersionDependencies' :: ListPackageVersionDependencies -> Text
domain} -> Text
domain) (\s :: ListPackageVersionDependencies
s@ListPackageVersionDependencies' {} Text
a -> ListPackageVersionDependencies
s {$sel:domain:ListPackageVersionDependencies' :: Text
domain = Text
a} :: ListPackageVersionDependencies)

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

-- | The format of the package with the requested dependencies. 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.
listPackageVersionDependencies_format :: Lens.Lens' ListPackageVersionDependencies PackageFormat
listPackageVersionDependencies_format :: (PackageFormat -> f PackageFormat)
-> ListPackageVersionDependencies
-> f ListPackageVersionDependencies
listPackageVersionDependencies_format = (ListPackageVersionDependencies -> PackageFormat)
-> (ListPackageVersionDependencies
    -> PackageFormat -> ListPackageVersionDependencies)
-> Lens
     ListPackageVersionDependencies
     ListPackageVersionDependencies
     PackageFormat
     PackageFormat
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionDependencies' {PackageFormat
format :: PackageFormat
$sel:format:ListPackageVersionDependencies' :: ListPackageVersionDependencies -> PackageFormat
format} -> PackageFormat
format) (\s :: ListPackageVersionDependencies
s@ListPackageVersionDependencies' {} PackageFormat
a -> ListPackageVersionDependencies
s {$sel:format:ListPackageVersionDependencies' :: PackageFormat
format = PackageFormat
a} :: ListPackageVersionDependencies)

-- | The name of the package versions\' package.
listPackageVersionDependencies_package :: Lens.Lens' ListPackageVersionDependencies Prelude.Text
listPackageVersionDependencies_package :: (Text -> f Text)
-> ListPackageVersionDependencies
-> f ListPackageVersionDependencies
listPackageVersionDependencies_package = (ListPackageVersionDependencies -> Text)
-> (ListPackageVersionDependencies
    -> Text -> ListPackageVersionDependencies)
-> Lens
     ListPackageVersionDependencies
     ListPackageVersionDependencies
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionDependencies' {Text
package :: Text
$sel:package:ListPackageVersionDependencies' :: ListPackageVersionDependencies -> Text
package} -> Text
package) (\s :: ListPackageVersionDependencies
s@ListPackageVersionDependencies' {} Text
a -> ListPackageVersionDependencies
s {$sel:package:ListPackageVersionDependencies' :: Text
package = Text
a} :: ListPackageVersionDependencies)

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

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

instance
  Prelude.NFData
    ListPackageVersionDependencies

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

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

instance Core.ToQuery ListPackageVersionDependencies where
  toQuery :: ListPackageVersionDependencies -> QueryString
toQuery ListPackageVersionDependencies' {Maybe Text
Text
PackageFormat
packageVersion :: Text
package :: Text
format :: PackageFormat
repository :: Text
domain :: Text
nextToken :: Maybe Text
domainOwner :: Maybe Text
namespace :: Maybe Text
$sel:packageVersion:ListPackageVersionDependencies' :: ListPackageVersionDependencies -> Text
$sel:package:ListPackageVersionDependencies' :: ListPackageVersionDependencies -> Text
$sel:format:ListPackageVersionDependencies' :: ListPackageVersionDependencies -> PackageFormat
$sel:repository:ListPackageVersionDependencies' :: ListPackageVersionDependencies -> Text
$sel:domain:ListPackageVersionDependencies' :: ListPackageVersionDependencies -> Text
$sel:nextToken:ListPackageVersionDependencies' :: ListPackageVersionDependencies -> Maybe Text
$sel:domainOwner:ListPackageVersionDependencies' :: ListPackageVersionDependencies -> Maybe Text
$sel:namespace:ListPackageVersionDependencies' :: ListPackageVersionDependencies -> 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
"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:/ 'newListPackageVersionDependenciesResponse' smart constructor.
data ListPackageVersionDependenciesResponse = ListPackageVersionDependenciesResponse'
  { -- | A format that specifies the type of the package that contains the
    -- returned dependencies. The valid values are:
    --
    -- -   @npm@
    --
    -- -   @pypi@
    --
    -- -   @maven@
    ListPackageVersionDependenciesResponse -> 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.
    ListPackageVersionDependenciesResponse -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
    -- | The current revision associated with the package version.
    ListPackageVersionDependenciesResponse -> Maybe Text
versionRevision :: Prelude.Maybe Prelude.Text,
    -- | The returned list of
    -- <https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageDependency.html PackageDependency>
    -- objects.
    ListPackageVersionDependenciesResponse -> Maybe [PackageDependency]
dependencies :: Prelude.Maybe [PackageDependency],
    -- | 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.
    ListPackageVersionDependenciesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The version of the package that is specified in the request.
    ListPackageVersionDependenciesResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The name of the package that contains the returned package versions
    -- dependencies.
    ListPackageVersionDependenciesResponse -> Maybe Text
package :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListPackageVersionDependenciesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListPackageVersionDependenciesResponse
-> ListPackageVersionDependenciesResponse -> Bool
(ListPackageVersionDependenciesResponse
 -> ListPackageVersionDependenciesResponse -> Bool)
-> (ListPackageVersionDependenciesResponse
    -> ListPackageVersionDependenciesResponse -> Bool)
-> Eq ListPackageVersionDependenciesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPackageVersionDependenciesResponse
-> ListPackageVersionDependenciesResponse -> Bool
$c/= :: ListPackageVersionDependenciesResponse
-> ListPackageVersionDependenciesResponse -> Bool
== :: ListPackageVersionDependenciesResponse
-> ListPackageVersionDependenciesResponse -> Bool
$c== :: ListPackageVersionDependenciesResponse
-> ListPackageVersionDependenciesResponse -> Bool
Prelude.Eq, ReadPrec [ListPackageVersionDependenciesResponse]
ReadPrec ListPackageVersionDependenciesResponse
Int -> ReadS ListPackageVersionDependenciesResponse
ReadS [ListPackageVersionDependenciesResponse]
(Int -> ReadS ListPackageVersionDependenciesResponse)
-> ReadS [ListPackageVersionDependenciesResponse]
-> ReadPrec ListPackageVersionDependenciesResponse
-> ReadPrec [ListPackageVersionDependenciesResponse]
-> Read ListPackageVersionDependenciesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPackageVersionDependenciesResponse]
$creadListPrec :: ReadPrec [ListPackageVersionDependenciesResponse]
readPrec :: ReadPrec ListPackageVersionDependenciesResponse
$creadPrec :: ReadPrec ListPackageVersionDependenciesResponse
readList :: ReadS [ListPackageVersionDependenciesResponse]
$creadList :: ReadS [ListPackageVersionDependenciesResponse]
readsPrec :: Int -> ReadS ListPackageVersionDependenciesResponse
$creadsPrec :: Int -> ReadS ListPackageVersionDependenciesResponse
Prelude.Read, Int -> ListPackageVersionDependenciesResponse -> ShowS
[ListPackageVersionDependenciesResponse] -> ShowS
ListPackageVersionDependenciesResponse -> String
(Int -> ListPackageVersionDependenciesResponse -> ShowS)
-> (ListPackageVersionDependenciesResponse -> String)
-> ([ListPackageVersionDependenciesResponse] -> ShowS)
-> Show ListPackageVersionDependenciesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPackageVersionDependenciesResponse] -> ShowS
$cshowList :: [ListPackageVersionDependenciesResponse] -> ShowS
show :: ListPackageVersionDependenciesResponse -> String
$cshow :: ListPackageVersionDependenciesResponse -> String
showsPrec :: Int -> ListPackageVersionDependenciesResponse -> ShowS
$cshowsPrec :: Int -> ListPackageVersionDependenciesResponse -> ShowS
Prelude.Show, (forall x.
 ListPackageVersionDependenciesResponse
 -> Rep ListPackageVersionDependenciesResponse x)
-> (forall x.
    Rep ListPackageVersionDependenciesResponse x
    -> ListPackageVersionDependenciesResponse)
-> Generic ListPackageVersionDependenciesResponse
forall x.
Rep ListPackageVersionDependenciesResponse x
-> ListPackageVersionDependenciesResponse
forall x.
ListPackageVersionDependenciesResponse
-> Rep ListPackageVersionDependenciesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPackageVersionDependenciesResponse x
-> ListPackageVersionDependenciesResponse
$cfrom :: forall x.
ListPackageVersionDependenciesResponse
-> Rep ListPackageVersionDependenciesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListPackageVersionDependenciesResponse' 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', 'listPackageVersionDependenciesResponse_format' - A format that specifies the type of the package that contains the
-- returned dependencies. The valid values are:
--
-- -   @npm@
--
-- -   @pypi@
--
-- -   @maven@
--
-- 'namespace', 'listPackageVersionDependenciesResponse_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', 'listPackageVersionDependenciesResponse_versionRevision' - The current revision associated with the package version.
--
-- 'dependencies', 'listPackageVersionDependenciesResponse_dependencies' - The returned list of
-- <https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageDependency.html PackageDependency>
-- objects.
--
-- 'nextToken', 'listPackageVersionDependenciesResponse_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.
--
-- 'version', 'listPackageVersionDependenciesResponse_version' - The version of the package that is specified in the request.
--
-- 'package', 'listPackageVersionDependenciesResponse_package' - The name of the package that contains the returned package versions
-- dependencies.
--
-- 'httpStatus', 'listPackageVersionDependenciesResponse_httpStatus' - The response's http status code.
newListPackageVersionDependenciesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPackageVersionDependenciesResponse
newListPackageVersionDependenciesResponse :: Int -> ListPackageVersionDependenciesResponse
newListPackageVersionDependenciesResponse
  Int
pHttpStatus_ =
    ListPackageVersionDependenciesResponse' :: Maybe PackageFormat
-> Maybe Text
-> Maybe Text
-> Maybe [PackageDependency]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ListPackageVersionDependenciesResponse
ListPackageVersionDependenciesResponse'
      { $sel:format:ListPackageVersionDependenciesResponse' :: Maybe PackageFormat
format =
          Maybe PackageFormat
forall a. Maybe a
Prelude.Nothing,
        $sel:namespace:ListPackageVersionDependenciesResponse' :: Maybe Text
namespace = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:versionRevision:ListPackageVersionDependenciesResponse' :: Maybe Text
versionRevision = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:dependencies:ListPackageVersionDependenciesResponse' :: Maybe [PackageDependency]
dependencies = Maybe [PackageDependency]
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListPackageVersionDependenciesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:version:ListPackageVersionDependenciesResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:package:ListPackageVersionDependenciesResponse' :: Maybe Text
package = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListPackageVersionDependenciesResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | A format that specifies the type of the package that contains the
-- returned dependencies. The valid values are:
--
-- -   @npm@
--
-- -   @pypi@
--
-- -   @maven@
listPackageVersionDependenciesResponse_format :: Lens.Lens' ListPackageVersionDependenciesResponse (Prelude.Maybe PackageFormat)
listPackageVersionDependenciesResponse_format :: (Maybe PackageFormat -> f (Maybe PackageFormat))
-> ListPackageVersionDependenciesResponse
-> f ListPackageVersionDependenciesResponse
listPackageVersionDependenciesResponse_format = (ListPackageVersionDependenciesResponse -> Maybe PackageFormat)
-> (ListPackageVersionDependenciesResponse
    -> Maybe PackageFormat -> ListPackageVersionDependenciesResponse)
-> Lens
     ListPackageVersionDependenciesResponse
     ListPackageVersionDependenciesResponse
     (Maybe PackageFormat)
     (Maybe PackageFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionDependenciesResponse' {Maybe PackageFormat
format :: Maybe PackageFormat
$sel:format:ListPackageVersionDependenciesResponse' :: ListPackageVersionDependenciesResponse -> Maybe PackageFormat
format} -> Maybe PackageFormat
format) (\s :: ListPackageVersionDependenciesResponse
s@ListPackageVersionDependenciesResponse' {} Maybe PackageFormat
a -> ListPackageVersionDependenciesResponse
s {$sel:format:ListPackageVersionDependenciesResponse' :: Maybe PackageFormat
format = Maybe PackageFormat
a} :: ListPackageVersionDependenciesResponse)

-- | 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.
listPackageVersionDependenciesResponse_namespace :: Lens.Lens' ListPackageVersionDependenciesResponse (Prelude.Maybe Prelude.Text)
listPackageVersionDependenciesResponse_namespace :: (Maybe Text -> f (Maybe Text))
-> ListPackageVersionDependenciesResponse
-> f ListPackageVersionDependenciesResponse
listPackageVersionDependenciesResponse_namespace = (ListPackageVersionDependenciesResponse -> Maybe Text)
-> (ListPackageVersionDependenciesResponse
    -> Maybe Text -> ListPackageVersionDependenciesResponse)
-> Lens
     ListPackageVersionDependenciesResponse
     ListPackageVersionDependenciesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionDependenciesResponse' {Maybe Text
namespace :: Maybe Text
$sel:namespace:ListPackageVersionDependenciesResponse' :: ListPackageVersionDependenciesResponse -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: ListPackageVersionDependenciesResponse
s@ListPackageVersionDependenciesResponse' {} Maybe Text
a -> ListPackageVersionDependenciesResponse
s {$sel:namespace:ListPackageVersionDependenciesResponse' :: Maybe Text
namespace = Maybe Text
a} :: ListPackageVersionDependenciesResponse)

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

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

-- | 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.
listPackageVersionDependenciesResponse_nextToken :: Lens.Lens' ListPackageVersionDependenciesResponse (Prelude.Maybe Prelude.Text)
listPackageVersionDependenciesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPackageVersionDependenciesResponse
-> f ListPackageVersionDependenciesResponse
listPackageVersionDependenciesResponse_nextToken = (ListPackageVersionDependenciesResponse -> Maybe Text)
-> (ListPackageVersionDependenciesResponse
    -> Maybe Text -> ListPackageVersionDependenciesResponse)
-> Lens
     ListPackageVersionDependenciesResponse
     ListPackageVersionDependenciesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionDependenciesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPackageVersionDependenciesResponse' :: ListPackageVersionDependenciesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPackageVersionDependenciesResponse
s@ListPackageVersionDependenciesResponse' {} Maybe Text
a -> ListPackageVersionDependenciesResponse
s {$sel:nextToken:ListPackageVersionDependenciesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListPackageVersionDependenciesResponse)

-- | The version of the package that is specified in the request.
listPackageVersionDependenciesResponse_version :: Lens.Lens' ListPackageVersionDependenciesResponse (Prelude.Maybe Prelude.Text)
listPackageVersionDependenciesResponse_version :: (Maybe Text -> f (Maybe Text))
-> ListPackageVersionDependenciesResponse
-> f ListPackageVersionDependenciesResponse
listPackageVersionDependenciesResponse_version = (ListPackageVersionDependenciesResponse -> Maybe Text)
-> (ListPackageVersionDependenciesResponse
    -> Maybe Text -> ListPackageVersionDependenciesResponse)
-> Lens
     ListPackageVersionDependenciesResponse
     ListPackageVersionDependenciesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPackageVersionDependenciesResponse' {Maybe Text
version :: Maybe Text
$sel:version:ListPackageVersionDependenciesResponse' :: ListPackageVersionDependenciesResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: ListPackageVersionDependenciesResponse
s@ListPackageVersionDependenciesResponse' {} Maybe Text
a -> ListPackageVersionDependenciesResponse
s {$sel:version:ListPackageVersionDependenciesResponse' :: Maybe Text
version = Maybe Text
a} :: ListPackageVersionDependenciesResponse)

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

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

instance
  Prelude.NFData
    ListPackageVersionDependenciesResponse