diff --git a/generator/ServiceClientGeneratorLib/ServiceModel.cs b/generator/ServiceClientGeneratorLib/ServiceModel.cs index 6485dc260992..e077511bab60 100644 --- a/generator/ServiceClientGeneratorLib/ServiceModel.cs +++ b/generator/ServiceClientGeneratorLib/ServiceModel.cs @@ -572,7 +572,8 @@ public List S3AllowListOperations new Operation(this, "DeleteBucketAnalyticsConfiguration", DocumentRoot[OperationsKey]["DeleteBucketAnalyticsConfiguration"]), new Operation(this, "DeleteBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["DeleteBucketIntelligentTieringConfiguration"]), new Operation(this, "DeleteBucketInventoryConfiguration", DocumentRoot[OperationsKey]["DeleteBucketInventoryConfiguration"]), - new Operation(this,"PutBucketRequestPayment", DocumentRoot[OperationsKey]["PutBucketRequestPayment"]) + new Operation(this,"PutBucketRequestPayment", DocumentRoot[OperationsKey]["PutBucketRequestPayment"]), + new Operation(this, "CreateBucketMetadataConfiguration",DocumentRoot[OperationsKey]["CreateBucketMetadataConfiguration"]) }; } @@ -602,7 +603,8 @@ public List S3RequestMarshallerThrowGenericExceptionList "GetBucketAcl", "PutObjectAcl", "GetObjectAcl", - "PutBucketAcl" + "PutBucketAcl", + "CreateBucketMetadataConfiguration" }; } return _s3RequestMarshallerThrowAmazonS3ExceptionList; diff --git a/generator/ServiceModels/s3/s3.customizations.json b/generator/ServiceModels/s3/s3.customizations.json index 7e9fc6818404..0acc7070cf86 100644 --- a/generator/ServiceModels/s3/s3.customizations.json +++ b/generator/ServiceModels/s3/s3.customizations.json @@ -1187,6 +1187,26 @@ "ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]} } ] + }, + "CreateBucketMetadataConfigurationRequest":{ + "modify":[ + { + "ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]} + }, + { + "ContentMD5":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._contentMD5);"]} + }, + { + "BucketName":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._bucketName);"]} + } + ] + }, + "MetadataTableEncryptionConfiguration":{ + "modify":[ + { + "KmsKeyArn":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._kmsKeyArn);"]} + } + ] } }, diff --git a/sdk/src/Services/S3/Custom/Model/CreateBucketMetadataConfigurationRequest.cs b/sdk/src/Services/S3/Custom/Model/CreateBucketMetadataConfigurationRequest.cs deleted file mode 100644 index 18a74a0e6333..000000000000 --- a/sdk/src/Services/S3/Custom/Model/CreateBucketMetadataConfigurationRequest.cs +++ /dev/null @@ -1,102 +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 Amazon.Runtime; - -namespace Amazon.S3.Model -{ - /// - /// Container for the parameters to the CreateBucketMetadataConfiguration operation. - /// - public partial class CreateBucketMetadataConfigurationRequest : AmazonWebServiceRequest - { - private string bucketName; - private ChecksumAlgorithm checksumAlgorithm; - private string contentMD5; - private string expectedBucketOwner; - private MetadataConfiguration metadataConfiguration; - - /// - /// Gets and sets the property BucketName. - /// - public string BucketName - { - get { return this.bucketName; } - set { this.bucketName = value; } - } - - internal bool IsSetBucketName() - { - return !String.IsNullOrEmpty(this.bucketName); - } - - /// - /// Gets and sets the property ChecksumAlgorithm. - /// - public ChecksumAlgorithm ChecksumAlgorithm - { - get { return this.checksumAlgorithm; } - set { this.checksumAlgorithm = value; } - } - - internal bool IsSetChecksumAlgorithm() - { - return this.checksumAlgorithm != null; - } - - /// - /// Gets and sets the property ContentMD5. - /// - public string ContentMD5 - { - get { return this.contentMD5; } - set { this.contentMD5 = value; } - } - - internal bool IsSetContentMD5() - { - return !String.IsNullOrEmpty(this.contentMD5); - } - - /// - /// Gets and sets the property ExpectedBucketOwner. - /// - public string ExpectedBucketOwner - { - get { return this.expectedBucketOwner; } - set { this.expectedBucketOwner = value; } - } - - internal bool IsSetExpectedBucketOwner() - { - return !String.IsNullOrEmpty(this.expectedBucketOwner); - } - - /// - /// Gets and sets the property MetadataConfiguration. - /// - public MetadataConfiguration MetadataConfiguration - { - get { return this.metadataConfiguration; } - set { this.metadataConfiguration = value; } - } - - internal bool IsSetMetadataConfiguration() - { - return this.metadataConfiguration != null; - } - - } -} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/MetadataTableEncryptionConfiguration.cs b/sdk/src/Services/S3/Custom/Model/MetadataTableEncryptionConfiguration.cs deleted file mode 100644 index 4ccb5dace110..000000000000 --- a/sdk/src/Services/S3/Custom/Model/MetadataTableEncryptionConfiguration.cs +++ /dev/null @@ -1,68 +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.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 -{ - /// - /// - /// - public partial class MetadataTableEncryptionConfiguration - { - private string kmsKeyArn; - private TableSseAlgorithm sseAlgorithm; - - /// - /// Gets and sets the property KmsKeyArn. - /// - public string KmsKeyArn - { - get { return this.kmsKeyArn; } - set { this.kmsKeyArn = value; } - } - - // Check to see if KmsKeyArn property is set - internal bool IsSetKmsKeyArn() - { - return !String.IsNullOrEmpty(this.kmsKeyArn); - } - - /// - /// Gets and sets the property SseAlgorithm. - /// - public TableSseAlgorithm SseAlgorithm - { - get { return this.sseAlgorithm; } - set { this.sseAlgorithm = value; } - } - - // Check to see if SseAlgorithm property is set - internal bool IsSetSseAlgorithm() - { - return this.sseAlgorithm != null; - } - - } -} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/CreateBucketMetadataConfigurationRequest.cs b/sdk/src/Services/S3/Generated/Model/CreateBucketMetadataConfigurationRequest.cs new file mode 100644 index 000000000000..9ae9a2c50250 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/CreateBucketMetadataConfigurationRequest.cs @@ -0,0 +1,237 @@ +/* + * 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 CreateBucketMetadataConfiguration operation. + /// Creates an S3 Metadata V2 metadata configuration for a general purpose bucket. For + /// more information, see Accelerating + /// data discovery with S3 Metadata in the Amazon S3 User Guide. + /// + ///
Permissions
+ /// + /// To use this operation, you must have the following permissions. For more information, + /// see Setting + /// up permissions for configuring metadata tables in the Amazon S3 User Guide. + /// + /// + /// + /// If you want to encrypt your metadata tables with server-side encryption with Key Management + /// Service (KMS) keys (SSE-KMS), you need additional permissions in your KMS key policy. + /// For more information, see + /// Setting up permissions for configuring metadata tables in the Amazon S3 User + /// Guide. + /// + /// + /// + /// If you also want to integrate your table bucket with Amazon Web Services analytics + /// services so that you can query your metadata table, you need additional permissions. + /// For more information, see + /// Integrating Amazon S3 Tables with Amazon Web Services analytics services in the + /// Amazon S3 User Guide. + /// + /// + /// + /// To query your metadata tables, you need additional permissions. For more information, + /// see + /// Permissions for querying metadata tables in the Amazon S3 User Guide. + /// + ///
  • + /// + /// s3:CreateBucketMetadataTableConfiguration + /// + /// + /// + /// The IAM policy action name is the same for the V1 and V2 API operations. + /// + ///
  • + /// + /// s3tables:CreateTableBucket + /// + ///
  • + /// + /// s3tables:CreateNamespace + /// + ///
  • + /// + /// s3tables:GetTable + /// + ///
  • + /// + /// s3tables:CreateTable + /// + ///
  • + /// + /// s3tables:PutTablePolicy + /// + ///
  • + /// + /// s3tables:PutTableEncryption + /// + ///
  • + /// + /// kms:DescribeKey + /// + ///
+ /// + /// The following operations are related to CreateBucketMetadataConfiguration: + /// + /// + /// + /// 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 CreateBucketMetadataConfigurationRequest : AmazonWebServiceRequest + { + private string _bucketName; + private ChecksumAlgorithm _checksumAlgorithm; + private string _contentMD5; + private string _expectedBucketOwner; + private MetadataConfiguration _metadataConfiguration; + + /// + /// Gets and sets the property BucketName. + /// + /// The general purpose bucket that you want to create the metadata configuration for. + /// + /// + /// + [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 !String.IsNullOrEmpty(this._bucketName); + } + + /// + /// Gets and sets the property ChecksumAlgorithm. + /// + /// The checksum algorithm to use with your metadata configuration. + /// + /// + public ChecksumAlgorithm ChecksumAlgorithm + { + get { return this._checksumAlgorithm; } + set { this._checksumAlgorithm = value; } + } + + // Check to see if ChecksumAlgorithm property is set + internal bool IsSetChecksumAlgorithm() + { + return this._checksumAlgorithm != null; + } + + /// + /// Gets and sets the property ContentMD5. + /// + /// The Content-MD5 header for the metadata configuration. + /// + /// + public string ContentMD5 + { + get { return this._contentMD5; } + set { this._contentMD5 = value; } + } + + // Check to see if ContentMD5 property is set + internal bool IsSetContentMD5() + { + return !String.IsNullOrEmpty(this._contentMD5); + } + + /// + /// Gets and sets the property ExpectedBucketOwner. + /// + /// The expected owner of the general purpose bucket that corresponds to your metadata + /// configuration. + /// + /// + 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 MetadataConfiguration. + /// + /// The contents of your metadata configuration. + /// + /// + [AWSProperty(Required=true)] + public MetadataConfiguration MetadataConfiguration + { + get { return this._metadataConfiguration; } + set { this._metadataConfiguration = value; } + } + + // Check to see if MetadataConfiguration property is set + internal bool IsSetMetadataConfiguration() + { + return this._metadataConfiguration != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/CreateBucketMetadataConfigurationResponse.cs b/sdk/src/Services/S3/Generated/Model/CreateBucketMetadataConfigurationResponse.cs similarity index 100% rename from sdk/src/Services/S3/Custom/Model/CreateBucketMetadataConfigurationResponse.cs rename to sdk/src/Services/S3/Generated/Model/CreateBucketMetadataConfigurationResponse.cs diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/CreateBucketMetadataConfigurationRequestMarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/CreateBucketMetadataConfigurationRequestMarshaller.cs similarity index 90% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/CreateBucketMetadataConfigurationRequestMarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/CreateBucketMetadataConfigurationRequestMarshaller.cs index b240dd04b7b6..29fa48b163dc 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/CreateBucketMetadataConfigurationRequestMarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/CreateBucketMetadataConfigurationRequestMarshaller.cs @@ -36,7 +36,7 @@ namespace Amazon.S3.Model.Internal.MarshallTransformations /// /// CreateBucketMetadataConfiguration Request Marshaller /// - public class CreateBucketMetadataConfigurationRequestMarshaller : IMarshaller , IMarshaller + public partial class CreateBucketMetadataConfigurationRequestMarshaller : IMarshaller , IMarshaller { /// /// Marshaller the request object to the HTTP request. @@ -56,6 +56,7 @@ public IRequest Marshall(AmazonWebServiceRequest input) public IRequest Marshall(CreateBucketMetadataConfigurationRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.S3"); + PreMarshallCustomization(request, publicRequest); request.HttpMethod = "POST"; request.AddSubResource("metadataConfiguration"); @@ -75,9 +76,7 @@ public IRequest Marshall(CreateBucketMetadataConfigurationRequest publicRequest) } if (!publicRequest.IsSetBucketName()) throw new AmazonS3Exception("Request object does not have required field BucketName set"); - request.AddPathResource("{Bucket}", StringUtils.FromString(publicRequest.BucketName)); - request.ResourcePath = "/{Bucket}"; - + 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 })) { @@ -88,17 +87,14 @@ public IRequest Marshall(CreateBucketMetadataConfigurationRequest publicRequest) { xmlWriter.WriteStartElement("InventoryTableConfiguration"); if(publicRequest.MetadataConfiguration.InventoryTableConfiguration.IsSetConfigurationState()) - xmlWriter.WriteElementString("ConfigurationState", StringUtils.FromString(publicRequest.MetadataConfiguration.InventoryTableConfiguration.ConfigurationState)); - + xmlWriter.WriteElementString("ConfigurationState", StringUtils.FromString(publicRequest.MetadataConfiguration.InventoryTableConfiguration.ConfigurationState)); if (publicRequest.MetadataConfiguration.InventoryTableConfiguration.EncryptionConfiguration != null) { xmlWriter.WriteStartElement("EncryptionConfiguration"); if(publicRequest.MetadataConfiguration.InventoryTableConfiguration.EncryptionConfiguration.IsSetKmsKeyArn()) - xmlWriter.WriteElementString("KmsKeyArn", StringUtils.FromString(publicRequest.MetadataConfiguration.InventoryTableConfiguration.EncryptionConfiguration.KmsKeyArn)); - + xmlWriter.WriteElementString("KmsKeyArn", StringUtils.FromString(publicRequest.MetadataConfiguration.InventoryTableConfiguration.EncryptionConfiguration.KmsKeyArn)); if(publicRequest.MetadataConfiguration.InventoryTableConfiguration.EncryptionConfiguration.IsSetSseAlgorithm()) - xmlWriter.WriteElementString("SseAlgorithm", StringUtils.FromString(publicRequest.MetadataConfiguration.InventoryTableConfiguration.EncryptionConfiguration.SseAlgorithm)); - + xmlWriter.WriteElementString("SseAlgorithm", StringUtils.FromString(publicRequest.MetadataConfiguration.InventoryTableConfiguration.EncryptionConfiguration.SseAlgorithm)); xmlWriter.WriteEndElement(); } xmlWriter.WriteEndElement(); @@ -110,22 +106,18 @@ public IRequest Marshall(CreateBucketMetadataConfigurationRequest publicRequest) { xmlWriter.WriteStartElement("EncryptionConfiguration"); if(publicRequest.MetadataConfiguration.JournalTableConfiguration.EncryptionConfiguration.IsSetKmsKeyArn()) - xmlWriter.WriteElementString("KmsKeyArn", StringUtils.FromString(publicRequest.MetadataConfiguration.JournalTableConfiguration.EncryptionConfiguration.KmsKeyArn)); - + xmlWriter.WriteElementString("KmsKeyArn", StringUtils.FromString(publicRequest.MetadataConfiguration.JournalTableConfiguration.EncryptionConfiguration.KmsKeyArn)); if(publicRequest.MetadataConfiguration.JournalTableConfiguration.EncryptionConfiguration.IsSetSseAlgorithm()) - xmlWriter.WriteElementString("SseAlgorithm", StringUtils.FromString(publicRequest.MetadataConfiguration.JournalTableConfiguration.EncryptionConfiguration.SseAlgorithm)); - + xmlWriter.WriteElementString("SseAlgorithm", StringUtils.FromString(publicRequest.MetadataConfiguration.JournalTableConfiguration.EncryptionConfiguration.SseAlgorithm)); xmlWriter.WriteEndElement(); } if (publicRequest.MetadataConfiguration.JournalTableConfiguration.RecordExpiration != null) { xmlWriter.WriteStartElement("RecordExpiration"); if(publicRequest.MetadataConfiguration.JournalTableConfiguration.RecordExpiration.IsSetDays()) - xmlWriter.WriteElementString("Days", StringUtils.FromInt(publicRequest.MetadataConfiguration.JournalTableConfiguration.RecordExpiration.Days)); - + xmlWriter.WriteElementString("Days", StringUtils.FromInt(publicRequest.MetadataConfiguration.JournalTableConfiguration.RecordExpiration.Days.Value)); if(publicRequest.MetadataConfiguration.JournalTableConfiguration.RecordExpiration.IsSetExpiration()) - xmlWriter.WriteElementString("Expiration", StringUtils.FromString(publicRequest.MetadataConfiguration.JournalTableConfiguration.RecordExpiration.Expiration)); - + xmlWriter.WriteElementString("Expiration", StringUtils.FromString(publicRequest.MetadataConfiguration.JournalTableConfiguration.RecordExpiration.Expiration)); xmlWriter.WriteEndElement(); } xmlWriter.WriteEndElement(); @@ -134,13 +126,12 @@ public IRequest Marshall(CreateBucketMetadataConfigurationRequest publicRequest) xmlWriter.WriteEndElement(); } } + PostMarshallCustomization(request, publicRequest); try { string content = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(content); request.Headers["Content-Type"] = "application/xml"; - if (publicRequest.IsSetContentMD5()) - request.Headers[Amazon.Util.HeaderKeys.ContentMD5Header] = publicRequest.ContentMD5; ChecksumUtils.SetChecksumData( request, publicRequest.ChecksumAlgorithm, @@ -154,7 +145,6 @@ public IRequest Marshall(CreateBucketMetadataConfigurationRequest publicRequest) { throw new AmazonServiceException("Unable to marshall request to XML", e); } - return request; } private static CreateBucketMetadataConfigurationRequestMarshaller _instance = new CreateBucketMetadataConfigurationRequestMarshaller(); @@ -175,5 +165,7 @@ public static CreateBucketMetadataConfigurationRequestMarshaller Instance } } + partial void PostMarshallCustomization(DefaultRequest defaultRequest, CreateBucketMetadataConfigurationRequest publicRequest); + partial void PreMarshallCustomization(DefaultRequest defaultRequest, CreateBucketMetadataConfigurationRequest publicRequest); } } \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/CreateBucketMetadataConfigurationResponseUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/CreateBucketMetadataConfigurationResponseUnmarshaller.cs similarity index 82% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/CreateBucketMetadataConfigurationResponseUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/CreateBucketMetadataConfigurationResponseUnmarshaller.cs index 8ca998880ae9..54fe2c4bc8ab 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/CreateBucketMetadataConfigurationResponseUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/CreateBucketMetadataConfigurationResponseUnmarshaller.cs @@ -36,7 +36,7 @@ namespace Amazon.S3.Model.Internal.MarshallTransformations /// /// Response Unmarshaller for CreateBucketMetadataConfiguration operation /// - public class CreateBucketMetadataConfigurationResponseUnmarshaller : S3ReponseUnmarshaller + public partial class CreateBucketMetadataConfigurationResponseUnmarshaller : S3ReponseUnmarshaller { /// /// Unmarshaller the response from the service to the response class. @@ -47,6 +47,7 @@ public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext conte { CreateBucketMetadataConfigurationResponse response = new CreateBucketMetadataConfigurationResponse(); + PostUnmarshallCustomization(context, response); return response; } @@ -60,7 +61,7 @@ public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext conte /// public override AmazonServiceException UnmarshallException(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { - var errorResponse = S3ErrorResponseUnmarshaller.Instance.Unmarshall(context); + S3ErrorResponse errorResponse = S3ErrorResponseUnmarshaller.Instance.Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; @@ -70,11 +71,17 @@ public override AmazonServiceException UnmarshallException(XmlUnmarshallerContex using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { } - return new AmazonS3Exception(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); + return base.ConstructS3Exception(context, errorResponse, innerException, statusCode); } + partial void PostUnmarshallCustomization(XmlUnmarshallerContext context, CreateBucketMetadataConfigurationResponse response); + private static CreateBucketMetadataConfigurationResponseUnmarshaller _instance = new CreateBucketMetadataConfigurationResponseUnmarshaller(); + internal static CreateBucketMetadataConfigurationResponseUnmarshaller GetInstance() + { + return _instance; + } /// /// Gets the singleton. diff --git a/sdk/src/Services/S3/Custom/Model/InventoryTableConfiguration.cs b/sdk/src/Services/S3/Generated/Model/InventoryTableConfiguration.cs similarity index 97% rename from sdk/src/Services/S3/Custom/Model/InventoryTableConfiguration.cs rename to sdk/src/Services/S3/Generated/Model/InventoryTableConfiguration.cs index 21e2675a00d6..6a90c8511e6b 100644 --- a/sdk/src/Services/S3/Custom/Model/InventoryTableConfiguration.cs +++ b/sdk/src/Services/S3/Generated/Model/InventoryTableConfiguration.cs @@ -40,7 +40,8 @@ public partial class InventoryTableConfiguration /// /// Gets and sets the property ConfigurationState. /// - /// The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled. + /// The configuration state of the inventory table, indicating whether the inventory + /// table is enabled or disabled. /// /// [AWSProperty(Required=true)] diff --git a/sdk/src/Services/S3/Custom/Model/JournalTableConfiguration.cs b/sdk/src/Services/S3/Generated/Model/JournalTableConfiguration.cs similarity index 100% rename from sdk/src/Services/S3/Custom/Model/JournalTableConfiguration.cs rename to sdk/src/Services/S3/Generated/Model/JournalTableConfiguration.cs diff --git a/sdk/src/Services/S3/Custom/Model/MetadataConfiguration.cs b/sdk/src/Services/S3/Generated/Model/MetadataConfiguration.cs similarity index 100% rename from sdk/src/Services/S3/Custom/Model/MetadataConfiguration.cs rename to sdk/src/Services/S3/Generated/Model/MetadataConfiguration.cs diff --git a/sdk/src/Services/S3/Generated/Model/MetadataTableEncryptionConfiguration.cs b/sdk/src/Services/S3/Generated/Model/MetadataTableEncryptionConfiguration.cs new file mode 100644 index 000000000000..b4ce5e8c55fc --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/MetadataTableEncryptionConfiguration.cs @@ -0,0 +1,84 @@ +/* + * 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 +{ + /// + /// The encryption settings for an S3 Metadata journal table or inventory table configuration. + /// + public partial class MetadataTableEncryptionConfiguration + { + private string _kmsKeyArn; + private TableSseAlgorithm _sseAlgorithm; + + /// + /// Gets and sets the property KmsKeyArn. + /// + /// If server-side encryption with Key Management Service (KMS) keys (SSE-KMS) is specified, + /// you must also specify the KMS key Amazon Resource Name (ARN). You must specify a customer-managed + /// KMS key that's located in the same Region as the general purpose bucket that corresponds + /// to the metadata table configuration. + /// + /// + public string KmsKeyArn + { + get { return this._kmsKeyArn; } + set { this._kmsKeyArn = value; } + } + + // Check to see if KmsKeyArn property is set + internal bool IsSetKmsKeyArn() + { + return !String.IsNullOrEmpty(this._kmsKeyArn); + } + + /// + /// Gets and sets the property SseAlgorithm. + /// + /// The encryption type specified for a metadata table. To specify server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS), use the aws:kms value. To + /// specify server-side encryption with Amazon S3 managed keys (SSE-S3), use the AES256 + /// value. + /// + /// + [AWSProperty(Required=true)] + public TableSseAlgorithm SseAlgorithm + { + get { return this._sseAlgorithm; } + set { this._sseAlgorithm = value; } + } + + // Check to see if SseAlgorithm property is set + internal bool IsSetSseAlgorithm() + { + return this._sseAlgorithm != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/RecordExpiration.cs b/sdk/src/Services/S3/Generated/Model/RecordExpiration.cs similarity index 95% rename from sdk/src/Services/S3/Custom/Model/RecordExpiration.cs rename to sdk/src/Services/S3/Generated/Model/RecordExpiration.cs index 11ebd34f3211..ea347e40f84d 100644 --- a/sdk/src/Services/S3/Custom/Model/RecordExpiration.cs +++ b/sdk/src/Services/S3/Generated/Model/RecordExpiration.cs @@ -30,7 +30,8 @@ namespace Amazon.S3.Model { /// - /// The journal table record expiration settings for a journal table in an S3 Metadata configuration. + /// The journal table record expiration settings for a journal table in an S3 Metadata + /// configuration. /// public partial class RecordExpiration { @@ -47,9 +48,9 @@ public partial class RecordExpiration /// 365. /// /// - public int Days + public int? Days { - get { return this._days.GetValueOrDefault(); } + get { return this._days; } set { this._days = value; } }