AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
WebsiteConfiguration.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/s3/S3_EXPORTS.h>
9#include <aws/s3/model/ErrorDocument.h>
10#include <aws/s3/model/IndexDocument.h>
11#include <aws/s3/model/RedirectAllRequestsTo.h>
12#include <aws/s3/model/RoutingRule.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace S3 {
23namespace Model {
24
32 public:
33 AWS_S3_API WebsiteConfiguration() = default;
36
37 AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
38
40
43 inline const ErrorDocument& GetErrorDocument() const { return m_errorDocument; }
44 inline bool ErrorDocumentHasBeenSet() const { return m_errorDocumentHasBeenSet; }
45 template <typename ErrorDocumentT = ErrorDocument>
46 void SetErrorDocument(ErrorDocumentT&& value) {
47 m_errorDocumentHasBeenSet = true;
48 m_errorDocument = std::forward<ErrorDocumentT>(value);
49 }
50 template <typename ErrorDocumentT = ErrorDocument>
51 WebsiteConfiguration& WithErrorDocument(ErrorDocumentT&& value) {
52 SetErrorDocument(std::forward<ErrorDocumentT>(value));
53 return *this;
54 }
56
58
61 inline const IndexDocument& GetIndexDocument() const { return m_indexDocument; }
62 inline bool IndexDocumentHasBeenSet() const { return m_indexDocumentHasBeenSet; }
63 template <typename IndexDocumentT = IndexDocument>
64 void SetIndexDocument(IndexDocumentT&& value) {
65 m_indexDocumentHasBeenSet = true;
66 m_indexDocument = std::forward<IndexDocumentT>(value);
67 }
68 template <typename IndexDocumentT = IndexDocument>
69 WebsiteConfiguration& WithIndexDocument(IndexDocumentT&& value) {
70 SetIndexDocument(std::forward<IndexDocumentT>(value));
71 return *this;
72 }
74
76
81 inline const RedirectAllRequestsTo& GetRedirectAllRequestsTo() const { return m_redirectAllRequestsTo; }
82 inline bool RedirectAllRequestsToHasBeenSet() const { return m_redirectAllRequestsToHasBeenSet; }
83 template <typename RedirectAllRequestsToT = RedirectAllRequestsTo>
84 void SetRedirectAllRequestsTo(RedirectAllRequestsToT&& value) {
85 m_redirectAllRequestsToHasBeenSet = true;
86 m_redirectAllRequestsTo = std::forward<RedirectAllRequestsToT>(value);
87 }
88 template <typename RedirectAllRequestsToT = RedirectAllRequestsTo>
89 WebsiteConfiguration& WithRedirectAllRequestsTo(RedirectAllRequestsToT&& value) {
90 SetRedirectAllRequestsTo(std::forward<RedirectAllRequestsToT>(value));
91 return *this;
92 }
94
96
99 inline const Aws::Vector<RoutingRule>& GetRoutingRules() const { return m_routingRules; }
100 inline bool RoutingRulesHasBeenSet() const { return m_routingRulesHasBeenSet; }
101 template <typename RoutingRulesT = Aws::Vector<RoutingRule>>
102 void SetRoutingRules(RoutingRulesT&& value) {
103 m_routingRulesHasBeenSet = true;
104 m_routingRules = std::forward<RoutingRulesT>(value);
105 }
106 template <typename RoutingRulesT = Aws::Vector<RoutingRule>>
107 WebsiteConfiguration& WithRoutingRules(RoutingRulesT&& value) {
108 SetRoutingRules(std::forward<RoutingRulesT>(value));
109 return *this;
110 }
111 template <typename RoutingRulesT = RoutingRule>
112 WebsiteConfiguration& AddRoutingRules(RoutingRulesT&& value) {
113 m_routingRulesHasBeenSet = true;
114 m_routingRules.emplace_back(std::forward<RoutingRulesT>(value));
115 return *this;
116 }
118 private:
119 ErrorDocument m_errorDocument;
120
121 IndexDocument m_indexDocument;
122
123 RedirectAllRequestsTo m_redirectAllRequestsTo;
124
125 Aws::Vector<RoutingRule> m_routingRules;
126 bool m_errorDocumentHasBeenSet = false;
127 bool m_indexDocumentHasBeenSet = false;
128 bool m_redirectAllRequestsToHasBeenSet = false;
129 bool m_routingRulesHasBeenSet = false;
130};
131
132} // namespace Model
133} // namespace S3
134} // namespace Aws
WebsiteConfiguration & WithErrorDocument(ErrorDocumentT &&value)
WebsiteConfiguration & WithRoutingRules(RoutingRulesT &&value)
WebsiteConfiguration & AddRoutingRules(RoutingRulesT &&value)
WebsiteConfiguration & WithIndexDocument(IndexDocumentT &&value)
const IndexDocument & GetIndexDocument() const
AWS_S3_API WebsiteConfiguration & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::Vector< RoutingRule > & GetRoutingRules() const
AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
void SetIndexDocument(IndexDocumentT &&value)
AWS_S3_API WebsiteConfiguration(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetErrorDocument(ErrorDocumentT &&value)
WebsiteConfiguration & WithRedirectAllRequestsTo(RedirectAllRequestsToT &&value)
void SetRedirectAllRequestsTo(RedirectAllRequestsToT &&value)
void SetRoutingRules(RoutingRulesT &&value)
AWS_S3_API WebsiteConfiguration()=default
const ErrorDocument & GetErrorDocument() const
const RedirectAllRequestsTo & GetRedirectAllRequestsTo() const
std::vector< T, Aws::Allocator< T > > Vector