/** * 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 XRay { namespace Model { /** *

The name and value of a sampling rule to apply to a trace * summary.

See Also:

AWS * API Reference

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

The name of a sampling rule.

*/ inline const SamplingStrategyName& GetName() const{ return m_name; } /** *

The name of a sampling rule.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of a sampling rule.

*/ inline void SetName(const SamplingStrategyName& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of a sampling rule.

*/ inline void SetName(SamplingStrategyName&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of a sampling rule.

*/ inline SamplingStrategy& WithName(const SamplingStrategyName& value) { SetName(value); return *this;} /** *

The name of a sampling rule.

*/ inline SamplingStrategy& WithName(SamplingStrategyName&& value) { SetName(std::move(value)); return *this;} /** *

The value of a sampling rule.

*/ inline double GetValue() const{ return m_value; } /** *

The value of a sampling rule.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

The value of a sampling rule.

*/ inline void SetValue(double value) { m_valueHasBeenSet = true; m_value = value; } /** *

The value of a sampling rule.

*/ inline SamplingStrategy& WithValue(double value) { SetValue(value); return *this;} private: SamplingStrategyName m_name; bool m_nameHasBeenSet = false; double m_value; bool m_valueHasBeenSet = false; }; } // namespace Model } // namespace XRay } // namespace Aws