/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Lightsail { namespace Model { /** */ class UpdateBucketRequest : public LightsailRequest { public: AWS_LIGHTSAIL_API UpdateBucketRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "UpdateBucket"; } AWS_LIGHTSAIL_API Aws::String SerializePayload() const override; AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the bucket to update.

*/ inline const Aws::String& GetBucketName() const{ return m_bucketName; } /** *

The name of the bucket to update.

*/ inline bool BucketNameHasBeenSet() const { return m_bucketNameHasBeenSet; } /** *

The name of the bucket to update.

*/ inline void SetBucketName(const Aws::String& value) { m_bucketNameHasBeenSet = true; m_bucketName = value; } /** *

The name of the bucket to update.

*/ inline void SetBucketName(Aws::String&& value) { m_bucketNameHasBeenSet = true; m_bucketName = std::move(value); } /** *

The name of the bucket to update.

*/ inline void SetBucketName(const char* value) { m_bucketNameHasBeenSet = true; m_bucketName.assign(value); } /** *

The name of the bucket to update.

*/ inline UpdateBucketRequest& WithBucketName(const Aws::String& value) { SetBucketName(value); return *this;} /** *

The name of the bucket to update.

*/ inline UpdateBucketRequest& WithBucketName(Aws::String&& value) { SetBucketName(std::move(value)); return *this;} /** *

The name of the bucket to update.

*/ inline UpdateBucketRequest& WithBucketName(const char* value) { SetBucketName(value); return *this;} /** *

An object that sets the public accessibility of objects in the specified * bucket.

*/ inline const AccessRules& GetAccessRules() const{ return m_accessRules; } /** *

An object that sets the public accessibility of objects in the specified * bucket.

*/ inline bool AccessRulesHasBeenSet() const { return m_accessRulesHasBeenSet; } /** *

An object that sets the public accessibility of objects in the specified * bucket.

*/ inline void SetAccessRules(const AccessRules& value) { m_accessRulesHasBeenSet = true; m_accessRules = value; } /** *

An object that sets the public accessibility of objects in the specified * bucket.

*/ inline void SetAccessRules(AccessRules&& value) { m_accessRulesHasBeenSet = true; m_accessRules = std::move(value); } /** *

An object that sets the public accessibility of objects in the specified * bucket.

*/ inline UpdateBucketRequest& WithAccessRules(const AccessRules& value) { SetAccessRules(value); return *this;} /** *

An object that sets the public accessibility of objects in the specified * bucket.

*/ inline UpdateBucketRequest& WithAccessRules(AccessRules&& value) { SetAccessRules(std::move(value)); return *this;} /** *

Specifies whether to enable or suspend versioning of objects in the * bucket.

The following options can be specified:

  • * Enabled - Enables versioning of objects in the specified * bucket.

  • Suspended - Suspends versioning of * objects in the specified bucket. Existing object versions are retained.

    *
*/ inline const Aws::String& GetVersioning() const{ return m_versioning; } /** *

Specifies whether to enable or suspend versioning of objects in the * bucket.

The following options can be specified:

  • * Enabled - Enables versioning of objects in the specified * bucket.

  • Suspended - Suspends versioning of * objects in the specified bucket. Existing object versions are retained.

    *
*/ inline bool VersioningHasBeenSet() const { return m_versioningHasBeenSet; } /** *

Specifies whether to enable or suspend versioning of objects in the * bucket.

The following options can be specified:

  • * Enabled - Enables versioning of objects in the specified * bucket.

  • Suspended - Suspends versioning of * objects in the specified bucket. Existing object versions are retained.

    *
*/ inline void SetVersioning(const Aws::String& value) { m_versioningHasBeenSet = true; m_versioning = value; } /** *

Specifies whether to enable or suspend versioning of objects in the * bucket.

The following options can be specified:

  • * Enabled - Enables versioning of objects in the specified * bucket.

  • Suspended - Suspends versioning of * objects in the specified bucket. Existing object versions are retained.

    *
*/ inline void SetVersioning(Aws::String&& value) { m_versioningHasBeenSet = true; m_versioning = std::move(value); } /** *

Specifies whether to enable or suspend versioning of objects in the * bucket.

The following options can be specified:

  • * Enabled - Enables versioning of objects in the specified * bucket.

  • Suspended - Suspends versioning of * objects in the specified bucket. Existing object versions are retained.

    *
*/ inline void SetVersioning(const char* value) { m_versioningHasBeenSet = true; m_versioning.assign(value); } /** *

Specifies whether to enable or suspend versioning of objects in the * bucket.

The following options can be specified:

  • * Enabled - Enables versioning of objects in the specified * bucket.

  • Suspended - Suspends versioning of * objects in the specified bucket. Existing object versions are retained.

    *
*/ inline UpdateBucketRequest& WithVersioning(const Aws::String& value) { SetVersioning(value); return *this;} /** *

Specifies whether to enable or suspend versioning of objects in the * bucket.

The following options can be specified:

  • * Enabled - Enables versioning of objects in the specified * bucket.

  • Suspended - Suspends versioning of * objects in the specified bucket. Existing object versions are retained.

    *
*/ inline UpdateBucketRequest& WithVersioning(Aws::String&& value) { SetVersioning(std::move(value)); return *this;} /** *

Specifies whether to enable or suspend versioning of objects in the * bucket.

The following options can be specified:

  • * Enabled - Enables versioning of objects in the specified * bucket.

  • Suspended - Suspends versioning of * objects in the specified bucket. Existing object versions are retained.

    *
*/ inline UpdateBucketRequest& WithVersioning(const char* value) { SetVersioning(value); return *this;} /** *

An array of strings to specify the Amazon Web Services account IDs that can * access the bucket.

You can give a maximum of 10 Amazon Web Services * accounts access to a bucket.

*/ inline const Aws::Vector& GetReadonlyAccessAccounts() const{ return m_readonlyAccessAccounts; } /** *

An array of strings to specify the Amazon Web Services account IDs that can * access the bucket.

You can give a maximum of 10 Amazon Web Services * accounts access to a bucket.

*/ inline bool ReadonlyAccessAccountsHasBeenSet() const { return m_readonlyAccessAccountsHasBeenSet; } /** *

An array of strings to specify the Amazon Web Services account IDs that can * access the bucket.

You can give a maximum of 10 Amazon Web Services * accounts access to a bucket.

*/ inline void SetReadonlyAccessAccounts(const Aws::Vector& value) { m_readonlyAccessAccountsHasBeenSet = true; m_readonlyAccessAccounts = value; } /** *

An array of strings to specify the Amazon Web Services account IDs that can * access the bucket.

You can give a maximum of 10 Amazon Web Services * accounts access to a bucket.

*/ inline void SetReadonlyAccessAccounts(Aws::Vector&& value) { m_readonlyAccessAccountsHasBeenSet = true; m_readonlyAccessAccounts = std::move(value); } /** *

An array of strings to specify the Amazon Web Services account IDs that can * access the bucket.

You can give a maximum of 10 Amazon Web Services * accounts access to a bucket.

*/ inline UpdateBucketRequest& WithReadonlyAccessAccounts(const Aws::Vector& value) { SetReadonlyAccessAccounts(value); return *this;} /** *

An array of strings to specify the Amazon Web Services account IDs that can * access the bucket.

You can give a maximum of 10 Amazon Web Services * accounts access to a bucket.

*/ inline UpdateBucketRequest& WithReadonlyAccessAccounts(Aws::Vector&& value) { SetReadonlyAccessAccounts(std::move(value)); return *this;} /** *

An array of strings to specify the Amazon Web Services account IDs that can * access the bucket.

You can give a maximum of 10 Amazon Web Services * accounts access to a bucket.

*/ inline UpdateBucketRequest& AddReadonlyAccessAccounts(const Aws::String& value) { m_readonlyAccessAccountsHasBeenSet = true; m_readonlyAccessAccounts.push_back(value); return *this; } /** *

An array of strings to specify the Amazon Web Services account IDs that can * access the bucket.

You can give a maximum of 10 Amazon Web Services * accounts access to a bucket.

*/ inline UpdateBucketRequest& AddReadonlyAccessAccounts(Aws::String&& value) { m_readonlyAccessAccountsHasBeenSet = true; m_readonlyAccessAccounts.push_back(std::move(value)); return *this; } /** *

An array of strings to specify the Amazon Web Services account IDs that can * access the bucket.

You can give a maximum of 10 Amazon Web Services * accounts access to a bucket.

*/ inline UpdateBucketRequest& AddReadonlyAccessAccounts(const char* value) { m_readonlyAccessAccountsHasBeenSet = true; m_readonlyAccessAccounts.push_back(value); return *this; } /** *

An object that describes the access log configuration for the bucket.

*/ inline const BucketAccessLogConfig& GetAccessLogConfig() const{ return m_accessLogConfig; } /** *

An object that describes the access log configuration for the bucket.

*/ inline bool AccessLogConfigHasBeenSet() const { return m_accessLogConfigHasBeenSet; } /** *

An object that describes the access log configuration for the bucket.

*/ inline void SetAccessLogConfig(const BucketAccessLogConfig& value) { m_accessLogConfigHasBeenSet = true; m_accessLogConfig = value; } /** *

An object that describes the access log configuration for the bucket.

*/ inline void SetAccessLogConfig(BucketAccessLogConfig&& value) { m_accessLogConfigHasBeenSet = true; m_accessLogConfig = std::move(value); } /** *

An object that describes the access log configuration for the bucket.

*/ inline UpdateBucketRequest& WithAccessLogConfig(const BucketAccessLogConfig& value) { SetAccessLogConfig(value); return *this;} /** *

An object that describes the access log configuration for the bucket.

*/ inline UpdateBucketRequest& WithAccessLogConfig(BucketAccessLogConfig&& value) { SetAccessLogConfig(std::move(value)); return *this;} private: Aws::String m_bucketName; bool m_bucketNameHasBeenSet = false; AccessRules m_accessRules; bool m_accessRulesHasBeenSet = false; Aws::String m_versioning; bool m_versioningHasBeenSet = false; Aws::Vector m_readonlyAccessAccounts; bool m_readonlyAccessAccountsHasBeenSet = false; BucketAccessLogConfig m_accessLogConfig; bool m_accessLogConfigHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws