/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace S3 { namespace Model { /** *

Specifies website configuration parameters for an Amazon S3 * bucket.

See Also:

AWS * API Reference

*/ class AWS_S3_API WebsiteConfiguration { public: WebsiteConfiguration(); WebsiteConfiguration(const Aws::Utils::Xml::XmlNode& xmlNode); WebsiteConfiguration& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; /** *

The name of the error document for the website.

*/ inline const ErrorDocument& GetErrorDocument() const{ return m_errorDocument; } /** *

The name of the error document for the website.

*/ inline bool ErrorDocumentHasBeenSet() const { return m_errorDocumentHasBeenSet; } /** *

The name of the error document for the website.

*/ inline void SetErrorDocument(const ErrorDocument& value) { m_errorDocumentHasBeenSet = true; m_errorDocument = value; } /** *

The name of the error document for the website.

*/ inline void SetErrorDocument(ErrorDocument&& value) { m_errorDocumentHasBeenSet = true; m_errorDocument = std::move(value); } /** *

The name of the error document for the website.

*/ inline WebsiteConfiguration& WithErrorDocument(const ErrorDocument& value) { SetErrorDocument(value); return *this;} /** *

The name of the error document for the website.

*/ inline WebsiteConfiguration& WithErrorDocument(ErrorDocument&& value) { SetErrorDocument(std::move(value)); return *this;} /** *

The name of the index document for the website.

*/ inline const IndexDocument& GetIndexDocument() const{ return m_indexDocument; } /** *

The name of the index document for the website.

*/ inline bool IndexDocumentHasBeenSet() const { return m_indexDocumentHasBeenSet; } /** *

The name of the index document for the website.

*/ inline void SetIndexDocument(const IndexDocument& value) { m_indexDocumentHasBeenSet = true; m_indexDocument = value; } /** *

The name of the index document for the website.

*/ inline void SetIndexDocument(IndexDocument&& value) { m_indexDocumentHasBeenSet = true; m_indexDocument = std::move(value); } /** *

The name of the index document for the website.

*/ inline WebsiteConfiguration& WithIndexDocument(const IndexDocument& value) { SetIndexDocument(value); return *this;} /** *

The name of the index document for the website.

*/ inline WebsiteConfiguration& WithIndexDocument(IndexDocument&& value) { SetIndexDocument(std::move(value)); return *this;} /** *

The redirect behavior for every request to this bucket's website * endpoint.

If you specify this property, you can't specify any * other property.

*/ inline const RedirectAllRequestsTo& GetRedirectAllRequestsTo() const{ return m_redirectAllRequestsTo; } /** *

The redirect behavior for every request to this bucket's website * endpoint.

If you specify this property, you can't specify any * other property.

*/ inline bool RedirectAllRequestsToHasBeenSet() const { return m_redirectAllRequestsToHasBeenSet; } /** *

The redirect behavior for every request to this bucket's website * endpoint.

If you specify this property, you can't specify any * other property.

*/ inline void SetRedirectAllRequestsTo(const RedirectAllRequestsTo& value) { m_redirectAllRequestsToHasBeenSet = true; m_redirectAllRequestsTo = value; } /** *

The redirect behavior for every request to this bucket's website * endpoint.

If you specify this property, you can't specify any * other property.

*/ inline void SetRedirectAllRequestsTo(RedirectAllRequestsTo&& value) { m_redirectAllRequestsToHasBeenSet = true; m_redirectAllRequestsTo = std::move(value); } /** *

The redirect behavior for every request to this bucket's website * endpoint.

If you specify this property, you can't specify any * other property.

*/ inline WebsiteConfiguration& WithRedirectAllRequestsTo(const RedirectAllRequestsTo& value) { SetRedirectAllRequestsTo(value); return *this;} /** *

The redirect behavior for every request to this bucket's website * endpoint.

If you specify this property, you can't specify any * other property.

*/ inline WebsiteConfiguration& WithRedirectAllRequestsTo(RedirectAllRequestsTo&& value) { SetRedirectAllRequestsTo(std::move(value)); return *this;} /** *

Rules that define when a redirect is applied and the redirect behavior.

*/ inline const Aws::Vector& GetRoutingRules() const{ return m_routingRules; } /** *

Rules that define when a redirect is applied and the redirect behavior.

*/ inline bool RoutingRulesHasBeenSet() const { return m_routingRulesHasBeenSet; } /** *

Rules that define when a redirect is applied and the redirect behavior.

*/ inline void SetRoutingRules(const Aws::Vector& value) { m_routingRulesHasBeenSet = true; m_routingRules = value; } /** *

Rules that define when a redirect is applied and the redirect behavior.

*/ inline void SetRoutingRules(Aws::Vector&& value) { m_routingRulesHasBeenSet = true; m_routingRules = std::move(value); } /** *

Rules that define when a redirect is applied and the redirect behavior.

*/ inline WebsiteConfiguration& WithRoutingRules(const Aws::Vector& value) { SetRoutingRules(value); return *this;} /** *

Rules that define when a redirect is applied and the redirect behavior.

*/ inline WebsiteConfiguration& WithRoutingRules(Aws::Vector&& value) { SetRoutingRules(std::move(value)); return *this;} /** *

Rules that define when a redirect is applied and the redirect behavior.

*/ inline WebsiteConfiguration& AddRoutingRules(const RoutingRule& value) { m_routingRulesHasBeenSet = true; m_routingRules.push_back(value); return *this; } /** *

Rules that define when a redirect is applied and the redirect behavior.

*/ inline WebsiteConfiguration& AddRoutingRules(RoutingRule&& value) { m_routingRulesHasBeenSet = true; m_routingRules.push_back(std::move(value)); return *this; } private: ErrorDocument m_errorDocument; bool m_errorDocumentHasBeenSet; IndexDocument m_indexDocument; bool m_indexDocumentHasBeenSet; RedirectAllRequestsTo m_redirectAllRequestsTo; bool m_redirectAllRequestsToHasBeenSet; Aws::Vector m_routingRules; bool m_routingRulesHasBeenSet; }; } // namespace Model } // namespace S3 } // namespace Aws