{-# 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.UpdatePackageVersionsStatus
-- 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)
--
-- Updates the status of one or more versions of a package.
module Amazonka.CodeArtifact.UpdatePackageVersionsStatus
  ( -- * Creating a Request
    UpdatePackageVersionsStatus (..),
    newUpdatePackageVersionsStatus,

    -- * Request Lenses
    updatePackageVersionsStatus_expectedStatus,
    updatePackageVersionsStatus_versionRevisions,
    updatePackageVersionsStatus_namespace,
    updatePackageVersionsStatus_domainOwner,
    updatePackageVersionsStatus_domain,
    updatePackageVersionsStatus_repository,
    updatePackageVersionsStatus_format,
    updatePackageVersionsStatus_package,
    updatePackageVersionsStatus_versions,
    updatePackageVersionsStatus_targetStatus,

    -- * Destructuring the Response
    UpdatePackageVersionsStatusResponse (..),
    newUpdatePackageVersionsStatusResponse,

    -- * Response Lenses
    updatePackageVersionsStatusResponse_failedVersions,
    updatePackageVersionsStatusResponse_successfulVersions,
    updatePackageVersionsStatusResponse_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:/ 'newUpdatePackageVersionsStatus' smart constructor.
data UpdatePackageVersionsStatus = UpdatePackageVersionsStatus'
  { -- | The package version’s expected status before it is updated. If
    -- @expectedStatus@ is provided, the package version\'s status is updated
    -- only if its status at the time @UpdatePackageVersionsStatus@ is called
    -- matches @expectedStatus@.
    UpdatePackageVersionsStatus -> Maybe PackageVersionStatus
expectedStatus :: Prelude.Maybe PackageVersionStatus,
    -- | A map of package versions and package version revisions. The map @key@
    -- is the package version (for example, @3.5.2@), and the map @value@ is
    -- the package version revision.
    UpdatePackageVersionsStatus -> Maybe (HashMap Text Text)
versionRevisions :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | 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.
    UpdatePackageVersionsStatus -> 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.
    UpdatePackageVersionsStatus -> Maybe Text
domainOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the domain that contains the repository that contains the
    -- package versions with a status to be updated.
    UpdatePackageVersionsStatus -> Text
domain :: Prelude.Text,
    -- | The repository that contains the package versions with the status you
    -- want to update.
    UpdatePackageVersionsStatus -> Text
repository :: Prelude.Text,
    -- | A format that specifies the type of the package with the statuses to
    -- update. The valid values are:
    --
    -- -   @npm@
    --
    -- -   @pypi@
    --
    -- -   @maven@
    UpdatePackageVersionsStatus -> PackageFormat
format :: PackageFormat,
    -- | The name of the package with the version statuses to update.
    UpdatePackageVersionsStatus -> Text
package :: Prelude.Text,
    -- | An array of strings that specify the versions of the package with the
    -- statuses to update.
    UpdatePackageVersionsStatus -> [Text]
versions :: [Prelude.Text],
    -- | The status you want to change the package version status to.
    UpdatePackageVersionsStatus -> PackageVersionStatus
targetStatus :: PackageVersionStatus
  }
  deriving (UpdatePackageVersionsStatus -> UpdatePackageVersionsStatus -> Bool
(UpdatePackageVersionsStatus
 -> UpdatePackageVersionsStatus -> Bool)
-> (UpdatePackageVersionsStatus
    -> UpdatePackageVersionsStatus -> Bool)
-> Eq UpdatePackageVersionsStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePackageVersionsStatus -> UpdatePackageVersionsStatus -> Bool
$c/= :: UpdatePackageVersionsStatus -> UpdatePackageVersionsStatus -> Bool
== :: UpdatePackageVersionsStatus -> UpdatePackageVersionsStatus -> Bool
$c== :: UpdatePackageVersionsStatus -> UpdatePackageVersionsStatus -> Bool
Prelude.Eq, ReadPrec [UpdatePackageVersionsStatus]
ReadPrec UpdatePackageVersionsStatus
Int -> ReadS UpdatePackageVersionsStatus
ReadS [UpdatePackageVersionsStatus]
(Int -> ReadS UpdatePackageVersionsStatus)
-> ReadS [UpdatePackageVersionsStatus]
-> ReadPrec UpdatePackageVersionsStatus
-> ReadPrec [UpdatePackageVersionsStatus]
-> Read UpdatePackageVersionsStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdatePackageVersionsStatus]
$creadListPrec :: ReadPrec [UpdatePackageVersionsStatus]
readPrec :: ReadPrec UpdatePackageVersionsStatus
$creadPrec :: ReadPrec UpdatePackageVersionsStatus
readList :: ReadS [UpdatePackageVersionsStatus]
$creadList :: ReadS [UpdatePackageVersionsStatus]
readsPrec :: Int -> ReadS UpdatePackageVersionsStatus
$creadsPrec :: Int -> ReadS UpdatePackageVersionsStatus
Prelude.Read, Int -> UpdatePackageVersionsStatus -> ShowS
[UpdatePackageVersionsStatus] -> ShowS
UpdatePackageVersionsStatus -> String
(Int -> UpdatePackageVersionsStatus -> ShowS)
-> (UpdatePackageVersionsStatus -> String)
-> ([UpdatePackageVersionsStatus] -> ShowS)
-> Show UpdatePackageVersionsStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePackageVersionsStatus] -> ShowS
$cshowList :: [UpdatePackageVersionsStatus] -> ShowS
show :: UpdatePackageVersionsStatus -> String
$cshow :: UpdatePackageVersionsStatus -> String
showsPrec :: Int -> UpdatePackageVersionsStatus -> ShowS
$cshowsPrec :: Int -> UpdatePackageVersionsStatus -> ShowS
Prelude.Show, (forall x.
 UpdatePackageVersionsStatus -> Rep UpdatePackageVersionsStatus x)
-> (forall x.
    Rep UpdatePackageVersionsStatus x -> UpdatePackageVersionsStatus)
-> Generic UpdatePackageVersionsStatus
forall x.
Rep UpdatePackageVersionsStatus x -> UpdatePackageVersionsStatus
forall x.
UpdatePackageVersionsStatus -> Rep UpdatePackageVersionsStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdatePackageVersionsStatus x -> UpdatePackageVersionsStatus
$cfrom :: forall x.
UpdatePackageVersionsStatus -> Rep UpdatePackageVersionsStatus x
Prelude.Generic)

-- |
-- Create a value of 'UpdatePackageVersionsStatus' 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:
--
-- 'expectedStatus', 'updatePackageVersionsStatus_expectedStatus' - The package version’s expected status before it is updated. If
-- @expectedStatus@ is provided, the package version\'s status is updated
-- only if its status at the time @UpdatePackageVersionsStatus@ is called
-- matches @expectedStatus@.
--
-- 'versionRevisions', 'updatePackageVersionsStatus_versionRevisions' - A map of package versions and package version revisions. The map @key@
-- is the package version (for example, @3.5.2@), and the map @value@ is
-- the package version revision.
--
-- 'namespace', 'updatePackageVersionsStatus_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', 'updatePackageVersionsStatus_domainOwner' - The 12-digit account number of the AWS account that owns the domain. It
-- does not include dashes or spaces.
--
-- 'domain', 'updatePackageVersionsStatus_domain' - The name of the domain that contains the repository that contains the
-- package versions with a status to be updated.
--
-- 'repository', 'updatePackageVersionsStatus_repository' - The repository that contains the package versions with the status you
-- want to update.
--
-- 'format', 'updatePackageVersionsStatus_format' - A format that specifies the type of the package with the statuses to
-- update. The valid values are:
--
-- -   @npm@
--
-- -   @pypi@
--
-- -   @maven@
--
-- 'package', 'updatePackageVersionsStatus_package' - The name of the package with the version statuses to update.
--
-- 'versions', 'updatePackageVersionsStatus_versions' - An array of strings that specify the versions of the package with the
-- statuses to update.
--
-- 'targetStatus', 'updatePackageVersionsStatus_targetStatus' - The status you want to change the package version status to.
newUpdatePackageVersionsStatus ::
  -- | 'domain'
  Prelude.Text ->
  -- | 'repository'
  Prelude.Text ->
  -- | 'format'
  PackageFormat ->
  -- | 'package'
  Prelude.Text ->
  -- | 'targetStatus'
  PackageVersionStatus ->
  UpdatePackageVersionsStatus
newUpdatePackageVersionsStatus :: Text
-> Text
-> PackageFormat
-> Text
-> PackageVersionStatus
-> UpdatePackageVersionsStatus
newUpdatePackageVersionsStatus
  Text
pDomain_
  Text
pRepository_
  PackageFormat
pFormat_
  Text
pPackage_
  PackageVersionStatus
