{-# 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.DisposePackageVersions
-- 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)
--
-- Deletes the assets in package versions and sets the package versions\'
-- status to @Disposed@. A disposed package version cannot be restored in
-- your repository because its assets are deleted.
--
-- To view all disposed package versions in a repository, use
-- <https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_ListPackageVersions.html ListPackageVersions>
-- and set the
-- <https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_ListPackageVersions.html#API_ListPackageVersions_RequestSyntax status>
-- parameter to @Disposed@.
--
-- To view information about a disposed package version, use
-- <https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DescribePackageVersion.html DescribePackageVersion>.
module Amazonka.CodeArtifact.DisposePackageVersions
  ( -- * Creating a Request
    DisposePackageVersions (..),
    newDisposePackageVersions,

    -- * Request Lenses
    disposePackageVersions_expectedStatus,
    disposePackageVersions_versionRevisions,
    disposePackageVersions_namespace,
    disposePackageVersions_domainOwner,
    disposePackageVersions_domain,
    disposePackageVersions_repository,
    disposePackageVersions_format,
    disposePackageVersions_package,
    disposePackageVersions_versions,

    -- * Destructuring the Response
    DisposePackageVersionsResponse (..),
    newDisposePackageVersionsResponse,

    -- * Response Lenses
    disposePackageVersionsResponse_failedVersions,
    disposePackageVersionsResponse_successfulVersions,
    disposePackageVersionsResponse_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:/ 'newDisposePackageVersions' smart constructor.
data DisposePackageVersions = DisposePackageVersions'
  { -- | The expected status of the package version to dispose. Valid values are:
    --
    -- -   @Published@
    --
    -- -   @Unfinished@
    --
    -- -   @Unlisted@
    --
    -- -   @Archived@
    --
    -- -   @Disposed@
    DisposePackageVersions -> Maybe PackageVersionStatus
expectedStatus :: Prelude.Maybe PackageVersionStatus,
    -- | The revisions of the package versions you want to dispose.
    DisposePackageVersions -> 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.
    DisposePackageVersions -> 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.
    DisposePackageVersions -> Maybe Text
domainOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the domain that contains the repository you want to dispose.
    DisposePackageVersions -> Text
domain :: Prelude.Text,
    -- | The name of the repository that contains the package versions you want
    -- to dispose.
    DisposePackageVersions -> Text
repository :: Prelude.Text,
    -- | A format that specifies the type of package versions you want to
    -- dispose. The valid values are:
    --
    -- -   @npm@
    --
    -- -   @pypi@
    --
    -- -   @maven@
    DisposePackageVersions -> PackageFormat
format :: PackageFormat,
    -- | The name of the package with the versions you want to dispose.
    DisposePackageVersions -> Text
package :: Prelude.Text,
    -- | The versions of the package you want to dispose.
    DisposePackageVersions -> [Text]
versions :: [Prelude.Text]
  }
  deriving (DisposePackageVersions -> DisposePackageVersions -> Bool
(DisposePackageVersions -> DisposePackageVersions -> Bool)
-> (DisposePackageVersions -> DisposePackageVersions -> Bool)
-> Eq DisposePackageVersions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisposePackageVersions -> DisposePackageVersions -> Bool
$c/= :: DisposePackageVersions -> DisposePackageVersions -> Bool
== :: DisposePackageVersions -> DisposePackageVersions -> Bool
$c== :: DisposePackageVersions -> DisposePackageVersions -> Bool
Prelude.Eq, ReadPrec [DisposePackageVersions]
ReadPrec DisposePackageVersions
Int -> ReadS DisposePackageVersions
ReadS [DisposePackageVersions]
(Int -> ReadS DisposePackageVersions)
-> ReadS [DisposePackageVersions]
-> ReadPrec DisposePackageVersions
-> ReadPrec [DisposePackageVersions]
-> Read DisposePackageVersions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisposePackageVersions]
$creadListPrec :: ReadPrec [DisposePackageVersions]
readPrec :: ReadPrec DisposePackageVersions
$creadPrec :: ReadPrec DisposePackageVersions
readList :: ReadS [DisposePackageVersions]
$creadList :: ReadS [DisposePackageVersions]
readsPrec :: Int -> ReadS DisposePackageVersions
$creadsPrec :: Int -> ReadS DisposePackageVersions
Prelude.Read, Int -> DisposePackageVersions -> ShowS
[DisposePackageVersions] -> ShowS
DisposePackageVersions -> String
(Int -> DisposePackageVersions -> ShowS)
-> (DisposePackageVersions -> String)
-> ([DisposePackageVersions] -> ShowS)
-> Show DisposePackageVersions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisposePackageVersions] -> ShowS
$cshowList :: [DisposePackageVersions] -> ShowS
show :: DisposePackageVersions -> String
$cshow :: DisposePackageVersions -> String
showsPrec :: Int -> DisposePackageVersions -> ShowS
$cshowsPrec :: Int -> DisposePackageVersions -> ShowS
Prelude.Show, (forall x. DisposePackageVersions -> Rep DisposePackageVersions x)
-> (forall x.
    Rep DisposePackageVersions x -> DisposePackageVersions)
