diff --git a/generator/ServiceClientGeneratorLib/ServiceModel.cs b/generator/ServiceClientGeneratorLib/ServiceModel.cs index 1ff42c46bc5f..2cfa398745f6 100644 --- a/generator/ServiceClientGeneratorLib/ServiceModel.cs +++ b/generator/ServiceClientGeneratorLib/ServiceModel.cs @@ -570,7 +570,7 @@ public List S3AllowListOperations new Operation(this, "PutBucketMetricsConfiguration", DocumentRoot[OperationsKey]["PutBucketMetricsConfiguration"]), new Operation(this, "DeleteBucketMetricsConfiguration", DocumentRoot[OperationsKey]["DeleteBucketMetricsConfiguration"]), new Operation(this, "DeleteBucketAnalyticsConfiguration", DocumentRoot[OperationsKey]["DeleteBucketAnalyticsConfiguration"]), - //new Operation(this, "DeleteBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["DeleteBucketIntelligentTieringConfiguration"]), + new Operation(this, "DeleteBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["DeleteBucketIntelligentTieringConfiguration"]), //new Operation(this, "DeleteBucketInventoryConfiguration", DocumentRoot[OperationsKey]["DeleteBucketInventoryConfiguration"]), }; diff --git a/generator/ServiceModels/s3/s3.customizations.json b/generator/ServiceModels/s3/s3.customizations.json index 9693ee2d6a36..6dc8337d042c 100644 --- a/generator/ServiceModels/s3/s3.customizations.json +++ b/generator/ServiceModels/s3/s3.customizations.json @@ -1069,6 +1069,13 @@ } } ] + }, + "DeleteBucketIntelligentTieringConfigurationRequest":{ + "modify":[ + { + "Id":{"emitPropertyName": "IntelligentTieringId"} + } + ] } }, "operationModifiers": { diff --git a/sdk/src/Services/S3/Custom/Model/DeleteBucketIntelligentTieringConfigurationResponse.cs b/sdk/src/Services/S3/Custom/Model/DeleteBucketIntelligentTieringConfigurationResponse.cs deleted file mode 100644 index 58a73dc76241..000000000000 --- a/sdk/src/Services/S3/Custom/Model/DeleteBucketIntelligentTieringConfigurationResponse.cs +++ /dev/null @@ -1,27 +0,0 @@ -/*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 System; -using System.Collections.Generic; -using System.Text; - -namespace Amazon.S3.Model -{ - /// - /// Returns information about the DeleteBucketIntelligentTieringConfiguration response metadata. - /// The DeleteBucketMetricsConfiguration operation has a void result type. - /// - public class DeleteBucketIntelligentTieringConfigurationResponse : AmazonWebServiceResponse - { - } -} diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteBucketIntelligentTieringConfigurationRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteBucketIntelligentTieringConfigurationRequestMarshaller.cs deleted file mode 100644 index e9eadea79f82..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteBucketIntelligentTieringConfigurationRequestMarshaller.cs +++ /dev/null @@ -1,74 +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 Amazon.S3.Util; -using System; -using System.Collections.Generic; -using System.Text; - -#pragma warning disable 1591 - -namespace Amazon.S3.Model.Internal.MarshallTransformations -{ - /// - /// Delete Bucket IntelligentTieringConfiguration Request Marshaller - /// - public class DeleteBucketIntelligentTieringConfigurationRequestMarshaller : IMarshaller, IMarshaller - { - public IRequest Marshall(Amazon.Runtime.AmazonWebServiceRequest input) - { - return this.Marshall((DeleteBucketIntelligentTieringConfigurationRequest)input); - } - - public IRequest Marshall(DeleteBucketIntelligentTieringConfigurationRequest deleteBucketIntelligentTieringConfigurationRequest) - { - IRequest request = new DefaultRequest(deleteBucketIntelligentTieringConfigurationRequest, "Amazon.S3"); - - request.HttpMethod = "DELETE"; - - if (string.IsNullOrEmpty(deleteBucketIntelligentTieringConfigurationRequest.BucketName)) - throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "deleteBucketIntelligentTieringConfigurationRequest.BucketName"); - - if (deleteBucketIntelligentTieringConfigurationRequest.IsSetExpectedBucketOwner()) - request.Headers.Add(S3Constants.AmzHeaderExpectedBucketOwner, S3Transforms.ToStringValue(deleteBucketIntelligentTieringConfigurationRequest.ExpectedBucketOwner)); - - request.ResourcePath = "/"; - request.AddSubResource("intelligent-tiering"); - request.AddSubResource("id", deleteBucketIntelligentTieringConfigurationRequest.IntelligentTieringId); - request.UseQueryString = true; - - return request; - } - - private static DeleteBucketIntelligentTieringConfigurationRequestMarshaller _instance; - - /// - /// Singleton for marshaller - /// - public static DeleteBucketIntelligentTieringConfigurationRequestMarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new DeleteBucketIntelligentTieringConfigurationRequestMarshaller(); - } - return _instance; - } - } - } -} diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller.cs deleted file mode 100644 index f8af8293437c..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller.cs +++ /dev/null @@ -1,57 +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; -using System; -using System.Collections.Generic; -using System.Text; - -namespace Amazon.S3.Model.Internal.MarshallTransformations -{ - /// - /// Response Unmarshaller for DeleteBucketIntelligentTiering operation - /// - public class DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller : S3ReponseUnmarshaller - { - /// - /// Unmarshaller the response from the service to the response class. - /// - /// - /// - public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) - { - DeleteBucketIntelligentTieringConfigurationResponse response = new DeleteBucketIntelligentTieringConfigurationResponse(); - - return response; - } - - private static DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller _instance; - - /// - /// Singleton for the unmarshaller - /// - public static DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller(); - } - return _instance; - } - } - } -} diff --git a/sdk/src/Services/S3/Custom/Model/DeleteBucketIntelligentTieringConfigurationRequest.cs b/sdk/src/Services/S3/Generated/Model/DeleteBucketIntelligentTieringConfigurationRequest.cs similarity index 65% rename from sdk/src/Services/S3/Custom/Model/DeleteBucketIntelligentTieringConfigurationRequest.cs rename to sdk/src/Services/S3/Generated/Model/DeleteBucketIntelligentTieringConfigurationRequest.cs index fd1b1a290c76..eb5f694922e7 100644 --- a/sdk/src/Services/S3/Custom/Model/DeleteBucketIntelligentTieringConfigurationRequest.cs +++ b/sdk/src/Services/S3/Generated/Model/DeleteBucketIntelligentTieringConfigurationRequest.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). @@ -12,18 +12,33 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -using Amazon.Runtime; + +/* + * 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 DeleteBucketIntelligentTieringConfiguration operation. + /// + /// + /// This operation is not supported for directory buckets. + /// + /// + /// /// Deletes the S3 Intelligent-Tiering configuration from the specified bucket. - /// + /// /// /// /// The S3 Intelligent-Tiering storage class is designed to optimize storage costs by @@ -48,7 +63,7 @@ namespace Amazon.S3.Model /// /// /// - /// Operations related to DeleteBucketIntelligentTieringConfiguration include: + /// Operations related to DeleteBucketIntelligentTieringConfiguration include: /// /// /// + /// + /// + /// 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 DeleteBucketIntelligentTieringConfigurationRequest : AmazonWebServiceRequest - { - private string bucketName; - private string expectedBucketOwner; - private string intelligentTieiringId; + public partial class DeleteBucketIntelligentTieringConfigurationRequest : AmazonWebServiceRequest + { + private string _bucketName; + private string _expectedBucketOwner; + private string _intelligentTieringId; /// - /// The name of the Amazon S3 bucket whose configuration you want to modify or retrieve. + /// Gets and sets the property BucketName. + /// + /// The name of the Amazon S3 bucket whose configuration you want to modify or retrieve. + /// /// + [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 BucketName property is set internal bool IsSetBucketName() { - return !(string.IsNullOrEmpty(this.bucketName)); + return this._bucketName != null; } /// @@ -99,29 +124,34 @@ internal bool IsSetBucketName() /// 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 this.expectedBucketOwner != null; + return this._expectedBucketOwner != null; } /// - /// The ID used to identify the S3 Intelligent-Tiering configuration. + /// Gets and sets the property IntelligentTieringId. + /// + /// The ID used to identify the S3 Intelligent-Tiering configuration. + /// /// + [AWSProperty(Required=true)] public string IntelligentTieringId { - get { return this.intelligentTieiringId; } - set { this.intelligentTieiringId = value; } + get { return this._intelligentTieringId; } + set { this._intelligentTieringId = value; } } - // Check to see if IntelligentTieiringId property is set - internal bool IsSetIntelligentTieiringId() + // Check to see if IntelligentTieringId property is set + internal bool IsSetIntelligentTieringId() { - return !(string.IsNullOrEmpty(this.IntelligentTieringId)); + return this._intelligentTieringId != null; } + } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/DeleteBucketIntelligentTieringConfigurationResponse.cs b/sdk/src/Services/S3/Generated/Model/DeleteBucketIntelligentTieringConfigurationResponse.cs new file mode 100644 index 000000000000..eb270e6f71c2 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/DeleteBucketIntelligentTieringConfigurationResponse.cs @@ -0,0 +1,39 @@ +/* + * 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 DeleteBucketIntelligentTieringConfiguration operation. + /// + public partial class DeleteBucketIntelligentTieringConfigurationResponse : AmazonWebServiceResponse + { + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteBucketIntelligentTieringConfigurationRequestMarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteBucketIntelligentTieringConfigurationRequestMarshaller.cs new file mode 100644 index 000000000000..de8ea636d51d --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteBucketIntelligentTieringConfigurationRequestMarshaller.cs @@ -0,0 +1,101 @@ +/* + * 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 +{ + /// + /// DeleteBucketIntelligentTieringConfiguration Request Marshaller + /// + public partial class DeleteBucketIntelligentTieringConfigurationRequestMarshaller : IMarshaller , IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((DeleteBucketIntelligentTieringConfigurationRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(DeleteBucketIntelligentTieringConfigurationRequest publicRequest) + { + var request = new DefaultRequest(publicRequest, "Amazon.S3"); + PreMarshallCustomization(request, publicRequest); + request.HttpMethod = "DELETE"; + request.AddSubResource("intelligent-tiering"); + + 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.", "DeleteBucketIntelligentTieringConfigurationRequest.BucketName"); + if (string.IsNullOrEmpty(publicRequest.IntelligentTieringId)) + throw new AmazonS3Exception("Request object does not have required field IntelligentTieringId set"); + + if (publicRequest.IsSetIntelligentTieringId()) + request.Parameters.Add("id", StringUtils.FromString(publicRequest.IntelligentTieringId)); + request.ResourcePath = "/"; + + PostMarshallCustomization(request, publicRequest); + request.UseQueryString = true; + return request; + } + private static DeleteBucketIntelligentTieringConfigurationRequestMarshaller _instance = new DeleteBucketIntelligentTieringConfigurationRequestMarshaller(); + + internal static DeleteBucketIntelligentTieringConfigurationRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static DeleteBucketIntelligentTieringConfigurationRequestMarshaller Instance + { + get + { + return _instance; + } + } + + partial void PostMarshallCustomization(DefaultRequest defaultRequest, DeleteBucketIntelligentTieringConfigurationRequest publicRequest); + partial void PreMarshallCustomization(DefaultRequest defaultRequest, DeleteBucketIntelligentTieringConfigurationRequest publicRequest); + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller.cs new file mode 100644 index 000000000000..fcb9700cbf91 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller.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 DeleteBucketIntelligentTieringConfiguration operation + /// + public partial class DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller : S3ReponseUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) + { + DeleteBucketIntelligentTieringConfigurationResponse response = new DeleteBucketIntelligentTieringConfigurationResponse(); + + 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, DeleteBucketIntelligentTieringConfigurationResponse response); + + private static DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller _instance = new DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller(); + + internal static DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static DeleteBucketIntelligentTieringConfigurationResponseUnmarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file