{-# 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.S3.DeleteObjectTagging
-- 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)
--
-- Removes the entire tag set from the specified object. For more
-- information about managing object tags, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html Object Tagging>.
--
-- To use this operation, you must have permission to perform the
-- @s3:DeleteObjectTagging@ action.
--
-- To delete tags of a specific object version, add the @versionId@ query
-- parameter in the request. You will need permission for the
-- @s3:DeleteObjectVersionTagging@ action.
--
-- The following operations are related to
-- @DeleteBucketMetricsConfiguration@:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html PutObjectTagging>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html GetObjectTagging>
module Amazonka.S3.DeleteObjectTagging
  ( -- * Creating a Request
    DeleteObjectTagging (..),
    newDeleteObjectTagging,

    -- * Request Lenses
    deleteObjectTagging_versionId,
    deleteObjectTagging_expectedBucketOwner,
    deleteObjectTagging_bucket,
    deleteObjectTagging_key,

    -- * Destructuring the Response
    DeleteObjectTaggingResponse (..),
    newDeleteObjectTaggingResponse,

    -- * Response Lenses
    deleteObjectTaggingResponse_versionId,
    deleteObjectTaggingResponse_httpStatus,
  )
where

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
import Amazonka.S3.Types

-- | /See:/ 'newDeleteObjectTagging' smart constructor.
data DeleteObjectTagging = DeleteObjectTagging'
  { -- | The versionId of the object that the tag-set will be removed from.
    DeleteObjectTagging -> Maybe ObjectVersionId
versionId :: Prelude.Maybe ObjectVersionId,
    -- | The account ID of the expected bucket owner. If the bucket is owned by a
    -- different account, the request will fail with an HTTP
    -- @403 (Access Denied)@ error.
    DeleteObjectTagging -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
    -- | The bucket name containing the objects from which to remove the tags.
    --
    -- When using this action with an access point, you must direct requests to
    -- the access point hostname. The access point hostname takes the form
    -- /AccessPointName/-/AccountId/.s3-accesspoint./Region/.amazonaws.com.
    -- When using this action with an access point through the Amazon Web
    -- Services SDKs, you provide the access point ARN in place of the bucket
    -- name. For more information about access point ARNs, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html Using access points>
    -- in the /Amazon S3 User Guide/.
    --
    -- When using this action with Amazon S3 on Outposts, you must direct
    -- requests to the S3 on Outposts hostname. The S3 on Outposts hostname
    -- takes the form
    -- /AccessPointName/-/AccountId/./outpostID/.s3-outposts./Region/.amazonaws.com.
    -- When using this action using S3 on Outposts through the Amazon Web
    -- Services SDKs, you provide the Outposts bucket ARN in place of the
    -- bucket name. For more information about S3 on Outposts ARNs, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using S3 on Outposts>
    -- in the /Amazon S3 User Guide/.
    DeleteObjectTagging -> BucketName
bucket :: BucketName,
    -- | The key that identifies the object in the bucket from which to remove
    -- all tags.
    DeleteObjectTagging -> ObjectKey
key :: ObjectKey
  }
  deriving (DeleteObjectTagging -> DeleteObjectTagging -> Bool
(DeleteObjectTagging -> DeleteObjectTagging -> Bool)
-> (DeleteObjectTagging -> DeleteObjectTagging -> Bool)
-> Eq DeleteObjectTagging
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteObjectTagging -> DeleteObjectTagging -> Bool
$c/= :: DeleteObjectTagging -> DeleteObjectTagging -> Bool
== :: DeleteObjectTagging -> DeleteObjectTagging -> Bool
$c== :: DeleteObjectTagging -> DeleteObjectTagging -> Bool
Prelude.Eq, ReadPrec [DeleteObjectTagging]
ReadPrec DeleteObjectTagging
Int -> ReadS DeleteObjectTagging
ReadS [DeleteObjectTagging]
(Int -> ReadS DeleteObjectTagging)
-> ReadS [DeleteObjectTagging]
-> ReadPrec DeleteObjectTagging
-> ReadPrec [DeleteObjectTagging]
-> Read DeleteObjectTagging
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteObjectTagging]
$creadListPrec :: ReadPrec [DeleteObjectTagging]
readPrec :: ReadPrec DeleteObjectTagging
$creadPrec :: ReadPrec DeleteObjectTagging
readList :: ReadS [DeleteObjectTagging]
$creadList :: ReadS [DeleteObjectTagging]
readsPrec :: Int -> ReadS DeleteObjectTagging
$creadsPrec :: Int -> ReadS DeleteObjectTagging
Prelude.Read, Int -> DeleteObjectTagging -> ShowS
[DeleteObjectTagging] -> ShowS
DeleteObjectTagging -> String
(Int -> DeleteObjectTagging -> ShowS)
-> (DeleteObjectTagging -> String)
-> ([DeleteObjectTagging] -> ShowS)
-> Show DeleteObjectTagging
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteObjectTagging] -> ShowS
$cshowList :: [DeleteObjectTagging] -> ShowS
show :: DeleteObjectTagging -> String
$cshow :: DeleteObjectTagging -> String
showsPrec :: Int -> DeleteObjectTagging -> ShowS
$cshowsPrec :: Int -> DeleteObjectTagging -> ShowS
Prelude.Show, (forall x. DeleteObjectTagging -> Rep DeleteObjectTagging x)
-> (forall x. Rep DeleteObjectTagging x -> DeleteObjectTagging)
-> Generic DeleteObjectTagging
forall x. Rep DeleteObjectTagging x -> DeleteObjectTagging
forall x. DeleteObjectTagging -> Rep DeleteObjectTagging x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteObjectTagging x -> DeleteObjectTagging
$cfrom :: forall x. DeleteObjectTagging -> Rep DeleteObjectTagging x
Prelude.Generic)

-- |
-- Create a value of 'DeleteObjectTagging' 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:
--
-- 'versionId', 'deleteObjectTagging_versionId' - The versionId of the object that the tag-set will be removed from.
--
-- 'expectedBucketOwner', 'deleteObjectTagging_expectedBucketOwner' - The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request will fail with an HTTP
-- @403 (Access Denied)@ error.
--
-- 'bucket', 'deleteObjectTagging_bucket' - The bucket name containing the objects from which to remove the tags.
--
-- When using this action with an access point, you must direct requests to
-- the access point hostname. The access point hostname takes the form
-- /AccessPointName/-/AccountId/.s3-accesspoint./Region/.amazonaws.com.
-- When using this action with an access point through the Amazon Web
-- Services SDKs, you provide the access point ARN in place of the bucket
-- name. For more information about access point ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html Using access points>
-- in the /Amazon S3 User Guide/.
--
-- When using this action with Amazon S3 on Outposts, you must direct
-- requests to the S3 on Outposts hostname. The S3 on Outposts hostname
-- takes the form
-- /AccessPointName/-/AccountId/./outpostID/.s3-outposts./Region/.amazonaws.com.
-- When using this action using S3 on Outposts through the Amazon Web
-- Services SDKs, you provide the Outposts bucket ARN in place of the
-- bucket name. For more information about S3 on Outposts ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using S3 on Outposts>
-- in the /Amazon S3 User Guide/.
--
-- 'key', 'deleteObjectTagging_key' - The key that identifies the object in the bucket from which to remove
-- all tags.
newDeleteObjectTagging ::
  -- | 'bucket'
  BucketName ->
  -- | 'key'
  ObjectKey ->
  DeleteObjectTagging
newDeleteObjectTagging :: BucketName -> ObjectKey -> DeleteObjectTagging
newDeleteObjectTagging BucketName
pBucket_ ObjectKey
pKey_ =
  DeleteObjectTagging' :: Maybe ObjectVersionId