-> Generic DisposePackageVersions
forall x. Rep DisposePackageVersions x -> DisposePackageVersions
forall x. DisposePackageVersions -> Rep DisposePackageVersions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DisposePackageVersions x -> DisposePackageVersions
$cfrom :: forall x. DisposePackageVersions -> Rep DisposePackageVersions x
Prelude.Generic)

-- |
-- Create a value of 'DisposePackageVersions' 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', 'disposePackageVersions_expectedStatus' - The expected status of the package version to dispose. Valid values are:
--
-- -   @Published@
--
-- -   @Unfinished@
--
-- -   @Unlisted@
--
-- -   @Archived@
--
-- -   @Disposed@
--
-- 'versionRevisions', 'disposePackageVersions_versionRevisions' - The revisions of the package versions you want to dispose.
--
-- 'namespace', 'disposePackageVersions_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', 'disposePackageVersions_domainOwner' - The 12-digit account number of the AWS account that owns the domain. It
-- does not include dashes or spaces.
--
-- 'domain', 'disposePackageVersions_domain' - The name of the domain that contains the repository you want to dispose.
--
-- 'repository', 'disposePackageVersions_repository' - The name of the repository that contains the package versions you want
-- to dispose.
--
-- 'format', 'disposePackageVersions_format' - A format that specifies the type of package versions you want to
-- dispose. The valid values are:
--
-- -   @npm@
--
-- -   @pypi@
--
-- -   @maven@
--
-- 'package', 'disposePackageVersions_package' - The name of the package with the versions you want to dispose.
--
-- 'versions', 'disposePackageVersions_versions' - The versions of the package you want to dispose.
newDisposePackageVersions ::
  -- | 'domain'
  Prelude.Text ->
  -- | 'repository'
  Prelude.Text ->
  -- | 'format'
  PackageFormat ->
  -- | 'package'
  Prelude.Text ->
  DisposePackageVersions
newDisposePackageVersions :: Text -> Text -> PackageFormat -> Text -> DisposePackageVersions
newDisposePackageVersions
  Text
pDomain_
  Text
pRepository_
  PackageFormat
pFormat_
  Text
pPackage_ =
    DisposePackageVersions' :: Maybe PackageVersionStatus
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> PackageFormat
-> Text
-> [Text]
-> DisposePackageVersions
DisposePackageVersions'
      { $sel:expectedStatus:DisposePackageVersions' :: Maybe PackageVersionStatus
expectedStatus =
          Maybe PackageVersionStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:versionRevisions:DisposePackageVersions' :: Maybe (HashMap Text Text)
versionRevisions = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:namespace:DisposePackageVersions' :: Maybe Text
namespace = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:domainOwner:DisposePackageVersions' :: Maybe Text
domainOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:domain:DisposePackageVersions' :: Text
domain = Text
pDomain_,
        $sel:repository:DisposePackageVersions' :: Text
repository = Text
pRepository_,
        $sel:format:DisposePackageVersions' :: PackageFormat
format = PackageFormat
pFormat_,
        $sel:package:DisposePackageVersions' :: Text
package = Text
pPackage_,
        $sel:versions:DisposePackageVersions' :: [Text]
versions = [Text]
forall a. Monoid a => a
Prelude.mempty
      }

