{-# 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.Glacier.AbortMultipartUpload
(
AbortMultipartUpload (..),
newAbortMultipartUpload,
abortMultipartUpload_accountId,
abortMultipartUpload_vaultName,
abortMultipartUpload_uploadId,
AbortMultipartUploadResponse (..),
newAbortMultipartUploadResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Glacier.Types
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 AbortMultipartUpload = AbortMultipartUpload'
{
AbortMultipartUpload -> Text
accountId :: Prelude.Text,
AbortMultipartUpload -> Text
vaultName :: Prelude.Text,
AbortMultipartUpload -> Text
uploadId :: Prelude.Text
}
deriving (AbortMultipartUpload -> AbortMultipartUpload -> Bool
(AbortMultipartUpload -> AbortMultipartUpload -> Bool)
-> (AbortMultipartUpload -> AbortMultipartUpload -> Bool)
-> Eq AbortMultipartUpload
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AbortMultipartUpload -> AbortMultipartUpload -> Bool
$c/= :: AbortMultipartUpload -> AbortMultipartUpload -> Bool
== :: AbortMultipartUpload -> AbortMultipartUpload -> Bool
$c== :: AbortMultipartUpload -> AbortMultipartUpload -> Bool
Prelude.Eq, ReadPrec [AbortMultipartUpload]
ReadPrec AbortMultipartUpload
Int -> ReadS AbortMultipartUpload
ReadS [AbortMultipartUpload]
(Int -> ReadS AbortMultipartUpload)
-> ReadS [AbortMultipartUpload]
-> ReadPrec AbortMultipartUpload
-> ReadPrec [AbortMultipartUpload]
-> Read AbortMultipartUpload
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AbortMultipartUpload]
$creadListPrec :: ReadPrec [AbortMultipartUpload]
readPrec :: ReadPrec AbortMultipartUpload
$creadPrec :: ReadPrec AbortMultipartUpload
readList :: ReadS [AbortMultipartUpload]
$creadList :: ReadS [AbortMultipartUpload]
readsPrec :: Int -> ReadS AbortMultipartUpload
$creadsPrec :: Int -> ReadS AbortMultipartUpload
Prelude.Read, Int -> AbortMultipartUpload -> ShowS
[AbortMultipartUpload] -> ShowS
AbortMultipartUpload -> String
(Int -> AbortMultipartUpload -> ShowS)
-> (AbortMultipartUpload -> String)
-> ([AbortMultipartUpload] -> ShowS)
-> Show AbortMultipartUpload
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AbortMultipartUpload] -> ShowS
$cshowList :: [AbortMultipartUpload] -> ShowS
show :: AbortMultipartUpload -> String
$cshow :: AbortMultipartUpload -> String
showsPrec :: Int -> AbortMultipartUpload -> ShowS
$cshowsPrec :: Int -> AbortMultipartUpload -> ShowS
Prelude.Show, (forall x. AbortMultipartUpload -> Rep AbortMultipartUpload x)
-> (forall x. Rep AbortMultipartUpload x -> AbortMultipartUpload)
-> Generic AbortMultipartUpload
forall x. Rep AbortMultipartUpload x -> AbortMultipartUpload
forall x. AbortMultipartUpload -> Rep AbortMultipartUpload x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AbortMultipartUpload x -> AbortMultipartUpload
$cfrom :: forall x. AbortMultipartUpload -> Rep AbortMultipartUpload x
Prelude.Generic)
newAbortMultipartUpload ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
AbortMultipartUpload
newAbortMultipartUpload :: Text -> Text -> Text -> AbortMultipartUpload
newAbortMultipartUpload
Text
pAccountId_
Text
pVaultName_
Text
pUploadId_ =
AbortMultipartUpload' :: Text -> Text -> Text -> AbortMultipartUpload
AbortMultipartUpload'
{ $sel:accountId:AbortMultipartUpload' :: Text
accountId = Text
pAccountId_,
$sel:vaultName:AbortMultipartUpload' :: Text
vaultName = Text
pVaultName_,
$sel:uploadId:AbortMultipartUpload' :: Text
uploadId = Text
pUploadId_
}
abortMultipartUpload_accountId :: Lens.Lens' AbortMultipartUpload Prelude.Text
abortMultipartUpload_accountId :: (Text -> f Text) -> AbortMultipartUpload -> f AbortMultipartUpload
abortMultipartUpload_accountId = (AbortMultipartUpload -> Text)
-> (AbortMultipartUpload -> Text -> AbortMultipartUpload)
-> Lens AbortMultipartUpload AbortMultipartUpload Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AbortMultipartUpload' {Text
accountId :: Text
$sel:accountId:AbortMultipartUpload' :: AbortMultipartUpload -> Text
accountId} -> Text
accountId) (\s :: AbortMultipartUpload
s@AbortMultipartUpload' {} Text
a -> AbortMultipartUpload
s {$sel:accountId:AbortMultipartUpload' :: Text
accountId = Text
a} :: AbortMultipartUpload)
abortMultipartUpload_vaultName :: Lens.Lens' AbortMultipartUpload Prelude.Text
abortMultipartUpload_vaultName :: (Text -> f Text) -> AbortMultipartUpload -> f AbortMultipartUpload
abortMultipartUpload_vaultName = (AbortMultipartUpload -> Text)
-> (AbortMultipartUpload -> Text -> AbortMultipartUpload)
-> Lens AbortMultipartUpload AbortMultipartUpload Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AbortMultipartUpload' {Text
vaultName :: Text
$sel:vaultName:AbortMultipartUpload' :: AbortMultipartUpload -> Text
vaultName} -> Text
vaultName) (\s :: AbortMultipartUpload
s@AbortMultipartUpload' {} Text
a -> AbortMultipartUpload
s {$sel:vaultName:AbortMultipartUpload' :: Text
vaultName = Text
a} :: AbortMultipartUpload)
abortMultipartUpload_uploadId :: Lens.Lens' AbortMultipartUpload Prelude.Text
abortMultipartUpload_uploadId :: (Text -> f Text) -> AbortMultipartUpload -> f AbortMultipartUpload
abortMultipartUpload_uploadId = (AbortMultipartUpload -> Text)
-> (AbortMultipartUpload -> Text -> AbortMultipartUpload)
-> Lens AbortMultipartUpload AbortMultipartUpload Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AbortMultipartUpload' {Text
uploadId :: Text
$sel:uploadId:AbortMultipartUpload' :: AbortMultipartUpload -> Text
uploadId} -> Text
uploadId) (\s :: AbortMultipartUpload
s@AbortMultipartUpload' {} Text
a -> AbortMultipartUpload
s {$sel:uploadId:AbortMultipartUpload' :: Text
uploadId = Text
a} :: AbortMultipartUpload)
instance Core.AWSRequest AbortMultipartUpload where
type
AWSResponse AbortMultipartUpload =
AbortMultipartUploadResponse
request :: AbortMultipartUpload -> Request AbortMultipartUpload
request =
ByteString
-> Request AbortMultipartUpload -> Request AbortMultipartUpload
forall a. ByteString -> Request a -> Request a
Request.glacierVersionHeader (Service -> ByteString
Core._serviceVersion Service
defaultService)
(Request AbortMultipartUpload -> Request AbortMultipartUpload)
-> (AbortMultipartUpload -> Request AbortMultipartUpload)
-> AbortMultipartUpload
-> Request AbortMultipartUpload
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service -> AbortMultipartUpload -> Request AbortMultipartUpload
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy AbortMultipartUpload
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse AbortMultipartUpload)))
response =
AWSResponse AbortMultipartUpload
-> Logger
-> Service
-> Proxy AbortMultipartUpload
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse AbortMultipartUpload)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse AbortMultipartUpload
AbortMultipartUploadResponse
AbortMultipartUploadResponse'
instance Prelude.Hashable AbortMultipartUpload
instance Prelude.NFData AbortMultipartUpload
instance Core.ToHeaders AbortMultipartUpload where
toHeaders :: AbortMultipartUpload -> [Header]
toHeaders = [Header] -> AbortMultipartUpload -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath AbortMultipartUpload where
toPath :: AbortMultipartUpload -> ByteString
toPath AbortMultipartUpload' {Text
uploadId :: Text
vaultName :: Text
accountId :: Text
$sel:uploadId:AbortMultipartUpload' :: AbortMultipartUpload -> Text
$sel:vaultName:AbortMultipartUpload' :: AbortMultipartUpload -> Text
$sel:accountId:AbortMultipartUpload' :: AbortMultipartUpload -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
accountId,
ByteString
"/vaults/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
vaultName,
ByteString
"/multipart-uploads/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
uploadId
]
instance Core.ToQuery AbortMultipartUpload where
toQuery :: AbortMultipartUpload -> QueryString
toQuery = QueryString -> AbortMultipartUpload -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data AbortMultipartUploadResponse = AbortMultipartUploadResponse'
{
}
deriving (AbortMultipartUploadResponse
-> AbortMultipartUploadResponse -> Bool
(AbortMultipartUploadResponse
-> AbortMultipartUploadResponse -> Bool)
-> (AbortMultipartUploadResponse
-> AbortMultipartUploadResponse -> Bool)
-> Eq AbortMultipartUploadResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AbortMultipartUploadResponse
-> AbortMultipartUploadResponse -> Bool
$c/= :: AbortMultipartUploadResponse
-> AbortMultipartUploadResponse -> Bool
== :: AbortMultipartUploadResponse
-> AbortMultipartUploadResponse -> Bool
$c== :: AbortMultipartUploadResponse
-> AbortMultipartUploadResponse -> Bool
Prelude.Eq, ReadPrec [AbortMultipartUploadResponse]
ReadPrec AbortMultipartUploadResponse
Int -> ReadS AbortMultipartUploadResponse
ReadS [AbortMultipartUploadResponse]
(Int -> ReadS AbortMultipartUploadResponse)
-> ReadS [AbortMultipartUploadResponse]
-> ReadPrec AbortMultipartUploadResponse
-> ReadPrec [AbortMultipartUploadResponse]
-> Read AbortMultipartUploadResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AbortMultipartUploadResponse]
$creadListPrec :: ReadPrec [AbortMultipartUploadResponse]
readPrec :: ReadPrec AbortMultipartUploadResponse
$creadPrec :: ReadPrec AbortMultipartUploadResponse
readList :: ReadS [AbortMultipartUploadResponse]
$creadList :: ReadS [AbortMultipartUploadResponse]
readsPrec :: Int -> ReadS AbortMultipartUploadResponse
$creadsPrec :: Int -> ReadS AbortMultipartUploadResponse
Prelude.Read, Int -> AbortMultipartUploadResponse -> ShowS
[AbortMultipartUploadResponse] -> ShowS
AbortMultipartUploadResponse -> String
(Int -> AbortMultipartUploadResponse -> ShowS)
-> (AbortMultipartUploadResponse -> String)
-> ([AbortMultipartUploadResponse] -> ShowS)
-> Show AbortMultipartUploadResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AbortMultipartUploadResponse] -> ShowS
$cshowList :: [AbortMultipartUploadResponse] -> ShowS
show :: AbortMultipartUploadResponse -> String
$cshow :: AbortMultipartUploadResponse -> String
showsPrec :: Int -> AbortMultipartUploadResponse -> ShowS
$cshowsPrec :: Int -> AbortMultipartUploadResponse -> ShowS
Prelude.Show, (forall x.
AbortMultipartUploadResponse -> Rep AbortMultipartUploadResponse x)
-> (forall x.
Rep AbortMultipartUploadResponse x -> AbortMultipartUploadResponse)
-> Generic AbortMultipartUploadResponse
forall x.
Rep AbortMultipartUploadResponse x -> AbortMultipartUploadResponse
forall x.
AbortMultipartUploadResponse -> Rep AbortMultipartUploadResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AbortMultipartUploadResponse x -> AbortMultipartUploadResponse
$cfrom :: forall x.
AbortMultipartUploadResponse -> Rep AbortMultipartUploadResponse x
Prelude.Generic)
newAbortMultipartUploadResponse ::
AbortMultipartUploadResponse
newAbortMultipartUploadResponse :: AbortMultipartUploadResponse
newAbortMultipartUploadResponse =
AbortMultipartUploadResponse
AbortMultipartUploadResponse'
instance Prelude.NFData AbortMultipartUploadResponse