{-# 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.GetPackageVersionAsset
(
GetPackageVersionAsset (..),
newGetPackageVersionAsset,
getPackageVersionAsset_namespace,
getPackageVersionAsset_domainOwner,
getPackageVersionAsset_packageVersionRevision,
getPackageVersionAsset_domain,
getPackageVersionAsset_repository,
getPackageVersionAsset_format,
getPackageVersionAsset_package,
getPackageVersionAsset_packageVersion,
getPackageVersionAsset_asset,
GetPackageVersionAssetResponse (..),
newGetPackageVersionAssetResponse,
getPackageVersionAssetResponse_packageVersion,
getPackageVersionAssetResponse_assetName,
getPackageVersionAssetResponse_packageVersionRevision,
getPackageVersionAssetResponse_httpStatus,
getPackageVersionAssetResponse_asset,
)
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 GetPackageVersionAsset = GetPackageVersionAsset'
{
GetPackageVersionAsset -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
GetPackageVersionAsset -> Maybe Text
domainOwner :: Prelude.Maybe Prelude.Text,
GetPackageVersionAsset -> Maybe Text
packageVersionRevision :: Prelude.Maybe Prelude.Text,
GetPackageVersionAsset -> Text
domain :: Prelude.Text,
GetPackageVersionAsset -> Text
repository :: Prelude.Text,
GetPackageVersionAsset -> PackageFormat
format :: PackageFormat,
GetPackageVersionAsset -> Text
package :: Prelude.Text,
GetPackageVersionAsset -> Text
packageVersion :: Prelude.Text,
GetPackageVersionAsset -> Text
asset :: Prelude.Text
}
deriving (GetPackageVersionAsset -> GetPackageVersionAsset -> Bool
(GetPackageVersionAsset -> GetPackageVersionAsset -> Bool)
-> (GetPackageVersionAsset -> GetPackageVersionAsset -> Bool)
-> Eq GetPackageVersionAsset
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPackageVersionAsset -> GetPackageVersionAsset -> Bool
$c/= :: GetPackageVersionAsset -> GetPackageVersionAsset -> Bool
== :: GetPackageVersionAsset -> GetPackageVersionAsset -> Bool
$c== :: GetPackageVersionAsset -> GetPackageVersionAsset -> Bool
Prelude.Eq, ReadPrec [GetPackageVersionAsset]
ReadPrec GetPackageVersionAsset
Int -> ReadS GetPackageVersionAsset
ReadS [GetPackageVersionAsset]
(Int -> ReadS GetPackageVersionAsset)
-> ReadS [GetPackageVersionAsset]
-> ReadPrec GetPackageVersionAsset
-> ReadPrec [GetPackageVersionAsset]
-> Read GetPackageVersionAsset
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetPackageVersionAsset]
$creadListPrec :: ReadPrec [GetPackageVersionAsset]
readPrec :: ReadPrec GetPackageVersionAsset
$creadPrec :: ReadPrec GetPackageVersionAsset
readList :: ReadS [GetPackageVersionAsset]
$creadList :: ReadS [GetPackageVersionAsset]
readsPrec :: Int -> ReadS GetPackageVersionAsset
$creadsPrec :: Int -> ReadS GetPackageVersionAsset
Prelude.Read, Int -> GetPackageVersionAsset -> ShowS
[GetPackageVersionAsset] -> ShowS
GetPackageVersionAsset -> String
(Int -> GetPackageVersionAsset -> ShowS)
-> (GetPackageVersionAsset -> String)
-> ([GetPackageVersionAsset] -> ShowS)
-> Show GetPackageVersionAsset
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPackageVersionAsset] -> ShowS
$cshowList :: [GetPackageVersionAsset] -> ShowS
show :: GetPackageVersionAsset -> String
$cshow :: GetPackageVersionAsset -> String
showsPrec :: Int -> GetPackageVersionAsset -> ShowS
$cshowsPrec :: Int -> GetPackageVersionAsset -> ShowS
Prelude.Show, (forall x. GetPackageVersionAsset -> Rep GetPackageVersionAsset x)
-> (forall x.
Rep GetPackageVersionAsset x -> GetPackageVersionAsset)
-> Generic GetPackageVersionAsset
forall x. Rep GetPackageVersionAsset x -> GetPackageVersionAsset
forall x. GetPackageVersionAsset -> Rep GetPackageVersionAsset x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetPackageVersionAsset x -> GetPackageVersionAsset
$cfrom :: forall x. GetPackageVersionAsset -> Rep GetPackageVersionAsset x
Prelude.Generic)
newGetPackageVersionAsset ::
Prelude.Text ->
Prelude.Text ->
PackageFormat ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
GetPackageVersionAsset
newGetPackageVersionAsset :: Text
-> Text
-> PackageFormat
-> Text
-> Text
-> Text
-> GetPackageVersionAsset
newGetPackageVersionAsset
Text
pDomain_
Text
pRepository_
PackageFormat
pFormat_
Text
pPackage_
Text
pPackageVersion_
Text
pAsset_ =
GetPackageVersionAsset' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> PackageFormat
-> Text
-> Text
-> Text
-> GetPackageVersionAsset
GetPackageVersionAsset'
{ $sel:namespace:GetPackageVersionAsset' :: Maybe Text
namespace =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:domainOwner:GetPackageVersionAsset' :: Maybe Text
domainOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:packageVersionRevision:GetPackageVersionAsset' :: Maybe Text
packageVersionRevision = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:domain:GetPackageVersionAsset' :: Text
domain = Text
pDomain_,
$sel:repository:GetPackageVersionAsset' :: Text
repository = Text
pRepository_,
$sel:format:GetPackageVersionAsset' :: PackageFormat
format = PackageFormat
pFormat_,
$sel:package:GetPackageVersionAsset' :: Text
package = Text
pPackage_,
$sel:packageVersion:GetPackageVersionAsset' :: Text
packageVersion = Text
pPackageVersion_,
$sel:asset:GetPackageVersionAsset' :: Text
asset = Text
pAsset_
}
getPackageVersionAsset_namespace :: Lens.Lens' GetPackageVersionAsset (Prelude.Maybe Prelude.Text)
getPackageVersionAsset_namespace :: (Maybe Text -> f (Maybe Text))
-> GetPackageVersionAsset -> f GetPackageVersionAsset
getPackageVersionAsset_namespace = (GetPackageVersionAsset -> Maybe Text)
-> (GetPackageVersionAsset -> Maybe Text -> GetPackageVersionAsset)
-> Lens
GetPackageVersionAsset
GetPackageVersionAsset
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionAsset' {Maybe Text
namespace :: Maybe Text
$sel:namespace:GetPackageVersionAsset' :: GetPackageVersionAsset -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: GetPackageVersionAsset
s@GetPackageVersionAsset' {} Maybe Text
a -> GetPackageVersionAsset
s {$sel:namespace:GetPackageVersionAsset' :: Maybe Text
namespace = Maybe Text
a} :: GetPackageVersionAsset)
getPackageVersionAsset_domainOwner :: Lens.Lens' GetPackageVersionAsset (Prelude.Maybe Prelude.Text)
getPackageVersionAsset_domainOwner :: (Maybe Text -> f (Maybe Text))
-> GetPackageVersionAsset -> f GetPackageVersionAsset
getPackageVersionAsset_domainOwner = (GetPackageVersionAsset -> Maybe Text)
-> (GetPackageVersionAsset -> Maybe Text -> GetPackageVersionAsset)
-> Lens
GetPackageVersionAsset
GetPackageVersionAsset
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionAsset' {Maybe Text
domainOwner :: Maybe Text
$sel:domainOwner:GetPackageVersionAsset' :: GetPackageVersionAsset -> Maybe Text
domainOwner} -> Maybe Text
domainOwner) (\s :: GetPackageVersionAsset
s@GetPackageVersionAsset' {} Maybe Text
a -> GetPackageVersionAsset
s {$sel:domainOwner:GetPackageVersionAsset' :: Maybe Text
domainOwner = Maybe Text
a} :: GetPackageVersionAsset)
getPackageVersionAsset_packageVersionRevision :: Lens.Lens' GetPackageVersionAsset (Prelude.Maybe Prelude.Text)
getPackageVersionAsset_packageVersionRevision :: (Maybe Text -> f (Maybe Text))
-> GetPackageVersionAsset -> f GetPackageVersionAsset
getPackageVersionAsset_packageVersionRevision = (GetPackageVersionAsset -> Maybe Text)
-> (GetPackageVersionAsset -> Maybe Text -> GetPackageVersionAsset)
-> Lens
GetPackageVersionAsset
GetPackageVersionAsset
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionAsset' {Maybe Text
packageVersionRevision :: Maybe Text
$sel:packageVersionRevision:GetPackageVersionAsset' :: GetPackageVersionAsset -> Maybe Text
packageVersionRevision} -> Maybe Text
packageVersionRevision) (\s :: GetPackageVersionAsset
s@GetPackageVersionAsset' {} Maybe Text
a -> GetPackageVersionAsset
s {$sel:packageVersionRevision:GetPackageVersionAsset' :: Maybe Text
packageVersionRevision = Maybe Text
a} :: GetPackageVersionAsset)
getPackageVersionAsset_domain :: Lens.Lens' GetPackageVersionAsset Prelude.Text
getPackageVersionAsset_domain :: (Text -> f Text)
-> GetPackageVersionAsset -> f GetPackageVersionAsset
getPackageVersionAsset_domain = (GetPackageVersionAsset -> Text)
-> (GetPackageVersionAsset -> Text -> GetPackageVersionAsset)
-> Lens GetPackageVersionAsset GetPackageVersionAsset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionAsset' {Text
domain :: Text
$sel:domain:GetPackageVersionAsset' :: GetPackageVersionAsset -> Text
domain} -> Text
domain) (\s :: GetPackageVersionAsset
s@GetPackageVersionAsset' {} Text
a -> GetPackageVersionAsset
s {$sel:domain:GetPackageVersionAsset' :: Text
domain = Text
a} :: GetPackageVersionAsset)
getPackageVersionAsset_repository :: Lens.Lens' GetPackageVersionAsset Prelude.Text
getPackageVersionAsset_repository :: (Text -> f Text)
-> GetPackageVersionAsset -> f GetPackageVersionAsset
getPackageVersionAsset_repository = (GetPackageVersionAsset -> Text)
-> (GetPackageVersionAsset -> Text -> GetPackageVersionAsset)
-> Lens GetPackageVersionAsset GetPackageVersionAsset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionAsset' {Text
repository :: Text
$sel:repository:GetPackageVersionAsset' :: GetPackageVersionAsset -> Text
repository} -> Text
repository) (\s :: GetPackageVersionAsset
s@GetPackageVersionAsset' {} Text
a -> GetPackageVersionAsset
s {$sel:repository:GetPackageVersionAsset' :: Text
repository = Text
a} :: GetPackageVersionAsset)
getPackageVersionAsset_format :: Lens.Lens' GetPackageVersionAsset PackageFormat
getPackageVersionAsset_format :: (PackageFormat -> f PackageFormat)
-> GetPackageVersionAsset -> f GetPackageVersionAsset
getPackageVersionAsset_format = (GetPackageVersionAsset -> PackageFormat)
-> (GetPackageVersionAsset
-> PackageFormat -> GetPackageVersionAsset)
-> Lens
GetPackageVersionAsset
GetPackageVersionAsset
PackageFormat
PackageFormat
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionAsset' {PackageFormat
format :: PackageFormat
$sel:format:GetPackageVersionAsset' :: GetPackageVersionAsset -> PackageFormat
format} -> PackageFormat
format) (\s :: GetPackageVersionAsset
s@GetPackageVersionAsset' {} PackageFormat
a -> GetPackageVersionAsset
s {$sel:format:GetPackageVersionAsset' :: PackageFormat
format = PackageFormat
a} :: GetPackageVersionAsset)
getPackageVersionAsset_package :: Lens.Lens' GetPackageVersionAsset Prelude.Text
getPackageVersionAsset_package :: (Text -> f Text)
-> GetPackageVersionAsset -> f GetPackageVersionAsset
getPackageVersionAsset_package = (GetPackageVersionAsset -> Text)
-> (GetPackageVersionAsset -> Text -> GetPackageVersionAsset)
-> Lens GetPackageVersionAsset GetPackageVersionAsset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionAsset' {Text
package :: Text
$sel:package:GetPackageVersionAsset' :: GetPackageVersionAsset -> Text
package} -> Text
package) (\s :: GetPackageVersionAsset
s@GetPackageVersionAsset' {} Text
a -> GetPackageVersionAsset
s {$sel:package:GetPackageVersionAsset' :: Text
package = Text
a} :: GetPackageVersionAsset)
getPackageVersionAsset_packageVersion :: Lens.Lens' GetPackageVersionAsset Prelude.Text
getPackageVersionAsset_packageVersion :: (Text -> f Text)
-> GetPackageVersionAsset -> f GetPackageVersionAsset
getPackageVersionAsset_packageVersion = (GetPackageVersionAsset -> Text)
-> (GetPackageVersionAsset -> Text -> GetPackageVersionAsset)
-> Lens GetPackageVersionAsset GetPackageVersionAsset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionAsset' {Text
packageVersion :: Text
$sel:packageVersion:GetPackageVersionAsset' :: GetPackageVersionAsset -> Text
packageVersion} -> Text
packageVersion) (\s :: GetPackageVersionAsset
s@GetPackageVersionAsset' {} Text
a -> GetPackageVersionAsset
s {$sel:packageVersion:GetPackageVersionAsset' :: Text
packageVersion = Text
a} :: GetPackageVersionAsset)
getPackageVersionAsset_asset :: Lens.Lens' GetPackageVersionAsset Prelude.Text
getPackageVersionAsset_asset :: (Text -> f Text)
-> GetPackageVersionAsset -> f GetPackageVersionAsset
getPackageVersionAsset_asset = (GetPackageVersionAsset -> Text)
-> (GetPackageVersionAsset -> Text -> GetPackageVersionAsset)
-> Lens GetPackageVersionAsset GetPackageVersionAsset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionAsset' {Text
asset :: Text
$sel:asset:GetPackageVersionAsset' :: GetPackageVersionAsset -> Text
asset} -> Text
asset) (\s :: GetPackageVersionAsset
s@GetPackageVersionAsset' {} Text
a -> GetPackageVersionAsset
s {$sel:asset:GetPackageVersionAsset' :: Text
asset = Text
a} :: GetPackageVersionAsset)
instance Core.AWSRequest GetPackageVersionAsset where
type
AWSResponse GetPackageVersionAsset =
GetPackageVersionAssetResponse
request :: GetPackageVersionAsset -> Request GetPackageVersionAsset
request = Service -> GetPackageVersionAsset -> Request GetPackageVersionAsset
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetPackageVersionAsset
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetPackageVersionAsset)))
response =
(Int
-> ResponseHeaders
-> ResponseBody
-> Either String (AWSResponse GetPackageVersionAsset))
-> Logger
-> Service
-> Proxy GetPackageVersionAsset
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetPackageVersionAsset)))
forall (m :: * -> *) a.
MonadResource m =>
(Int
-> ResponseHeaders
-> ResponseBody
-> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveBody
( \Int
s ResponseHeaders
h ResponseBody
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> GetPackageVersionAssetResponse
GetPackageVersionAssetResponse'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> GetPackageVersionAssetResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> GetPackageVersionAssetResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"X-PackageVersion")
Either
String
(Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> GetPackageVersionAssetResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Int -> ResponseBody -> GetPackageVersionAssetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"X-AssetName")
Either
String
(Maybe Text
-> Int -> ResponseBody -> GetPackageVersionAssetResponse)
-> Either String (Maybe Text)
-> Either
String (Int -> ResponseBody -> GetPackageVersionAssetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"X-PackageVersionRevision")
Either
String (Int -> ResponseBody -> GetPackageVersionAssetResponse)
-> Either String Int
-> Either String (ResponseBody -> GetPackageVersionAssetResponse)
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))
Either String (ResponseBody -> GetPackageVersionAssetResponse)
-> Either String ResponseBody
-> Either String GetPackageVersionAssetResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseBody -> Either String ResponseBody
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure ResponseBody
x)
)
instance Prelude.Hashable GetPackageVersionAsset
instance Prelude.NFData GetPackageVersionAsset
instance Core.ToHeaders GetPackageVersionAsset where
toHeaders :: GetPackageVersionAsset -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetPackageVersionAsset -> 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.ToPath GetPackageVersionAsset where
toPath :: GetPackageVersionAsset -> ByteString
toPath = ByteString -> GetPackageVersionAsset -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/package/version/asset"
instance Core.ToQuery GetPackageVersionAsset where
toQuery :: GetPackageVersionAsset -> QueryString
toQuery GetPackageVersionAsset' {Maybe Text
Text
PackageFormat
asset :: Text
packageVersion :: Text
package :: Text
format :: PackageFormat
repository :: Text
domain :: Text
packageVersionRevision :: Maybe Text
domainOwner :: Maybe Text
namespace :: Maybe Text
$sel:asset:GetPackageVersionAsset' :: GetPackageVersionAsset -> Text
$sel:packageVersion:GetPackageVersionAsset' :: GetPackageVersionAsset -> Text
$sel:package:GetPackageVersionAsset' :: GetPackageVersionAsset -> Text
$sel:format:GetPackageVersionAsset' :: GetPackageVersionAsset -> PackageFormat
$sel:repository:GetPackageVersionAsset' :: GetPackageVersionAsset -> Text
$sel:domain:GetPackageVersionAsset' :: GetPackageVersionAsset -> Text
$sel:packageVersionRevision:GetPackageVersionAsset' :: GetPackageVersionAsset -> Maybe Text
$sel:domainOwner:GetPackageVersionAsset' :: GetPackageVersionAsset -> Maybe Text
$sel:namespace:GetPackageVersionAsset' :: GetPackageVersionAsset -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"namespace" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
namespace,
ByteString
"domain-owner" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
domainOwner,
ByteString
"revision" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
packageVersionRevision,
ByteString
"domain" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
domain,
ByteString
"repository" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
repository,
ByteString
"format" ByteString -> PackageFormat -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: PackageFormat
format,
ByteString
"package" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
package,
ByteString
"version" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
packageVersion,
ByteString
"asset" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
asset
]
data GetPackageVersionAssetResponse = GetPackageVersionAssetResponse'
{
GetPackageVersionAssetResponse -> Maybe Text
packageVersion :: Prelude.Maybe Prelude.Text,
GetPackageVersionAssetResponse -> Maybe Text
assetName :: Prelude.Maybe Prelude.Text,
GetPackageVersionAssetResponse -> Maybe Text
packageVersionRevision :: Prelude.Maybe Prelude.Text,
GetPackageVersionAssetResponse -> Int
httpStatus :: Prelude.Int,
GetPackageVersionAssetResponse -> ResponseBody
asset :: Core.ResponseBody
}
deriving (Int -> GetPackageVersionAssetResponse -> ShowS
[GetPackageVersionAssetResponse] -> ShowS
GetPackageVersionAssetResponse -> String
(Int -> GetPackageVersionAssetResponse -> ShowS)
-> (GetPackageVersionAssetResponse -> String)
-> ([GetPackageVersionAssetResponse] -> ShowS)
-> Show GetPackageVersionAssetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPackageVersionAssetResponse] -> ShowS
$cshowList :: [GetPackageVersionAssetResponse] -> ShowS
show :: GetPackageVersionAssetResponse -> String
$cshow :: GetPackageVersionAssetResponse -> String
showsPrec :: Int -> GetPackageVersionAssetResponse -> ShowS
$cshowsPrec :: Int -> GetPackageVersionAssetResponse -> ShowS
Prelude.Show, (forall x.
GetPackageVersionAssetResponse
-> Rep GetPackageVersionAssetResponse x)
-> (forall x.
Rep GetPackageVersionAssetResponse x
-> GetPackageVersionAssetResponse)
-> Generic GetPackageVersionAssetResponse
forall x.
Rep GetPackageVersionAssetResponse x
-> GetPackageVersionAssetResponse
forall x.
GetPackageVersionAssetResponse
-> Rep GetPackageVersionAssetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetPackageVersionAssetResponse x
-> GetPackageVersionAssetResponse
$cfrom :: forall x.
GetPackageVersionAssetResponse
-> Rep GetPackageVersionAssetResponse x
Prelude.Generic)
newGetPackageVersionAssetResponse ::
Prelude.Int ->
Core.ResponseBody ->
GetPackageVersionAssetResponse
newGetPackageVersionAssetResponse :: Int -> ResponseBody -> GetPackageVersionAssetResponse
newGetPackageVersionAssetResponse
Int
pHttpStatus_
ResponseBody
pAsset_ =
GetPackageVersionAssetResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> GetPackageVersionAssetResponse
GetPackageVersionAssetResponse'
{ $sel:packageVersion:GetPackageVersionAssetResponse' :: Maybe Text
packageVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:assetName:GetPackageVersionAssetResponse' :: Maybe Text
assetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:packageVersionRevision:GetPackageVersionAssetResponse' :: Maybe Text
packageVersionRevision = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetPackageVersionAssetResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:asset:GetPackageVersionAssetResponse' :: ResponseBody
asset = ResponseBody
pAsset_
}
getPackageVersionAssetResponse_packageVersion :: Lens.Lens' GetPackageVersionAssetResponse (Prelude.Maybe Prelude.Text)
getPackageVersionAssetResponse_packageVersion :: (Maybe Text -> f (Maybe Text))
-> GetPackageVersionAssetResponse
-> f GetPackageVersionAssetResponse
getPackageVersionAssetResponse_packageVersion = (GetPackageVersionAssetResponse -> Maybe Text)
-> (GetPackageVersionAssetResponse
-> Maybe Text -> GetPackageVersionAssetResponse)
-> Lens
GetPackageVersionAssetResponse
GetPackageVersionAssetResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionAssetResponse' {Maybe Text
packageVersion :: Maybe Text
$sel:packageVersion:GetPackageVersionAssetResponse' :: GetPackageVersionAssetResponse -> Maybe Text
packageVersion} -> Maybe Text
packageVersion) (\s :: GetPackageVersionAssetResponse
s@GetPackageVersionAssetResponse' {} Maybe Text
a -> GetPackageVersionAssetResponse
s {$sel:packageVersion:GetPackageVersionAssetResponse' :: Maybe Text
packageVersion = Maybe Text
a} :: GetPackageVersionAssetResponse)
getPackageVersionAssetResponse_assetName :: Lens.Lens' GetPackageVersionAssetResponse (Prelude.Maybe Prelude.Text)
getPackageVersionAssetResponse_assetName :: (Maybe Text -> f (Maybe Text))
-> GetPackageVersionAssetResponse
-> f GetPackageVersionAssetResponse
getPackageVersionAssetResponse_assetName = (GetPackageVersionAssetResponse -> Maybe Text)
-> (GetPackageVersionAssetResponse
-> Maybe Text -> GetPackageVersionAssetResponse)
-> Lens
GetPackageVersionAssetResponse
GetPackageVersionAssetResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionAssetResponse' {Maybe Text
assetName :: Maybe Text
$sel:assetName:GetPackageVersionAssetResponse' :: GetPackageVersionAssetResponse -> Maybe Text
assetName} -> Maybe Text
assetName) (\s :: GetPackageVersionAssetResponse
s@GetPackageVersionAssetResponse' {} Maybe Text
a -> GetPackageVersionAssetResponse
s {$sel:assetName:GetPackageVersionAssetResponse' :: Maybe Text
assetName = Maybe Text
a} :: GetPackageVersionAssetResponse)
getPackageVersionAssetResponse_packageVersionRevision :: Lens.Lens' GetPackageVersionAssetResponse (Prelude.Maybe Prelude.Text)
getPackageVersionAssetResponse_packageVersionRevision :: (Maybe Text -> f (Maybe Text))
-> GetPackageVersionAssetResponse
-> f GetPackageVersionAssetResponse
getPackageVersionAssetResponse_packageVersionRevision = (GetPackageVersionAssetResponse -> Maybe Text)
-> (GetPackageVersionAssetResponse
-> Maybe Text -> GetPackageVersionAssetResponse)
-> Lens
GetPackageVersionAssetResponse
GetPackageVersionAssetResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionAssetResponse' {Maybe Text
packageVersionRevision :: Maybe Text
$sel:packageVersionRevision:GetPackageVersionAssetResponse' :: GetPackageVersionAssetResponse -> Maybe Text
packageVersionRevision} -> Maybe Text
packageVersionRevision) (\s :: GetPackageVersionAssetResponse
s@GetPackageVersionAssetResponse' {} Maybe Text
a -> GetPackageVersionAssetResponse
s {$sel:packageVersionRevision:GetPackageVersionAssetResponse' :: Maybe Text
packageVersionRevision = Maybe Text
a} :: GetPackageVersionAssetResponse)
getPackageVersionAssetResponse_httpStatus :: Lens.Lens' GetPackageVersionAssetResponse Prelude.Int
getPackageVersionAssetResponse_httpStatus :: (Int -> f Int)
-> GetPackageVersionAssetResponse
-> f GetPackageVersionAssetResponse
getPackageVersionAssetResponse_httpStatus = (GetPackageVersionAssetResponse -> Int)
-> (GetPackageVersionAssetResponse
-> Int -> GetPackageVersionAssetResponse)
-> Lens
GetPackageVersionAssetResponse
GetPackageVersionAssetResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionAssetResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetPackageVersionAssetResponse' :: GetPackageVersionAssetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetPackageVersionAssetResponse
s@GetPackageVersionAssetResponse' {} Int
a -> GetPackageVersionAssetResponse
s {$sel:httpStatus:GetPackageVersionAssetResponse' :: Int
httpStatus = Int
a} :: GetPackageVersionAssetResponse)
getPackageVersionAssetResponse_asset :: Lens.Lens' GetPackageVersionAssetResponse Core.ResponseBody
getPackageVersionAssetResponse_asset :: (ResponseBody -> f ResponseBody)
-> GetPackageVersionAssetResponse
-> f GetPackageVersionAssetResponse
getPackageVersionAssetResponse_asset = (GetPackageVersionAssetResponse -> ResponseBody)
-> (GetPackageVersionAssetResponse
-> ResponseBody -> GetPackageVersionAssetResponse)
-> Lens
GetPackageVersionAssetResponse
GetPackageVersionAssetResponse
ResponseBody
ResponseBody
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPackageVersionAssetResponse' {ResponseBody
asset :: ResponseBody
$sel:asset:GetPackageVersionAssetResponse' :: GetPackageVersionAssetResponse -> ResponseBody
asset} -> ResponseBody
asset) (\s :: GetPackageVersionAssetResponse
s@GetPackageVersionAssetResponse' {} ResponseBody
a -> GetPackageVersionAssetResponse
s {$sel:asset:GetPackageVersionAssetResponse' :: ResponseBody
asset = ResponseBody
a} :: GetPackageVersionAssetResponse)