-- | The expected status of the package version to dispose. Valid values are:
--
-- -   @Published@
--
-- -   @Unfinished@
--
-- -   @Unlisted@
--
-- -   @Archived@
--
-- -   @Disposed@
disposePackageVersions_expectedStatus :: Lens.Lens' DisposePackageVersions (Prelude.Maybe PackageVersionStatus)
disposePackageVersions_expectedStatus :: (Maybe PackageVersionStatus -> f (Maybe PackageVersionStatus))
-> DisposePackageVersions -> f DisposePackageVersions
disposePackageVersions_expectedStatus = (DisposePackageVersions -> Maybe PackageVersionStatus)
-> (DisposePackageVersions
    -> Maybe PackageVersionStatus -> DisposePackageVersions)
-> Lens
     DisposePackageVersions
     DisposePackageVersions
     (Maybe PackageVersionStatus)
     (Maybe PackageVersionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisposePackageVersions' {Maybe PackageVersionStatus
expectedStatus :: Maybe PackageVersionStatus
$sel:expectedStatus:DisposePackageVersions' :: DisposePackageVersions -> Maybe PackageVersionStatus
expectedStatus} -> Maybe PackageVersionStatus
expectedStatus) (\s :: DisposePackageVersions
s@DisposePackageVersions' {} Maybe PackageVersionStatus
a -> DisposePackageVersions
s {$sel:expectedStatus:DisposePackageVersions' :: Maybe PackageVersionStatus
expectedStatus = Maybe PackageVersionStatus
a} :: DisposePackageVersions)

-- | The revisions of the package versions you want to dispose.
disposePackageVersions_versionRevisions :: Lens.Lens' DisposePackageVersions (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
disposePackageVersions_versionRevisions :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DisposePackageVersions -> f DisposePackageVersions
disposePackageVersions_versionRevisions = (DisposePackageVersions -> Maybe (HashMap Text Text))
-> (DisposePackageVersions
    -> Maybe (HashMap Text Text) -> DisposePackageVersions)
-> Lens
     DisposePackageVersions
     DisposePackageVersions
     (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 (\DisposePackageVersions' {Maybe (HashMap Text Text)
versionRevisions :: Maybe (HashMap Text Text)
$sel:versionRevisions:DisposePackageVersions' :: DisposePackageVersions -> Maybe (HashMap Text Text)
versionRevisions} -> Maybe (HashMap Text Text)
versionRevisions) (\s :: DisposePackageVersions
s@DisposePackageVersions' {} Maybe (HashMap Text Text)
a -> DisposePackageVersions
s {$sel:versionRevisions:DisposePackageVersions' :: Maybe (HashMap Text Text)
versionRevisions = Maybe (HashMap Text Text)
a} :: DisposePackageVersions) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DisposePackageVersions -> f DisposePackageVersions)
-> ((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)))
-> DisposePackageVersions
-> f DisposePackageVersions
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.
disposePackageVersions_namespace :: Lens.Lens' DisposePackageVersions (Prelude.Maybe Prelude.Text)
disposePackageVersions_namespace :: (Maybe Text -> f (Maybe Text))
-> DisposePackageVersions -> f DisposePackageVersions
disposePackageVersions_namespace = (DisposePackageVersions -> Maybe Text)
-> (DisposePackageVersions -> Maybe Text -> DisposePackageVersions)
-> Lens
     DisposePackageVersions
     DisposePackageVersions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisposePackageVersions' {Maybe Text
namespace :: Maybe Text
$sel:namespace:DisposePackageVersions' :: DisposePackageVersions -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: DisposePackageVersions
s@DisposePackageVersions' {} Maybe Text
a -> DisposePackageVersions
s {$sel:namespace:DisposePackageVersions' :: Maybe Text
namespace = Maybe Text
a} :: DisposePackageVersions)

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

-- | The name of the domain that contains the repository you want to dispose.
disposePackageVersions_domain :: Lens.Lens' DisposePackageVersions Prelude.Text
disposePackageVersions_domain :: (Text -> f Text)
-> DisposePackageVersions -> f DisposePackageVersions
disposePackageVersions_domain = (DisposePackageVersions -> Text)
-> (DisposePackageVersions -> Text -> DisposePackageVersions)
-> Lens DisposePackageVersions DisposePackageVersions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisposePackageVersions' {Text
domain :: Text
$sel:domain:DisposePackageVersions' :: DisposePackageVersions -> Text
domain} -> Text
domain) (\s :: DisposePackageVersions
s@DisposePackageVersions' {} Text
a -> DisposePackageVersions
s {$sel:domain:DisposePackageVersions' :: Text
domain = Text
a} :: DisposePackageVersions)

-- | The name of the repository that contains the package versions you want
-- to dispose.
disposePackageVersions_repository :: Lens.Lens' DisposePackageVersions Prelude.Text
disposePackageVersions_repository :: (Text -> f Text)
-> DisposePackageVersions -> f DisposePackageVersions
disposePackageVersions_repository = (DisposePackageVersions -> Text)
-> (DisposePackageVersions -> Text -> DisposePackageVersions)
-> Lens DisposePackageVersions DisposePackageVersions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisposePackageVersions' {Text
repository :: Text
$sel:repository:DisposePackageVersions' :: DisposePackageVersions -> Text
repository} -> Text
repository) (\s :: DisposePackageVersions
s@DisposePackageVersions' {} Text
a -> DisposePackageVersions
s {$sel:repository:DisposePackageVersions' :: Text
repository = Text
a} :: DisposePackageVersions)

-- | A format that specifies the type of package versions you want to
-- dispose. The valid values are:
--
-- -   @npm@
--
-- -   @pypi@
--
-- -   @maven@
disposePackageVersions_format :: Lens.Lens' DisposePackageVersions PackageFormat
disposePackageVersions_format :: (PackageFormat -> f PackageFormat)
-> DisposePackageVersions -> f DisposePackageVersions
disposePackageVersions_format = (DisposePackageVersions -> PackageFormat)
-> (DisposePackageVersions
    -> PackageFormat -> DisposePackageVersions)
-> Lens
     DisposePackageVersions
     DisposePackageVersions
     PackageFormat
     PackageFormat
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisposePackageVersions' {PackageFormat
format :: PackageFormat
$sel:format:DisposePackageVersions' :: DisposePackageVersions -> PackageFormat
format} -> PackageFormat
format) (\s :: DisposePackageVersions
s@DisposePackageVersions' {} PackageFormat
a -> DisposePackageVersions
s {$sel:format:DisposePackageVersions' :: PackageFormat
format = PackageFormat
a} :: DisposePackageVersions)

-- | The name of the package with the versions you want to dispose.
disposePackageVersions_package :: Lens.Lens' DisposePackageVersions Prelude.Text
disposePackageVersions_package :: (Text -> f Text)
-> DisposePackageVersions -> f DisposePackageVersions
disposePackageVersions_package = (DisposePackageVersions -> Text)
-> (DisposePackageVersions -> Text -> DisposePackageVersions)
-> Lens DisposePackageVersions DisposePackageVersions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisposePackageVersions' {Text
package :: Text
$sel:package:DisposePackageVersions' :: DisposePackageVersions -> Text
package} -> Text
package) (\s :: DisposePackageVersions
s@DisposePackageVersions' {} Text
a -> DisposePackageVersions
s {$sel:package:DisposePackageVersions' :: Text
package = Text
a} :: DisposePackageVersions)

