From 9a887f5d04268e8208622c053a56a7e960dc6e8b Mon Sep 17 00:00:00 2001 From: Muhammad Othman Date: Tue, 9 Dec 2025 15:13:34 -0500 Subject: [PATCH] Generate PutBucketTagging S3 operation --- .../ServiceClientGeneratorLib/ServiceModel.cs | 1 + .../ServiceModels/s3/s3.customizations.json | 12 +- .../PutBucketTaggingRequestMarshaller.cs | 117 -------------- .../PutBucketTaggingResponseUnmarshaller.cs | 62 -------- .../PutBucketTaggingRequestMarshaller.cs | 147 ++++++++++++++++++ .../PutBucketTaggingResponseUnmarshaller.cs | 98 ++++++++++++ .../Model/PutBucketTaggingRequest.cs | 138 ++++++++++------ .../Model/PutBucketTaggingResponse.cs | 15 +- .../S3/Generated/_bcl/AmazonS3Client.cs | 4 +- .../Services/S3/Generated/_bcl/IAmazonS3.cs | 4 +- .../Generated/_netstandard/AmazonS3Client.cs | 2 +- .../S3/Generated/_netstandard/IAmazonS3.cs | 2 +- 12 files changed, 362 insertions(+), 240 deletions(-) delete mode 100644 sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketTaggingRequestMarshaller.cs delete mode 100644 sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketTaggingResponseUnmarshaller.cs create mode 100644 sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketTaggingRequestMarshaller.cs create mode 100644 sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketTaggingResponseUnmarshaller.cs rename sdk/src/Services/S3/{Custom => Generated}/Model/PutBucketTaggingRequest.cs (52%) rename sdk/src/Services/S3/{Custom => Generated}/Model/PutBucketTaggingResponse.cs (74%) diff --git a/generator/ServiceClientGeneratorLib/ServiceModel.cs b/generator/ServiceClientGeneratorLib/ServiceModel.cs index 5cfd504801e2..8f38e0da6204 100644 --- a/generator/ServiceClientGeneratorLib/ServiceModel.cs +++ b/generator/ServiceClientGeneratorLib/ServiceModel.cs @@ -577,6 +577,7 @@ public List S3AllowListOperations new Operation(this, "GetBucketMetadataConfiguration", DocumentRoot[OperationsKey]["GetBucketMetadataConfiguration"]), new Operation(this, "RenameObject", DocumentRoot[OperationsKey]["RenameObject"]), new Operation(this, "PutBucketOwnershipControls", DocumentRoot[OperationsKey]["PutBucketOwnershipControls"]), + new Operation(this, "PutBucketTagging", DocumentRoot[OperationsKey]["PutBucketTagging"]), }; } 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 58b9e0605459..bd6331dfb495 100644 --- a/generator/ServiceModels/s3/s3.customizations.json +++ b/generator/ServiceModels/s3/s3.customizations.json @@ -193,13 +193,9 @@ ] }, "PutBucketTaggingRequest": { - "exclude": [ "Tagging" ], - "inject": [ + "modify":[ { - "TagSet": { - "shape": "TagSet", - "originalMember": "Tagging" - } + "ExpectedBucketOwner" :{"injectXmlIsSet":["return !string.IsNullOrEmpty(this._expectedBucketOwner);"]} } ] }, @@ -1253,7 +1249,6 @@ } ] } - }, "operationModifiers": { "CreateBucket": { @@ -1620,6 +1615,9 @@ ], "UploadPartCopyOutput" : [ "CopyPartResult" + ], + "PutBucketTaggingRequest":[ + "Tagging" ] }, "excludeShapes":[ diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketTaggingRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketTaggingRequestMarshaller.cs deleted file mode 100644 index 6abb3ed56370..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketTaggingRequestMarshaller.cs +++ /dev/null @@ -1,117 +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 System.IO; -using System.Xml; -using System.Text; -using Amazon.S3.Util; -using Amazon.Runtime; -using Amazon.Runtime.Internal; -using Amazon.Runtime.Internal.Transform; -using Amazon.Util; -using Amazon.Runtime.Internal.Util; - -#pragma warning disable 1591 - -namespace Amazon.S3.Model.Internal.MarshallTransformations -{ - /// - /// Put Bucket Tagging Request Marshaller - /// - public class PutBucketTaggingRequestMarshaller : IMarshaller ,IMarshaller - { - public IRequest Marshall(Amazon.Runtime.AmazonWebServiceRequest input) - { - return this.Marshall((PutBucketTaggingRequest)input); - } - - public IRequest Marshall(PutBucketTaggingRequest putBucketTaggingRequest) - { - IRequest request = new DefaultRequest(putBucketTaggingRequest, "Amazon.S3"); - - request.HttpMethod = "PUT"; - - if (putBucketTaggingRequest.IsSetExpectedBucketOwner()) - request.Headers.Add(S3Constants.AmzHeaderExpectedBucketOwner, S3Transforms.ToStringValue(putBucketTaggingRequest.ExpectedBucketOwner)); - - if (putBucketTaggingRequest.IsSetChecksumAlgorithm()) - request.Headers.Add(S3Constants.AmzHeaderSdkChecksumAlgorithm, S3Transforms.ToStringValue(putBucketTaggingRequest.ChecksumAlgorithm)); - - if (string.IsNullOrEmpty(putBucketTaggingRequest.BucketName)) - throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "PutBucketTaggingRequest.BucketName"); - - request.ResourcePath = "/"; - - request.AddSubResource("tagging"); - - var stringWriter = new XMLEncodedStringWriter(System.Globalization.CultureInfo.InvariantCulture); - using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize })) - { - xmlWriter.WriteStartElement("Tagging", S3Constants.S3RequestXmlNamespace); - - var taggingTaggingtagSetList = putBucketTaggingRequest.TagSet; - if (taggingTaggingtagSetList != null && taggingTaggingtagSetList.Count > 0) - { - xmlWriter.WriteStartElement("TagSet"); - foreach (var taggingTaggingtagSetListValue in taggingTaggingtagSetList) - { - taggingTaggingtagSetListValue.Marshall("Tag", xmlWriter); - } - xmlWriter.WriteEndElement(); - } - xmlWriter.WriteEndElement(); - } - - try - { - var content = stringWriter.ToString(); - request.Content = Encoding.UTF8.GetBytes(content); - request.Headers[HeaderKeys.ContentTypeHeader] = "application/xml"; - - ChecksumUtils.SetChecksumData( - request, - putBucketTaggingRequest.ChecksumAlgorithm, - fallbackToMD5: false, - isRequestChecksumRequired: true, - headerName: S3Constants.AmzHeaderSdkChecksumAlgorithm - ); - } - catch (EncoderFallbackException e) - { - throw new AmazonServiceException("Unable to marshall request to XML", e); - } - - return request; - } - - private static PutBucketTaggingRequestMarshaller _instance; - - /// - /// Singleton for marshaller - /// - public static PutBucketTaggingRequestMarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new PutBucketTaggingRequestMarshaller(); - } - return _instance; - } - } - } -} - diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketTaggingResponseUnmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketTaggingResponseUnmarshaller.cs deleted file mode 100644 index 8a53a44efa62..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketTaggingResponseUnmarshaller.cs +++ /dev/null @@ -1,62 +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 System; -using System.Net; -using System.Collections.Generic; -using Amazon.S3.Model; -using Amazon.Runtime; -using Amazon.Runtime.Internal; -using Amazon.Runtime.Internal.Transform; - -namespace Amazon.S3.Model.Internal.MarshallTransformations -{ - /// - /// Response Unmarshaller for PutBucketTagging operation - /// - public class PutBucketTaggingResponseUnmarshaller : S3ReponseUnmarshaller - { - /// - /// Unmarshaller the response from the service to the response class. - /// - /// - /// - public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) - { - PutBucketTaggingResponse response = new PutBucketTaggingResponse(); - - - return response; - } - - private static PutBucketTaggingResponseUnmarshaller _instance; - - /// - /// Singleton for the unmarshaller - /// - public static PutBucketTaggingResponseUnmarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new PutBucketTaggingResponseUnmarshaller(); - } - return _instance; - } - } - - } -} - diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketTaggingRequestMarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketTaggingRequestMarshaller.cs new file mode 100644 index 000000000000..5b1d272db6be --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketTaggingRequestMarshaller.cs @@ -0,0 +1,147 @@ +/* + * 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 +{ + /// + /// PutBucketTagging Request Marshaller + /// + public partial class PutBucketTaggingRequestMarshaller : IMarshaller , IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((PutBucketTaggingRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(PutBucketTaggingRequest publicRequest) + { + var request = new DefaultRequest(publicRequest, "Amazon.S3"); + PreMarshallCustomization(request, publicRequest); + request.HttpMethod = "PUT"; + request.AddSubResource("tagging"); + + if (publicRequest.IsSetChecksumAlgorithm()) + { + request.Headers["x-amz-sdk-checksum-algorithm"] = publicRequest.ChecksumAlgorithm; + } + + if (publicRequest.IsSetContentMD5()) + { + request.Headers["Content-MD5"] = publicRequest.ContentMD5; + } + + 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.", "PutBucketTaggingRequest.BucketName"); + request.ResourcePath = "/"; + var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture); + using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize })) + { + xmlWriter.WriteStartElement("Tagging", "http://s3.amazonaws.com/doc/2006-03-01/"); + var publicRequestTagSet = publicRequest.TagSet; + if (publicRequestTagSet != null && (publicRequestTagSet.Count > 0 || !AWSConfigs.InitializeCollections)) + { + xmlWriter.WriteStartElement("TagSet"); + foreach (var publicRequestTagSetValue in publicRequestTagSet) + { + if (publicRequestTagSetValue != null) + { + xmlWriter.WriteStartElement("Tag"); + if(publicRequestTagSetValue.IsSetKey()) + xmlWriter.WriteElementString("Key", StringUtils.FromString(publicRequestTagSetValue.Key)); + if(publicRequestTagSetValue.IsSetValue()) + xmlWriter.WriteElementString("Value", StringUtils.FromString(publicRequestTagSetValue.Value)); + xmlWriter.WriteEndElement(); + } + } + xmlWriter.WriteEndElement(); + } + + xmlWriter.WriteEndElement(); + } + PostMarshallCustomization(request, publicRequest); + try + { + string content = stringWriter.ToString(); + request.Content = System.Text.Encoding.UTF8.GetBytes(content); + request.Headers["Content-Type"] = "application/xml"; + ChecksumUtils.SetChecksumData( + request, + publicRequest.ChecksumAlgorithm, + fallbackToMD5: false, + isRequestChecksumRequired: true, + headerName: "x-amz-sdk-checksum-algorithm" + ); + request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2006-03-01"; + } + catch (EncoderFallbackException e) + { + throw new AmazonServiceException("Unable to marshall request to XML", e); + } + return request; + } + private static PutBucketTaggingRequestMarshaller _instance = new PutBucketTaggingRequestMarshaller(); + + internal static PutBucketTaggingRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static PutBucketTaggingRequestMarshaller Instance + { + get + { + return _instance; + } + } + + partial void PostMarshallCustomization(DefaultRequest defaultRequest, PutBucketTaggingRequest publicRequest); + partial void PreMarshallCustomization(DefaultRequest defaultRequest, PutBucketTaggingRequest publicRequest); + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketTaggingResponseUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketTaggingResponseUnmarshaller.cs new file mode 100644 index 000000000000..debcacccbb9d --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketTaggingResponseUnmarshaller.cs @@ -0,0 +1,98 @@ +/* + * 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 PutBucketTagging operation + /// + public partial class PutBucketTaggingResponseUnmarshaller : S3ReponseUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) + { + PutBucketTaggingResponse response = new PutBucketTaggingResponse(); + + 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, PutBucketTaggingResponse response); + + private static PutBucketTaggingResponseUnmarshaller _instance = new PutBucketTaggingResponseUnmarshaller(); + + internal static PutBucketTaggingResponseUnmarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static PutBucketTaggingResponseUnmarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/PutBucketTaggingRequest.cs b/sdk/src/Services/S3/Generated/Model/PutBucketTaggingRequest.cs similarity index 52% rename from sdk/src/Services/S3/Custom/Model/PutBucketTaggingRequest.cs rename to sdk/src/Services/S3/Generated/Model/PutBucketTaggingRequest.cs index 12f0c6311688..845f36577da5 100644 --- a/sdk/src/Services/S3/Custom/Model/PutBucketTaggingRequest.cs +++ b/sdk/src/Services/S3/Generated/Model/PutBucketTaggingRequest.cs @@ -12,26 +12,37 @@ * 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 PutBucketTagging operation. /// /// - /// This operation is not supported by directory buckets. + /// This operation is not supported for directory buckets. /// /// /// - /// Sets the tags for a bucket. + /// Sets the tags for a general purpose bucket if attribute based access control (ABAC) + /// is not enabled for the bucket. When you enable + /// ABAC for a general purpose bucket, you can no longer use this operation for that + /// bucket and must use the TagResource + /// or UntagResource + /// operations instead. /// /// /// @@ -53,7 +64,7 @@ namespace Amazon.S3.Model /// /// /// - /// To use this operation, you must have permissions to perform the s3:PutBucketTagging + /// To use this operation, you must have permissions to perform the s3:PutBucketTagging /// action. The bucket owner has this permission by default and can grant this permission /// to others. For more information about permissions, see Permissions /// Related to Bucket Subresource Operations and Managing @@ -61,33 +72,32 @@ namespace Amazon.S3.Model /// /// /// - /// PutBucketTagging has the following special errors. For more Amazon S3 - /// errors see, Error + /// PutBucketTagging has the following special errors. For more Amazon S3 errors + /// see, Error /// Responses. /// /// /// - /// The following operations are related to PutBucketTagging: + /// The following operations are related to PutBucketTagging: /// /// + /// + /// + /// 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 PutBucketTaggingRequest : AmazonWebServiceRequest { - private string bucketName; + private string _bucketName; private ChecksumAlgorithm _checksumAlgorithm; - private List tagSet = AWSConfigs.InitializeCollections ? new List() : null; - private string expectedBucketOwner; + private string _contentMD5; + private string _expectedBucketOwner; + private List _tagSet = AWSConfigs.InitializeCollections ? new List() : null; /// - /// The name of the bucket to apply the tags to. + /// Gets and sets the property BucketName. + /// + /// The bucket name. + /// /// + [AWSProperty(Required=true)] public string BucketName { - get { return this.bucketName; } - set { this.bucketName = value; } + get { return this._bucketName; } + set { this._bucketName = value; } } - // Check to see if Bucket property is set + // Check to see if BucketName property is set internal bool IsSetBucketName() { - return this.bucketName != null; + return this._bucketName != null; } /// /// Gets and sets the property ChecksumAlgorithm. /// - /// Indicates the algorithm used to create the checksum for the object when you use the + /// Indicates the algorithm used to create the checksum for the request when you use the /// SDK. This header will not provide any additional functionality if you don't use the - /// SDK. When you send this header, there must be a corresponding x-amz-checksum - /// or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request - /// with the HTTP status code 400 Bad Request. For more information, see - /// Checking + /// SDK. When you send this header, there must be a corresponding x-amz-checksum + /// or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the + /// HTTP status code 400 Bad Request. For more information, see Checking /// object integrity in the Amazon S3 User Guide. /// /// /// - /// If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm + /// If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm /// parameter. /// /// @@ -153,18 +173,29 @@ internal bool IsSetChecksumAlgorithm() } /// - /// The collection of tags. + /// Gets and sets the property ContentMD5. + /// + /// The Base64 encoded 128-bit MD5 digest of the data. You must use this header + /// as a message integrity check to verify that the request body was not corrupted in + /// transit. For more information, see RFC + /// 1864. + /// + /// + /// + /// For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon + /// Web Services SDKs, this field is calculated automatically. + /// /// - public List TagSet + public string ContentMD5 { - get { return this.tagSet; } - set { this.tagSet = value; } + get { return this._contentMD5; } + set { this._contentMD5 = value; } } - // Check to see if TagSet property is set - internal bool IsSetTagSet() + // Check to see if ContentMD5 property is set + internal bool IsSetContentMD5() { - return this.tagSet != null && (this.tagSet.Count > 0 || !AWSConfigs.InitializeCollections); + return this._contentMD5 != null; } /// @@ -172,24 +203,43 @@ internal bool IsSetTagSet() /// /// 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). + /// 403 Forbidden (access denied). /// /// public string ExpectedBucketOwner { - get { return this.expectedBucketOwner; } - set { this.expectedBucketOwner = value; } + get { return this._expectedBucketOwner; } + set { this._expectedBucketOwner = value; } + } + + // Check to see if ExpectedBucketOwner property is set + internal bool IsSetExpectedBucketOwner() + { + return !string.IsNullOrEmpty(this._expectedBucketOwner); } /// - /// Checks to see if ExpectedBucketOwner is set. + /// Gets and sets the property TagSet. + /// + /// A collection for a set of tags + /// + /// + /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned + /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller + /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous + /// SDK behavior set the AWSConfigs.InitializeCollections static property to true. /// - /// true, if ExpectedBucketOwner property is set. - internal bool IsSetExpectedBucketOwner() + public List TagSet + { + get { return this._tagSet; } + set { this._tagSet = value; } + } + + // Check to see if TagSet property is set + internal bool IsSetTagSet() { - return !String.IsNullOrEmpty(this.expectedBucketOwner); + return this._tagSet != null && (this._tagSet.Count > 0 || !AWSConfigs.InitializeCollections); } } -} - +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/PutBucketTaggingResponse.cs b/sdk/src/Services/S3/Generated/Model/PutBucketTaggingResponse.cs similarity index 74% rename from sdk/src/Services/S3/Custom/Model/PutBucketTaggingResponse.cs rename to sdk/src/Services/S3/Generated/Model/PutBucketTaggingResponse.cs index 7b1eefb4d7bc..bf76b2573ae3 100644 --- a/sdk/src/Services/S3/Custom/Model/PutBucketTaggingResponse.cs +++ b/sdk/src/Services/S3/Generated/Model/PutBucketTaggingResponse.cs @@ -12,21 +12,28 @@ * 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 { /// - /// Returns information about the PutBucketTagging response metadata. - /// The PutBucketTagging operation has a void result type. + /// This is the response object from the PutBucketTagging operation. /// public partial class PutBucketTaggingResponse : AmazonWebServiceResponse { + } -} - +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/_bcl/AmazonS3Client.cs b/sdk/src/Services/S3/Generated/_bcl/AmazonS3Client.cs index 171a0066c870..771488faa44a 100644 --- a/sdk/src/Services/S3/Generated/_bcl/AmazonS3Client.cs +++ b/sdk/src/Services/S3/Generated/_bcl/AmazonS3Client.cs @@ -27411,7 +27411,7 @@ public virtual PutBucketRequestPaymentResponse PutBucketRequestPayment(PutBucket /// /// /// The bucket name. - /// A property of PutBucketTaggingRequest used to execute the PutBucketTagging service method. + /// A collection for a set of tags /// /// The response from the PutBucketTagging service method, as returned by S3. /// REST API Reference for PutBucketTagging Operation @@ -27613,7 +27613,7 @@ public virtual PutBucketTaggingResponse PutBucketTagging(PutBucketTaggingRequest /// /// /// The bucket name. - /// A property of PutBucketTaggingRequest used to execute the PutBucketTagging service method. + /// A collection for a set of tags /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// diff --git a/sdk/src/Services/S3/Generated/_bcl/IAmazonS3.cs b/sdk/src/Services/S3/Generated/_bcl/IAmazonS3.cs index 58c3b1e5fbfd..f6c4e2b9a175 100644 --- a/sdk/src/Services/S3/Generated/_bcl/IAmazonS3.cs +++ b/sdk/src/Services/S3/Generated/_bcl/IAmazonS3.cs @@ -25479,7 +25479,7 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// The bucket name. - /// A property of PutBucketTaggingRequest used to execute the PutBucketTagging service method. + /// A collection for a set of tags /// /// The response from the PutBucketTagging service method, as returned by S3. /// REST API Reference for PutBucketTagging Operation @@ -25667,7 +25667,7 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// The bucket name. - /// A property of PutBucketTaggingRequest used to execute the PutBucketTagging service method. + /// A collection for a set of tags /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// diff --git a/sdk/src/Services/S3/Generated/_netstandard/AmazonS3Client.cs b/sdk/src/Services/S3/Generated/_netstandard/AmazonS3Client.cs index cc5746f7957b..804d28a48b5e 100644 --- a/sdk/src/Services/S3/Generated/_netstandard/AmazonS3Client.cs +++ b/sdk/src/Services/S3/Generated/_netstandard/AmazonS3Client.cs @@ -15057,7 +15057,7 @@ internal virtual PutBucketTaggingResponse PutBucketTagging(PutBucketTaggingReque /// /// /// The bucket name. - /// A property of PutBucketTaggingRequest used to execute the PutBucketTagging service method. + /// A collection for a set of tags /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// diff --git a/sdk/src/Services/S3/Generated/_netstandard/IAmazonS3.cs b/sdk/src/Services/S3/Generated/_netstandard/IAmazonS3.cs index 4ba7c6e9dbb0..e45e3533a8c5 100644 --- a/sdk/src/Services/S3/Generated/_netstandard/IAmazonS3.cs +++ b/sdk/src/Services/S3/Generated/_netstandard/IAmazonS3.cs @@ -13216,7 +13216,7 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// The bucket name. - /// A property of PutBucketTaggingRequest used to execute the PutBucketTagging service method. + /// A collection for a set of tags /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///