-> Maybe Text -> BucketName -> ObjectKey -> DeleteObjectTagging
DeleteObjectTagging'
    { $sel:versionId:DeleteObjectTagging' :: Maybe ObjectVersionId
versionId = Maybe ObjectVersionId
forall a. Maybe a
Prelude.Nothing,
      $sel:expectedBucketOwner:DeleteObjectTagging' :: Maybe Text
expectedBucketOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bucket:DeleteObjectTagging' :: BucketName
bucket = BucketName
pBucket_,
      $sel:key:DeleteObjectTagging' :: ObjectKey
key = ObjectKey
pKey_
    }

-- | The versionId of the object that the tag-set will be removed from.
deleteObjectTagging_versionId :: Lens.Lens' DeleteObjectTagging (Prelude.Maybe ObjectVersionId)
deleteObjectTagging_versionId :: (Maybe ObjectVersionId -> f (Maybe ObjectVersionId))
-> DeleteObjectTagging -> f DeleteObjectTagging
deleteObjectTagging_versionId = (DeleteObjectTagging -> Maybe ObjectVersionId)
-> (DeleteObjectTagging
    -> Maybe ObjectVersionId -> DeleteObjectTagging)
-> Lens
     DeleteObjectTagging
     DeleteObjectTagging
     (Maybe ObjectVersionId)
     (Maybe ObjectVersionId)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjectTagging' {Maybe ObjectVersionId
versionId :: Maybe ObjectVersionId
$sel:versionId:DeleteObjectTagging' :: DeleteObjectTagging -> Maybe ObjectVersionId
versionId} -> Maybe ObjectVersionId
versionId) (\s :: DeleteObjectTagging
s@DeleteObjectTagging' {} Maybe ObjectVersionId
a -> DeleteObjectTagging
s {$sel:versionId:DeleteObjectTagging' :: Maybe ObjectVersionId
versionId = Maybe ObjectVersionId
a} :: DeleteObjectTagging)

-- | The account ID of the expected bucket owner. If the bucket is owned by a
-- different account, the request will fail with an HTTP
-- @403 (Access Denied)@ error.
deleteObjectTagging_expectedBucketOwner :: Lens.Lens' DeleteObjectTagging (Prelude.Maybe Prelude.Text)
deleteObjectTagging_expectedBucketOwner :: (Maybe Text -> f (Maybe Text))
-> DeleteObjectTagging -> f DeleteObjectTagging
deleteObjectTagging_expectedBucketOwner = (DeleteObjectTagging -> Maybe Text)
-> (DeleteObjectTagging -> Maybe Text -> DeleteObjectTagging)
-> Lens
     DeleteObjectTagging DeleteObjectTagging (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjectTagging' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:DeleteObjectTagging' :: DeleteObjectTagging -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: DeleteObjectTagging
s@DeleteObjectTagging' {} Maybe Text
a -> DeleteObjectTagging
s {$sel:expectedBucketOwner:DeleteObjectTagging' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: DeleteObjectTagging)

-- | The bucket name containing the objects from which to remove the tags.
--
-- When using this action with an access point, you must direct requests to
-- the access point hostname. The access point hostname takes the form
-- /AccessPointName/-/AccountId/.s3-accesspoint./Region/.amazonaws.com.
-- When using this action with an access point through the Amazon Web
-- Services SDKs, you provide the access point ARN in place of the bucket
-- name. For more information about access point ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html Using access points>
-- in the /Amazon S3 User Guide/.
--
-- When using this action with Amazon S3 on Outposts, you must direct
-- requests to the S3 on Outposts hostname. The S3 on Outposts hostname
-- takes the form
-- /AccessPointName/-/AccountId/./outpostID/.s3-outposts./Region/.amazonaws.com.
-- When using this action using S3 on Outposts through the Amazon Web
-- Services SDKs, you provide the Outposts bucket ARN in place of the
-- bucket name. For more information about S3 on Outposts ARNs, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html Using S3 on Outposts>
-- in the /Amazon S3 User Guide/.
deleteObjectTagging_bucket :: Lens.Lens' DeleteObjectTagging BucketName
deleteObjectTagging_bucket :: (BucketName -> f BucketName)
-> DeleteObjectTagging -> f DeleteObjectTagging
deleteObjectTagging_bucket = (DeleteObjectTagging -> BucketName)
-> (DeleteObjectTagging -> BucketName -> DeleteObjectTagging)
-> Lens
     DeleteObjectTagging DeleteObjectTagging BucketName BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjectTagging' {BucketName
bucket :: BucketName
$sel:bucket:DeleteObjectTagging' :: DeleteObjectTagging -> BucketName
bucket} -> BucketName
bucket) (\s :: DeleteObjectTagging
s@DeleteObjectTagging' {} BucketName
a -> DeleteObjectTagging
s {$sel:bucket:DeleteObjectTagging' :: BucketName
bucket = BucketName
a} :: DeleteObjectTagging)