-- | The versions of the package you want to dispose.
disposePackageVersions_versions :: Lens.Lens' DisposePackageVersions [Prelude.Text]
disposePackageVersions_versions :: ([Text] -> f [Text])
-> DisposePackageVersions -> f DisposePackageVersions
disposePackageVersions_versions = (DisposePackageVersions -> [Text])
-> (DisposePackageVersions -> [Text] -> DisposePackageVersions)
-> Lens DisposePackageVersions DisposePackageVersions [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisposePackageVersions' {[Text]
versions :: [Text]
$sel:versions:DisposePackageVersions' :: DisposePackageVersions -> [Text]
versions} -> [Text]
versions) (\s :: DisposePackageVersions
s@DisposePackageVersions' {} [Text]
a -> DisposePackageVersions
s {$sel:versions:DisposePackageVersions' :: [Text]
versions = [Text]
a} :: DisposePackageVersions) (([Text] -> f [Text])
 -> DisposePackageVersions -> f DisposePackageVersions)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> DisposePackageVersions
-> f DisposePackageVersions
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

instance Core.AWSRequest DisposePackageVersions where
  type
    AWSResponse DisposePackageVersions =
      DisposePackageVersionsResponse
  request :: DisposePackageVersions -> Request DisposePackageVersions
request = Service -> DisposePackageVersions -> Request DisposePackageVersions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DisposePackageVersions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DisposePackageVersions)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DisposePackageVersions))
-> Logger
-> Service
-> Proxy DisposePackageVersions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DisposePackageVersions)))
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
-> DisposePackageVersionsResponse
DisposePackageVersionsResponse'
            (Maybe (HashMap Text PackageVersionError)
 -> Maybe (HashMap Text SuccessfulPackageVersionInfo)
 -> Int
 -> DisposePackageVersionsResponse)
-> Either String (Maybe (HashMap Text PackageVersionError))
-> Either
     String
     (Maybe (HashMap Text SuccessfulPackageVersionInfo)
      -> Int -> DisposePackageVersionsResponse)
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 -> DisposePackageVersionsResponse)
-> Either
     String (Maybe (HashMap Text SuccessfulPackageVersionInfo))
-> Either String (Int -> DisposePackageVersionsResponse)
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 -> DisposePackageVersionsResponse)
-> Either String Int
-> Either String DisposePackageVersionsResponse
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 DisposePackageVersions

instance Prelude.NFData DisposePackageVersions

instance Core.ToHeaders DisposePackageVersions where
  toHeaders :: DisposePackageVersions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DisposePackageVersions -> 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 DisposePackageVersions where
  toJSON :: DisposePackageVersions -> Value
toJSON DisposePackageVersions' {[Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe PackageVersionStatus
Text
PackageFormat
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:versions:DisposePackageVersions' :: DisposePackageVersions -> [Text]
$sel:package:DisposePackageVersions' :: DisposePackageVersions -> Text
$sel:format:DisposePackageVersions' :: DisposePackageVersions -> PackageFormat
$sel:repository:DisposePackageVersions' :: DisposePackageVersions -> Text
$sel:domain:DisposePackageVersions' :: DisposePackageVersions -> Text
$sel:domainOwner:DisposePackageVersions' :: DisposePackageVersions -> Maybe Text
$sel:namespace:DisposePackageVersions' :: DisposePackageVersions -> Maybe Text
$sel:versionRevisions:DisposePackageVersions' :: DisposePackageVersions -> Maybe (HashMap Text Text)
$sel:expectedStatus:DisposePackageVersions' :: DisposePackageVersions -> 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)
          ]
      )

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

instance Core.ToQuery DisposePackageVersions where
  toQuery :: DisposePackageVersions -> QueryString
toQuery DisposePackageVersions' {[Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe PackageVersionStatus
Text
PackageFormat
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:versions:DisposePackageVersions' :: DisposePackageVersions -> [Text]
$sel:package:DisposePackageVersions' :: DisposePackageVersions -> Text
$sel:format:DisposePackageVersions' :: DisposePackageVersions -> PackageFormat
$sel:repository:DisposePackageVersions' :: DisposePackageVersions -> Text
$sel:domain:DisposePackageVersions' :: DisposePackageVersions -> Text
$sel:domainOwner:DisposePackageVersions' :: DisposePackageVersions -> Maybe Text
$sel:namespace:DisposePackageVersions' :: DisposePackageVersions -> Maybe Text
$sel:versionRevisions:DisposePackageVersions' :: DisposePackageVersions -> Maybe (HashMap Text Text)
$sel:expectedStatus:DisposePackageVersions' :: DisposePackageVersions -> 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:/ 'newDisposePackageVersionsResponse' smart constructor.
data DisposePackageVersionsResponse = DisposePackageVersionsResponse'
  { -- | A @PackageVersionError@ object that contains a map of errors codes for
    -- the disposed package versions that failed. The possible error codes are:
    --
    -- -   @ALREADY_EXISTS@
    --
    -- -   @MISMATCHED_REVISION@
    --
    -- -   @MISMATCHED_STATUS@
    --
    -- -   @NOT_ALLOWED@
    --
    -- -   @NOT_FOUND@
    --
    -- -   @SKIPPED@
    DisposePackageVersionsResponse
-> Maybe (HashMap Text PackageVersionError)
failedVersions :: Prelude.Maybe (Prelude.HashMap Prelude.Text PackageVersionError),
    -- | A list of the package versions that were successfully disposed.
    DisposePackageVersionsResponse
-> Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions :: Prelude.Maybe (Prelude.HashMap Prelude.Text SuccessfulPackageVersionInfo),
    -- | The response's http status code.
    DisposePackageVersionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DisposePackageVersionsResponse
-> DisposePackageVersionsResponse -> Bool
(DisposePackageVersionsResponse
 -> DisposePackageVersionsResponse -> Bool)
-> (DisposePackageVersionsResponse
    -> DisposePackageVersionsResponse -> Bool)
-> Eq DisposePackageVersionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisposePackageVersionsResponse
-> DisposePackageVersionsResponse -> Bool
$c/= :: DisposePackageVersionsResponse
-> DisposePackageVersionsResponse -> Bool
== :: DisposePackageVersionsResponse
-> DisposePackageVersionsResponse -> Bool
$c== :: DisposePackageVersionsResponse
-> DisposePackageVersionsResponse -> Bool
Prelude.Eq, ReadPrec [DisposePackageVersionsResponse]
ReadPrec DisposePackageVersionsResponse
Int -> ReadS DisposePackageVersionsResponse
ReadS [DisposePackageVersionsResponse]
(Int -> ReadS DisposePackageVersionsResponse)
-> ReadS [DisposePackageVersionsResponse]
-> ReadPrec DisposePackageVersionsResponse
-> ReadPrec [DisposePackageVersionsResponse]
-> Read DisposePackageVersionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisposePackageVersionsResponse]
$creadListPrec :: ReadPrec [DisposePackageVersionsResponse]
readPrec :: ReadPrec DisposePackageVersionsResponse
$creadPrec :: ReadPrec DisposePackageVersionsResponse
readList :: ReadS [DisposePackageVersionsResponse]
$creadList :: ReadS [DisposePackageVersionsResponse]
readsPrec :: Int -> ReadS DisposePackageVersionsResponse
$creadsPrec :: Int -> ReadS DisposePackageVersionsResponse
Prelude.Read, Int -> DisposePackageVersionsResponse -> ShowS
[DisposePackageVersionsResponse] -> ShowS
DisposePackageVersionsResponse -> String
(Int -> DisposePackageVersionsResponse -> ShowS)
-> (DisposePackageVersionsResponse -> String)
-> ([DisposePackageVersionsResponse] -> ShowS)
-> Show DisposePackageVersionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisposePackageVersionsResponse] -> ShowS
$cshowList :: [DisposePackageVersionsResponse] -> ShowS
show :: DisposePackageVersionsResponse -> String
$cshow :: DisposePackageVersionsResponse -> String
showsPrec :: Int -> DisposePackageVersionsResponse -> ShowS
$cshowsPrec :: Int -> DisposePackageVersionsResponse -> ShowS
Prelude.Show, (forall x.
 DisposePackageVersionsResponse
 -> Rep DisposePackageVersionsResponse x)
