AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
WebsiteConfiguration.h
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
8#include <aws/s3/model/ErrorDocument.h>
9#include <aws/s3/model/IndexDocument.h>
10#include <aws/s3/model/RedirectAllRequestsTo.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/s3/model/RoutingRule.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Xml
20{
21 class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace S3
25{
26namespace Model
27{
28
36 {
37 public:
38 AWS_S3_API WebsiteConfiguration() = default;
41
42 AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
43
44
46
49 inline const ErrorDocument& GetErrorDocument() const { return m_errorDocument; }
50 inline bool ErrorDocumentHasBeenSet() const { return m_errorDocumentHasBeenSet; }
51 template<typename ErrorDocumentT = ErrorDocument>
52 void SetErrorDocument(ErrorDocumentT&& value) { m_errorDocumentHasBeenSet = true; m_errorDocument = std::forward<ErrorDocumentT>(value); }
53 template<typename ErrorDocumentT = ErrorDocument>
54 WebsiteConfiguration& WithErrorDocument(ErrorDocumentT&& value) { SetErrorDocument(std::forward<ErrorDocumentT>(value)); return *this;}
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) { m_indexDocumentHasBeenSet = true; m_indexDocument = std::forward<IndexDocumentT>(value); }
65 template<typename IndexDocumentT = IndexDocument>
66 WebsiteConfiguration& WithIndexDocument(IndexDocumentT&& value) { SetIndexDocument(std::forward<IndexDocumentT>(value)); return *this;}
68
70
75 inline const RedirectAllRequestsTo& GetRedirectAllRequestsTo() const { return m_redirectAllRequestsTo; }
76 inline bool RedirectAllRequestsToHasBeenSet() const { return m_redirectAllRequestsToHasBeenSet; }
77 template<typename RedirectAllRequestsToT = RedirectAllRequestsTo>
78 void SetRedirectAllRequestsTo(RedirectAllRequestsToT&& value) { m_redirectAllRequestsToHasBeenSet = true; m_redirectAllRequestsTo = std::forward<RedirectAllRequestsToT>(value); }
79 template<typename RedirectAllRequestsToT = RedirectAllRequestsTo>
80 WebsiteConfiguration& WithRedirectAllRequestsTo(RedirectAllRequestsToT&& value) { SetRedirectAllRequestsTo(std::forward<RedirectAllRequestsToT>(value)); return *this;}
82
84
87 inline const Aws::Vector<RoutingRule>& GetRoutingRules() const { return m_routingRules; }
88 inline bool RoutingRulesHasBeenSet() const { return m_routingRulesHasBeenSet; }
89 template<typename RoutingRulesT = Aws::Vector<RoutingRule>>
90 void SetRoutingRules(RoutingRulesT&& value) { m_routingRulesHasBeenSet = true; m_routingRules = std::forward<RoutingRulesT>(value); }
91 template<typename RoutingRulesT = Aws::Vector<RoutingRule>>
92 WebsiteConfiguration& WithRoutingRules(RoutingRulesT&& value) { SetRoutingRules(std::forward<RoutingRulesT>(value)); return *this;}
93 template<typename RoutingRulesT = RoutingRule>
94 WebsiteConfiguration& AddRoutingRules(RoutingRulesT&& value) { m_routingRulesHasBeenSet = true; m_routingRules.emplace_back(std::forward<RoutingRulesT>(value)); return *this; }
96 private:
97
98 ErrorDocument m_errorDocument;
99 bool m_errorDocumentHasBeenSet = false;
100
101 IndexDocument m_indexDocument;
102 bool m_indexDocumentHasBeenSet = false;
103
104 RedirectAllRequestsTo m_redirectAllRequestsTo;
105 bool m_redirectAllRequestsToHasBeenSet = false;
106
107 Aws::Vector<RoutingRule> m_routingRules;
108 bool m_routingRulesHasBeenSet = false;
109 };
110
111} // namespace Model
112} // namespace S3
113} // 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