pTargetStatus_ =
    UpdatePackageVersionsStatus' :: Maybe PackageVersionStatus
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> PackageFormat
-> Text
-> [Text]
-> PackageVersionStatus
-> UpdatePackageVersionsStatus
UpdatePackageVersionsStatus'
      { $sel:expectedStatus:UpdatePackageVersionsStatus' :: Maybe PackageVersionStatus
expectedStatus =
          Maybe PackageVersionStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:versionRevisions:UpdatePackageVersionsStatus' :: Maybe (HashMap Text Text)
versionRevisions = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:namespace:UpdatePackageVersionsStatus' :: Maybe Text
namespace = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:domainOwner:UpdatePackageVersionsStatus' :: Maybe Text
domainOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:domain:UpdatePackageVersionsStatus' :: Text
domain = Text
pDomain_,
        $sel:repository:UpdatePackageVersionsStatus' :: Text
repository = Text
pRepository_,
        $sel:format:UpdatePackageVersionsStatus' :: PackageFormat
format = PackageFormat
pFormat_,
        $sel:package:UpdatePackageVersionsStatus' :: Text
package = Text
pPackage_,
        $sel:versions:UpdatePackageVersionsStatus' :: [Text]
versions = [Text]
forall a. Monoid a => a
Prelude.mempty,
        $sel:targetStatus:UpdatePackageVersionsStatus' :: PackageVersionStatus
targetStatus = PackageVersionStatus
pTargetStatus_
      }

-- | The package version’s expected status before it is updated. If
-- @expectedStatus@ is provided, the package version\'s status is updated
-- only if its status at the time @UpdatePackageVersionsStatus@ is called
-- matches @expectedStatus@.
updatePackageVersionsStatus_expectedStatus :: Lens.Lens' UpdatePackageVersionsStatus (Prelude.Maybe PackageVersionStatus)
updatePackageVersionsStatus_expectedStatus :: (Maybe PackageVersionStatus -> f (Maybe PackageVersionStatus))
-> UpdatePackageVersionsStatus -> f UpdatePackageVersionsStatus
updatePackageVersionsStatus_expectedStatus = (UpdatePackageVersionsStatus -> Maybe PackageVersionStatus)
-> (UpdatePackageVersionsStatus
    -> Maybe PackageVersionStatus -> UpdatePackageVersionsStatus)
-> Lens
     UpdatePackageVersionsStatus
     UpdatePackageVersionsStatus
     (Maybe PackageVersionStatus)
     (Maybe PackageVersionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePackageVersionsStatus' {Maybe PackageVersionStatus
expectedStatus :: Maybe PackageVersionStatus
$sel:expectedStatus:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Maybe PackageVersionStatus
expectedStatus} -> Maybe PackageVersionStatus
expectedStatus) (\s :: UpdatePackageVersionsStatus
s@UpdatePackageVersionsStatus' {} Maybe PackageVersionStatus
a -> UpdatePackageVersionsStatus
s {$sel:expectedStatus:UpdatePackageVersionsStatus' :: Maybe PackageVersionStatus
expectedStatus = Maybe PackageVersionStatus
a} :: UpdatePackageVersionsStatus)

-- | A map of package versions and package version revisions. The map @key@
-- is the package version (for example, @3.5.2@), and the map @value@ is
-- the package version revision.
updatePackageVersionsStatus_versionRevisions :: Lens.Lens' UpdatePackageVersionsStatus (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updatePackageVersionsStatus_versionRevisions :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdatePackageVersionsStatus -> f UpdatePackageVersionsStatus
updatePackageVersionsStatus_versionRevisions = (UpdatePackageVersionsStatus -> Maybe (HashMap Text Text))
-> (UpdatePackageVersionsStatus
    -> Maybe (HashMap Text Text) -> UpdatePackageVersionsStatus)
-> Lens
     UpdatePackageVersionsStatus
     UpdatePackageVersionsStatus
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePackageVersionsStatus' {Maybe (HashMap Text Text)
versionRevisions :: Maybe (HashMap Text Text)
$sel:versionRevisions:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Maybe (HashMap Text Text)
versionRevisions} -> Maybe (HashMap Text Text)
versionRevisions) (\s :: UpdatePackageVersionsStatus
s@UpdatePackageVersionsStatus' {} Maybe (HashMap Text Text)
a -> UpdatePackageVersionsStatus
s {$sel:versionRevisions:UpdatePackageVersionsStatus' :: Maybe (HashMap Text Text)
versionRevisions = Maybe (HashMap Text Text)
a} :: UpdatePackageVersionsStatus) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdatePackageVersionsStatus -> f UpdatePackageVersionsStatus)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdatePackageVersionsStatus
-> f UpdatePackageVersionsStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

-- | The name of the domain that contains the repository that contains the
-- package versions with a status to be updated.
updatePackageVersionsStatus_domain :: Lens.Lens' UpdatePackageVersionsStatus Prelude.Text
updatePackageVersionsStatus_domain :: (Text -> f Text)
-> UpdatePackageVersionsStatus -> f UpdatePackageVersionsStatus
updatePackageVersionsStatus_domain = (UpdatePackageVersionsStatus -> Text)
-> (UpdatePackageVersionsStatus
    -> Text -> UpdatePackageVersionsStatus)
-> Lens
     UpdatePackageVersionsStatus UpdatePackageVersionsStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePackageVersionsStatus' {Text
domain :: Text
$sel:domain:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Text
domain} -> Text
domain) (\s :: UpdatePackageVersionsStatus
s@UpdatePackageVersionsStatus' {} Text
a -> UpdatePackageVersionsStatus
s {$sel:domain:UpdatePackageVersionsStatus' :: Text
domain = Text
a} :: UpdatePackageVersionsStatus)

-- | The repository that contains the package versions with the status you
-- want to update.
updatePackageVersionsStatus_repository :: Lens.Lens' UpdatePackageVersionsStatus Prelude.Text
updatePackageVersionsStatus_repository :: (Text -> f Text)
-> UpdatePackageVersionsStatus -> f UpdatePackageVersionsStatus
updatePackageVersionsStatus_repository = (UpdatePackageVersionsStatus -> Text)
-> (UpdatePackageVersionsStatus
    -> Text -> UpdatePackageVersionsStatus)
-> Lens
     UpdatePackageVersionsStatus UpdatePackageVersionsStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePackageVersionsStatus' {Text
repository :: Text
$sel:repository:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Text
repository} -> Text
repository) (\s :: UpdatePackageVersionsStatus
s@UpdatePackageVersionsStatus' {} Text
a -> UpdatePackageVersionsStatus
s {$sel:repository:UpdatePackageVersionsStatus' :: Text
repository = Text
a} :: UpdatePackageVersionsStatus)

-- | A format that specifies the type of the package with the statuses to
-- update. The valid values are:
--
-- -   @npm@
--
-- -   @pypi@
--
-- -   @maven@
updatePackageVersionsStatus_format :: Lens.Lens' UpdatePackageVersionsStatus PackageFormat
updatePackageVersionsStatus_format :: (PackageFormat -> f PackageFormat)
-> UpdatePackageVersionsStatus -> f UpdatePackageVersionsStatus
updatePackageVersionsStatus_format = (UpdatePackageVersionsStatus -> PackageFormat)
-> (UpdatePackageVersionsStatus
    -> PackageFormat -> UpdatePackageVersionsStatus)
-> Lens
     UpdatePackageVersionsStatus
     UpdatePackageVersionsStatus
     PackageFormat
     PackageFormat
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePackageVersionsStatus' {PackageFormat
format :: PackageFormat
$sel:format:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> PackageFormat
format} -> PackageFormat
format) (\s :: UpdatePackageVersionsStatus
s@UpdatePackageVersionsStatus' {} PackageFormat
a -> UpdatePackageVersionsStatus
s {$sel:format:UpdatePackageVersionsStatus' :: PackageFormat
format = PackageFormat
a} :: UpdatePackageVersionsStatus)

-- | The name of the package with the version statuses to update.
updatePackageVersionsStatus_package :: Lens.Lens' UpdatePackageVersionsStatus Prelude.Text
updatePackageVersionsStatus_package :: (Text -> f Text)
-> UpdatePackageVersionsStatus -> f UpdatePackageVersionsStatus
updatePackageVersionsStatus_package = (UpdatePackageVersionsStatus -> Text)
-> (UpdatePackageVersionsStatus
    -> Text -> UpdatePackageVersionsStatus)
-> Lens
     UpdatePackageVersionsStatus UpdatePackageVersionsStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePackageVersionsStatus' {Text
package :: Text
$sel:package:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Text
package} -> Text
package) (\s :: UpdatePackageVersionsStatus
s@UpdatePackageVersionsStatus' {} Text
a -> UpdatePackageVersionsStatus
s {$sel:package:UpdatePackageVersionsStatus' :: Text
package = Text
a} :: UpdatePackageVersionsStatus)

-- | An array of strings that specify the versions of the package with the
-- statuses to update.
updatePackageVersionsStatus_versions :: Lens.Lens' UpdatePackageVersionsStatus [Prelude.Text]
updatePackageVersionsStatus_versions :: ([Text] -> f [Text])
-> UpdatePackageVersionsStatus -> f UpdatePackageVersionsStatus
updatePackageVersionsStatus_versions = (UpdatePackageVersionsStatus -> [Text])
-> (UpdatePackageVersionsStatus
    -> [Text] -> UpdatePackageVersionsStatus)
-> Lens
     UpdatePackageVersionsStatus
     UpdatePackageVersionsStatus
     [Text]
     [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePackageVersionsStatus' {[Text]
versions :: [Text]
$sel:versions:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> [Text]
versions} -> [Text]
versions) (\s :: UpdatePackageVersionsStatus
s@UpdatePackageVersionsStatus' {} [Text]
a -> UpdatePackageVersionsStatus
s {$sel:versions:UpdatePackageVersionsStatus' :: [Text]
versions = [Text]
a} :: UpdatePackageVersionsStatus) (([Text] -> f [Text])
 -> UpdatePackageVersionsStatus -> f UpdatePackageVersionsStatus)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> UpdatePackageVersionsStatus
-> f UpdatePackageVersionsStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The status you want to change the package version status to.
updatePackageVersionsStatus_targetStatus :: Lens.Lens' UpdatePackageVersionsStatus PackageVersionStatus
updatePackageVersionsStatus_targetStatus :: (PackageVersionStatus -> f PackageVersionStatus)
-> UpdatePackageVersionsStatus -> f UpdatePackageVersionsStatus
updatePackageVersionsStatus_targetStatus = (UpdatePackageVersionsStatus -> PackageVersionStatus)
-> (UpdatePackageVersionsStatus
    -> PackageVersionStatus -> UpdatePackageVersionsStatus)
-> Lens
     UpdatePackageVersionsStatus
     UpdatePackageVersionsStatus
     PackageVersionStatus
     PackageVersionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePackageVersionsStatus' {PackageVersionStatus
targetStatus :: PackageVersionStatus
$sel:targetStatus:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> PackageVersionStatus
targetStatus} -> PackageVersionStatus
targetStatus) (\s :: UpdatePackageVersionsStatus
s@UpdatePackageVersionsStatus' {} PackageVersionStatus
a -> UpdatePackageVersionsStatus
s {$sel:targetStatus:UpdatePackageVersionsStatus' :: PackageVersionStatus
targetStatus = PackageVersionStatus
a} :: UpdatePackageVersionsStatus)

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

instance Prelude.NFData UpdatePackageVersionsStatus

instance Core.ToHeaders UpdatePackageVersionsStatus where
  toHeaders :: UpdatePackageVersionsStatus -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdatePackageVersionsStatus -> 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 UpdatePackageVersionsStatus where
  toJSON :: UpdatePackageVersionsStatus -> Value
toJSON UpdatePackageVersionsStatus' {[Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe PackageVersionStatus
Text
PackageFormat
PackageVersionStatus
targetStatus :: PackageVersionStatus
versions :: [Text]
package :: Text
format :: PackageFormat
repository :: Text
domain :: Text
domainOwner :: Maybe Text
namespace :: Maybe Text
versionRevisions :: Maybe (HashMap Text Text)
expectedStatus :: Maybe PackageVersionStatus
$sel:targetStatus:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> PackageVersionStatus
$sel:versions:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> [Text]
$sel:package:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Text
$sel:format:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> PackageFormat
$sel:repository:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Text
$sel:domain:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Text
$sel:domainOwner:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Maybe Text
$sel:namespace:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Maybe Text
$sel:versionRevisions:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Maybe (HashMap Text Text)
$sel:expectedStatus:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Maybe PackageVersionStatus
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"expectedStatus" Text -> PackageVersionStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (PackageVersionStatus -> Pair)
-> Maybe PackageVersionStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PackageVersionStatus
expectedStatus,
            (Text
"versionRevisions" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
versionRevisions,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"versions" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
versions),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"targetStatus" Text -> PackageVersionStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= PackageVersionStatus
targetStatus)
          ]
      )

instance Core.ToPath UpdatePackageVersionsStatus where
  toPath :: UpdatePackageVersionsStatus -> ByteString
toPath =
    ByteString -> UpdatePackageVersionsStatus -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/package/versions/update_status"

instance Core.ToQuery UpdatePackageVersionsStatus where
  toQuery :: UpdatePackageVersionsStatus -> QueryString
toQuery UpdatePackageVersionsStatus' {[Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe PackageVersionStatus
Text
PackageFormat
PackageVersionStatus
targetStatus :: PackageVersionStatus
versions :: [Text]
package :: Text
format :: PackageFormat
repository :: Text
domain :: Text
domainOwner :: Maybe Text
namespace :: Maybe Text
versionRevisions :: Maybe (HashMap Text Text)
expectedStatus :: Maybe PackageVersionStatus
$sel:targetStatus:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> PackageVersionStatus
$sel:versions:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> [Text]
$sel:package:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Text
$sel:format:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> PackageFormat
$sel:repository:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Text
$sel:domain:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Text
$sel:domainOwner:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Maybe Text
$sel:namespace:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Maybe Text
$sel:versionRevisions:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Maybe (HashMap Text Text)
$sel:expectedStatus:UpdatePackageVersionsStatus' :: UpdatePackageVersionsStatus -> Maybe PackageVersionStatus
..} =
    [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
"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
      ]

-- | /See:/ 'newUpdatePackageVersionsStatusResponse' smart constructor.
data UpdatePackageVersionsStatusResponse = UpdatePackageVersionsStatusResponse'
  { -- | A list of @SuccessfulPackageVersionInfo@ objects, one for each package
    -- version with a status that successfully updated.
    UpdatePackageVersionsStatusResponse
-> Maybe (HashMap Text PackageVersionError)
failedVersions :: Prelude.Maybe (Prelude.HashMap Prelude.Text PackageVersionError),
    -- | A list of @PackageVersionError@ objects, one for each package version
    -- with a status that failed to update.
    UpdatePackageVersionsStatusResponse
-> Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions :: Prelude.Maybe (Prelude.HashMap Prelude.Text SuccessfulPackageVersionInfo),
    -- | The response's http status code.
    UpdatePackageVersionsStatusResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdatePackageVersionsStatusResponse
-> UpdatePackageVersionsStatusResponse -> Bool
(UpdatePackageVersionsStatusResponse
 -> UpdatePackageVersionsStatusResponse -> Bool)
-> (UpdatePackageVersionsStatusResponse
    -> UpdatePackageVersionsStatusResponse -> Bool)
-> Eq UpdatePackageVersionsStatusResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePackageVersionsStatusResponse
-> UpdatePackageVersionsStatusResponse -> Bool
$c/= :: UpdatePackageVersionsStatusResponse
-> UpdatePackageVersionsStatusResponse -> Bool
== :: UpdatePackageVersionsStatusResponse
-> UpdatePackageVersionsStatusResponse -> Bool
$c== :: UpdatePackageVersionsStatusResponse
-> UpdatePackageVersionsStatusResponse -> Bool
Prelude.Eq, ReadPrec [UpdatePackageVersionsStatusResponse]
ReadPrec UpdatePackageVersionsStatusResponse
Int -> ReadS UpdatePackageVersionsStatusResponse
ReadS [UpdatePackageVersionsStatusResponse]
(Int -> ReadS UpdatePackageVersionsStatusResponse)
-> ReadS [UpdatePackageVersionsStatusResponse]
-> ReadPrec UpdatePackageVersionsStatusResponse
-> ReadPrec [UpdatePackageVersionsStatusResponse]
-> Read UpdatePackageVersionsStatusResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdatePackageVersionsStatusResponse]
$creadListPrec :: ReadPrec [UpdatePackageVersionsStatusResponse]
readPrec :: ReadPrec UpdatePackageVersionsStatusResponse
$creadPrec :: ReadPrec UpdatePackageVersionsStatusResponse
readList :: ReadS [UpdatePackageVersionsStatusResponse]
$creadList :: ReadS [UpdatePackageVersionsStatusResponse]
readsPrec :: Int -> ReadS UpdatePackageVersionsStatusResponse
$creadsPrec :: Int -> ReadS UpdatePackageVersionsStatusResponse
Prelude.Read, Int -> UpdatePackageVersionsStatusResponse -> ShowS
[UpdatePackageVersionsStatusResponse] -> ShowS
UpdatePackageVersionsStatusResponse -> String
(Int -> UpdatePackageVersionsStatusResponse -> ShowS)
-> (UpdatePackageVersionsStatusResponse -> String)
-> ([UpdatePackageVersionsStatusResponse] -> ShowS)
-> Show UpdatePackageVersionsStatusResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePackageVersionsStatusResponse] -> ShowS
$cshowList :: [UpdatePackageVersionsStatusResponse] -> ShowS
show :: UpdatePackageVersionsStatusResponse -> String
$cshow :: UpdatePackageVersionsStatusResponse -> String
showsPrec :: Int -> UpdatePackageVersionsStatusResponse -> ShowS
$cshowsPrec :: Int -> UpdatePackageVersionsStatusResponse -> ShowS
Prelude.Show, (forall x.
 UpdatePackageVersionsStatusResponse
 -> Rep UpdatePackageVersionsStatusResponse x)
-> (forall x.
    Rep UpdatePackageVersionsStatusResponse x
    -> UpdatePackageVersionsStatusResponse)
-> Generic UpdatePackageVersionsStatusResponse
forall x.
Rep UpdatePackageVersionsStatusResponse x
-> UpdatePackageVersionsStatusResponse
forall x.
UpdatePackageVersionsStatusResponse
-> Rep UpdatePackageVersionsStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdatePackageVersionsStatusResponse x
-> UpdatePackageVersionsStatusResponse
$cfrom :: forall x.
UpdatePackageVersionsStatusResponse
-> Rep UpdatePackageVersionsStatusResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdatePackageVersionsStatusResponse' 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:
--
-- 'failedVersions', 'updatePackageVersionsStatusResponse_failedVersions' - A list of @SuccessfulPackageVersionInfo@ objects, one for each package
-- version with a status that successfully updated.
--
-- 'successfulVersions', 'updatePackageVersionsStatusResponse_successfulVersions' - A list of @PackageVersionError@ objects, one for each package version
-- with a status that failed to update.
--
-- 'httpStatus', 'updatePackageVersionsStatusResponse_httpStatus' - The response's http status code.
newUpdatePackageVersionsStatusResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdatePackageVersionsStatusResponse
newUpdatePackageVersionsStatusResponse :: Int -> UpdatePackageVersionsStatusResponse
newUpdatePackageVersionsStatusResponse Int
pHttpStatus_ =
  UpdatePackageVersionsStatusResponse' :: Maybe (HashMap Text PackageVersionError)
-> Maybe (HashMap Text SuccessfulPackageVersionInfo)
-> Int
-> UpdatePackageVersionsStatusResponse
UpdatePackageVersionsStatusResponse'
    { $sel:failedVersions:UpdatePackageVersionsStatusResponse' :: Maybe (HashMap Text PackageVersionError)
failedVersions =
        Maybe (HashMap Text PackageVersionError)
forall a. Maybe a
Prelude.Nothing,
      $sel:successfulVersions:UpdatePackageVersionsStatusResponse' :: Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions = Maybe (HashMap Text SuccessfulPackageVersionInfo)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdatePackageVersionsStatusResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of @SuccessfulPackageVersionInfo@ objects, one for each package
-- version with a status that successfully updated.
updatePackageVersionsStatusResponse_failedVersions :: Lens.Lens' UpdatePackageVersionsStatusResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text PackageVersionError))
updatePackageVersionsStatusResponse_failedVersions :: (Maybe (HashMap Text PackageVersionError)
 -> f (Maybe (HashMap Text PackageVersionError)))
-> UpdatePackageVersionsStatusResponse
-> f UpdatePackageVersionsStatusResponse
updatePackageVersionsStatusResponse_failedVersions = (UpdatePackageVersionsStatusResponse
 -> Maybe (HashMap Text PackageVersionError))
-> (UpdatePackageVersionsStatusResponse
    -> Maybe (HashMap Text PackageVersionError)
    -> UpdatePackageVersionsStatusResponse)
-> Lens
     UpdatePackageVersionsStatusResponse
     UpdatePackageVersionsStatusResponse
     (Maybe (HashMap Text PackageVersionError))
     (Maybe (HashMap Text PackageVersionError))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePackageVersionsStatusResponse' {Maybe (HashMap Text PackageVersionError)
failedVersions :: Maybe (HashMap Text PackageVersionError)
$sel:failedVersions:UpdatePackageVersionsStatusResponse' :: UpdatePackageVersionsStatusResponse
-> Maybe (HashMap Text PackageVersionError)
failedVersions} -> Maybe (HashMap Text PackageVersionError)
failedVersions) (\s :: UpdatePackageVersionsStatusResponse
s@UpdatePackageVersionsStatusResponse' {} Maybe (HashMap Text PackageVersionError)
a -> UpdatePackageVersionsStatusResponse
s {$sel:failedVersions:UpdatePackageVersionsStatusResponse' :: Maybe (HashMap Text PackageVersionError)
failedVersions = Maybe (HashMap Text PackageVersionError)
a} :: UpdatePackageVersionsStatusResponse) ((Maybe (HashMap Text PackageVersionError)
  -> f (Maybe (HashMap Text PackageVersionError)))
 -> UpdatePackageVersionsStatusResponse
 -> f UpdatePackageVersionsStatusResponse)