-> (forall x.
    Rep DisposePackageVersionsResponse x
    -> DisposePackageVersionsResponse)
-> Generic DisposePackageVersionsResponse
forall x.
Rep DisposePackageVersionsResponse x
-> DisposePackageVersionsResponse
forall x.
DisposePackageVersionsResponse
-> Rep DisposePackageVersionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisposePackageVersionsResponse x
-> DisposePackageVersionsResponse
$cfrom :: forall x.
DisposePackageVersionsResponse
-> Rep DisposePackageVersionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DisposePackageVersionsResponse' 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', 'disposePackageVersionsResponse_failedVersions' - A @PackageVersionError@ object that contains a map of errors codes for
-- the disposed package versions that failed. The possible error codes are:
--
-- -   @ALREADY_EXISTS@
--
-- -   @MISMATCHED_REVISION@
--
-- -   @MISMATCHED_STATUS@
--
-- -   @NOT_ALLOWED@
--
-- -   @NOT_FOUND@
--
-- -   @SKIPPED@
--
-- 'successfulVersions', 'disposePackageVersionsResponse_successfulVersions' - A list of the package versions that were successfully disposed.
--
-- 'httpStatus', 'disposePackageVersionsResponse_httpStatus' - The response's http status code.
newDisposePackageVersionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DisposePackageVersionsResponse
newDisposePackageVersionsResponse :: Int -> DisposePackageVersionsResponse
newDisposePackageVersionsResponse Int
pHttpStatus_ =
  DisposePackageVersionsResponse' :: Maybe (HashMap Text PackageVersionError)
-> Maybe (HashMap Text SuccessfulPackageVersionInfo)
-> Int
-> DisposePackageVersionsResponse
DisposePackageVersionsResponse'
    { $sel:failedVersions:DisposePackageVersionsResponse' :: Maybe (HashMap Text PackageVersionError)
failedVersions =
        Maybe (HashMap Text PackageVersionError)
forall a. Maybe a
Prelude.Nothing,
      $sel:successfulVersions:DisposePackageVersionsResponse' :: Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions = Maybe (HashMap Text SuccessfulPackageVersionInfo)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DisposePackageVersionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A @PackageVersionError@ object that contains a map of errors codes for
-- the disposed package versions that failed. The possible error codes are:
--
-- -   @ALREADY_EXISTS@
--
-- -   @MISMATCHED_REVISION@
--
-- -   @MISMATCHED_STATUS@
--
-- -   @NOT_ALLOWED@
--
-- -   @NOT_FOUND@
--
-- -   @SKIPPED@
disposePackageVersionsResponse_failedVersions :: Lens.Lens' DisposePackageVersionsResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text PackageVersionError))
disposePackageVersionsResponse_failedVersions :: (Maybe (HashMap Text PackageVersionError)
 -> f (Maybe (HashMap Text PackageVersionError)))
-> DisposePackageVersionsResponse
-> f DisposePackageVersionsResponse
disposePackageVersionsResponse_failedVersions = (DisposePackageVersionsResponse
 -> Maybe (HashMap Text PackageVersionError))
-> (DisposePackageVersionsResponse
    -> Maybe (HashMap Text PackageVersionError)
    -> DisposePackageVersionsResponse)
-> Lens
     DisposePackageVersionsResponse
     DisposePackageVersionsResponse
     (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 (\DisposePackageVersionsResponse' {Maybe (HashMap Text PackageVersionError)
failedVersions :: Maybe (HashMap Text PackageVersionError)
$sel:failedVersions:DisposePackageVersionsResponse' :: DisposePackageVersionsResponse
-> Maybe (HashMap Text PackageVersionError)
failedVersions} -> Maybe (HashMap Text PackageVersionError)
failedVersions) (\s :: DisposePackageVersionsResponse
s@DisposePackageVersionsResponse' {} Maybe (HashMap Text PackageVersionError)
a -> DisposePackageVersionsResponse
s {$sel:failedVersions:DisposePackageVersionsResponse' :: Maybe (HashMap Text PackageVersionError)
failedVersions = Maybe (HashMap Text PackageVersionError)
a} :: DisposePackageVersionsResponse) ((Maybe (HashMap Text PackageVersionError)
  -> f (Maybe (HashMap Text PackageVersionError)))
 -> DisposePackageVersionsResponse
 -> f DisposePackageVersionsResponse)
-> ((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)))
-> DisposePackageVersionsResponse
-> f DisposePackageVersionsResponse
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 the package versions that were successfully disposed.
disposePackageVersionsResponse_successfulVersions :: Lens.Lens' DisposePackageVersionsResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text SuccessfulPackageVersionInfo))
disposePackageVersionsResponse_successfulVersions :: (Maybe (HashMap Text SuccessfulPackageVersionInfo)
 -> f (Maybe (HashMap Text SuccessfulPackageVersionInfo)))
