AWS SDK for C++  0.12.9
AWS SDK for C++
ReplicationConfiguration.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/s3/S3_EXPORTS.h>
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Xml
26 {
27  class XmlNode;
28 } // namespace Xml
29 } // namespace Utils
30 namespace S3
31 {
32 namespace Model
33 {
34 
40  {
41  public:
44  ReplicationConfiguration& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
45 
46  void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
47 
52  inline const Aws::String& GetRole() const{ return m_role; }
53 
58  inline void SetRole(const Aws::String& value) { m_roleHasBeenSet = true; m_role = value; }
59 
64  inline void SetRole(Aws::String&& value) { m_roleHasBeenSet = true; m_role = value; }
65 
70  inline void SetRole(const char* value) { m_roleHasBeenSet = true; m_role.assign(value); }
71 
76  inline ReplicationConfiguration& WithRole(const Aws::String& value) { SetRole(value); return *this;}
77 
82  inline ReplicationConfiguration& WithRole(Aws::String&& value) { SetRole(value); return *this;}
83 
88  inline ReplicationConfiguration& WithRole(const char* value) { SetRole(value); return *this;}
89 
94  inline const Aws::Vector<ReplicationRule>& GetRules() const{ return m_rules; }
95 
100  inline void SetRules(const Aws::Vector<ReplicationRule>& value) { m_rulesHasBeenSet = true; m_rules = value; }
101 
106  inline void SetRules(Aws::Vector<ReplicationRule>&& value) { m_rulesHasBeenSet = true; m_rules = value; }
107 
112  inline ReplicationConfiguration& WithRules(const Aws::Vector<ReplicationRule>& value) { SetRules(value); return *this;}
113 
118  inline ReplicationConfiguration& WithRules(Aws::Vector<ReplicationRule>&& value) { SetRules(value); return *this;}
119 
124  inline ReplicationConfiguration& AddRules(const ReplicationRule& value) { m_rulesHasBeenSet = true; m_rules.push_back(value); return *this; }
125 
130  inline ReplicationConfiguration& AddRules(ReplicationRule&& value) { m_rulesHasBeenSet = true; m_rules.push_back(value); return *this; }
131 
132  private:
133  Aws::String m_role;
134  bool m_roleHasBeenSet;
136  bool m_rulesHasBeenSet;
137  };
138 
139 } // namespace Model
140 } // namespace S3
141 } // namespace Aws
ReplicationConfiguration & AddRules(ReplicationRule &&value)
ReplicationConfiguration & WithRole(const Aws::String &value)
const Aws::Vector< ReplicationRule > & GetRules() const
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
void SetRules(Aws::Vector< ReplicationRule > &&value)
#define AWS_S3_API
Definition: S3_EXPORTS.h:34
ReplicationConfiguration & WithRules(const Aws::Vector< ReplicationRule > &value)
void SetRules(const Aws::Vector< ReplicationRule > &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
ReplicationConfiguration & WithRules(Aws::Vector< ReplicationRule > &&value)
ReplicationConfiguration & AddRules(const ReplicationRule &value)
ReplicationConfiguration & WithRole(Aws::String &&value)
JSON (JavaScript Object Notation).
ReplicationConfiguration & WithRole(const char *value)