/** * 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 { /** *

The traffic configuration of your continuous deployment.

See * Also:

AWS * API Reference

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

Contains the percentage of traffic to send to the staging distribution.

*/ inline const ContinuousDeploymentSingleWeightConfig& GetSingleWeightConfig() const{ return m_singleWeightConfig; } /** *

Contains the percentage of traffic to send to the staging distribution.

*/ inline bool SingleWeightConfigHasBeenSet() const { return m_singleWeightConfigHasBeenSet; } /** *

Contains the percentage of traffic to send to the staging distribution.

*/ inline void SetSingleWeightConfig(const ContinuousDeploymentSingleWeightConfig& value) { m_singleWeightConfigHasBeenSet = true; m_singleWeightConfig = value; } /** *

Contains the percentage of traffic to send to the staging distribution.

*/ inline void SetSingleWeightConfig(ContinuousDeploymentSingleWeightConfig&& value) { m_singleWeightConfigHasBeenSet = true; m_singleWeightConfig = std::move(value); } /** *

Contains the percentage of traffic to send to the staging distribution.

*/ inline TrafficConfig& WithSingleWeightConfig(const ContinuousDeploymentSingleWeightConfig& value) { SetSingleWeightConfig(value); return *this;} /** *

Contains the percentage of traffic to send to the staging distribution.

*/ inline TrafficConfig& WithSingleWeightConfig(ContinuousDeploymentSingleWeightConfig&& value) { SetSingleWeightConfig(std::move(value)); return *this;} /** *

Determines which HTTP requests are sent to the staging distribution.

*/ inline const ContinuousDeploymentSingleHeaderConfig& GetSingleHeaderConfig() const{ return m_singleHeaderConfig; } /** *

Determines which HTTP requests are sent to the staging distribution.

*/ inline bool SingleHeaderConfigHasBeenSet() const { return m_singleHeaderConfigHasBeenSet; } /** *

Determines which HTTP requests are sent to the staging distribution.

*/ inline void SetSingleHeaderConfig(const ContinuousDeploymentSingleHeaderConfig& value) { m_singleHeaderConfigHasBeenSet = true; m_singleHeaderConfig = value; } /** *

Determines which HTTP requests are sent to the staging distribution.

*/ inline void SetSingleHeaderConfig(ContinuousDeploymentSingleHeaderConfig&& value) { m_singleHeaderConfigHasBeenSet = true; m_singleHeaderConfig = std::move(value); } /** *

Determines which HTTP requests are sent to the staging distribution.

*/ inline TrafficConfig& WithSingleHeaderConfig(const ContinuousDeploymentSingleHeaderConfig& value) { SetSingleHeaderConfig(value); return *this;} /** *

Determines which HTTP requests are sent to the staging distribution.

*/ inline TrafficConfig& WithSingleHeaderConfig(ContinuousDeploymentSingleHeaderConfig&& value) { SetSingleHeaderConfig(std::move(value)); return *this;} /** *

The type of traffic configuration.

*/ inline const ContinuousDeploymentPolicyType& GetType() const{ return m_type; } /** *

The type of traffic configuration.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of traffic configuration.

*/ inline void SetType(const ContinuousDeploymentPolicyType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of traffic configuration.

*/ inline void SetType(ContinuousDeploymentPolicyType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of traffic configuration.

*/ inline TrafficConfig& WithType(const ContinuousDeploymentPolicyType& value) { SetType(value); return *this;} /** *

The type of traffic configuration.

*/ inline TrafficConfig& WithType(ContinuousDeploymentPolicyType&& value) { SetType(std::move(value)); return *this;} private: ContinuousDeploymentSingleWeightConfig m_singleWeightConfig; bool m_singleWeightConfigHasBeenSet = false; ContinuousDeploymentSingleHeaderConfig m_singleHeaderConfig; bool m_singleHeaderConfigHasBeenSet = false; ContinuousDeploymentPolicyType m_type; bool m_typeHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws