diff --git a/generator/ServiceClientGeneratorLib/ServiceModel.cs b/generator/ServiceClientGeneratorLib/ServiceModel.cs index 1a060ed21fa4..ff65cd209a37 100644 --- a/generator/ServiceClientGeneratorLib/ServiceModel.cs +++ b/generator/ServiceClientGeneratorLib/ServiceModel.cs @@ -576,7 +576,8 @@ public List S3AllowListOperations new Operation(this, "CreateBucketMetadataConfiguration",DocumentRoot[OperationsKey]["CreateBucketMetadataConfiguration"]), new Operation(this, "GetBucketMetadataConfiguration", DocumentRoot[OperationsKey]["GetBucketMetadataConfiguration"]), new Operation(this, "DeleteBucketMetadataConfiguration", DocumentRoot[OperationsKey]["DeleteBucketMetadataConfiguration"]), - new Operation(this, "ListObjects", DocumentRoot[OperationsKey]["ListObjects"]) + new Operation(this, "ListObjects", DocumentRoot[OperationsKey]["ListObjects"]), + new Operation(this,"UpdateBucketMetadataJournalTableConfiguration", DocumentRoot[OperationsKey]["UpdateBucketMetadataJournalTableConfiguration"]) }; } 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 673798271d6f..3a725c9a243f 100644 --- a/generator/ServiceModels/s3/s3.customizations.json +++ b/generator/ServiceModels/s3/s3.customizations.json @@ -1255,6 +1255,17 @@ "EncodingType":{"emitPropertyName":"Encoding"} } ] + }, + "UpdateBucketMetadataJournalTableConfigurationRequest":{ + "modify":[ + { + "ContentMD5":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._contentMD5);"]} + }, + { + "ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]} + } + + ] } }, diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/UpdateBucketMetadataJournalTableConfigurationRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/UpdateBucketMetadataJournalTableConfigurationRequestMarshaller.cs deleted file mode 100644 index 2963826dcb86..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/UpdateBucketMetadataJournalTableConfigurationRequestMarshaller.cs +++ /dev/null @@ -1,128 +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; -using Amazon.Runtime.Internal.Transform; -using Amazon.Runtime.Internal.Util; -using Amazon.S3.Util; -using Amazon.Util; -using System.Text; -using System.Xml; - -#pragma warning disable 1591 - -namespace Amazon.S3.Model.Internal.MarshallTransformations -{ - public class UpdateBucketMetadataJournalTableConfigurationRequestMarshaller : IMarshaller, IMarshaller - { - public IRequest Marshall(Amazon.Runtime.AmazonWebServiceRequest input) - { - return this.Marshall((UpdateBucketMetadataJournalTableConfigurationRequest)input); - } - - public IRequest Marshall(UpdateBucketMetadataJournalTableConfigurationRequest updateBucketMetadataJournalTableConfigurationRequest) - { - IRequest request = new DefaultRequest(updateBucketMetadataJournalTableConfigurationRequest, "Amazon.S3"); - - request.HttpMethod = "PUT"; - - if (updateBucketMetadataJournalTableConfigurationRequest.IsSetChecksumAlgorithm()) - request.Headers.Add(S3Constants.AmzHeaderSdkChecksumAlgorithm, S3Transforms.ToStringValue(updateBucketMetadataJournalTableConfigurationRequest.ChecksumAlgorithm)); - - if (updateBucketMetadataJournalTableConfigurationRequest.IsSetExpectedBucketOwner()) - request.Headers.Add(S3Constants.AmzHeaderExpectedBucketOwner, S3Transforms.ToStringValue(updateBucketMetadataJournalTableConfigurationRequest.ExpectedBucketOwner)); - - if (updateBucketMetadataJournalTableConfigurationRequest.IsSetContentMD5()) - request.Headers.Add(HeaderKeys.ContentMD5Header, S3Transforms.ToStringValue(updateBucketMetadataJournalTableConfigurationRequest.ContentMD5)); - - if (string.IsNullOrEmpty(updateBucketMetadataJournalTableConfigurationRequest.BucketName)) - throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "UpdateBucketMetadataJournalTableConfigurationRequest.BucketName"); - - request.ResourcePath = "/"; - - request.AddSubResource("metadataJournalTable"); - - var stringWriter = new XMLEncodedStringWriter(System.Globalization.CultureInfo.InvariantCulture); - using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize })) - { - var journalTableConfiguration = updateBucketMetadataJournalTableConfigurationRequest.JournalTableConfiguration; - if (journalTableConfiguration != null) - { - xmlWriter.WriteStartElement("JournalTableConfiguration", S3Constants.S3RequestXmlNamespace); - - if (journalTableConfiguration.IsSetConfigurationState()) - { - xmlWriter.WriteElementString("ConfigurationState", S3Transforms.ToXmlStringValue(journalTableConfiguration.ConfigurationState)); - } - - if (journalTableConfiguration.IsSetEncryptionConfiguration()) - { - xmlWriter.WriteStartElement("EncryptionConfiguration"); - if (journalTableConfiguration.EncryptionConfiguration.IsSetKmsKeyArn()) - { - xmlWriter.WriteElementString("KmsKeyArn", journalTableConfiguration.EncryptionConfiguration.KmsKeyArn); - } - if (journalTableConfiguration.EncryptionConfiguration.IsSetSseAlgorithm()) - { - xmlWriter.WriteElementString("SseAlgorithm", journalTableConfiguration.EncryptionConfiguration.SseAlgorithm); - } - xmlWriter.WriteEndElement(); - } - - xmlWriter.WriteEndElement(); - } - } - - try - { - var content = stringWriter.ToString(); - request.Content = Encoding.UTF8.GetBytes(content); - request.Headers[HeaderKeys.ContentTypeHeader] = "application/xml"; - - ChecksumUtils.SetChecksumData( - request, - updateBucketMetadataJournalTableConfigurationRequest.ChecksumAlgorithm, - fallbackToMD5: false, - isRequestChecksumRequired: true, - headerName: "x-amz-sdk-checksum-algorithm" - ); - } - catch (EncoderFallbackException e) - { - throw new AmazonServiceException("Unable to marshall request to XML", e); - } - - return request; - } - - private static UpdateBucketMetadataJournalTableConfigurationRequestMarshaller _instance; - - /// - /// Singleton for marshaller - /// - public static UpdateBucketMetadataJournalTableConfigurationRequestMarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new UpdateBucketMetadataJournalTableConfigurationRequestMarshaller(); - } - return _instance; - } - } - } -} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller.cs deleted file mode 100644 index e11d03cb75ab..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller.cs +++ /dev/null @@ -1,64 +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 Amazon.Runtime; -using Amazon.Runtime.Internal.Transform; - -#pragma warning disable 1591 - -namespace Amazon.S3.Model.Internal.MarshallTransformations -{ - public class UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller : S3ReponseUnmarshaller - { - private static UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller _instance; - - /// - /// Singleton for the unmarshaller - /// - public static UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller(); - } - return _instance; - } - } - - public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) - { - UpdateBucketMetadataJournalTableConfigurationResponse response = new UpdateBucketMetadataJournalTableConfigurationResponse(); - - return response; - } - - public override AmazonServiceException UnmarshallException(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) - { - var errorResponse = S3ErrorResponseUnmarshaller.Instance.Unmarshall(context); - errorResponse.InnerException = innerException; - errorResponse.StatusCode = statusCode; - - var errorCode = errorResponse.Code; - if (errorCode != null && errorCode.Equals("NoSuchBucket")) - { - return new NoSuchBucketException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); - } - return new AmazonS3Exception(errorResponse.Message, innerException, errorResponse.Type, errorCode, errorResponse.RequestId, statusCode); - } - } -} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/JournalTableConfigurationUpdates.cs b/sdk/src/Services/S3/Custom/Model/JournalTableConfigurationUpdates.cs deleted file mode 100644 index 2246954fa4b1..000000000000 --- a/sdk/src/Services/S3/Custom/Model/JournalTableConfigurationUpdates.cs +++ /dev/null @@ -1,59 +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; - -namespace Amazon.S3.Model -{ - /// - /// The journal table configuration updates. - /// - public partial class JournalTableConfigurationUpdates - { - private JournalConfigurationState configurationState; - private MetadataTableEncryptionConfiguration encryptionConfiguration; - - /// - /// - /// The state of the journal table configuration. - /// - /// - public JournalConfigurationState ConfigurationState - { - get { return this.configurationState; } - set { this.configurationState = value; } - } - - internal bool IsSetConfigurationState() - { - return this.configurationState != null; - } - - /// - /// - /// The encryption configuration for the journal table. - /// - /// - public MetadataTableEncryptionConfiguration EncryptionConfiguration - { - get { return this.encryptionConfiguration; } - set { this.encryptionConfiguration = value; } - } - - internal bool IsSetEncryptionConfiguration() - { - return this.encryptionConfiguration != null; - } - } -} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/UpdateBucketMetadataJournalTableConfigurationRequest.cs b/sdk/src/Services/S3/Custom/Model/UpdateBucketMetadataJournalTableConfigurationRequest.cs deleted file mode 100644 index 1322f11292b5..000000000000 --- a/sdk/src/Services/S3/Custom/Model/UpdateBucketMetadataJournalTableConfigurationRequest.cs +++ /dev/null @@ -1,114 +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 UpdateBucketMetadataJournalTableConfiguration operation. - /// Updates the journal table configuration for a general purpose bucket. - /// - public partial class UpdateBucketMetadataJournalTableConfigurationRequest : AmazonWebServiceRequest - { - private string bucketName; - private ChecksumAlgorithm checksumAlgorithm; - private string contentMD5; - private JournalTableConfigurationUpdates journalTableConfiguration; - private string expectedBucketOwner; - - /// - /// - /// The general purpose bucket that you want to update the journal table configuration for. - /// - /// - public string BucketName - { - get { return this.bucketName; } - set { this.bucketName = value; } - } - - internal bool IsSetBucketName() - { - return !String.IsNullOrEmpty(bucketName); - } - - /// - /// - /// The checksum algorithm to use with your journal table configuration update. - /// - /// - public ChecksumAlgorithm ChecksumAlgorithm - { - get { return this.checksumAlgorithm; } - set { this.checksumAlgorithm = value; } - } - - internal bool IsSetChecksumAlgorithm() - { - return checksumAlgorithm != null; - } - - /// - /// - /// The Content-MD5 header for the journal table configuration update. - /// - /// - public string ContentMD5 - { - get { return this.contentMD5; } - set { this.contentMD5 = value; } - } - - internal bool IsSetContentMD5() - { - return !String.IsNullOrEmpty(this.contentMD5); - } - - /// - /// - /// The journal table configuration updates. - /// - /// - public JournalTableConfigurationUpdates JournalTableConfiguration - { - get { return this.journalTableConfiguration; } - set { this.journalTableConfiguration = value; } - } - - internal bool IsSetJournalTableConfiguration() - { - return this.journalTableConfiguration != null; - } - - /// - /// - /// 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; } - } - - internal bool IsSetExpectedBucketOwner() - { - return !String.IsNullOrEmpty(this.expectedBucketOwner); - } - } -} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/UpdateBucketMetadataJournalTableConfigurationRequestMarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/UpdateBucketMetadataJournalTableConfigurationRequestMarshaller.cs new file mode 100644 index 000000000000..8aab03e3aecf --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/UpdateBucketMetadataJournalTableConfigurationRequestMarshaller.cs @@ -0,0 +1,141 @@ +/* + * 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 +{ + /// + /// UpdateBucketMetadataJournalTableConfiguration Request Marshaller + /// + public partial class UpdateBucketMetadataJournalTableConfigurationRequestMarshaller : IMarshaller , IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((UpdateBucketMetadataJournalTableConfigurationRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(UpdateBucketMetadataJournalTableConfigurationRequest publicRequest) + { + var request = new DefaultRequest(publicRequest, "Amazon.S3"); + PreMarshallCustomization(request, publicRequest); + request.HttpMethod = "PUT"; + request.AddSubResource("metadataJournalTable"); + + 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.", "UpdateBucketMetadataJournalTableConfigurationRequest.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 })) + { + if (publicRequest.IsSetJournalTableConfiguration()) + { + xmlWriter.WriteStartElement("JournalTableConfiguration", "http://s3.amazonaws.com/doc/2006-03-01/"); + if (publicRequest.JournalTableConfiguration.RecordExpiration != null) + { + xmlWriter.WriteStartElement("RecordExpiration"); + if(publicRequest.JournalTableConfiguration.RecordExpiration.IsSetDays()) + xmlWriter.WriteElementString("Days", StringUtils.FromInt(publicRequest.JournalTableConfiguration.RecordExpiration.Days.Value)); + if(publicRequest.JournalTableConfiguration.RecordExpiration.IsSetExpiration()) + xmlWriter.WriteElementString("Expiration", StringUtils.FromString(publicRequest.JournalTableConfiguration.RecordExpiration.Expiration)); + 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 UpdateBucketMetadataJournalTableConfigurationRequestMarshaller _instance = new UpdateBucketMetadataJournalTableConfigurationRequestMarshaller(); + + internal static UpdateBucketMetadataJournalTableConfigurationRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static UpdateBucketMetadataJournalTableConfigurationRequestMarshaller Instance + { + get + { + return _instance; + } + } + + partial void PostMarshallCustomization(DefaultRequest defaultRequest, UpdateBucketMetadataJournalTableConfigurationRequest publicRequest); + partial void PreMarshallCustomization(DefaultRequest defaultRequest, UpdateBucketMetadataJournalTableConfigurationRequest publicRequest); + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller.cs new file mode 100644 index 000000000000..9cdcebd8724c --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller.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 UpdateBucketMetadataJournalTableConfiguration operation + /// + public partial class UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller : S3ReponseUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) + { + UpdateBucketMetadataJournalTableConfigurationResponse response = new UpdateBucketMetadataJournalTableConfigurationResponse(); + + 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, UpdateBucketMetadataJournalTableConfigurationResponse response); + + private static UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller _instance = new UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller(); + + internal static UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static UpdateBucketMetadataJournalTableConfigurationResponseUnmarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/JournalTableConfigurationUpdates.cs b/sdk/src/Services/S3/Generated/Model/JournalTableConfigurationUpdates.cs new file mode 100644 index 000000000000..7e25b34c8149 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/JournalTableConfigurationUpdates.cs @@ -0,0 +1,59 @@ +/* + * 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 specified updates to the S3 Metadata journal table configuration. + /// + public partial class JournalTableConfigurationUpdates + { + private RecordExpiration _recordExpiration; + + /// + /// Gets and sets the property RecordExpiration. + /// + /// The journal table record expiration settings for the journal table. + /// + /// + [AWSProperty(Required=true)] + public RecordExpiration RecordExpiration + { + get { return this._recordExpiration; } + set { this._recordExpiration = value; } + } + + // Check to see if RecordExpiration property is set + internal bool IsSetRecordExpiration() + { + return this._recordExpiration != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/UpdateBucketMetadataJournalTableConfigurationRequest.cs b/sdk/src/Services/S3/Generated/Model/UpdateBucketMetadataJournalTableConfigurationRequest.cs new file mode 100644 index 000000000000..d95379e2a42c --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/UpdateBucketMetadataJournalTableConfigurationRequest.cs @@ -0,0 +1,181 @@ +/* + * 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 UpdateBucketMetadataJournalTableConfiguration operation. + /// Enables or disables journal table record expiration for an S3 Metadata configuration + /// on 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 s3:UpdateBucketMetadataJournalTableConfiguration + /// permission. For more information, see Setting + /// up permissions for configuring metadata tables in the Amazon S3 User Guide. + /// + /// + ///
+ /// + /// The following operations are related to UpdateBucketMetadataJournalTableConfiguration: + /// + /// + /// + /// 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 UpdateBucketMetadataJournalTableConfigurationRequest : AmazonWebServiceRequest + { + private string _bucketName; + private ChecksumAlgorithm _checksumAlgorithm; + private string _contentMD5; + private string _expectedBucketOwner; + private JournalTableConfigurationUpdates _journalTableConfiguration; + + /// + /// Gets and sets the property BucketName. + /// + /// The general purpose bucket that corresponds to the metadata configuration that you + /// want to enable or disable journal table record expiration 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 this._bucketName != null; + } + + /// + /// Gets and sets the property ChecksumAlgorithm. + /// + /// The checksum algorithm to use with your journal table 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 journal table 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 the metadata + /// table configuration that you want to enable or disable journal table record expiration + /// for. + /// + /// + 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 JournalTableConfiguration. + /// + /// The contents of your journal table configuration. + /// + /// + [AWSProperty(Required=true)] + public JournalTableConfigurationUpdates JournalTableConfiguration + { + get { return this._journalTableConfiguration; } + set { this._journalTableConfiguration = value; } + } + + // Check to see if JournalTableConfiguration property is set + internal bool IsSetJournalTableConfiguration() + { + return this._journalTableConfiguration != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/UpdateBucketMetadataJournalTableConfigurationResponse.cs b/sdk/src/Services/S3/Generated/Model/UpdateBucketMetadataJournalTableConfigurationResponse.cs similarity index 69% rename from sdk/src/Services/S3/Custom/Model/UpdateBucketMetadataJournalTableConfigurationResponse.cs rename to sdk/src/Services/S3/Generated/Model/UpdateBucketMetadataJournalTableConfigurationResponse.cs index 90d6387bc10e..ecb12a6a61ac 100644 --- a/sdk/src/Services/S3/Custom/Model/UpdateBucketMetadataJournalTableConfigurationResponse.cs +++ b/sdk/src/Services/S3/Generated/Model/UpdateBucketMetadataJournalTableConfigurationResponse.cs @@ -12,15 +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 { /// - /// This is the response returned by the UpdateBucketMetadataJournalTableConfiguration operation. + /// This is the response object from the UpdateBucketMetadataJournalTableConfiguration operation. /// public partial class UpdateBucketMetadataJournalTableConfigurationResponse : AmazonWebServiceResponse { + } } \ No newline at end of file