diff --git a/generator/ServiceClientGeneratorLib/ServiceModel.cs b/generator/ServiceClientGeneratorLib/ServiceModel.cs index 2c5623382cca..3ddb8066968e 100644 --- a/generator/ServiceClientGeneratorLib/ServiceModel.cs +++ b/generator/ServiceClientGeneratorLib/ServiceModel.cs @@ -581,7 +581,8 @@ public List S3AllowListOperations new Operation(this, "ListMultipartUploads", DocumentRoot[OperationsKey]["ListMultipartUploads"]), new Operation(this, "CompleteMultipartUpload", DocumentRoot[OperationsKey]["CompleteMultipartUpload"]), new Operation(this, "DeleteObject", DocumentRoot[OperationsKey]["DeleteObject"]), - new Operation(this, "DeleteObjects", DocumentRoot[OperationsKey]["DeleteObjects"]) + new Operation(this, "DeleteObjects", DocumentRoot[OperationsKey]["DeleteObjects"]), + new Operation(this, "DeleteObjectTagging", DocumentRoot[OperationsKey]["DeleteObjectTagging"]) }; } return _s3AllowListOperations.Where(operation => operation.data != null).ToList(); diff --git a/generator/ServiceModels/s3/s3.customizations.json b/generator/ServiceModels/s3/s3.customizations.json index 3dc80c9e64e6..180ed0866603 100644 --- a/generator/ServiceModels/s3/s3.customizations.json +++ b/generator/ServiceModels/s3/s3.customizations.json @@ -1423,6 +1423,23 @@ "ETag":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._eTag);"]} } ] + }, + "DeleteObjectTaggingRequest":{ + "modify":[ + { + "ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]} + }, + { + "VersionId":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._versionId);"]} + } + ] + }, + "DeleteObjectTaggingOutput":{ + "modify":[ + { + "VersionId":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._versionId);"]} + } + ] } }, "operationModifiers": { diff --git a/sdk/src/Services/S3/Custom/Model/DeleteObjectTaggingRequest.cs b/sdk/src/Services/S3/Custom/Model/DeleteObjectTaggingRequest.cs deleted file mode 100644 index 8efbaccf4f41..000000000000 --- a/sdk/src/Services/S3/Custom/Model/DeleteObjectTaggingRequest.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -using Amazon.Runtime; -using Amazon.S3; -using System; - -namespace Amazon.S3.Model -{ - /// - /// Container for the parameters to the DeleteObjectTagging operation. - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// Removes the entire tag set from the specified object. For more information about managing - /// object tags, see - /// 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 DeleteObjectTagging: - /// - /// - /// - public class DeleteObjectTaggingRequest : AmazonWebServiceRequest - { - private string bucketName; - private string expectedBucketOwner; - private string key; - private string versionId; - - /// - /// Gets and sets the property BucketName. - /// - /// The bucket name containing the objects from which to remove the tags. - /// - /// - /// Access points - When you use this action with an access point for general purpose buckets, you must provide - /// the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action - /// with an access point for directory buckets, you must provide the access point name in place of the bucket name. When - /// using the access point ARN, 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 - /// Using access points in - /// the Amazon S3 User Guide. - /// - /// - /// S3 on Outposts - When you use this action with 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 - /// you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access - /// point alias. For more information about S3 on Outposts, see - /// What is S3 on Outposts? in - /// the Amazon S3 User Guide. - /// - /// - public string BucketName - { - get { return this.bucketName; } - set { this.bucketName = value; } - } - - // Check to see if BucketName property is set - internal bool IsSetBucketName() - { - return !string.IsNullOrEmpty(this.bucketName); - } - - /// - /// Gets and sets the property ExpectedBucketOwner. - /// - /// The account ID of the expected bucket owner. If the account ID that you provide does - /// not match the actual owner of the bucket, the request fails with the HTTP status code - /// 403 Forbidden (access denied). - /// - /// - public string ExpectedBucketOwner - { - get { return this.expectedBucketOwner; } - set { this.expectedBucketOwner = value; } - } - - // Check to see if ExpectedBucketOwner property is set - internal bool IsSetExpectedBucketOwner() - { - return !String.IsNullOrEmpty(this.expectedBucketOwner); - } - - /// - /// The key identifying the object tagging to delete. - /// - /// - /// - /// This property will be used as part of the resource path of the HTTP request. In .NET the System.Uri class - /// is used to construct the uri for the request. The System.Uri class will canonicalize the uri string by compacting characters like "..". - /// For example an object key of "foo/../bar/file.txt" will be transformed into "bar/file.txt" because the ".." - /// is interpreted as use parent directory. - /// - /// - /// Starting with .NET 8, the AWS .NET SDK disables System.Uri's feature of canonicalizing the resource path. This allows S3 keys like - /// "foo/../bar/file.txt" to work correctly with the AWS .NET SDK. - /// - /// - /// For further information view the documentation for the Uri class: https://docs.microsoft.com/en-us/dotnet/api/system.uri - /// - /// - public string Key - { - get { return this.key; } - set { this.key = value; } - } - - /// - /// Check to see if Key property is set - /// - internal bool IsSetKey() - { - return !string.IsNullOrEmpty(this.key); - } - - /// - /// Gets and sets the property VersionId. - /// - /// The versionId of the object that the tag-set will be removed from. - /// - /// - public string VersionId - { - get { return this.versionId; } - set { this.versionId = value; } - } - - // Check to see if VersionId property is set - internal bool IsSetVersionId() - { - return !string.IsNullOrEmpty(this.versionId); - } - } -} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/DeleteObjectTaggingResponse.cs b/sdk/src/Services/S3/Custom/Model/DeleteObjectTaggingResponse.cs deleted file mode 100644 index f820688536c1..000000000000 --- a/sdk/src/Services/S3/Custom/Model/DeleteObjectTaggingResponse.cs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -using Amazon.Runtime; - -namespace Amazon.S3.Model -{ - /// - /// Returns information about the DeleteObjectTagging response and response metadata. - /// - public class DeleteObjectTaggingResponse : AmazonWebServiceResponse - { - private string versionId; - - /// - /// Returns the version ID of the delete marker created as a result of the DELETE operation. - /// - public string VersionId - { - get { return this.versionId; } - set { this.versionId = value; } - } - - /// - /// Check to see if VersionId property is set - /// - internal bool IsSetVersionId() - { - return !string.IsNullOrEmpty(this.versionId); - } - } -} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteObjectTaggingRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteObjectTaggingRequestMarshaller.cs deleted file mode 100644 index 4201120c5bd5..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteObjectTaggingRequestMarshaller.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -using Amazon.Runtime.Internal; -using Amazon.Runtime.Internal.Transform; -using System.Globalization; -using Amazon.S3.Util; - -#pragma warning disable 1591 - -namespace Amazon.S3.Model.Internal.MarshallTransformations -{ - /// - /// DeleteObjectTaggingRequest Marshaller - /// - public class DeleteObjectTaggingRequestMarshaller : IMarshaller, IMarshaller - { - /// - /// Marshall DeleteObjectTaggingRequest object into an http request. - /// - public IRequest Marshall(Amazon.Runtime.AmazonWebServiceRequest input) - { - return this.Marshall((DeleteObjectTaggingRequest)input); - } - - /// - /// Marshall DeleteObjectTaggingRequest object into an http request. - /// - public IRequest Marshall(DeleteObjectTaggingRequest deleteObjectTaggingRequest) - { - IRequest request = new DefaultRequest(deleteObjectTaggingRequest, "Amazon.S3"); - - request.HttpMethod = "DELETE"; - - if (deleteObjectTaggingRequest.IsSetExpectedBucketOwner()) - request.Headers.Add(S3Constants.AmzHeaderExpectedBucketOwner, S3Transforms.ToStringValue(deleteObjectTaggingRequest.ExpectedBucketOwner)); - - if (string.IsNullOrEmpty(deleteObjectTaggingRequest.BucketName)) - throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "DeleteObjectTaggingRequest.BucketName"); - if (string.IsNullOrEmpty(deleteObjectTaggingRequest.Key)) - throw new System.ArgumentException("Key is a required property and must be set before making this call.", "DeleteObjectTaggingRequest.Key"); - request.AddPathResource("{Key+}", S3Transforms.ToStringValue(deleteObjectTaggingRequest.Key)); - request.ResourcePath = "/{Key+}"; - request.AddSubResource("tagging"); - - if (deleteObjectTaggingRequest.IsSetVersionId()) - request.AddSubResource("versionId", S3Transforms.ToStringValue(deleteObjectTaggingRequest.VersionId)); - - return request; - } - - private static DeleteObjectTaggingRequestMarshaller _instance; - - /// - /// Singleton for marshaller - /// - public static DeleteObjectTaggingRequestMarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new DeleteObjectTaggingRequestMarshaller(); - } - return _instance; - } - } - } -} diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteObjectTaggingResponseUnmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteObjectTaggingResponseUnmarshaller.cs deleted file mode 100644 index a2c391fd2a78..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteObjectTaggingResponseUnmarshaller.cs +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -using Amazon.Runtime; -using Amazon.Runtime.Internal.Transform; - -namespace Amazon.S3.Model.Internal.MarshallTransformations -{ - /// - /// Response Unmarshaller for DeleteObjectTagging operation - /// - public class DeleteObjectTaggingResponseUnmarshaller : S3ReponseUnmarshaller - { - /// - /// Unmarshaller the response from the service to the response class. - /// - /// - /// - public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) - { - DeleteObjectTaggingResponse response = new DeleteObjectTaggingResponse(); - - UnmarshallResult(context, response); - - return response; - } - - private static void UnmarshallResult(XmlUnmarshallerContext context, DeleteObjectTaggingResponse response) - { - IWebResponseData responseData = context.ResponseData; - if (responseData.IsHeaderPresent("x-amz-version-id")) - response.VersionId = S3Transforms.ToString(responseData.GetHeaderValue("x-amz-version-id")); - return; - } - - private static DeleteObjectTaggingResponseUnmarshaller _instance; - - /// - /// Singleton for the unmarshaller - /// - public static DeleteObjectTaggingResponseUnmarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new DeleteObjectTaggingResponseUnmarshaller(); - } - return _instance; - } - } - } -} - diff --git a/sdk/src/Services/S3/Generated/Model/DeleteObjectTaggingRequest.cs b/sdk/src/Services/S3/Generated/Model/DeleteObjectTaggingRequest.cs new file mode 100644 index 000000000000..04f1e3b553ef --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/DeleteObjectTaggingRequest.cs @@ -0,0 +1,184 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// Container for the parameters to the DeleteObjectTagging operation. + /// + /// + /// This operation is not supported for directory buckets. + /// + /// + /// + /// Removes the entire tag set from the specified object. For more information about managing + /// object tags, see + /// 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 DeleteObjectTagging: + /// + /// + /// + /// You must URL encode any signed header values that contain spaces. For example, if + /// your header value is my file.txt, containing two spaces after my, you + /// must URL encode this value to my%20%20file.txt. + /// + /// + /// + public partial class DeleteObjectTaggingRequest : AmazonWebServiceRequest + { + private string _bucketName; + private string _expectedBucketOwner; + private string _key; + private string _versionId; + + /// + /// Gets and sets the property BucketName. + /// + /// The bucket name containing the objects from which to remove the tags. + /// + /// + /// + /// Access points - When you use this action with an access point for general + /// purpose buckets, you must provide the alias of the access point in place of the bucket + /// name or specify the access point ARN. When you use this action with an access point + /// for directory buckets, you must provide the access point name in place of the bucket + /// name. When using the access point ARN, 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 Using + /// access points in the Amazon S3 User Guide. + /// + /// + /// + /// S3 on Outposts - When you use this action with 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 you use this action with S3 on Outposts, the destination bucket must be the Outposts + /// access point ARN or the access point alias. For more information about S3 on Outposts, + /// see What + /// is S3 on Outposts? in the Amazon S3 User Guide. + /// + /// + [AWSProperty(Required=true)] + public string BucketName + { + get { return this._bucketName; } + set { this._bucketName = value; } + } + + // Check to see if BucketName property is set + internal bool IsSetBucketName() + { + return this._bucketName != null; + } + + /// + /// Gets and sets the property ExpectedBucketOwner. + /// + /// The account ID of the expected bucket owner. If the account ID that you provide does + /// not match the actual owner of the bucket, the request fails with the HTTP status code + /// 403 Forbidden (access denied). + /// + /// + public string ExpectedBucketOwner + { + get { return this._expectedBucketOwner; } + set { this._expectedBucketOwner = value; } + } + + // Check to see if ExpectedBucketOwner property is set + internal bool IsSetExpectedBucketOwner() + { + return !String.IsNullOrEmpty(this._expectedBucketOwner); + } + + /// + /// Gets and sets the property Key. + /// + /// The key that identifies the object in the bucket from which to remove all tags. + /// + /// + [AWSProperty(Required=true, Min=1)] + public string Key + { + get { return this._key; } + set { this._key = value; } + } + + // Check to see if Key property is set + internal bool IsSetKey() + { + return this._key != null; + } + + /// + /// Gets and sets the property VersionId. + /// + /// The versionId of the object that the tag-set will be removed from. + /// + /// + public string VersionId + { + get { return this._versionId; } + set { this._versionId = value; } + } + + // Check to see if VersionId property is set + internal bool IsSetVersionId() + { + return !String.IsNullOrEmpty(this._versionId); + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/DeleteObjectTaggingResponse.cs b/sdk/src/Services/S3/Generated/Model/DeleteObjectTaggingResponse.cs new file mode 100644 index 000000000000..607302d6fff9 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/DeleteObjectTaggingResponse.cs @@ -0,0 +1,58 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// This is the response object from the DeleteObjectTagging operation. + /// + public partial class DeleteObjectTaggingResponse : AmazonWebServiceResponse + { + private string _versionId; + + /// + /// Gets and sets the property VersionId. + /// + /// The versionId of the object the tag-set was removed from. + /// + /// + public string VersionId + { + get { return this._versionId; } + set { this._versionId = value; } + } + + // Check to see if VersionId property is set + internal bool IsSetVersionId() + { + return !String.IsNullOrEmpty(this._versionId); + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteObjectTaggingRequestMarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteObjectTaggingRequestMarshaller.cs new file mode 100644 index 000000000000..d482031703cf --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteObjectTaggingRequestMarshaller.cs @@ -0,0 +1,102 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Text; +using System.Xml.Serialization; + +using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +using System.Xml; + +#pragma warning disable CS0612,CS0618 +namespace Amazon.S3.Model.Internal.MarshallTransformations +{ + /// + /// DeleteObjectTagging Request Marshaller + /// + public partial class DeleteObjectTaggingRequestMarshaller : IMarshaller , IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((DeleteObjectTaggingRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(DeleteObjectTaggingRequest publicRequest) + { + var request = new DefaultRequest(publicRequest, "Amazon.S3"); + PreMarshallCustomization(request, publicRequest); + request.HttpMethod = "DELETE"; + request.AddSubResource("tagging"); + + if (publicRequest.IsSetExpectedBucketOwner()) + { + request.Headers["x-amz-expected-bucket-owner"] = publicRequest.ExpectedBucketOwner; + } + if (string.IsNullOrEmpty(publicRequest.BucketName)) + throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "DeleteObjectTaggingRequest.BucketName"); + if (string.IsNullOrEmpty(publicRequest.Key)) + throw new System.ArgumentException("Key is a required property and must be set before making this call.", "DeleteObjectTaggingRequest.Key"); + request.AddPathResource("{Key+}", StringUtils.FromString(publicRequest.Key)); + + if (publicRequest.IsSetVersionId()) + request.Parameters.Add("versionId", StringUtils.FromString(publicRequest.VersionId)); + request.ResourcePath = "/{Key+}"; + + PostMarshallCustomization(request, publicRequest); + request.UseQueryString = true; + return request; + } + private static DeleteObjectTaggingRequestMarshaller _instance = new DeleteObjectTaggingRequestMarshaller(); + + internal static DeleteObjectTaggingRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static DeleteObjectTaggingRequestMarshaller Instance + { + get + { + return _instance; + } + } + + partial void PostMarshallCustomization(DefaultRequest defaultRequest, DeleteObjectTaggingRequest publicRequest); + partial void PreMarshallCustomization(DefaultRequest defaultRequest, DeleteObjectTaggingRequest publicRequest); + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteObjectTaggingResponseUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteObjectTaggingResponseUnmarshaller.cs new file mode 100644 index 000000000000..25d6c2fa79af --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteObjectTaggingResponseUnmarshaller.cs @@ -0,0 +1,100 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; + +using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; + +#pragma warning disable CS0612,CS0618 +namespace Amazon.S3.Model.Internal.MarshallTransformations +{ + /// + /// Response Unmarshaller for DeleteObjectTagging operation + /// + public partial class DeleteObjectTaggingResponseUnmarshaller : S3ReponseUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) + { + DeleteObjectTaggingResponse response = new DeleteObjectTaggingResponse(); + if (context.ResponseData.IsHeaderPresent("x-amz-version-id")) + response.VersionId = context.ResponseData.GetHeaderValue("x-amz-version-id"); + + PostUnmarshallCustomization(context, response); + return response; + } + + + /// + /// Unmarshaller error response to exception. + /// + /// + /// + /// + /// + public override AmazonServiceException UnmarshallException(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) + { + S3ErrorResponse errorResponse = S3ErrorResponseUnmarshaller.Instance.Unmarshall(context); + errorResponse.InnerException = innerException; + errorResponse.StatusCode = statusCode; + + var responseBodyBytes = context.GetResponseBodyBytes(); + + using (var streamCopy = new MemoryStream(responseBodyBytes)) + using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) + { + } + return base.ConstructS3Exception(context, errorResponse, innerException, statusCode); + } + + partial void PostUnmarshallCustomization(XmlUnmarshallerContext context, DeleteObjectTaggingResponse response); + + private static DeleteObjectTaggingResponseUnmarshaller _instance = new DeleteObjectTaggingResponseUnmarshaller(); + + internal static DeleteObjectTaggingResponseUnmarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static DeleteObjectTaggingResponseUnmarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file