-- | The key that identifies the object in the bucket from which to remove
-- all tags.
deleteObjectTagging_key :: Lens.Lens' DeleteObjectTagging ObjectKey
deleteObjectTagging_key :: (ObjectKey -> f ObjectKey)
-> DeleteObjectTagging -> f DeleteObjectTagging
deleteObjectTagging_key = (DeleteObjectTagging -> ObjectKey)
-> (DeleteObjectTagging -> ObjectKey -> DeleteObjectTagging)
-> Lens DeleteObjectTagging DeleteObjectTagging ObjectKey ObjectKey
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjectTagging' {ObjectKey
key :: ObjectKey
$sel:key:DeleteObjectTagging' :: DeleteObjectTagging -> ObjectKey
key} -> ObjectKey
key) (\s :: DeleteObjectTagging
s@DeleteObjectTagging' {} ObjectKey
a -> DeleteObjectTagging
s {$sel:key:DeleteObjectTagging' :: ObjectKey
key = ObjectKey
a} :: DeleteObjectTagging)

instance Core.AWSRequest DeleteObjectTagging where
  type
    AWSResponse DeleteObjectTagging =
      DeleteObjectTaggingResponse
  request :: DeleteObjectTagging -> Request DeleteObjectTagging
request =
    Request DeleteObjectTagging -> Request DeleteObjectTagging
forall a. Request a -> Request a
Request.s3vhost
      (Request DeleteObjectTagging -> Request DeleteObjectTagging)
-> (DeleteObjectTagging -> Request DeleteObjectTagging)
-> DeleteObjectTagging
-> Request DeleteObjectTagging
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service -> DeleteObjectTagging -> Request DeleteObjectTagging
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteObjectTagging
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteObjectTagging)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse DeleteObjectTagging))
-> Logger
-> Service
-> Proxy DeleteObjectTagging
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteObjectTagging)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Maybe ObjectVersionId -> Int -> DeleteObjectTaggingResponse
DeleteObjectTaggingResponse'
            (Maybe ObjectVersionId -> Int -> DeleteObjectTaggingResponse)
-> Either String (Maybe ObjectVersionId)
-> Either String (Int -> DeleteObjectTaggingResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe ObjectVersionId)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-version-id")
            Either String (Int -> DeleteObjectTaggingResponse)
-> Either String Int -> Either String DeleteObjectTaggingResponse
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 DeleteObjectTagging

instance Prelude.NFData DeleteObjectTagging

instance Core.ToHeaders DeleteObjectTagging where
  toHeaders :: DeleteObjectTagging -> ResponseHeaders
toHeaders DeleteObjectTagging' {Maybe Text
Maybe ObjectVersionId
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
expectedBucketOwner :: Maybe Text
versionId :: Maybe ObjectVersionId
$sel:key:DeleteObjectTagging' :: DeleteObjectTagging -> ObjectKey
$sel:bucket:DeleteObjectTagging' :: DeleteObjectTagging -> BucketName
$sel:expectedBucketOwner:DeleteObjectTagging' :: DeleteObjectTagging -> Maybe Text
$sel:versionId:DeleteObjectTagging' :: DeleteObjectTagging -> Maybe ObjectVersionId
..} =
    [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"x-amz-expected-bucket-owner"
          HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
expectedBucketOwner
      ]

