/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace IoT { namespace Model { /** *

Describes an action to write data to an Amazon S3 bucket.

See * Also:

AWS API * Reference

*/ class S3Action { public: AWS_IOT_API S3Action(); AWS_IOT_API S3Action(Aws::Utils::Json::JsonView jsonValue); AWS_IOT_API S3Action& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The ARN of the IAM role that grants access.

*/ inline const Aws::String& GetRoleArn() const{ return m_roleArn; } /** *

The ARN of the IAM role that grants access.

*/ inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; } /** *

The ARN of the IAM role that grants access.

*/ inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; } /** *

The ARN of the IAM role that grants access.

*/ inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); } /** *

The ARN of the IAM role that grants access.

*/ inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); } /** *

The ARN of the IAM role that grants access.

*/ inline S3Action& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;} /** *

The ARN of the IAM role that grants access.

*/ inline S3Action& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;} /** *

The ARN of the IAM role that grants access.

*/ inline S3Action& WithRoleArn(const char* value) { SetRoleArn(value); return *this;} /** *

The Amazon S3 bucket.

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

The Amazon S3 bucket.

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

The Amazon S3 bucket.

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

The Amazon S3 bucket.

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

The Amazon S3 bucket.

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

The Amazon S3 bucket.

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

The Amazon S3 bucket.

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

The Amazon S3 bucket.

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

The object key. For more information, see Actions, * resources, and condition keys for Amazon S3.

*/ inline const Aws::String& GetKey() const{ return m_key; } /** *

The object key. For more information, see Actions, * resources, and condition keys for Amazon S3.

*/ inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; } /** *

The object key. For more information, see Actions, * resources, and condition keys for Amazon S3.

*/ inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; } /** *

The object key. For more information, see Actions, * resources, and condition keys for Amazon S3.

*/ inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); } /** *

The object key. For more information, see Actions, * resources, and condition keys for Amazon S3.

*/ inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); } /** *

The object key. For more information, see Actions, * resources, and condition keys for Amazon S3.

*/ inline S3Action& WithKey(const Aws::String& value) { SetKey(value); return *this;} /** *

The object key. For more information, see Actions, * resources, and condition keys for Amazon S3.

*/ inline S3Action& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;} /** *

The object key. For more information, see Actions, * resources, and condition keys for Amazon S3.

*/ inline S3Action& WithKey(const char* value) { SetKey(value); return *this;} /** *

The Amazon S3 canned ACL that controls access to the object identified by the * object key. For more information, see S3 * canned ACLs.

*/ inline const CannedAccessControlList& GetCannedAcl() const{ return m_cannedAcl; } /** *

The Amazon S3 canned ACL that controls access to the object identified by the * object key. For more information, see S3 * canned ACLs.

*/ inline bool CannedAclHasBeenSet() const { return m_cannedAclHasBeenSet; } /** *

The Amazon S3 canned ACL that controls access to the object identified by the * object key. For more information, see S3 * canned ACLs.

*/ inline void SetCannedAcl(const CannedAccessControlList& value) { m_cannedAclHasBeenSet = true; m_cannedAcl = value; } /** *

The Amazon S3 canned ACL that controls access to the object identified by the * object key. For more information, see S3 * canned ACLs.

*/ inline void SetCannedAcl(CannedAccessControlList&& value) { m_cannedAclHasBeenSet = true; m_cannedAcl = std::move(value); } /** *

The Amazon S3 canned ACL that controls access to the object identified by the * object key. For more information, see S3 * canned ACLs.

*/ inline S3Action& WithCannedAcl(const CannedAccessControlList& value) { SetCannedAcl(value); return *this;} /** *

The Amazon S3 canned ACL that controls access to the object identified by the * object key. For more information, see S3 * canned ACLs.

*/ inline S3Action& WithCannedAcl(CannedAccessControlList&& value) { SetCannedAcl(std::move(value)); return *this;} private: Aws::String m_roleArn; bool m_roleArnHasBeenSet = false; Aws::String m_bucketName; bool m_bucketNameHasBeenSet = false; Aws::String m_key; bool m_keyHasBeenSet = false; CannedAccessControlList m_cannedAcl; bool m_cannedAclHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws