diff --git a/generator/ServiceClientGeneratorLib/ServiceModel.cs b/generator/ServiceClientGeneratorLib/ServiceModel.cs index a8aad008a0fd..cf2bee71a776 100644 --- a/generator/ServiceClientGeneratorLib/ServiceModel.cs +++ b/generator/ServiceClientGeneratorLib/ServiceModel.cs @@ -578,7 +578,12 @@ public List S3AllowListOperations new Operation(this, "DeleteBucketMetadataConfiguration", DocumentRoot[OperationsKey]["DeleteBucketMetadataConfiguration"]), new Operation(this, "ListObjects", DocumentRoot[OperationsKey]["ListObjects"]), new Operation(this,"UpdateBucketMetadataJournalTableConfiguration", DocumentRoot[OperationsKey]["UpdateBucketMetadataJournalTableConfiguration"]), - new Operation(this, "ListMultipartUploads", DocumentRoot[OperationsKey]["ListMultipartUploads"]) + new Operation(this, "ListMultipartUploads", DocumentRoot[OperationsKey]["ListMultipartUploads"]), + new Operation(this, "CompleteMultipartUpload", DocumentRoot[OperationsKey]["CompleteMultipartUpload"]), + new Operation(this, "DeleteObject", DocumentRoot[OperationsKey]["DeleteObject"]), + new Operation(this, "DeleteObjects", DocumentRoot[OperationsKey]["DeleteObjects"]), + new Operation(this, "DeleteObjectTagging", DocumentRoot[OperationsKey]["DeleteObjectTagging"]), + new Operation(this, "GetBucketLogging", DocumentRoot[OperationsKey]["GetBucketLogging"]) }; } 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 a580acd535bb..c99baf452d3a 100644 --- a/generator/ServiceModels/s3/s3.customizations.json +++ b/generator/ServiceModels/s3/s3.customizations.json @@ -1289,6 +1289,208 @@ "Uploads":{"emitPropertyName":"MultipartUploads"} + } + ] + }, + "RestoreObjectRequest":{ + "modify":[ + { + "Tier": {"emitPropertyName":"RetrievalTier"} + }, + { + "ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]} + }, + { + "GlacierJobParameters":{ + "emitPropertyName":"Tier" + } + }, + { + "Type":{"emitPropertyName":"RestoreRequestType"} + } + ] + }, + "RestoreRequest":{ + "modify":[ + { + "GlacierJobParameters":{ + "injectXmlMarshallCode":["TierCustomMarshall(xmlWriter, publicRequest);"] + } + }, + { + "Type":{"emitPropertyName":"RestoreRequestType"} + }, + { + "Tier": {"emitPropertyName":"RetrievalTier"} + } + ] + }, + "InputSerialization":{ + "modify":[ + { + "CompressionType":{ + "injectXmlPrivateMemberAssignment" :["private CompressionType _compressionType = CompressionType.None;"] + } + } + + ] + }, + "S3Location":{ + "modify":[ + { + "AccessControlList":{ + "injectXmlPrivateMemberAssignment":["private S3AccessControlList _accessControlList;"], + "injectXmlIsSet":["return this._accessControlList != null;"], + "injectXmlMarshallCode":["AccessControlListCustomMarshall(xmlWriter, publicRequest);"] + } + }, + { + "UserMetadata":{ + "injectXmlPrivateMemberAssignment":["private MetadataCollection _userMetadata;"], + "injectXmlIsSet":["return this._userMetadata != null;"], + "injectXmlMarshallCode":["UserMetadataCustomMarshall(xmlWriter, publicRequest);"] + } + } + ] + }, + "JSONInput":{ + "modify":[ + { + "Type":{"emitPropertyName":"JsonType"} + } + ] + }, + "CompleteMultipartUploadOutput":{ + "modify":[ + { + "ServerSideEncryption":{"emitPropertyName":"ServerSideEncryptionMethod"} + }, + { + "SSEKMSKeyId":{"emitPropertyName":"ServerSideEncryptionKeyManagementServiceKeyId"} + }, + { + "Expiration":{"injectXmlUnmarshallCode":["ExpirationCustomUnmarshall(context, response);"]} + } + ] + }, + "CompletedMultipartUpload":{ + "modify":[ + { + "Parts": {"emitPropertyName":"PartETags"} + } + ] + }, + "DeleteObjectRequest":{ + "modify":[ + { + "ExpectedBucketOwner":{"injectXmlIsSet": ["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]} + }, + { + "IfMatch" : {"injectXmlIsSet":["return !string.IsNullOrEmpty(this._ifMatch);"]} + }, + { + "MFA": {"emitPropertyName": "MfaCodes"} + }, + { + "MfaCodes":{ + "injectXmlIsSet": ["return CustomMfaCodesIsSet();"], + "injectXmlMarshallCode" : ["MfaCodesCustomMarshall(request, publicRequest);"] + } + } + ] + }, + "DeleteObjectOutput":{ + "modify":[ + { + "DeleteMarker":{"injectXmlUnmarshallCode": ["DeleteMarkerCustomUnmarshall(context, response);"]} + } + ] + }, + "DeleteObjectsRequest":{ + "modify":[ + { + "MFA":{"emitPropertyName" :"MfaCodes"} + }, + { + "MfaCodes":{ + "injectXmlIsSet": ["return CustomMfaCodesIsSet();"], + "injectXmlMarshallCode" : ["MfaCodesCustomMarshall(request, publicRequest);"] + } + }, + { + "ExpectedBucketOwner":{ + "injectXmlIsSet": ["return !String.IsNullOrEmpty(this._expectedBucketOwner);"] + } + } + ] + }, + "DeleteObjectsOutput":{ + "modify":[ + { + "Deleted":{"emitPropertyName":"DeletedObjects"} + }, + { + "Errors":{"emitPropertyName":"DeleteErrors"} + } + ] + }, + "Delete":{ + "modify":[ + { + "Objects":{ + "skipXmlIsSet": true + } + } + ] + }, + "KeyVersion" : { + "modify":[ + { + "ETag":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._eTag);"]} + } + ] + }, + "DeleteObjectTaggingRequest":{ + "modify":[ + { + "ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]} + }, + { + "VersionId":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._versionId);"]} + } + ] + }, + "DeleteObjectTaggingOutput":{ + "modify":[ + { + "VersionId":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._versionId);"]} + } + ] + }, + "GetBucketLoggingRequest":{ + "modify":[ + { + "ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]} + } + ] + }, + "GetBucketLoggingOutput":{ + "modify":[ + { + "LoggingEnabled": {"emitPropertyName":"BucketLoggingConfig"} + }, + { + "BucketLoggingConfig":{"injectXmlPropertyGetter" : ["get {return BucketLoggingConfigCustomGetter();}"]} + } + ] + }, + "S3BucketLoggingConfig":{ + "modify":[ + { + "TargetBucket":{"emitPropertyName":"TargetBucketName"} + }, + { + "TargetGrants":{"emitPropertyName":"Grants"} } ] } @@ -1434,6 +1636,36 @@ }, "Type" :{ "renameShape":"GranteeType" + }, + "Tier":{ + "renameShape":"GlacierJobTier" + }, + "Encryption":{ + "renameShape":"S3Encryption" + }, + "GlacierJobParameters":{ + "renameShape":"GlacierJobTier" + }, + "JSONType":{ + "renameShape":"JsonType" + }, + "CompletedPart":{ + "renameShape":"PartETag" + }, + "MFA":{ + "renameShape": "MfaCodes" + }, + "ObjectIdentifier":{ + "renameShape": "KeyVersion" + }, + "Error":{ + "renameShape": "DeleteError" + }, + "LoggingEnabled":{ + "renameShape":"S3BucketLoggingConfig" + }, + "TargetGrant":{ + "renameShape": "S3Grant" } }, "overrideTreatEnumsAsString":{ diff --git a/sdk/src/Services/S3/Custom/Model/GetBucketLoggingResponse.cs b/sdk/src/Services/S3/Custom/Model/GetBucketLoggingResponse.cs index 80d497014ff7..9563ae70343f 100644 --- a/sdk/src/Services/S3/Custom/Model/GetBucketLoggingResponse.cs +++ b/sdk/src/Services/S3/Custom/Model/GetBucketLoggingResponse.cs @@ -24,24 +24,15 @@ namespace Amazon.S3.Model /// /// Returns information about the GetBucketLogging response and response metadata. /// - public class GetBucketLoggingResponse : AmazonWebServiceResponse + public partial class GetBucketLoggingResponse : AmazonWebServiceResponse { - private S3BucketLoggingConfig bucketLoggingConfig; - - /// - /// Gets and sets the LoggingConfig property. - /// - public S3BucketLoggingConfig BucketLoggingConfig + S3BucketLoggingConfig BucketLoggingConfigCustomGetter() { - get + if (this._bucketLoggingConfig == null) { - if (this.bucketLoggingConfig == null) - { - this.bucketLoggingConfig = new S3BucketLoggingConfig(); - } - return this.bucketLoggingConfig; + this._bucketLoggingConfig = new S3BucketLoggingConfig(); } - set { this.bucketLoggingConfig = value; } + return this._bucketLoggingConfig; } } } diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketLoggingRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketLoggingRequestMarshaller.cs index db4380875c63..5d97e703e1d5 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketLoggingRequestMarshaller.cs +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketLoggingRequestMarshaller.cs @@ -24,49 +24,12 @@ namespace Amazon.S3.Model.Internal.MarshallTransformations /// /// Get Bucket Logging Request Marshaller /// - public class GetBucketLoggingRequestMarshaller : IMarshaller ,IMarshaller + public partial class GetBucketLoggingRequestMarshaller : IMarshaller ,IMarshaller { - public IRequest Marshall(Amazon.Runtime.AmazonWebServiceRequest input) - { - return this.Marshall((GetBucketLoggingRequest)input); - } - - public IRequest Marshall(GetBucketLoggingRequest getBucketLoggingRequest) + partial void PreMarshallCustomization(DefaultRequest defaultRequest, GetBucketLoggingRequest publicRequest) { - IRequest request = new DefaultRequest(getBucketLoggingRequest, "Amazon.S3"); - - request.Suppress404Exceptions = true; - request.HttpMethod = "GET"; - - if (getBucketLoggingRequest.IsSetExpectedBucketOwner()) - request.Headers.Add(S3Constants.AmzHeaderExpectedBucketOwner, S3Transforms.ToStringValue(getBucketLoggingRequest.ExpectedBucketOwner)); - - if (string.IsNullOrEmpty(getBucketLoggingRequest.BucketName)) - throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "GetBucketLoggingRequest.BucketName"); - - request.ResourcePath = "/"; - request.AddSubResource("logging"); - request.UseQueryString = true; - - return request; + defaultRequest.Suppress404Exceptions = true; } - - private static GetBucketLoggingRequestMarshaller _instance; - - /// - /// Singleton for marshaller - /// - public static GetBucketLoggingRequestMarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new GetBucketLoggingRequestMarshaller(); - } - return _instance; - } - } } } diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketLoggingResponseUnmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketLoggingResponseUnmarshaller.cs deleted file mode 100644 index 7995ecbe230a..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketLoggingResponseUnmarshaller.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 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 GetBucketLogging operation - /// - public class GetBucketLoggingResponseUnmarshaller : S3ReponseUnmarshaller - { - /// - /// Unmarshaller the response from the service to the response class. - /// - /// - /// - public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) - { - GetBucketLoggingResponse response = new GetBucketLoggingResponse(); - - while (context.Read()) - { - if (context.IsStartElement) - { - UnmarshallResult(context,response); - continue; - } - } - - - return response; - } - - private static void UnmarshallResult(XmlUnmarshallerContext context,GetBucketLoggingResponse response) - { - - int originalDepth = context.CurrentDepth; - int targetDepth = originalDepth + 1; - - if (context.IsStartOfDocument) - targetDepth += 2; - - while (context.Read()) - { - if (context.IsStartElement || context.IsAttribute) - { - if (context.TestExpression("LoggingEnabled", targetDepth)) - { - response.BucketLoggingConfig = LoggingEnabledUnmarshaller.Instance.Unmarshall(context); - - continue; - } - } - else if (context.IsEndElement && context.CurrentDepth < originalDepth) - { - return; - } - } - - - - return; - } - - private static GetBucketLoggingResponseUnmarshaller _instance; - - /// - /// Singleton for the unmarshaller - /// - public static GetBucketLoggingResponseUnmarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new GetBucketLoggingResponseUnmarshaller(); - } - return _instance; - } - } - - } -} - diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketLoggingRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketLoggingRequestMarshaller.cs index 263254eea83e..bf95794fb742 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketLoggingRequestMarshaller.cs +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketLoggingRequestMarshaller.cs @@ -67,7 +67,7 @@ public IRequest Marshall(PutBucketLoggingRequest putBucketLoggingRequest) if (bucketLoggingStatusBucketLoggingStatus != null) { var loggingEnabledLoggingEnabled = bucketLoggingStatusBucketLoggingStatus; - if (loggingEnabledLoggingEnabled != null && loggingEnabledLoggingEnabled.IsSetTargetBucket()) + if (loggingEnabledLoggingEnabled != null && loggingEnabledLoggingEnabled.IsSetTargetBucketName()) { xmlWriter.WriteStartElement("LoggingEnabled"); xmlWriter.WriteElementString("TargetBucket", S3Transforms.ToXmlStringValue(loggingEnabledLoggingEnabled.TargetBucketName)); diff --git a/sdk/src/Services/S3/Custom/Model/S3BucketLoggingConfig.cs b/sdk/src/Services/S3/Custom/Model/S3BucketLoggingConfig.cs index b005ab360484..f90fd8d8db4d 100644 --- a/sdk/src/Services/S3/Custom/Model/S3BucketLoggingConfig.cs +++ b/sdk/src/Services/S3/Custom/Model/S3BucketLoggingConfig.cs @@ -25,79 +25,8 @@ namespace Amazon.S3.Model /// keys for a bucket. For more information, see PUT /// Bucket logging in the Amazon S3 API Reference. /// - public class S3BucketLoggingConfig + public partial class S3BucketLoggingConfig { - private List targetGrants = AWSConfigs.InitializeCollections ? new List() : null; - - /// - /// Specifies the bucket where you want Amazon S3 to store server access logs. You can have your logs delivered to any bucket that you own, - /// including the same bucket that is being logged. You can also configure multiple buckets to deliver their logs to the same target bucket. In - /// this case you should choose a different TargetPrefix for each source bucket so that the delivered log files can be distinguished by key. - /// - public string TargetBucketName { get; set; } - - // Check to see if TargetBucket property is set - internal bool IsSetTargetBucket() - { - return this.TargetBucketName != null; - } - - /// - /// A collection of grants. - /// - /// - /// Buckets that use the bucket owner enforced setting for Object Ownership don't support - /// target grants. For more information, see Permissions - /// for server access log delivery in the Amazon S3 User Guide. - /// - /// - public List Grants - { - get { return this.targetGrants; } - set { this.targetGrants = value; } - } - - // Check to see if TargetGrants property is set - internal bool IsSetGrants() - { - return this.targetGrants != null && (this.targetGrants.Count > 0 || !AWSConfigs.InitializeCollections); - } - - private TargetObjectKeyFormat _targetObjectKeyFormat; - /// - /// Gets and sets the property TargetObjectKeyFormat. - /// - /// Amazon S3 key format for log objects. - /// - /// - public TargetObjectKeyFormat TargetObjectKeyFormat - { - get { return this._targetObjectKeyFormat; } - set { this._targetObjectKeyFormat = value; } - } - - // Check to see if TargetObjectKeyFormat property is set - internal bool IsSetTargetObjectKeyFormat() - { - return this._targetObjectKeyFormat != null; - } - - /// - /// Gets and sets the property TargetPrefix. - /// - /// A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets - /// in a single bucket, you can use a prefix to distinguish which log files came from - /// which bucket. - /// - /// - public string TargetPrefix { get; set; } - - // Check to see if TargetPrefix property is set - internal bool IsSetTargetPrefix() - { - return this.TargetPrefix != null; - } - /// /// Creates a S3Grant and adds it to the list of grants. /// diff --git a/sdk/src/Services/S3/Custom/Model/GetBucketLoggingRequest.cs b/sdk/src/Services/S3/Generated/Model/GetBucketLoggingRequest.cs similarity index 62% rename from sdk/src/Services/S3/Custom/Model/GetBucketLoggingRequest.cs rename to sdk/src/Services/S3/Generated/Model/GetBucketLoggingRequest.cs index 868ebb357b03..23b460d135ba 100644 --- a/sdk/src/Services/S3/Custom/Model/GetBucketLoggingRequest.cs +++ b/sdk/src/Services/S3/Generated/Model/GetBucketLoggingRequest.cs @@ -12,22 +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 { /// /// Container for the parameters to the GetBucketLogging operation. /// /// - /// This operation is not supported by directory buckets. + /// This operation is not supported for directory buckets. /// /// /// @@ -36,7 +42,7 @@ namespace Amazon.S3.Model /// /// /// - /// The following operations are related to GetBucketLogging: + /// The following operations are related to GetBucketLogging: /// ///
  • /// @@ -48,26 +54,36 @@ namespace Amazon.S3.Model /// PutBucketLogging /// /// - ///
+ /// + /// + /// 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 GetBucketLoggingRequest : AmazonWebServiceRequest { - private string bucketName; - private string expectedBucketOwner; + private string _bucketName; + private string _expectedBucketOwner; /// - /// The name of the bucket to query. + /// Gets and sets the property BucketName. + /// + /// The bucket name for which to get the logging information. + /// /// + [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 this.bucketName != null; + return this._bucketName != null; } /// @@ -75,24 +91,20 @@ internal bool IsSetBucketName() /// /// 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; } } - /// - /// Checks to see if ExpectedBucketOwner is set. - /// - /// true, if ExpectedBucketOwner property is set. + // Check to see if ExpectedBucketOwner property is set internal bool IsSetExpectedBucketOwner() { - return !String.IsNullOrEmpty(this.expectedBucketOwner); + return !String.IsNullOrEmpty(this._expectedBucketOwner); } } -} - +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/GetBucketLoggingResponse.cs b/sdk/src/Services/S3/Generated/Model/GetBucketLoggingResponse.cs new file mode 100644 index 000000000000..fc145d0cbf43 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/GetBucketLoggingResponse.cs @@ -0,0 +1,55 @@ +/* + * 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 GetBucketLogging operation. + /// + public partial class GetBucketLoggingResponse : AmazonWebServiceResponse + { + private S3BucketLoggingConfig _bucketLoggingConfig; + + /// + /// Gets and sets the property BucketLoggingConfig. + /// + public S3BucketLoggingConfig BucketLoggingConfig + { + get {return BucketLoggingConfigCustomGetter();} + set { this._bucketLoggingConfig = value; } + } + + // Check to see if BucketLoggingConfig property is set + internal bool IsSetBucketLoggingConfig() + { + return this._bucketLoggingConfig != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketLoggingRequestMarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketLoggingRequestMarshaller.cs new file mode 100644 index 000000000000..e514a265bbbc --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketLoggingRequestMarshaller.cs @@ -0,0 +1,95 @@ +/* + * 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 +{ + /// + /// GetBucketLogging Request Marshaller + /// + public partial class GetBucketLoggingRequestMarshaller : IMarshaller , IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((GetBucketLoggingRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(GetBucketLoggingRequest publicRequest) + { + var request = new DefaultRequest(publicRequest, "Amazon.S3"); + PreMarshallCustomization(request, publicRequest); + request.HttpMethod = "GET"; + request.AddSubResource("logging"); + + 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.", "GetBucketLoggingRequest.BucketName"); + request.ResourcePath = "/"; + + PostMarshallCustomization(request, publicRequest); + return request; + } + private static GetBucketLoggingRequestMarshaller _instance = new GetBucketLoggingRequestMarshaller(); + + internal static GetBucketLoggingRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static GetBucketLoggingRequestMarshaller Instance + { + get + { + return _instance; + } + } + + partial void PostMarshallCustomization(DefaultRequest defaultRequest, GetBucketLoggingRequest publicRequest); + partial void PreMarshallCustomization(DefaultRequest defaultRequest, GetBucketLoggingRequest publicRequest); + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketLoggingResponseUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketLoggingResponseUnmarshaller.cs new file mode 100644 index 000000000000..3a0d175f74f9 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketLoggingResponseUnmarshaller.cs @@ -0,0 +1,128 @@ +/* + * 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 GetBucketLogging operation + /// + public partial class GetBucketLoggingResponseUnmarshaller : S3ReponseUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) + { + GetBucketLoggingResponse response = new GetBucketLoggingResponse(); + UnmarshallResult(context,response); + + PostUnmarshallCustomization(context, response); + return response; + } + + private static void UnmarshallResult(XmlUnmarshallerContext context, GetBucketLoggingResponse response) + { + int originalDepth = context.CurrentDepth; + int targetDepth = originalDepth + 1; + if (context.IsStartOfDocument) + targetDepth += 1; + if (context.IsEmptyResponse) + { + return; + } + while (context.Read()) + { + if (context.IsStartElement || context.IsAttribute) + { + if (context.TestExpression("LoggingEnabled", targetDepth)) + { + var unmarshaller = S3BucketLoggingConfigUnmarshaller.Instance; + response.BucketLoggingConfig = unmarshaller.Unmarshall(context); + continue; + } + } + else if (context.IsEndElement && context.CurrentDepth < originalDepth) + { + return; + } + } + return; + } + + + /// + /// 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, GetBucketLoggingResponse response); + + private static GetBucketLoggingResponseUnmarshaller _instance = new GetBucketLoggingResponseUnmarshaller(); + + internal static GetBucketLoggingResponseUnmarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static GetBucketLoggingResponseUnmarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PartitionedPrefixUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PartitionedPrefixUnmarshaller.cs similarity index 75% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PartitionedPrefixUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PartitionedPrefixUnmarshaller.cs index 69c6483cb89e..c748aea004cf 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PartitionedPrefixUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PartitionedPrefixUnmarshaller.cs @@ -12,14 +12,31 @@ * 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 PartitionedPrefix Object /// - public class PartitionedPrefixUnmarshaller : IXmlUnmarshaller + public partial class PartitionedPrefixUnmarshaller : IXmlUnmarshaller { /// /// Unmarshaller the response from the service to the response class. @@ -45,6 +62,8 @@ public PartitionedPrefix Unmarshall(XmlUnmarshallerContext context) unmarshalledObject.PartitionDateSource = unmarshaller.Unmarshall(context); continue; } + + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { @@ -54,6 +73,8 @@ public PartitionedPrefix Unmarshall(XmlUnmarshallerContext context) return unmarshalledObject; } + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, PartitionedPrefix unmarshalledObject, int targetDepth); + private static PartitionedPrefixUnmarshaller _instance = new PartitionedPrefixUnmarshaller(); /// diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/S3BucketLoggingConfigUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/S3BucketLoggingConfigUnmarshaller.cs new file mode 100644 index 000000000000..5a9ebc7e25ba --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/S3BucketLoggingConfigUnmarshaller.cs @@ -0,0 +1,113 @@ +/* + * 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 S3BucketLoggingConfig Object + /// + public partial class S3BucketLoggingConfigUnmarshaller : IXmlUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public S3BucketLoggingConfig Unmarshall(XmlUnmarshallerContext context) + { + S3BucketLoggingConfig unmarshalledObject = new S3BucketLoggingConfig(); + int originalDepth = context.CurrentDepth; + int targetDepth = originalDepth + 1; + + if (context.IsStartOfDocument) + targetDepth += 2; + + while (context.Read()) + { + if (context.IsStartElement || context.IsAttribute) + { + if (context.TestExpression("TargetGrants/Grant", targetDepth)) + { + if (unmarshalledObject.Grants == null) + { + unmarshalledObject.Grants = new List(); + } + var unmarshaller = S3GrantUnmarshaller.Instance; + unmarshalledObject.Grants.Add(unmarshaller.Unmarshall(context)); + continue; + } + if (context.TestExpression("TargetBucket", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.TargetBucketName = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("TargetObjectKeyFormat", targetDepth)) + { + var unmarshaller = TargetObjectKeyFormatUnmarshaller.Instance; + unmarshalledObject.TargetObjectKeyFormat = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("TargetPrefix", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.TargetPrefix = unmarshaller.Unmarshall(context); + continue; + } + + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); + } + else if (context.IsEndElement && context.CurrentDepth < originalDepth) + { + return unmarshalledObject; + } + } + return unmarshalledObject; + } + + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, S3BucketLoggingConfig unmarshalledObject, int targetDepth); + + private static S3BucketLoggingConfigUnmarshaller _instance = new S3BucketLoggingConfigUnmarshaller(); + + /// + /// Gets the singleton. + /// + public static S3BucketLoggingConfigUnmarshaller Instance + { + get + { + return _instance; + } + } + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/SimplePrefixUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/SimplePrefixUnmarshaller.cs similarity index 72% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/SimplePrefixUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/SimplePrefixUnmarshaller.cs index df0773dcc7ca..30dd504a6817 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/SimplePrefixUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/SimplePrefixUnmarshaller.cs @@ -12,14 +12,31 @@ * 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 SimplePrefix Object /// - public class SimplePrefixUnmarshaller : IXmlUnmarshaller + public partial class SimplePrefixUnmarshaller : IXmlUnmarshaller { /// /// Unmarshaller the response from the service to the response class. @@ -39,6 +56,8 @@ public SimplePrefix Unmarshall(XmlUnmarshallerContext context) { if (context.IsStartElement || context.IsAttribute) { + + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { @@ -48,6 +67,8 @@ public SimplePrefix Unmarshall(XmlUnmarshallerContext context) return unmarshalledObject; } + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, SimplePrefix unmarshalledObject, int targetDepth); + private static SimplePrefixUnmarshaller _instance = new SimplePrefixUnmarshaller(); /// diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/TargetObjectKeyFormatUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/TargetObjectKeyFormatUnmarshaller.cs similarity index 77% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/TargetObjectKeyFormatUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/TargetObjectKeyFormatUnmarshaller.cs index 63c790a4017c..f27048f36865 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/TargetObjectKeyFormatUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/TargetObjectKeyFormatUnmarshaller.cs @@ -12,14 +12,31 @@ * 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 TargetObjectKeyFormat Object /// - public class TargetObjectKeyFormatUnmarshaller : IXmlUnmarshaller + public partial class TargetObjectKeyFormatUnmarshaller : IXmlUnmarshaller { /// /// Unmarshaller the response from the service to the response class. @@ -51,6 +68,8 @@ public TargetObjectKeyFormat Unmarshall(XmlUnmarshallerContext context) unmarshalledObject.SimplePrefix = unmarshaller.Unmarshall(context); continue; } + + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { @@ -60,6 +79,8 @@ public TargetObjectKeyFormat Unmarshall(XmlUnmarshallerContext context) return unmarshalledObject; } + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, TargetObjectKeyFormat unmarshalledObject, int targetDepth); + private static TargetObjectKeyFormatUnmarshaller _instance = new TargetObjectKeyFormatUnmarshaller(); /// diff --git a/sdk/src/Services/S3/Custom/Model/PartitionedPrefix.cs b/sdk/src/Services/S3/Generated/Model/PartitionedPrefix.cs similarity index 60% rename from sdk/src/Services/S3/Custom/Model/PartitionedPrefix.cs rename to sdk/src/Services/S3/Generated/Model/PartitionedPrefix.cs index 4e69860e7185..1316900ae384 100644 --- a/sdk/src/Services/S3/Custom/Model/PartitionedPrefix.cs +++ b/sdk/src/Services/S3/Generated/Model/PartitionedPrefix.cs @@ -13,6 +13,20 @@ * 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 { /// @@ -20,7 +34,7 @@ namespace Amazon.S3.Model /// /// /// - /// [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] + /// [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] /// /// /// @@ -35,14 +49,19 @@ public partial class PartitionedPrefix /// /// Gets and sets the property PartitionDateSource. /// - /// Specifies the partition date source for the partitioned prefix. - /// PartitionDateSource can be EventTime or - /// DeliveryTime. For DeliveryTime, - /// the time in the log file names corresponds to the delivery time for the - /// log files. For EventTime, The logs delivered - /// are for a specific day only. The year, month, and day correspond to the - /// day on which the event occurred, and the hour, minutes and seconds are - /// set to 00 in the key. + /// Specifies the partition date source for the partitioned prefix. PartitionDateSource + /// can be EventTime or DeliveryTime. + /// + /// + /// + /// For DeliveryTime, the time in the log file names corresponds to the delivery + /// time for the log files. + /// + /// + /// + /// For EventTime, The logs delivered are for a specific day only. The year, month, + /// and day correspond to the day on which the event occurred, and the hour, minutes and + /// seconds are set to 00 in the key. /// /// public PartitionDateSource PartitionDateSource diff --git a/sdk/src/Services/S3/Generated/Model/S3BucketLoggingConfig.cs b/sdk/src/Services/S3/Generated/Model/S3BucketLoggingConfig.cs new file mode 100644 index 000000000000..012373f4992b --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/S3BucketLoggingConfig.cs @@ -0,0 +1,136 @@ +/* + * 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 +{ + /// + /// Describes where logs are stored and the prefix that Amazon S3 assigns to all log object + /// keys for a bucket. For more information, see PUT + /// Bucket logging in the Amazon S3 API Reference. + /// + public partial class S3BucketLoggingConfig + { + private List _grants = AWSConfigs.InitializeCollections ? new List() : null; + private string _targetBucketName; + private TargetObjectKeyFormat _targetObjectKeyFormat; + private string _targetPrefix; + + /// + /// Gets and sets the property Grants. + /// + /// Container for granting information. + /// + /// + /// + /// Buckets that use the bucket owner enforced setting for Object Ownership don't support + /// target grants. For more information, see Permissions + /// for server access log delivery in the Amazon S3 User Guide. + /// + /// + /// 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. + /// + public List Grants + { + get { return this._grants; } + set { this._grants = value; } + } + + // Check to see if Grants property is set + internal bool IsSetGrants() + { + return this._grants != null && (this._grants.Count > 0 || !AWSConfigs.InitializeCollections); + } + + /// + /// Gets and sets the property TargetBucketName. + /// + /// Specifies the bucket where you want Amazon S3 to store server access logs. You can + /// have your logs delivered to any bucket that you own, including the same bucket that + /// is being logged. You can also configure multiple buckets to deliver their logs to + /// the same target bucket. In this case, you should choose a different TargetPrefix + /// for each source bucket so that the delivered log files can be distinguished by key. + /// + /// + [AWSProperty(Required=true)] + public string TargetBucketName + { + get { return this._targetBucketName; } + set { this._targetBucketName = value; } + } + + // Check to see if TargetBucketName property is set + internal bool IsSetTargetBucketName() + { + return this._targetBucketName != null; + } + + /// + /// Gets and sets the property TargetObjectKeyFormat. + /// + /// Amazon S3 key format for log objects. + /// + /// + public TargetObjectKeyFormat TargetObjectKeyFormat + { + get { return this._targetObjectKeyFormat; } + set { this._targetObjectKeyFormat = value; } + } + + // Check to see if TargetObjectKeyFormat property is set + internal bool IsSetTargetObjectKeyFormat() + { + return this._targetObjectKeyFormat != null; + } + + /// + /// Gets and sets the property TargetPrefix. + /// + /// A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets + /// in a single bucket, you can use a prefix to distinguish which log files came from + /// which bucket. + /// + /// + [AWSProperty(Required=true)] + public string TargetPrefix + { + get { return this._targetPrefix; } + set { this._targetPrefix = value; } + } + + // Check to see if TargetPrefix property is set + internal bool IsSetTargetPrefix() + { + return this._targetPrefix != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/SimplePrefix.cs b/sdk/src/Services/S3/Generated/Model/SimplePrefix.cs new file mode 100644 index 000000000000..4f511781082a --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/SimplePrefix.cs @@ -0,0 +1,44 @@ +/* + * 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 +{ + /// + /// To use simple format for S3 keys for log objects, set SimplePrefix to an empty object. + /// + /// + /// + /// [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] + /// + /// + public partial class SimplePrefix + { + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/TargetObjectKeyFormat.cs b/sdk/src/Services/S3/Generated/Model/TargetObjectKeyFormat.cs similarity index 85% rename from sdk/src/Services/S3/Custom/Model/TargetObjectKeyFormat.cs rename to sdk/src/Services/S3/Generated/Model/TargetObjectKeyFormat.cs index d72b23c2697f..99ae1e6be281 100644 --- a/sdk/src/Services/S3/Custom/Model/TargetObjectKeyFormat.cs +++ b/sdk/src/Services/S3/Generated/Model/TargetObjectKeyFormat.cs @@ -13,6 +13,20 @@ * 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 { ///