1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/s3-crt/S3Crt_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/core/utils/memory/stl/AWSVector.h> 10 #include <aws/s3-crt/model/ReplicationRule.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Utils 16 { 17 namespace Xml 18 { 19 class XmlNode; 20 } // namespace Xml 21 } // namespace Utils 22 namespace S3Crt 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>A container for replication rules. You can add up to 1,000 rules. The maximum 29 * size of a replication configuration is 2 MB.</p><p><h3>See Also:</h3> <a 30 * href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationConfiguration">AWS 31 * API Reference</a></p> 32 */ 33 class AWS_S3CRT_API ReplicationConfiguration 34 { 35 public: 36 ReplicationConfiguration(); 37 ReplicationConfiguration(const Aws::Utils::Xml::XmlNode& xmlNode); 38 ReplicationConfiguration& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 39 40 void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; 41 42 43 /** 44 * <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) 45 * role that Amazon S3 assumes when replicating objects. For more information, see 46 * <a 47 * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html">How 48 * to Set Up Replication</a> in the <i>Amazon S3 User Guide</i>.</p> 49 */ GetRole()50 inline const Aws::String& GetRole() const{ return m_role; } 51 52 /** 53 * <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) 54 * role that Amazon S3 assumes when replicating objects. For more information, see 55 * <a 56 * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html">How 57 * to Set Up Replication</a> in the <i>Amazon S3 User Guide</i>.</p> 58 */ RoleHasBeenSet()59 inline bool RoleHasBeenSet() const { return m_roleHasBeenSet; } 60 61 /** 62 * <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) 63 * role that Amazon S3 assumes when replicating objects. For more information, see 64 * <a 65 * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html">How 66 * to Set Up Replication</a> in the <i>Amazon S3 User Guide</i>.</p> 67 */ SetRole(const Aws::String & value)68 inline void SetRole(const Aws::String& value) { m_roleHasBeenSet = true; m_role = value; } 69 70 /** 71 * <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) 72 * role that Amazon S3 assumes when replicating objects. For more information, see 73 * <a 74 * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html">How 75 * to Set Up Replication</a> in the <i>Amazon S3 User Guide</i>.</p> 76 */ SetRole(Aws::String && value)77 inline void SetRole(Aws::String&& value) { m_roleHasBeenSet = true; m_role = std::move(value); } 78 79 /** 80 * <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) 81 * role that Amazon S3 assumes when replicating objects. For more information, see 82 * <a 83 * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html">How 84 * to Set Up Replication</a> in the <i>Amazon S3 User Guide</i>.</p> 85 */ SetRole(const char * value)86 inline void SetRole(const char* value) { m_roleHasBeenSet = true; m_role.assign(value); } 87 88 /** 89 * <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) 90 * role that Amazon S3 assumes when replicating objects. For more information, see 91 * <a 92 * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html">How 93 * to Set Up Replication</a> in the <i>Amazon S3 User Guide</i>.</p> 94 */ WithRole(const Aws::String & value)95 inline ReplicationConfiguration& WithRole(const Aws::String& value) { SetRole(value); return *this;} 96 97 /** 98 * <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) 99 * role that Amazon S3 assumes when replicating objects. For more information, see 100 * <a 101 * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html">How 102 * to Set Up Replication</a> in the <i>Amazon S3 User Guide</i>.</p> 103 */ WithRole(Aws::String && value)104 inline ReplicationConfiguration& WithRole(Aws::String&& value) { SetRole(std::move(value)); return *this;} 105 106 /** 107 * <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) 108 * role that Amazon S3 assumes when replicating objects. For more information, see 109 * <a 110 * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html">How 111 * to Set Up Replication</a> in the <i>Amazon S3 User Guide</i>.</p> 112 */ WithRole(const char * value)113 inline ReplicationConfiguration& WithRole(const char* value) { SetRole(value); return *this;} 114 115 116 /** 117 * <p>A container for one or more replication rules. A replication configuration 118 * must have at least one rule and can contain a maximum of 1,000 rules. </p> 119 */ GetRules()120 inline const Aws::Vector<ReplicationRule>& GetRules() const{ return m_rules; } 121 122 /** 123 * <p>A container for one or more replication rules. A replication configuration 124 * must have at least one rule and can contain a maximum of 1,000 rules. </p> 125 */ RulesHasBeenSet()126 inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; } 127 128 /** 129 * <p>A container for one or more replication rules. A replication configuration 130 * must have at least one rule and can contain a maximum of 1,000 rules. </p> 131 */ SetRules(const Aws::Vector<ReplicationRule> & value)132 inline void SetRules(const Aws::Vector<ReplicationRule>& value) { m_rulesHasBeenSet = true; m_rules = value; } 133 134 /** 135 * <p>A container for one or more replication rules. A replication configuration 136 * must have at least one rule and can contain a maximum of 1,000 rules. </p> 137 */ SetRules(Aws::Vector<ReplicationRule> && value)138 inline void SetRules(Aws::Vector<ReplicationRule>&& value) { m_rulesHasBeenSet = true; m_rules = std::move(value); } 139 140 /** 141 * <p>A container for one or more replication rules. A replication configuration 142 * must have at least one rule and can contain a maximum of 1,000 rules. </p> 143 */ WithRules(const Aws::Vector<ReplicationRule> & value)144 inline ReplicationConfiguration& WithRules(const Aws::Vector<ReplicationRule>& value) { SetRules(value); return *this;} 145 146 /** 147 * <p>A container for one or more replication rules. A replication configuration 148 * must have at least one rule and can contain a maximum of 1,000 rules. </p> 149 */ WithRules(Aws::Vector<ReplicationRule> && value)150 inline ReplicationConfiguration& WithRules(Aws::Vector<ReplicationRule>&& value) { SetRules(std::move(value)); return *this;} 151 152 /** 153 * <p>A container for one or more replication rules. A replication configuration 154 * must have at least one rule and can contain a maximum of 1,000 rules. </p> 155 */ AddRules(const ReplicationRule & value)156 inline ReplicationConfiguration& AddRules(const ReplicationRule& value) { m_rulesHasBeenSet = true; m_rules.push_back(value); return *this; } 157 158 /** 159 * <p>A container for one or more replication rules. A replication configuration 160 * must have at least one rule and can contain a maximum of 1,000 rules. </p> 161 */ AddRules(ReplicationRule && value)162 inline ReplicationConfiguration& AddRules(ReplicationRule&& value) { m_rulesHasBeenSet = true; m_rules.push_back(std::move(value)); return *this; } 163 164 private: 165 166 Aws::String m_role; 167 bool m_roleHasBeenSet; 168 169 Aws::Vector<ReplicationRule> m_rules; 170 bool m_rulesHasBeenSet; 171 }; 172 173 } // namespace Model 174 } // namespace S3Crt 175 } // namespace Aws 176