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

An origin group includes two origins (a primary origin and a second origin to * failover to) and a failover criteria that you specify. You create an origin * group to support origin failover in CloudFront. When you create or update a * distribution, you can specifiy the origin group instead of a single origin, and * CloudFront will failover from the primary origin to the second origin under the * failover conditions that you've chosen.

See Also:

AWS * API Reference

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

The origin group's ID.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The origin group's ID.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The origin group's ID.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The origin group's ID.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The origin group's ID.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The origin group's ID.

*/ inline OriginGroup& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The origin group's ID.

*/ inline OriginGroup& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The origin group's ID.

*/ inline OriginGroup& WithId(const char* value) { SetId(value); return *this;} /** *

A complex type that contains information about the failover criteria for an * origin group.

*/ inline const OriginGroupFailoverCriteria& GetFailoverCriteria() const{ return m_failoverCriteria; } /** *

A complex type that contains information about the failover criteria for an * origin group.

*/ inline bool FailoverCriteriaHasBeenSet() const { return m_failoverCriteriaHasBeenSet; } /** *

A complex type that contains information about the failover criteria for an * origin group.

*/ inline void SetFailoverCriteria(const OriginGroupFailoverCriteria& value) { m_failoverCriteriaHasBeenSet = true; m_failoverCriteria = value; } /** *

A complex type that contains information about the failover criteria for an * origin group.

*/ inline void SetFailoverCriteria(OriginGroupFailoverCriteria&& value) { m_failoverCriteriaHasBeenSet = true; m_failoverCriteria = std::move(value); } /** *

A complex type that contains information about the failover criteria for an * origin group.

*/ inline OriginGroup& WithFailoverCriteria(const OriginGroupFailoverCriteria& value) { SetFailoverCriteria(value); return *this;} /** *

A complex type that contains information about the failover criteria for an * origin group.

*/ inline OriginGroup& WithFailoverCriteria(OriginGroupFailoverCriteria&& value) { SetFailoverCriteria(std::move(value)); return *this;} /** *

A complex type that contains information about the origins in an origin * group.

*/ inline const OriginGroupMembers& GetMembers() const{ return m_members; } /** *

A complex type that contains information about the origins in an origin * group.

*/ inline bool MembersHasBeenSet() const { return m_membersHasBeenSet; } /** *

A complex type that contains information about the origins in an origin * group.

*/ inline void SetMembers(const OriginGroupMembers& value) { m_membersHasBeenSet = true; m_members = value; } /** *

A complex type that contains information about the origins in an origin * group.

*/ inline void SetMembers(OriginGroupMembers&& value) { m_membersHasBeenSet = true; m_members = std::move(value); } /** *

A complex type that contains information about the origins in an origin * group.

*/ inline OriginGroup& WithMembers(const OriginGroupMembers& value) { SetMembers(value); return *this;} /** *

A complex type that contains information about the origins in an origin * group.

*/ inline OriginGroup& WithMembers(OriginGroupMembers&& value) { SetMembers(std::move(value)); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; OriginGroupFailoverCriteria m_failoverCriteria; bool m_failoverCriteriaHasBeenSet = false; OriginGroupMembers m_members; bool m_membersHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws