AWS SDK for C++  0.12.9
AWS SDK for C++
WebsiteConfiguration.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>
22 
23 namespace Aws
24 {
25 namespace Utils
26 {
27 namespace Xml
28 {
29  class XmlNode;
30 } // namespace Xml
31 } // namespace Utils
32 namespace S3
33 {
34 namespace Model
35 {
36 
38  {
39  public:
42  WebsiteConfiguration& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
43 
44  void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
45 
46 
47  inline const ErrorDocument& GetErrorDocument() const{ return m_errorDocument; }
48 
49 
50  inline void SetErrorDocument(const ErrorDocument& value) { m_errorDocumentHasBeenSet = true; m_errorDocument = value; }
51 
52 
53  inline void SetErrorDocument(ErrorDocument&& value) { m_errorDocumentHasBeenSet = true; m_errorDocument = value; }
54 
55 
56  inline WebsiteConfiguration& WithErrorDocument(const ErrorDocument& value) { SetErrorDocument(value); return *this;}
57 
58 
59  inline WebsiteConfiguration& WithErrorDocument(ErrorDocument&& value) { SetErrorDocument(value); return *this;}
60 
61 
62  inline const IndexDocument& GetIndexDocument() const{ return m_indexDocument; }
63 
64 
65  inline void SetIndexDocument(const IndexDocument& value) { m_indexDocumentHasBeenSet = true; m_indexDocument = value; }
66 
67 
68  inline void SetIndexDocument(IndexDocument&& value) { m_indexDocumentHasBeenSet = true; m_indexDocument = value; }
69 
70 
71  inline WebsiteConfiguration& WithIndexDocument(const IndexDocument& value) { SetIndexDocument(value); return *this;}
72 
73 
74  inline WebsiteConfiguration& WithIndexDocument(IndexDocument&& value) { SetIndexDocument(value); return *this;}
75 
76 
77  inline const RedirectAllRequestsTo& GetRedirectAllRequestsTo() const{ return m_redirectAllRequestsTo; }
78 
79 
80  inline void SetRedirectAllRequestsTo(const RedirectAllRequestsTo& value) { m_redirectAllRequestsToHasBeenSet = true; m_redirectAllRequestsTo = value; }
81 
82 
83  inline void SetRedirectAllRequestsTo(RedirectAllRequestsTo&& value) { m_redirectAllRequestsToHasBeenSet = true; m_redirectAllRequestsTo = value; }
84 
85 
86  inline WebsiteConfiguration& WithRedirectAllRequestsTo(const RedirectAllRequestsTo& value) { SetRedirectAllRequestsTo(value); return *this;}
87 
88 
89  inline WebsiteConfiguration& WithRedirectAllRequestsTo(RedirectAllRequestsTo&& value) { SetRedirectAllRequestsTo(value); return *this;}
90 
91 
92  inline const Aws::Vector<RoutingRule>& GetRoutingRules() const{ return m_routingRules; }
93 
94 
95  inline void SetRoutingRules(const Aws::Vector<RoutingRule>& value) { m_routingRulesHasBeenSet = true; m_routingRules = value; }
96 
97 
98  inline void SetRoutingRules(Aws::Vector<RoutingRule>&& value) { m_routingRulesHasBeenSet = true; m_routingRules = value; }
99 
100 
101  inline WebsiteConfiguration& WithRoutingRules(const Aws::Vector<RoutingRule>& value) { SetRoutingRules(value); return *this;}
102 
103 
104  inline WebsiteConfiguration& WithRoutingRules(Aws::Vector<RoutingRule>&& value) { SetRoutingRules(value); return *this;}
105 
106 
107  inline WebsiteConfiguration& AddRoutingRules(const RoutingRule& value) { m_routingRulesHasBeenSet = true; m_routingRules.push_back(value); return *this; }
108 
109 
110  inline WebsiteConfiguration& AddRoutingRules(RoutingRule&& value) { m_routingRulesHasBeenSet = true; m_routingRules.push_back(value); return *this; }
111 
112  private:
113  ErrorDocument m_errorDocument;
114  bool m_errorDocumentHasBeenSet;
115  IndexDocument m_indexDocument;
116  bool m_indexDocumentHasBeenSet;
117  RedirectAllRequestsTo m_redirectAllRequestsTo;
118  bool m_redirectAllRequestsToHasBeenSet;
119  Aws::Vector<RoutingRule> m_routingRules;
120  bool m_routingRulesHasBeenSet;
121  };
122 
123 } // namespace Model
124 } // namespace S3
125 } // namespace Aws
const Aws::Vector< RoutingRule > & GetRoutingRules() const
void SetIndexDocument(const IndexDocument &value)
void SetErrorDocument(ErrorDocument &&value)
WebsiteConfiguration & WithIndexDocument(IndexDocument &&value)
WebsiteConfiguration & WithErrorDocument(ErrorDocument &&value)
void SetRoutingRules(Aws::Vector< RoutingRule > &&value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
#define AWS_S3_API
Definition: S3_EXPORTS.h:34
const IndexDocument & GetIndexDocument() const
void SetIndexDocument(IndexDocument &&value)
WebsiteConfiguration & AddRoutingRules(RoutingRule &&value)
void SetRedirectAllRequestsTo(const RedirectAllRequestsTo &value)
WebsiteConfiguration & WithRoutingRules(const Aws::Vector< RoutingRule > &value)
WebsiteConfiguration & WithErrorDocument(const ErrorDocument &value)
const RedirectAllRequestsTo & GetRedirectAllRequestsTo() const
const ErrorDocument & GetErrorDocument() const
WebsiteConfiguration & WithRoutingRules(Aws::Vector< RoutingRule > &&value)
void SetRedirectAllRequestsTo(RedirectAllRequestsTo &&value)
WebsiteConfiguration & WithRedirectAllRequestsTo(RedirectAllRequestsTo &&value)
WebsiteConfiguration & WithIndexDocument(const IndexDocument &value)
void SetErrorDocument(const ErrorDocument &value)
WebsiteConfiguration & WithRedirectAllRequestsTo(const RedirectAllRequestsTo &value)
WebsiteConfiguration & AddRoutingRules(const RoutingRule &value)
void SetRoutingRules(const Aws::Vector< RoutingRule > &value)
JSON (JavaScript Object Notation).