AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
RoutingRule.h
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
8#include <aws/s3/model/Condition.h>
9#include <aws/s3/model/Redirect.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Xml {
16class XmlNode;
17} // namespace Xml
18} // namespace Utils
19namespace S3 {
20namespace Model {
21
32 public:
33 AWS_S3_API RoutingRule() = default;
34 AWS_S3_API RoutingRule(const Aws::Utils::Xml::XmlNode& xmlNode);
35 AWS_S3_API RoutingRule& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
36
37 AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
38
40
47 inline const Condition& GetCondition() const { return m_condition; }
48 inline bool ConditionHasBeenSet() const { return m_conditionHasBeenSet; }
49 template <typename ConditionT = Condition>
50 void SetCondition(ConditionT&& value) {
51 m_conditionHasBeenSet = true;
52 m_condition = std::forward<ConditionT>(value);
53 }
54 template <typename ConditionT = Condition>
55 RoutingRule& WithCondition(ConditionT&& value) {
56 SetCondition(std::forward<ConditionT>(value));
57 return *this;
58 }
60
62
67 inline const Redirect& GetRedirect() const { return m_redirect; }
68 inline bool RedirectHasBeenSet() const { return m_redirectHasBeenSet; }
69 template <typename RedirectT = Redirect>
70 void SetRedirect(RedirectT&& value) {
71 m_redirectHasBeenSet = true;
72 m_redirect = std::forward<RedirectT>(value);
73 }
74 template <typename RedirectT = Redirect>
75 RoutingRule& WithRedirect(RedirectT&& value) {
76 SetRedirect(std::forward<RedirectT>(value));
77 return *this;
78 }
80 private:
81 Condition m_condition;
82
83 Redirect m_redirect;
84 bool m_conditionHasBeenSet = false;
85 bool m_redirectHasBeenSet = false;
86};
87
88} // namespace Model
89} // namespace S3
90} // namespace Aws
bool ConditionHasBeenSet() const
Definition RoutingRule.h:48
void SetRedirect(RedirectT &&value)
Definition RoutingRule.h:70
AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
AWS_S3_API RoutingRule()=default
const Redirect & GetRedirect() const
Definition RoutingRule.h:67
const Condition & GetCondition() const
Definition RoutingRule.h:47
bool RedirectHasBeenSet() const
Definition RoutingRule.h:68
RoutingRule & WithCondition(ConditionT &&value)
Definition RoutingRule.h:55
AWS_S3_API RoutingRule(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetCondition(ConditionT &&value)
Definition RoutingRule.h:50
RoutingRule & WithRedirect(RedirectT &&value)
Definition RoutingRule.h:75
AWS_S3_API RoutingRule & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)