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

The failover configuration for an endpoint. This includes what triggers * failover and what happens when it's triggered.

See Also:

AWS * API Reference

*/ class FailoverConfig { public: AWS_EVENTBRIDGE_API FailoverConfig(); AWS_EVENTBRIDGE_API FailoverConfig(Aws::Utils::Json::JsonView jsonValue); AWS_EVENTBRIDGE_API FailoverConfig& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_EVENTBRIDGE_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The main Region of the endpoint.

*/ inline const Primary& GetPrimary() const{ return m_primary; } /** *

The main Region of the endpoint.

*/ inline bool PrimaryHasBeenSet() const { return m_primaryHasBeenSet; } /** *

The main Region of the endpoint.

*/ inline void SetPrimary(const Primary& value) { m_primaryHasBeenSet = true; m_primary = value; } /** *

The main Region of the endpoint.

*/ inline void SetPrimary(Primary&& value) { m_primaryHasBeenSet = true; m_primary = std::move(value); } /** *

The main Region of the endpoint.

*/ inline FailoverConfig& WithPrimary(const Primary& value) { SetPrimary(value); return *this;} /** *

The main Region of the endpoint.

*/ inline FailoverConfig& WithPrimary(Primary&& value) { SetPrimary(std::move(value)); return *this;} /** *

The Region that events are routed to when failover is triggered or event * replication is enabled.

*/ inline const Secondary& GetSecondary() const{ return m_secondary; } /** *

The Region that events are routed to when failover is triggered or event * replication is enabled.

*/ inline bool SecondaryHasBeenSet() const { return m_secondaryHasBeenSet; } /** *

The Region that events are routed to when failover is triggered or event * replication is enabled.

*/ inline void SetSecondary(const Secondary& value) { m_secondaryHasBeenSet = true; m_secondary = value; } /** *

The Region that events are routed to when failover is triggered or event * replication is enabled.

*/ inline void SetSecondary(Secondary&& value) { m_secondaryHasBeenSet = true; m_secondary = std::move(value); } /** *

The Region that events are routed to when failover is triggered or event * replication is enabled.

*/ inline FailoverConfig& WithSecondary(const Secondary& value) { SetSecondary(value); return *this;} /** *

The Region that events are routed to when failover is triggered or event * replication is enabled.

*/ inline FailoverConfig& WithSecondary(Secondary&& value) { SetSecondary(std::move(value)); return *this;} private: Primary m_primary; bool m_primaryHasBeenSet = false; Secondary m_secondary; bool m_secondaryHasBeenSet = false; }; } // namespace Model } // namespace EventBridge } // namespace Aws