AWS SDK for C++  0.14.3
AWS SDK for C++
RoutingRule.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>
17 #include <aws/s3/model/Condition.h>
18 #include <aws/s3/model/Redirect.h>
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Xml
25 {
26  class XmlNode;
27 } // namespace Xml
28 } // namespace Utils
29 namespace S3
30 {
31 namespace Model
32 {
33 
35  {
36  public:
37  RoutingRule();
38  RoutingRule(const Aws::Utils::Xml::XmlNode& xmlNode);
39  RoutingRule& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
40 
41  void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
42 
49  inline const Condition& GetCondition() const{ return m_condition; }
50 
57  inline void SetCondition(const Condition& value) { m_conditionHasBeenSet = true; m_condition = value; }
58 
65  inline void SetCondition(Condition&& value) { m_conditionHasBeenSet = true; m_condition = value; }
66 
73  inline RoutingRule& WithCondition(const Condition& value) { SetCondition(value); return *this;}
74 
81  inline RoutingRule& WithCondition(Condition&& value) { SetCondition(value); return *this;}
82 
88  inline const Redirect& GetRedirect() const{ return m_redirect; }
89 
95  inline void SetRedirect(const Redirect& value) { m_redirectHasBeenSet = true; m_redirect = value; }
96 
102  inline void SetRedirect(Redirect&& value) { m_redirectHasBeenSet = true; m_redirect = value; }
103 
109  inline RoutingRule& WithRedirect(const Redirect& value) { SetRedirect(value); return *this;}
110 
116  inline RoutingRule& WithRedirect(Redirect&& value) { SetRedirect(value); return *this;}
117 
118  private:
119  Condition m_condition;
120  bool m_conditionHasBeenSet;
121  Redirect m_redirect;
122  bool m_redirectHasBeenSet;
123  };
124 
125 } // namespace Model
126 } // namespace S3
127 } // namespace Aws
void SetCondition(const Condition &value)
Definition: RoutingRule.h:57
RoutingRule & WithCondition(Condition &&value)
Definition: RoutingRule.h:81
RoutingRule & WithRedirect(const Redirect &value)
Definition: RoutingRule.h:109
void SetRedirect(Redirect &&value)
Definition: RoutingRule.h:102
const Redirect & GetRedirect() const
Definition: RoutingRule.h:88
void SetCondition(Condition &&value)
Definition: RoutingRule.h:65
#define AWS_S3_API
Definition: S3_EXPORTS.h:37
RoutingRule & WithRedirect(Redirect &&value)
Definition: RoutingRule.h:116
const Condition & GetCondition() const
Definition: RoutingRule.h:49
RoutingRule & WithCondition(const Condition &value)
Definition: RoutingRule.h:73
void SetRedirect(const Redirect &value)
Definition: RoutingRule.h:95
JSON (JavaScript Object Notation).