-> DisposePackageVersionsResponse
-> f DisposePackageVersionsResponse
disposePackageVersionsResponse_successfulVersions = (DisposePackageVersionsResponse
 -> Maybe (HashMap Text SuccessfulPackageVersionInfo))
-> (DisposePackageVersionsResponse
    -> Maybe (HashMap Text SuccessfulPackageVersionInfo)
    -> DisposePackageVersionsResponse)
-> Lens
     DisposePackageVersionsResponse
     DisposePackageVersionsResponse
     (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 (\DisposePackageVersionsResponse' {Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions :: Maybe (HashMap Text SuccessfulPackageVersionInfo)
$sel:successfulVersions:DisposePackageVersionsResponse' :: DisposePackageVersionsResponse
-> Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions} -> Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions) (\s :: DisposePackageVersionsResponse
s@DisposePackageVersionsResponse' {} Maybe (HashMap Text SuccessfulPackageVersionInfo)
a -> DisposePackageVersionsResponse
s {$sel:successfulVersions:DisposePackageVersionsResponse' :: Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions = Maybe (HashMap Text SuccessfulPackageVersionInfo)
a} :: DisposePackageVersionsResponse) ((Maybe (HashMap Text SuccessfulPackageVersionInfo)
  -> f (Maybe (HashMap Text SuccessfulPackageVersionInfo)))
 -> DisposePackageVersionsResponse
 -> f DisposePackageVersionsResponse)
-> ((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)))
-> DisposePackageVersionsResponse
-> f DisposePackageVersionsResponse
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.
disposePackageVersionsResponse_httpStatus :: Lens.Lens' DisposePackageVersionsResponse Prelude.Int
disposePackageVersionsResponse_httpStatus :: (Int -> f Int)
-> DisposePackageVersionsResponse
-> f DisposePackageVersionsResponse
disposePackageVersionsResponse_httpStatus = (DisposePackageVersionsResponse -> Int)
-> (DisposePackageVersionsResponse
    -> Int -> DisposePackageVersionsResponse)
-> Lens
     DisposePackageVersionsResponse
     DisposePackageVersionsResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisposePackageVersionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisposePackageVersionsResponse' :: DisposePackageVersionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisposePackageVersionsResponse
s@DisposePackageVersionsResponse' {} Int
a -> DisposePackageVersionsResponse
s {$sel:httpStatus:DisposePackageVersionsResponse' :: Int
httpStatus = Int
a} :: DisposePackageVersionsResponse)

instance
  Prelude.NFData
    DisposePackageVersionsResponse