{-# 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 #-}
module Amazonka.CodeArtifact.DeletePackageVersions
(
DeletePackageVersions (..),
newDeletePackageVersions,
deletePackageVersions_expectedStatus,
deletePackageVersions_namespace,
deletePackageVersions_domainOwner,
deletePackageVersions_domain,
deletePackageVersions_repository,
deletePackageVersions_format,
deletePackageVersions_package,
deletePackageVersions_versions,
DeletePackageVersionsResponse (..),
newDeletePackageVersionsResponse,
deletePackageVersionsResponse_failedVersions,
deletePackageVersionsResponse_successfulVersions,
deletePackageVersionsResponse_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
data DeletePackageVersions = DeletePackageVersions'
{
DeletePackageVersions -> Maybe PackageVersionStatus
expectedStatus :: Prelude.Maybe PackageVersionStatus,
DeletePackageVersions -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
DeletePackageVersions -> Maybe Text
domainOwner :: Prelude.Maybe Prelude.Text,
DeletePackageVersions -> Text
domain :: Prelude.Text,
DeletePackageVersions -> Text
repository :: Prelude.Text,
DeletePackageVersions -> PackageFormat
format :: PackageFormat,
DeletePackageVersions -> Text
package :: Prelude.Text,
DeletePackageVersions -> [Text]
versions :: [Prelude.Text]
}
deriving (DeletePackageVersions -> DeletePackageVersions -> Bool
(DeletePackageVersions -> DeletePackageVersions -> Bool)
-> (DeletePackageVersions -> DeletePackageVersions -> Bool)
-> Eq DeletePackageVersions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeletePackageVersions -> DeletePackageVersions -> Bool
$c/= :: DeletePackageVersions -> DeletePackageVersions -> Bool
== :: DeletePackageVersions -> DeletePackageVersions -> Bool
$c== :: DeletePackageVersions -> DeletePackageVersions -> Bool
Prelude.Eq, ReadPrec [DeletePackageVersions]
ReadPrec DeletePackageVersions
Int -> ReadS DeletePackageVersions
ReadS [DeletePackageVersions]
(Int -> ReadS DeletePackageVersions)
-> ReadS [DeletePackageVersions]
-> ReadPrec DeletePackageVersions
-> ReadPrec [DeletePackageVersions]
-> Read DeletePackageVersions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeletePackageVersions]
$creadListPrec :: ReadPrec [DeletePackageVersions]
readPrec :: ReadPrec DeletePackageVersions
$creadPrec :: ReadPrec DeletePackageVersions
readList :: ReadS [DeletePackageVersions]
$creadList :: ReadS [DeletePackageVersions]
readsPrec :: Int -> ReadS DeletePackageVersions
$creadsPrec :: Int -> ReadS DeletePackageVersions
Prelude.Read, Int -> DeletePackageVersions -> ShowS
[DeletePackageVersions] -> ShowS
DeletePackageVersions -> String
(Int -> DeletePackageVersions -> ShowS)
-> (DeletePackageVersions -> String)
-> ([DeletePackageVersions] -> ShowS)
-> Show DeletePackageVersions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeletePackageVersions] -> ShowS
$cshowList :: [DeletePackageVersions] -> ShowS
show :: DeletePackageVersions -> String
$cshow :: DeletePackageVersions -> String
showsPrec :: Int -> DeletePackageVersions -> ShowS
$cshowsPrec :: Int -> DeletePackageVersions -> ShowS
Prelude.Show, (forall x. DeletePackageVersions -> Rep DeletePackageVersions x)
-> (forall x. Rep DeletePackageVersions x -> DeletePackageVersions)
-> Generic DeletePackageVersions
forall x. Rep DeletePackageVersions x -> DeletePackageVersions
forall x. DeletePackageVersions -> Rep DeletePackageVersions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeletePackageVersions x -> DeletePackageVersions
$cfrom :: forall x. DeletePackageVersions -> Rep DeletePackageVersions x
Prelude.Generic)
newDeletePackageVersions ::
Prelude.Text ->
Prelude.Text ->
PackageFormat ->
Prelude.Text ->
DeletePackageVersions
newDeletePackageVersions :: Text -> Text -> PackageFormat -> Text -> DeletePackageVersions
newDeletePackageVersions
Text
pDomain_
Text
pRepository_
PackageFormat
pFormat_
Text
pPackage_ =
DeletePackageVersions' :: Maybe PackageVersionStatus
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> PackageFormat
-> Text
-> [Text]
-> DeletePackageVersions
DeletePackageVersions'
{ $sel:expectedStatus:DeletePackageVersions' :: Maybe PackageVersionStatus
expectedStatus =
Maybe PackageVersionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:namespace:DeletePackageVersions' :: Maybe Text
namespace = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:domainOwner:DeletePackageVersions' :: Maybe Text
domainOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:domain:DeletePackageVersions' :: Text
domain = Text
pDomain_,
$sel:repository:DeletePackageVersions' :: Text
repository = Text
pRepository_,
$sel:format:DeletePackageVersions' :: PackageFormat
format = PackageFormat
pFormat_,
$sel:package:DeletePackageVersions' :: Text
package = Text
pPackage_,
$sel:versions:DeletePackageVersions' :: [Text]
versions = [Text]
forall a. Monoid a => a
Prelude.mempty
}
deletePackageVersions_expectedStatus :: Lens.Lens' DeletePackageVersions (Prelude.Maybe PackageVersionStatus)
deletePackageVersions_expectedStatus :: (Maybe PackageVersionStatus -> f (Maybe PackageVersionStatus))
-> DeletePackageVersions -> f DeletePackageVersions
deletePackageVersions_expectedStatus = (DeletePackageVersions -> Maybe PackageVersionStatus)
-> (DeletePackageVersions
-> Maybe PackageVersionStatus -> DeletePackageVersions)
-> Lens
DeletePackageVersions
DeletePackageVersions
(Maybe PackageVersionStatus)
(Maybe PackageVersionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePackageVersions' {Maybe PackageVersionStatus
expectedStatus :: Maybe PackageVersionStatus
$sel:expectedStatus:DeletePackageVersions' :: DeletePackageVersions -> Maybe PackageVersionStatus
expectedStatus} -> Maybe PackageVersionStatus
expectedStatus) (\s :: DeletePackageVersions
s@DeletePackageVersions' {} Maybe PackageVersionStatus
a -> DeletePackageVersions
s {$sel:expectedStatus:DeletePackageVersions' :: Maybe PackageVersionStatus
expectedStatus = Maybe PackageVersionStatus
a} :: DeletePackageVersions)
deletePackageVersions_namespace :: Lens.Lens' DeletePackageVersions (Prelude.Maybe Prelude.Text)
deletePackageVersions_namespace :: (Maybe Text -> f (Maybe Text))
-> DeletePackageVersions -> f DeletePackageVersions
deletePackageVersions_namespace = (DeletePackageVersions -> Maybe Text)
-> (DeletePackageVersions -> Maybe Text -> DeletePackageVersions)
-> Lens
DeletePackageVersions
DeletePackageVersions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePackageVersions' {Maybe Text
namespace :: Maybe Text
$sel:namespace:DeletePackageVersions' :: DeletePackageVersions -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: DeletePackageVersions
s@DeletePackageVersions' {} Maybe Text
a -> DeletePackageVersions
s {$sel:namespace:DeletePackageVersions' :: Maybe Text
namespace = Maybe Text
a} :: DeletePackageVersions)
deletePackageVersions_domainOwner :: Lens.Lens' DeletePackageVersions (Prelude.Maybe Prelude.Text)
deletePackageVersions_domainOwner :: (Maybe Text -> f (Maybe Text))
-> DeletePackageVersions -> f DeletePackageVersions
deletePackageVersions_domainOwner = (DeletePackageVersions -> Maybe Text)
-> (DeletePackageVersions -> Maybe Text -> DeletePackageVersions)
-> Lens
DeletePackageVersions
DeletePackageVersions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePackageVersions' {Maybe Text
domainOwner :: Maybe Text
$sel:domainOwner:DeletePackageVersions' :: DeletePackageVersions -> Maybe Text
domainOwner} -> Maybe Text
domainOwner) (\s :: DeletePackageVersions
s@DeletePackageVersions' {} Maybe Text
a -> DeletePackageVersions
s {$sel:domainOwner:DeletePackageVersions' :: Maybe Text
domainOwner = Maybe Text
a} :: DeletePackageVersions)
deletePackageVersions_domain :: Lens.Lens' DeletePackageVersions Prelude.Text
deletePackageVersions_domain :: (Text -> f Text)
-> DeletePackageVersions -> f DeletePackageVersions
deletePackageVersions_domain = (DeletePackageVersions -> Text)
-> (DeletePackageVersions -> Text -> DeletePackageVersions)
-> Lens DeletePackageVersions DeletePackageVersions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePackageVersions' {Text
domain :: Text
$sel:domain:DeletePackageVersions' :: DeletePackageVersions -> Text
domain} -> Text
domain) (\s :: DeletePackageVersions
s@DeletePackageVersions' {} Text
a -> DeletePackageVersions
s {$sel:domain:DeletePackageVersions' :: Text
domain = Text
a} :: DeletePackageVersions)
deletePackageVersions_repository :: Lens.Lens' DeletePackageVersions Prelude.Text
deletePackageVersions_repository :: (Text -> f Text)
-> DeletePackageVersions -> f DeletePackageVersions
deletePackageVersions_repository = (DeletePackageVersions -> Text)
-> (DeletePackageVersions -> Text -> DeletePackageVersions)
-> Lens DeletePackageVersions DeletePackageVersions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePackageVersions' {Text
repository :: Text
$sel:repository:DeletePackageVersions' :: DeletePackageVersions -> Text
repository} -> Text
repository) (\s :: DeletePackageVersions
s@DeletePackageVersions' {} Text
a -> DeletePackageVersions
s {$sel:repository:DeletePackageVersions' :: Text
repository = Text
a} :: DeletePackageVersions)
deletePackageVersions_format :: Lens.Lens' DeletePackageVersions PackageFormat
deletePackageVersions_format :: (PackageFormat -> f PackageFormat)
-> DeletePackageVersions -> f DeletePackageVersions
deletePackageVersions_format = (DeletePackageVersions -> PackageFormat)
-> (DeletePackageVersions
-> PackageFormat -> DeletePackageVersions)
-> Lens
DeletePackageVersions
DeletePackageVersions
PackageFormat
PackageFormat
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePackageVersions' {PackageFormat
format :: PackageFormat
$sel:format:DeletePackageVersions' :: DeletePackageVersions -> PackageFormat
format} -> PackageFormat
format) (\s :: DeletePackageVersions
s@DeletePackageVersions' {} PackageFormat
a -> DeletePackageVersions
s {$sel:format:DeletePackageVersions' :: PackageFormat
format = PackageFormat
a} :: DeletePackageVersions)
deletePackageVersions_package :: Lens.Lens' DeletePackageVersions Prelude.Text
deletePackageVersions_package :: (Text -> f Text)
-> DeletePackageVersions -> f DeletePackageVersions
deletePackageVersions_package = (DeletePackageVersions -> Text)
-> (DeletePackageVersions -> Text -> DeletePackageVersions)
-> Lens DeletePackageVersions DeletePackageVersions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePackageVersions' {Text
package :: Text
$sel:package:DeletePackageVersions' :: DeletePackageVersions -> Text
package} -> Text
package) (\s :: DeletePackageVersions
s@DeletePackageVersions' {} Text
a -> DeletePackageVersions
s {$sel:package:DeletePackageVersions' :: Text
package = Text
a} :: DeletePackageVersions)
deletePackageVersions_versions :: Lens.Lens' DeletePackageVersions [Prelude.Text]
deletePackageVersions_versions :: ([Text] -> f [Text])
-> DeletePackageVersions -> f DeletePackageVersions
deletePackageVersions_versions = (DeletePackageVersions -> [Text])
-> (DeletePackageVersions -> [Text] -> DeletePackageVersions)
-> Lens DeletePackageVersions DeletePackageVersions [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePackageVersions' {[Text]
versions :: [Text]
$sel:versions:DeletePackageVersions' :: DeletePackageVersions -> [Text]
versions} -> [Text]
versions) (\s :: DeletePackageVersions
s@DeletePackageVersions' {} [Text]
a -> DeletePackageVersions
s {$sel:versions:DeletePackageVersions' :: [Text]
versions = [Text]
a} :: DeletePackageVersions) (([Text] -> f [Text])
-> DeletePackageVersions -> f DeletePackageVersions)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> DeletePackageVersions
-> f DeletePackageVersions
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 DeletePackageVersions where
type
AWSResponse DeletePackageVersions =
DeletePackageVersionsResponse
request :: DeletePackageVersions -> Request DeletePackageVersions
request = Service -> DeletePackageVersions -> Request DeletePackageVersions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeletePackageVersions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeletePackageVersions)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeletePackageVersions))
-> Logger
-> Service
-> Proxy DeletePackageVersions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeletePackageVersions)))
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
-> DeletePackageVersionsResponse
DeletePackageVersionsResponse'
(Maybe (HashMap Text PackageVersionError)
-> Maybe (HashMap Text SuccessfulPackageVersionInfo)
-> Int
-> DeletePackageVersionsResponse)
-> Either String (Maybe (HashMap Text PackageVersionError))
-> Either
String
(Maybe (HashMap Text SuccessfulPackageVersionInfo)
-> Int -> DeletePackageVersionsResponse)
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 -> DeletePackageVersionsResponse)
-> Either
String (Maybe (HashMap Text SuccessfulPackageVersionInfo))
-> Either String (Int -> DeletePackageVersionsResponse)
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 -> DeletePackageVersionsResponse)
-> Either String Int -> Either String DeletePackageVersionsResponse
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 DeletePackageVersions
instance Prelude.NFData DeletePackageVersions
instance Core.ToHeaders DeletePackageVersions where
toHeaders :: DeletePackageVersions -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeletePackageVersions -> 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 DeletePackageVersions where
toJSON :: DeletePackageVersions -> Value
toJSON DeletePackageVersions' {[Text]
Maybe Text
Maybe PackageVersionStatus
Text
PackageFormat
versions :: [Text]
package :: Text
format :: PackageFormat
repository :: Text
domain :: Text
domainOwner :: Maybe Text
namespace :: Maybe Text
expectedStatus :: Maybe PackageVersionStatus
$sel:versions:DeletePackageVersions' :: DeletePackageVersions -> [Text]
$sel:package:DeletePackageVersions' :: DeletePackageVersions -> Text
$sel:format:DeletePackageVersions' :: DeletePackageVersions -> PackageFormat
$sel:repository:DeletePackageVersions' :: DeletePackageVersions -> Text
$sel:domain:DeletePackageVersions' :: DeletePackageVersions -> Text
$sel:domainOwner:DeletePackageVersions' :: DeletePackageVersions -> Maybe Text
$sel:namespace:DeletePackageVersions' :: DeletePackageVersions -> Maybe Text
$sel:expectedStatus:DeletePackageVersions' :: DeletePackageVersions -> 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,
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 DeletePackageVersions where
toPath :: DeletePackageVersions -> ByteString
toPath = ByteString -> DeletePackageVersions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/package/versions/delete"
instance Core.ToQuery DeletePackageVersions where
toQuery :: DeletePackageVersions -> QueryString
toQuery DeletePackageVersions' {[Text]
Maybe Text
Maybe PackageVersionStatus
Text
PackageFormat
versions :: [Text]
package :: Text
format :: PackageFormat
repository :: Text
domain :: Text
domainOwner :: Maybe Text
namespace :: Maybe Text
expectedStatus :: Maybe PackageVersionStatus
$sel:versions:DeletePackageVersions' :: DeletePackageVersions -> [Text]
$sel:package:DeletePackageVersions' :: DeletePackageVersions -> Text
$sel:format:DeletePackageVersions' :: DeletePackageVersions -> PackageFormat
$sel:repository:DeletePackageVersions' :: DeletePackageVersions -> Text
$sel:domain:DeletePackageVersions' :: DeletePackageVersions -> Text
$sel:domainOwner:DeletePackageVersions' :: DeletePackageVersions -> Maybe Text
$sel:namespace:DeletePackageVersions' :: DeletePackageVersions -> Maybe Text
$sel:expectedStatus:DeletePackageVersions' :: DeletePackageVersions -> 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
]
data DeletePackageVersionsResponse = DeletePackageVersionsResponse'
{
DeletePackageVersionsResponse
-> Maybe (HashMap Text PackageVersionError)
failedVersions :: Prelude.Maybe (Prelude.HashMap Prelude.Text PackageVersionError),
DeletePackageVersionsResponse
-> Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions :: Prelude.Maybe (Prelude.HashMap Prelude.Text SuccessfulPackageVersionInfo),
DeletePackageVersionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeletePackageVersionsResponse
-> DeletePackageVersionsResponse -> Bool
(DeletePackageVersionsResponse
-> DeletePackageVersionsResponse -> Bool)
-> (DeletePackageVersionsResponse
-> DeletePackageVersionsResponse -> Bool)
-> Eq DeletePackageVersionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeletePackageVersionsResponse
-> DeletePackageVersionsResponse -> Bool
$c/= :: DeletePackageVersionsResponse
-> DeletePackageVersionsResponse -> Bool
== :: DeletePackageVersionsResponse
-> DeletePackageVersionsResponse -> Bool
$c== :: DeletePackageVersionsResponse
-> DeletePackageVersionsResponse -> Bool
Prelude.Eq, ReadPrec [DeletePackageVersionsResponse]
ReadPrec DeletePackageVersionsResponse
Int -> ReadS DeletePackageVersionsResponse
ReadS [DeletePackageVersionsResponse]
(Int -> ReadS DeletePackageVersionsResponse)
-> ReadS [DeletePackageVersionsResponse]
-> ReadPrec DeletePackageVersionsResponse
-> ReadPrec [DeletePackageVersionsResponse]
-> Read DeletePackageVersionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeletePackageVersionsResponse]
$creadListPrec :: ReadPrec [DeletePackageVersionsResponse]
readPrec :: ReadPrec DeletePackageVersionsResponse
$creadPrec :: ReadPrec DeletePackageVersionsResponse
readList :: ReadS [DeletePackageVersionsResponse]
$creadList :: ReadS [DeletePackageVersionsResponse]
readsPrec :: Int -> ReadS DeletePackageVersionsResponse
$creadsPrec :: Int -> ReadS DeletePackageVersionsResponse
Prelude.Read, Int -> DeletePackageVersionsResponse -> ShowS
[DeletePackageVersionsResponse] -> ShowS
DeletePackageVersionsResponse -> String
(Int -> DeletePackageVersionsResponse -> ShowS)
-> (DeletePackageVersionsResponse -> String)
-> ([DeletePackageVersionsResponse] -> ShowS)
-> Show DeletePackageVersionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeletePackageVersionsResponse] -> ShowS
$cshowList :: [DeletePackageVersionsResponse] -> ShowS
show :: DeletePackageVersionsResponse -> String
$cshow :: DeletePackageVersionsResponse -> String
showsPrec :: Int -> DeletePackageVersionsResponse -> ShowS
$cshowsPrec :: Int -> DeletePackageVersionsResponse -> ShowS
Prelude.Show, (forall x.
DeletePackageVersionsResponse
-> Rep DeletePackageVersionsResponse x)
-> (forall x.
Rep DeletePackageVersionsResponse x
-> DeletePackageVersionsResponse)
-> Generic DeletePackageVersionsResponse
forall x.
Rep DeletePackageVersionsResponse x
-> DeletePackageVersionsResponse
forall x.
DeletePackageVersionsResponse
-> Rep DeletePackageVersionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeletePackageVersionsResponse x
-> DeletePackageVersionsResponse
$cfrom :: forall x.
DeletePackageVersionsResponse
-> Rep DeletePackageVersionsResponse x
Prelude.Generic)
newDeletePackageVersionsResponse ::
Prelude.Int ->
DeletePackageVersionsResponse
newDeletePackageVersionsResponse :: Int -> DeletePackageVersionsResponse
newDeletePackageVersionsResponse Int
pHttpStatus_ =
DeletePackageVersionsResponse' :: Maybe (HashMap Text PackageVersionError)
-> Maybe (HashMap Text SuccessfulPackageVersionInfo)
-> Int
-> DeletePackageVersionsResponse
DeletePackageVersionsResponse'
{ $sel:failedVersions:DeletePackageVersionsResponse' :: Maybe (HashMap Text PackageVersionError)
failedVersions =
Maybe (HashMap Text PackageVersionError)
forall a. Maybe a
Prelude.Nothing,
$sel:successfulVersions:DeletePackageVersionsResponse' :: Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions = Maybe (HashMap Text SuccessfulPackageVersionInfo)
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeletePackageVersionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deletePackageVersionsResponse_failedVersions :: Lens.Lens' DeletePackageVersionsResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text PackageVersionError))
deletePackageVersionsResponse_failedVersions :: (Maybe (HashMap Text PackageVersionError)
-> f (Maybe (HashMap Text PackageVersionError)))
-> DeletePackageVersionsResponse -> f DeletePackageVersionsResponse
deletePackageVersionsResponse_failedVersions = (DeletePackageVersionsResponse
-> Maybe (HashMap Text PackageVersionError))
-> (DeletePackageVersionsResponse
-> Maybe (HashMap Text PackageVersionError)
-> DeletePackageVersionsResponse)
-> Lens
DeletePackageVersionsResponse
DeletePackageVersionsResponse
(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 (\DeletePackageVersionsResponse' {Maybe (HashMap Text PackageVersionError)
failedVersions :: Maybe (HashMap Text PackageVersionError)
$sel:failedVersions:DeletePackageVersionsResponse' :: DeletePackageVersionsResponse
-> Maybe (HashMap Text PackageVersionError)
failedVersions} -> Maybe (HashMap Text PackageVersionError)
failedVersions) (\s :: DeletePackageVersionsResponse
s@DeletePackageVersionsResponse' {} Maybe (HashMap Text PackageVersionError)
a -> DeletePackageVersionsResponse
s {$sel:failedVersions:DeletePackageVersionsResponse' :: Maybe (HashMap Text PackageVersionError)
failedVersions = Maybe (HashMap Text PackageVersionError)
a} :: DeletePackageVersionsResponse) ((Maybe (HashMap Text PackageVersionError)
-> f (Maybe (HashMap Text PackageVersionError)))
-> DeletePackageVersionsResponse
-> f DeletePackageVersionsResponse)
-> ((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)))
-> DeletePackageVersionsResponse
-> f DeletePackageVersionsResponse
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
deletePackageVersionsResponse_successfulVersions :: Lens.Lens' DeletePackageVersionsResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text SuccessfulPackageVersionInfo))
deletePackageVersionsResponse_successfulVersions :: (Maybe (HashMap Text SuccessfulPackageVersionInfo)
-> f (Maybe (HashMap Text SuccessfulPackageVersionInfo)))
-> DeletePackageVersionsResponse -> f DeletePackageVersionsResponse
deletePackageVersionsResponse_successfulVersions = (DeletePackageVersionsResponse
-> Maybe (HashMap Text SuccessfulPackageVersionInfo))
-> (DeletePackageVersionsResponse
-> Maybe (HashMap Text SuccessfulPackageVersionInfo)
-> DeletePackageVersionsResponse)
-> Lens
DeletePackageVersionsResponse
DeletePackageVersionsResponse
(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 (\DeletePackageVersionsResponse' {Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions :: Maybe (HashMap Text SuccessfulPackageVersionInfo)
$sel:successfulVersions:DeletePackageVersionsResponse' :: DeletePackageVersionsResponse
-> Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions} -> Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions) (\s :: DeletePackageVersionsResponse
s@DeletePackageVersionsResponse' {} Maybe (HashMap Text SuccessfulPackageVersionInfo)
a -> DeletePackageVersionsResponse
s {$sel:successfulVersions:DeletePackageVersionsResponse' :: Maybe (HashMap Text SuccessfulPackageVersionInfo)
successfulVersions = Maybe (HashMap Text SuccessfulPackageVersionInfo)
a} :: DeletePackageVersionsResponse) ((Maybe (HashMap Text SuccessfulPackageVersionInfo)
-> f (Maybe (HashMap Text SuccessfulPackageVersionInfo)))
-> DeletePackageVersionsResponse
-> f DeletePackageVersionsResponse)
-> ((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)))
-> DeletePackageVersionsResponse
-> f DeletePackageVersionsResponse
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
deletePackageVersionsResponse_httpStatus :: Lens.Lens' DeletePackageVersionsResponse Prelude.Int
deletePackageVersionsResponse_httpStatus :: (Int -> f Int)
-> DeletePackageVersionsResponse -> f DeletePackageVersionsResponse
deletePackageVersionsResponse_httpStatus = (DeletePackageVersionsResponse -> Int)
-> (DeletePackageVersionsResponse
-> Int -> DeletePackageVersionsResponse)
-> Lens
DeletePackageVersionsResponse DeletePackageVersionsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePackageVersionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeletePackageVersionsResponse' :: DeletePackageVersionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeletePackageVersionsResponse
s@DeletePackageVersionsResponse' {} Int
a -> DeletePackageVersionsResponse
s {$sel:httpStatus:DeletePackageVersionsResponse' :: Int
httpStatus = Int
a} :: DeletePackageVersionsResponse)
instance Prelude.NFData DeletePackageVersionsResponse