instance Core.ToPath DeleteObjectTagging where
  toPath :: DeleteObjectTagging -> ByteString
toPath DeleteObjectTagging' {Maybe Text
Maybe ObjectVersionId
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
expectedBucketOwner :: Maybe Text
versionId :: Maybe ObjectVersionId
$sel:key:DeleteObjectTagging' :: DeleteObjectTagging -> ObjectKey
$sel:bucket:DeleteObjectTagging' :: DeleteObjectTagging -> BucketName
$sel:expectedBucketOwner:DeleteObjectTagging' :: DeleteObjectTagging -> Maybe Text
$sel:versionId:DeleteObjectTagging' :: DeleteObjectTagging -> Maybe ObjectVersionId
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/", BucketName -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS BucketName
bucket, ByteString
"/", ObjectKey -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS ObjectKey
key]

instance Core.ToQuery DeleteObjectTagging where
  toQuery :: DeleteObjectTagging -> QueryString
toQuery DeleteObjectTagging' {Maybe Text
Maybe ObjectVersionId
ObjectKey
BucketName
key :: ObjectKey
bucket :: BucketName
expectedBucketOwner :: Maybe Text
versionId :: Maybe ObjectVersionId
$sel:key:DeleteObjectTagging' :: DeleteObjectTagging -> ObjectKey
$sel:bucket:DeleteObjectTagging' :: DeleteObjectTagging -> BucketName
$sel:expectedBucketOwner:DeleteObjectTagging' :: DeleteObjectTagging -> Maybe Text
$sel:versionId:DeleteObjectTagging' :: DeleteObjectTagging -> Maybe ObjectVersionId
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"versionId" ByteString -> Maybe ObjectVersionId -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ObjectVersionId
versionId, QueryString
"tagging"]

-- | /See:/ 'newDeleteObjectTaggingResponse' smart constructor.
data DeleteObjectTaggingResponse = DeleteObjectTaggingResponse'
  { -- | The versionId of the object the tag-set was removed from.
    DeleteObjectTaggingResponse -> Maybe ObjectVersionId
versionId :: Prelude.Maybe ObjectVersionId,
    -- | The response's http status code.
    DeleteObjectTaggingResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DeleteObjectTaggingResponse -> DeleteObjectTaggingResponse -> Bool
(DeleteObjectTaggingResponse
 -> DeleteObjectTaggingResponse -> Bool)
-> (DeleteObjectTaggingResponse
    -> DeleteObjectTaggingResponse -> Bool)
-> Eq DeleteObjectTaggingResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteObjectTaggingResponse -> DeleteObjectTaggingResponse -> Bool
$c/= :: DeleteObjectTaggingResponse -> DeleteObjectTaggingResponse -> Bool
== :: DeleteObjectTaggingResponse -> DeleteObjectTaggingResponse -> Bool
$c== :: DeleteObjectTaggingResponse -> DeleteObjectTaggingResponse -> Bool
Prelude.Eq, ReadPrec [DeleteObjectTaggingResponse]
ReadPrec DeleteObjectTaggingResponse
Int -> ReadS DeleteObjectTaggingResponse
ReadS [DeleteObjectTaggingResponse]
(Int -> ReadS DeleteObjectTaggingResponse)
-> ReadS [DeleteObjectTaggingResponse]
-> ReadPrec DeleteObjectTaggingResponse
-> ReadPrec [DeleteObjectTaggingResponse]
-> Read DeleteObjectTaggingResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteObjectTaggingResponse]
$creadListPrec :: ReadPrec [DeleteObjectTaggingResponse]
readPrec :: ReadPrec DeleteObjectTaggingResponse
$creadPrec :: ReadPrec DeleteObjectTaggingResponse
readList :: ReadS [DeleteObjectTaggingResponse]
$creadList :: ReadS [DeleteObjectTaggingResponse]
readsPrec :: Int -> ReadS DeleteObjectTaggingResponse
$creadsPrec :: Int -> ReadS DeleteObjectTaggingResponse
Prelude.Read, Int -> DeleteObjectTaggingResponse -> ShowS
[DeleteObjectTaggingResponse] -> ShowS
DeleteObjectTaggingResponse -> String
(Int -> DeleteObjectTaggingResponse -> ShowS)
-> (DeleteObjectTaggingResponse -> String)
-> ([DeleteObjectTaggingResponse] -> ShowS)
-> Show DeleteObjectTaggingResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteObjectTaggingResponse] -> ShowS
$cshowList :: [DeleteObjectTaggingResponse] -> ShowS
show :: DeleteObjectTaggingResponse -> String
$cshow :: DeleteObjectTaggingResponse -> String
showsPrec :: Int -> DeleteObjectTaggingResponse -> ShowS
$cshowsPrec :: Int -> DeleteObjectTaggingResponse -> ShowS
Prelude.Show, (forall x.
 DeleteObjectTaggingResponse -> Rep DeleteObjectTaggingResponse x)
-> (forall x.
    Rep DeleteObjectTaggingResponse x -> DeleteObjectTaggingResponse)
-> Generic DeleteObjectTaggingResponse
forall x.
Rep DeleteObjectTaggingResponse x -> DeleteObjectTaggingResponse
forall x.
DeleteObjectTaggingResponse -> Rep DeleteObjectTaggingResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteObjectTaggingResponse x -> DeleteObjectTaggingResponse
$cfrom :: forall x.
DeleteObjectTaggingResponse -> Rep DeleteObjectTaggingResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteObjectTaggingResponse' 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:
--
-- 'versionId', 'deleteObjectTaggingResponse_versionId' - The versionId of the object the tag-set was removed from.
--
-- 'httpStatus', 'deleteObjectTaggingResponse_httpStatus' - The response's http status code.
newDeleteObjectTaggingResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteObjectTaggingResponse
newDeleteObjectTaggingResponse :: Int -> DeleteObjectTaggingResponse
newDeleteObjectTaggingResponse Int
pHttpStatus_ =
  DeleteObjectTaggingResponse' :: Maybe ObjectVersionId -> Int -> DeleteObjectTaggingResponse
DeleteObjectTaggingResponse'
    { $sel:versionId:DeleteObjectTaggingResponse' :: Maybe ObjectVersionId
versionId =
        Maybe ObjectVersionId
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteObjectTaggingResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The versionId of the object the tag-set was removed from.
deleteObjectTaggingResponse_versionId :: Lens.Lens' DeleteObjectTaggingResponse (Prelude.Maybe ObjectVersionId)
deleteObjectTaggingResponse_versionId :: (Maybe ObjectVersionId -> f (Maybe ObjectVersionId))
-> DeleteObjectTaggingResponse -> f DeleteObjectTaggingResponse
deleteObjectTaggingResponse_versionId = (DeleteObjectTaggingResponse -> Maybe ObjectVersionId)
-> (DeleteObjectTaggingResponse
    -> Maybe ObjectVersionId -> DeleteObjectTaggingResponse)
-> Lens
     DeleteObjectTaggingResponse
     DeleteObjectTaggingResponse
     (Maybe ObjectVersionId)
     (Maybe ObjectVersionId)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteObjectTaggingResponse' {Maybe ObjectVersionId
versionId :: Maybe ObjectVersionId
$sel:versionId:DeleteObjectTaggingResponse' :: DeleteObjectTaggingResponse -> Maybe ObjectVersionId
versionId} -> Maybe ObjectVersionId
versionId) (\s :: DeleteObjectTaggingResponse
s@DeleteObjectTaggingResponse' {} Maybe ObjectVersionId
a -> DeleteObjectTaggingResponse
s {$sel:versionId:DeleteObjectTaggingResponse' :: Maybe ObjectVersionId
versionId = Maybe ObjectVersionId
a} :: DeleteObjectTaggingResponse)

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

instance Prelude.NFData DeleteObjectTaggingResponse