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

A complex data type that includes information about the failover criteria for * an origin group, including the status codes for which CloudFront will failover * from the primary origin to the second origin.

See Also:

AWS * API Reference

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

The status codes that, when returned from the primary origin, will trigger * CloudFront to failover to the second origin.

*/ inline const StatusCodes& GetStatusCodes() const{ return m_statusCodes; } /** *

The status codes that, when returned from the primary origin, will trigger * CloudFront to failover to the second origin.

*/ inline bool StatusCodesHasBeenSet() const { return m_statusCodesHasBeenSet; } /** *

The status codes that, when returned from the primary origin, will trigger * CloudFront to failover to the second origin.

*/ inline void SetStatusCodes(const StatusCodes& value) { m_statusCodesHasBeenSet = true; m_statusCodes = value; } /** *

The status codes that, when returned from the primary origin, will trigger * CloudFront to failover to the second origin.

*/ inline void SetStatusCodes(StatusCodes&& value) { m_statusCodesHasBeenSet = true; m_statusCodes = std::move(value); } /** *

The status codes that, when returned from the primary origin, will trigger * CloudFront to failover to the second origin.

*/ inline OriginGroupFailoverCriteria& WithStatusCodes(const StatusCodes& value) { SetStatusCodes(value); return *this;} /** *

The status codes that, when returned from the primary origin, will trigger * CloudFront to failover to the second origin.

*/ inline OriginGroupFailoverCriteria& WithStatusCodes(StatusCodes&& value) { SetStatusCodes(std::move(value)); return *this;} private: StatusCodes m_statusCodes; bool m_statusCodesHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws