From 4e94dd4255abc1c202f89c0db2822a99c10dfb14 Mon Sep 17 00:00:00 2001 From: Peter Song Date: Thu, 6 Nov 2025 22:51:32 -0800 Subject: [PATCH] Generate ListBucketAnalyticsConfiguration stack-info: PR: https://github.com/aws/aws-sdk-net/pull/4118, branch: peterrsongg/petesong/phase-3-pr-2/4 --- .../ServiceClientGeneratorLib/ServiceModel.cs | 2 +- ...nalyticsConfigurationsRequestMarshaller.cs | 75 ----------- ...stBucketAnalyticsConfigurationsResponse.cs | 99 -------------- ...nalyticsConfigurationsRequestMarshaller.cs | 99 ++++++++++++++ ...yticsConfigurationsResponseUnmarshaller.cs | 118 ++++++++++------- ...istBucketAnalyticsConfigurationsRequest.cs | 83 +++++++----- ...stBucketAnalyticsConfigurationsResponse.cs | 125 ++++++++++++++++++ 7 files changed, 348 insertions(+), 253 deletions(-) delete mode 100644 sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsRequestMarshaller.cs delete mode 100644 sdk/src/Services/S3/Custom/Model/ListBucketAnalyticsConfigurationsResponse.cs create mode 100644 sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsRequestMarshaller.cs rename sdk/src/Services/S3/{Custom => Generated}/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsResponseUnmarshaller.cs (54%) rename sdk/src/Services/S3/{Custom => Generated}/Model/ListBucketAnalyticsConfigurationsRequest.cs (61%) create mode 100644 sdk/src/Services/S3/Generated/Model/ListBucketAnalyticsConfigurationsResponse.cs diff --git a/generator/ServiceClientGeneratorLib/ServiceModel.cs b/generator/ServiceClientGeneratorLib/ServiceModel.cs index cf47d93f81d1..07b502aff69a 100644 --- a/generator/ServiceClientGeneratorLib/ServiceModel.cs +++ b/generator/ServiceClientGeneratorLib/ServiceModel.cs @@ -555,7 +555,7 @@ public List S3AllowListOperations new Operation(this, "GetBucketMetricsConfiguration", DocumentRoot[OperationsKey]["GetBucketMetricsConfiguration"]), //new Operation(this, "GetBucketVersioning", DocumentRoot[OperationsKey]["GetBucketVersioning"]), //new Operation(this, "GetBucketWebsite", DocumentRoot[OperationsKey]["GetBucketWebsite"]), - //new Operation(this, "ListBucketAnalyticsConfigurations", DocumentRoot[OperationsKey]["ListBucketAnalyticsConfigurations"]), + new Operation(this, "ListBucketAnalyticsConfigurations", DocumentRoot[OperationsKey]["ListBucketAnalyticsConfigurations"]), //new Operation(this, "ListBucketIntelligentTieringConfigurations", DocumentRoot[OperationsKey]["ListBucketIntelligentTieringConfigurations"]), //new Operation(this, "ListBucketInventoryConfigurations", DocumentRoot[OperationsKey]["ListBucketInventoryConfigurations"]), new Operation(this, "ListBucketMetricsConfigurations", DocumentRoot[OperationsKey]["ListBucketMetricsConfigurations"]), diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsRequestMarshaller.cs deleted file mode 100644 index ef59268a9b47..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsRequestMarshaller.cs +++ /dev/null @@ -1,75 +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.S3.Util; - -#pragma warning disable 1591 - -namespace Amazon.S3.Model.Internal.MarshallTransformations -{ - /// - /// List AnalyticsConfiguration Request Marshaller - /// - public class ListBucketAnalyticsConfigurationsRequestMarshaller : IMarshaller, IMarshaller - { - public IRequest Marshall(Amazon.Runtime.AmazonWebServiceRequest input) - { - return this.Marshall((ListBucketAnalyticsConfigurationsRequest)input); - } - - public IRequest Marshall(ListBucketAnalyticsConfigurationsRequest listBucketAnalyticsConfigurationsRequest) - { - IRequest request = new DefaultRequest(listBucketAnalyticsConfigurationsRequest, "AmazonS3"); - - request.HttpMethod = "GET"; - - if (listBucketAnalyticsConfigurationsRequest.IsSetExpectedBucketOwner()) - request.Headers.Add(S3Constants.AmzHeaderExpectedBucketOwner, S3Transforms.ToStringValue(listBucketAnalyticsConfigurationsRequest.ExpectedBucketOwner)); - - if (string.IsNullOrEmpty(listBucketAnalyticsConfigurationsRequest.BucketName)) - throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "ListBucketAnalyticsConfigurationsRequest.BucketName"); - - request.ResourcePath = "/"; - request.AddSubResource("analytics"); - if (listBucketAnalyticsConfigurationsRequest.IsSetContinuationToken()) - { - request.AddSubResource("continuation-token", listBucketAnalyticsConfigurationsRequest.ContinuationToken.ToString()); - } - request.UseQueryString = true; - - return request; - } - - private static ListBucketAnalyticsConfigurationsRequestMarshaller _instance; - - /// - /// Singleton for marshaller - /// - public static ListBucketAnalyticsConfigurationsRequestMarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new ListBucketAnalyticsConfigurationsRequestMarshaller(); - } - return _instance; - } - } - } -} diff --git a/sdk/src/Services/S3/Custom/Model/ListBucketAnalyticsConfigurationsResponse.cs b/sdk/src/Services/S3/Custom/Model/ListBucketAnalyticsConfigurationsResponse.cs deleted file mode 100644 index a5e19c635ebe..000000000000 --- a/sdk/src/Services/S3/Custom/Model/ListBucketAnalyticsConfigurationsResponse.cs +++ /dev/null @@ -1,99 +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 Amazon.Runtime; - -namespace Amazon.S3.Model -{ - /// - /// Returns information about the ListBucketAnalyticsConfigurationsResponse response and response metadata. - /// - public partial class ListBucketAnalyticsConfigurationsResponse : AmazonWebServiceResponse - { - private string token; - private List analyticsConfigurationList = AWSConfigs.InitializeCollections ? new List() : null; - private bool? isTruncated; - private string nextToken; - - /// - /// The ContinuationToken that represents where this request began. - /// - public string ContinuationToken - { - get { return this.token; } - set { this.token = value; } - } - - // Check to see if ContinuationToken property is set - internal bool IsSetToken() - { - return !(string.IsNullOrEmpty(this.token)); - } - - /// - /// The list of analytics configurations for a bucket. - /// - public List AnalyticsConfigurationList - { - get { return this.analyticsConfigurationList; } - set { this.analyticsConfigurationList = value; } - } - - /// - /// Check to see if AnalyticsConfigurationList property is set - /// - /// - public bool IsSetAnalyticsConfigurationList() - { - return this.analyticsConfigurationList != null && (this.analyticsConfigurationList.Count > 0 || !AWSConfigs.InitializeCollections); - } - - /// - /// Indicates whether the returned list of analytics configurations is complete. - /// A value of true indicates that the list is not complete and the NextContinuationToken will be provided for a subsequent request. - /// - public bool? IsTruncated - { - get { return this.isTruncated; } - set { this.isTruncated = value; } - } - - // Check to see if IsTruncated property is set - internal bool IsSetIsTruncated() - { - return this.isTruncated.HasValue; - } - - /// - /// NextContinuationToken is sent when isTruncated is true, which indicates that there are more analytics configurations to list. - /// The next request must include this NextContinuationToken. The token is obfuscated and is not a usable value. - /// - public string NextContinuationToken - { - get { return this.nextToken; } - set { this.nextToken = value; } - } - - // Check to see if NextContinuationToken property is set - internal bool IsSetNextToken() - { - return !(string.IsNullOrEmpty(this.nextToken)); - } - } -} diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsRequestMarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsRequestMarshaller.cs new file mode 100644 index 000000000000..e8680e0661f0 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsRequestMarshaller.cs @@ -0,0 +1,99 @@ +/* + * 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 +{ + /// + /// ListBucketAnalyticsConfigurations Request Marshaller + /// + public partial class ListBucketAnalyticsConfigurationsRequestMarshaller : IMarshaller , IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((ListBucketAnalyticsConfigurationsRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(ListBucketAnalyticsConfigurationsRequest publicRequest) + { + var request = new DefaultRequest(publicRequest, "Amazon.S3"); + PreMarshallCustomization(request, publicRequest); + request.HttpMethod = "GET"; + request.AddSubResource("analytics"); + + 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.", "ListBucketAnalyticsConfigurationsRequest.BucketName"); + + if (publicRequest.IsSetContinuationToken()) + request.Parameters.Add("continuation-token", StringUtils.FromString(publicRequest.ContinuationToken)); + request.ResourcePath = "/"; + + PostMarshallCustomization(request, publicRequest); + request.UseQueryString = true; + return request; + } + private static ListBucketAnalyticsConfigurationsRequestMarshaller _instance = new ListBucketAnalyticsConfigurationsRequestMarshaller(); + + internal static ListBucketAnalyticsConfigurationsRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static ListBucketAnalyticsConfigurationsRequestMarshaller Instance + { + get + { + return _instance; + } + } + + partial void PostMarshallCustomization(DefaultRequest defaultRequest, ListBucketAnalyticsConfigurationsRequest publicRequest); + partial void PreMarshallCustomization(DefaultRequest defaultRequest, ListBucketAnalyticsConfigurationsRequest publicRequest); + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsResponseUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsResponseUnmarshaller.cs similarity index 54% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsResponseUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsResponseUnmarshaller.cs index 687e548dcb04..84a6a5d1689e 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsResponseUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/ListBucketAnalyticsConfigurationsResponseUnmarshaller.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). @@ -12,84 +12,86 @@ * 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.Net; 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 1591 - +#pragma warning disable CS0612,CS0618 namespace Amazon.S3.Model.Internal.MarshallTransformations { /// - /// Response Unmarshaller for ListAnalyticsConfiguration operation - /// - public class ListBucketAnalyticsConfigurationsResponseUnmarshaller : S3ReponseUnmarshaller + /// Response Unmarshaller for ListBucketAnalyticsConfigurations operation + /// + public partial class ListBucketAnalyticsConfigurationsResponseUnmarshaller : S3ReponseUnmarshaller { /// /// Unmarshaller the response from the service to the response class. - /// + /// /// /// public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { ListBucketAnalyticsConfigurationsResponse response = new ListBucketAnalyticsConfigurationsResponse(); - - while (context.Read()) - { - if (context.IsStartElement) - { - UnmarshallResult(context, response); - continue; - } - } - - + UnmarshallResult(context,response); + + PostUnmarshallCustomization(context, response); return response; - } + } private static void UnmarshallResult(XmlUnmarshallerContext context, ListBucketAnalyticsConfigurationsResponse response) { - int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; - - if (context.IsStartOfDocument) - targetDepth += 2; - + if (context.IsStartOfDocument) + targetDepth += 1; + if (context.IsEmptyResponse) + { + return; + } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { - if (context.TestExpression("ContinuationToken", targetDepth)) - { - response.ContinuationToken = StringUnmarshaller.Instance.Unmarshall(context); - - continue; - } - if (context.TestExpression("AnalyticsConfiguration", targetDepth)) { if (response.AnalyticsConfigurationList == null) { response.AnalyticsConfigurationList = new List(); } - response.AnalyticsConfigurationList.Add(AnalyticsConfigurationUnmarshaller.Instance.Unmarshall(context)); + var unmarshaller = AnalyticsConfigurationUnmarshaller.Instance; + response.AnalyticsConfigurationList.Add(unmarshaller.Unmarshall(context)); + continue; + } + if (context.TestExpression("ContinuationToken", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + response.ContinuationToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IsTruncated", targetDepth)) { - response.IsTruncated = BoolUnmarshaller.Instance.Unmarshall(context); - + var unmarshaller = NullableBoolUnmarshaller.Instance; + response.IsTruncated = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextContinuationToken", targetDepth)) { - response.NextContinuationToken = StringUnmarshaller.Instance.Unmarshall(context); - + var unmarshaller = StringUnmarshaller.Instance; + response.NextContinuationToken = unmarshaller.Unmarshall(context); continue; } } @@ -98,27 +100,51 @@ private static void UnmarshallResult(XmlUnmarshallerContext context, ListBucketA 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(); - return; + using (var streamCopy = new MemoryStream(responseBodyBytes)) + using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) + { + } + return base.ConstructS3Exception(context, errorResponse, innerException, statusCode); } - private static ListBucketAnalyticsConfigurationsResponseUnmarshaller _instance = new ListBucketAnalyticsConfigurationsResponseUnmarshaller(); + partial void PostUnmarshallCustomization(XmlUnmarshallerContext context, ListBucketAnalyticsConfigurationsResponse response); + + private static ListBucketAnalyticsConfigurationsResponseUnmarshaller _instance = new ListBucketAnalyticsConfigurationsResponseUnmarshaller(); + + internal static ListBucketAnalyticsConfigurationsResponseUnmarshaller GetInstance() + { + return _instance; + } /// - /// Singleton for the unmarshaller - /// + /// Gets the singleton. + /// public static ListBucketAnalyticsConfigurationsResponseUnmarshaller Instance { get { - if (_instance == null) - { - _instance = new ListBucketAnalyticsConfigurationsResponseUnmarshaller(); - } return _instance; } } + } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/ListBucketAnalyticsConfigurationsRequest.cs b/sdk/src/Services/S3/Generated/Model/ListBucketAnalyticsConfigurationsRequest.cs similarity index 61% rename from sdk/src/Services/S3/Custom/Model/ListBucketAnalyticsConfigurationsRequest.cs rename to sdk/src/Services/S3/Generated/Model/ListBucketAnalyticsConfigurationsRequest.cs index bbc1691cc45e..6845753f0a8f 100644 --- a/sdk/src/Services/S3/Custom/Model/ListBucketAnalyticsConfigurationsRequest.cs +++ b/sdk/src/Services/S3/Generated/Model/ListBucketAnalyticsConfigurationsRequest.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). @@ -12,20 +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 ListBucketAnalyticsConfigurations operation. /// /// - /// This operation is not supported by directory buckets. + /// This operation is not supported for directory buckets. /// /// /// @@ -35,16 +43,16 @@ namespace Amazon.S3.Model /// /// /// This action supports list pagination and does not return more than 100 configurations - /// at a time. You should always check the IsTruncated element in the response. - /// If there are no more configurations to list, IsTruncated is set to false. - /// If there are more configurations to list, IsTruncated is set to true, - /// and there will be a value in NextContinuationToken. You use the NextContinuationToken + /// at a time. You should always check the IsTruncated element in the response. + /// If there are no more configurations to list, IsTruncated is set to false. If + /// there are more configurations to list, IsTruncated is set to true, and there + /// will be a value in NextContinuationToken. You use the NextContinuationToken /// value to continue the pagination of the list by passing the value in continuation-token - /// in the request to GET the next page. + /// in the request to GET the next page. /// /// /// - /// To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration + /// To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration /// action. The bucket owner has this permission by default. The bucket owner can grant /// this permission to others. For more information about permissions, see Permissions /// Related to Bucket Subresource Operations and Managing @@ -57,7 +65,7 @@ namespace Amazon.S3.Model /// /// /// - /// The following operations are related to ListBucketAnalyticsConfigurations: + /// The following operations are related to ListBucketAnalyticsConfigurations: /// /// + /// + /// + /// 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 ListBucketAnalyticsConfigurationsRequest : AmazonWebServiceRequest { - private string bucketName; - private string token; - private string expectedBucketOwner; + private string _bucketName; + private string _continuationToken; + private string _expectedBucketOwner; /// - /// The name of the bucket containing the analytics configurations to retrieve. + /// Gets and sets the property BucketName. + /// + /// The name of the bucket from which analytics configurations are retrieved. + /// /// + [AWSProperty(Required=true)] public string BucketName { - get { return this.bucketName; } - set { this.bucketName = value; } + get { return this._bucketName; } + set { this._bucketName = value; } } - // Check to see if Bucket property is set - internal bool IsSetBucket() + // Check to see if BucketName property is set + internal bool IsSetBucketName() { - return !(string.IsNullOrEmpty(this.bucketName)); + return this._bucketName != null; } /// - /// The ContinuationToken that represents a placeholder from where this request + /// Gets and sets the property ContinuationToken. + /// + /// The ContinuationToken that represents a placeholder from where this request /// should begin. + /// /// public string ContinuationToken { - get { return this.token; } - set { this.token = value; } + get { return this._continuationToken; } + set { this._continuationToken = value; } } // Check to see if ContinuationToken property is set internal bool IsSetContinuationToken() { - return !(string.IsNullOrEmpty(this.ContinuationToken)); + return this._continuationToken != null; } /// @@ -118,22 +139,20 @@ internal bool IsSetContinuationToken() /// /// 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 this._expectedBucketOwner != null; } + } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/ListBucketAnalyticsConfigurationsResponse.cs b/sdk/src/Services/S3/Generated/Model/ListBucketAnalyticsConfigurationsResponse.cs new file mode 100644 index 000000000000..42b2bba42986 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/ListBucketAnalyticsConfigurationsResponse.cs @@ -0,0 +1,125 @@ +/* + * 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 ListBucketAnalyticsConfigurations operation. + /// + public partial class ListBucketAnalyticsConfigurationsResponse : AmazonWebServiceResponse + { + private List _analyticsConfigurationList = AWSConfigs.InitializeCollections ? new List() : null; + private string _continuationToken; + private bool? _isTruncated; + private string _nextContinuationToken; + + /// + /// Gets and sets the property AnalyticsConfigurationList. + /// + /// The list of analytics configurations for a bucket. + /// + /// + /// 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 AnalyticsConfigurationList + { + get { return this._analyticsConfigurationList; } + set { this._analyticsConfigurationList = value; } + } + + // Check to see if AnalyticsConfigurationList property is set + internal bool IsSetAnalyticsConfigurationList() + { + return this._analyticsConfigurationList != null && (this._analyticsConfigurationList.Count > 0 || !AWSConfigs.InitializeCollections); + } + + /// + /// Gets and sets the property ContinuationToken. + /// + /// The marker that is used as a starting point for this analytics configuration list + /// response. This value is present if it was sent in the request. + /// + /// + public string ContinuationToken + { + get { return this._continuationToken; } + set { this._continuationToken = value; } + } + + // Check to see if ContinuationToken property is set + internal bool IsSetContinuationToken() + { + return this._continuationToken != null; + } + + /// + /// Gets and sets the property IsTruncated. + /// + /// Indicates whether the returned list of analytics configurations is complete. A value + /// of true indicates that the list is not complete and the NextContinuationToken will + /// be provided for a subsequent request. + /// + /// + public bool? IsTruncated + { + get { return this._isTruncated; } + set { this._isTruncated = value; } + } + + // Check to see if IsTruncated property is set + internal bool IsSetIsTruncated() + { + return this._isTruncated.HasValue; + } + + /// + /// Gets and sets the property NextContinuationToken. + /// + /// NextContinuationToken is sent when isTruncated is true, which indicates + /// that there are more analytics configurations to list. The next request must include + /// this NextContinuationToken. The token is obfuscated and is not a usable value. + /// + /// + public string NextContinuationToken + { + get { return this._nextContinuationToken; } + set { this._nextContinuationToken = value; } + } + + // Check to see if NextContinuationToken property is set + internal bool IsSetNextContinuationToken() + { + return this._nextContinuationToken != null; + } + + } +} \ No newline at end of file