-> ((Maybe (HashMap Text PackageVersionError)
     -> f (Maybe (HashMap Text PackageVersionError)))
    -> Maybe (HashMap Text PackageVersionError)
    -> f (Maybe (HashMap Text PackageVersionError)))
-> (Maybe (HashMap Text PackageVersionError)
    -> f (Maybe (HashMap Text PackageVersionError)))
-> UpdatePackageVersionsStatusResponse
-> f UpdatePackageVersionsStatusResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text PackageVersionError)
  (HashMap Text PackageVersionError)
  (HashMap Text PackageVersionError)
  (HashMap Text PackageVersionError)
-> Iso
     (Maybe (HashMap Text PackageVersionError))
     (Maybe (HashMap Text PackageVersionError))
     (Maybe (HashMap Text PackageVersionError))
     (Maybe (HashMap Text PackageVersionError))
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
  (HashMap Text PackageVersionError)
  (HashMap Text PackageVersionError)
  (HashMap Text PackageVersionError)
  (HashMap Text PackageVersionError)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of @PackageVersionError@ objects, one for each package version
-- with a status that failed to update.
updatePackageVersionsStatusResponse_successfulVersions :: Lens.Lens' UpdatePackageVersionsStatusResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text SuccessfulPackageVersionInfo))
updatePackageVersionsStatusResponse_successfulVersions :: (Maybe (HashMap Text SuccessfulPackageVersionInfo)
 -> f (Maybe (HashMap Text SuccessfulPackageVersionInfo)))
-> UpdatePackageVersionsStatusResponse
-> f UpdatePackageVersionsStatusResponse
updatePackageVersionsStatusResponse_successfulVersions = (UpdatePackageVersionsStatusResponse
 -> Maybe (HashMap Text SuccessfulPackageVersionInfo))
-> (UpdatePackageVersionsStatusResponse
    -> Maybe (HashMap Text SuccessfulPackageVersionInfo)
    -> UpdatePackageVersionsStatusResponse)
-> Lens
     UpdatePackageVersionsStatusResponse
     UpdatePackageVersionsStatusResponse
     (Maybe (HashMap Text SuccessfulPackageVersionInfo))
     (Maybe (HashMap Text SuccessfulPackageVersionInfo))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePackageVersionsStatusResponse' {Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions :: Maybe (HashMap Text SuccessfulPackageVersionInfo)
$sel:successfulVersions:UpdatePackageVersionsStatusResponse' :: UpdatePackageVersionsStatusResponse
-> Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions} -> Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions) (\s :: UpdatePackageVersionsStatusResponse
s@UpdatePackageVersionsStatusResponse' {} Maybe (HashMap Text SuccessfulPackageVersionInfo)
a -> UpdatePackageVersionsStatusResponse
s {$sel:successfulVersions:UpdatePackageVersionsStatusResponse' :: Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions = Maybe (HashMap Text SuccessfulPackageVersionInfo)
a} :: UpdatePackageVersionsStatusResponse) ((Maybe (HashMap Text SuccessfulPackageVersionInfo)
  -> f (Maybe (HashMap Text SuccessfulPackageVersionInfo)))
 -> UpdatePackageVersionsStatusResponse
 -> f UpdatePackageVersionsStatusResponse)
-> ((Maybe (HashMap Text SuccessfulPackageVersionInfo)
     -> f (Maybe (HashMap Text SuccessfulPackageVersionInfo)))
    -> Maybe (HashMap Text SuccessfulPackageVersionInfo)
    -> f (Maybe (HashMap Text SuccessfulPackageVersionInfo)))
-> (Maybe (HashMap Text SuccessfulPackageVersionInfo)
    -> f (Maybe (HashMap Text SuccessfulPackageVersionInfo)))
-> UpdatePackageVersionsStatusResponse
-> f UpdatePackageVersionsStatusResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text SuccessfulPackageVersionInfo)
  (HashMap Text SuccessfulPackageVersionInfo)
  (HashMap Text SuccessfulPackageVersionInfo)
  (HashMap Text SuccessfulPackageVersionInfo)
-> Iso
     (Maybe (HashMap Text SuccessfulPackageVersionInfo))
     (Maybe (HashMap Text SuccessfulPackageVersionInfo))
     (Maybe (HashMap Text SuccessfulPackageVersionInfo))
     (Maybe (HashMap Text SuccessfulPackageVersionInfo))
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
  (HashMap Text SuccessfulPackageVersionInfo)
  (HashMap Text SuccessfulPackageVersionInfo)
  (HashMap Text SuccessfulPackageVersionInfo)
  (HashMap Text SuccessfulPackageVersionInfo)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    UpdatePackageVersionsStatusResponse