/** * 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 Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace AppMesh { namespace Model { /** *

An object that represents the outlier detection for a virtual node's * listener.

See Also:

AWS * API Reference

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

The base amount of time for which a host is ejected.

*/ inline const Duration& GetBaseEjectionDuration() const{ return m_baseEjectionDuration; } /** *

The base amount of time for which a host is ejected.

*/ inline bool BaseEjectionDurationHasBeenSet() const { return m_baseEjectionDurationHasBeenSet; } /** *

The base amount of time for which a host is ejected.

*/ inline void SetBaseEjectionDuration(const Duration& value) { m_baseEjectionDurationHasBeenSet = true; m_baseEjectionDuration = value; } /** *

The base amount of time for which a host is ejected.

*/ inline void SetBaseEjectionDuration(Duration&& value) { m_baseEjectionDurationHasBeenSet = true; m_baseEjectionDuration = std::move(value); } /** *

The base amount of time for which a host is ejected.

*/ inline OutlierDetection& WithBaseEjectionDuration(const Duration& value) { SetBaseEjectionDuration(value); return *this;} /** *

The base amount of time for which a host is ejected.

*/ inline OutlierDetection& WithBaseEjectionDuration(Duration&& value) { SetBaseEjectionDuration(std::move(value)); return *this;} /** *

The time interval between ejection sweep analysis.

*/ inline const Duration& GetInterval() const{ return m_interval; } /** *

The time interval between ejection sweep analysis.

*/ inline bool IntervalHasBeenSet() const { return m_intervalHasBeenSet; } /** *

The time interval between ejection sweep analysis.

*/ inline void SetInterval(const Duration& value) { m_intervalHasBeenSet = true; m_interval = value; } /** *

The time interval between ejection sweep analysis.

*/ inline void SetInterval(Duration&& value) { m_intervalHasBeenSet = true; m_interval = std::move(value); } /** *

The time interval between ejection sweep analysis.

*/ inline OutlierDetection& WithInterval(const Duration& value) { SetInterval(value); return *this;} /** *

The time interval between ejection sweep analysis.

*/ inline OutlierDetection& WithInterval(Duration&& value) { SetInterval(std::move(value)); return *this;} /** *

Maximum percentage of hosts in load balancing pool for upstream service that * can be ejected. Will eject at least one host regardless of the value.

*/ inline int GetMaxEjectionPercent() const{ return m_maxEjectionPercent; } /** *

Maximum percentage of hosts in load balancing pool for upstream service that * can be ejected. Will eject at least one host regardless of the value.

*/ inline bool MaxEjectionPercentHasBeenSet() const { return m_maxEjectionPercentHasBeenSet; } /** *

Maximum percentage of hosts in load balancing pool for upstream service that * can be ejected. Will eject at least one host regardless of the value.

*/ inline void SetMaxEjectionPercent(int value) { m_maxEjectionPercentHasBeenSet = true; m_maxEjectionPercent = value; } /** *

Maximum percentage of hosts in load balancing pool for upstream service that * can be ejected. Will eject at least one host regardless of the value.

*/ inline OutlierDetection& WithMaxEjectionPercent(int value) { SetMaxEjectionPercent(value); return *this;} /** *

Number of consecutive 5xx errors required for ejection.

*/ inline long long GetMaxServerErrors() const{ return m_maxServerErrors; } /** *

Number of consecutive 5xx errors required for ejection.

*/ inline bool MaxServerErrorsHasBeenSet() const { return m_maxServerErrorsHasBeenSet; } /** *

Number of consecutive 5xx errors required for ejection.

*/ inline void SetMaxServerErrors(long long value) { m_maxServerErrorsHasBeenSet = true; m_maxServerErrors = value; } /** *

Number of consecutive 5xx errors required for ejection.

*/ inline OutlierDetection& WithMaxServerErrors(long long value) { SetMaxServerErrors(value); return *this;} private: Duration m_baseEjectionDuration; bool m_baseEjectionDurationHasBeenSet = false; Duration m_interval; bool m_intervalHasBeenSet = false; int m_maxEjectionPercent; bool m_maxEjectionPercentHasBeenSet = false; long long m_maxServerErrors; bool m_maxServerErrorsHasBeenSet = false; }; } // namespace Model } // namespace AppMesh } // namespace Aws