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

This structure specifies a segment that you have already created, and defines * the traffic split for that segment to be used in a launch.

See * Also:

AWS * API Reference

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

A number indicating the order to use to evaluate segment overrides, if there * are more than one. Segment overrides with lower numbers are evaluated first.

*/ inline long long GetEvaluationOrder() const{ return m_evaluationOrder; } /** *

A number indicating the order to use to evaluate segment overrides, if there * are more than one. Segment overrides with lower numbers are evaluated first.

*/ inline bool EvaluationOrderHasBeenSet() const { return m_evaluationOrderHasBeenSet; } /** *

A number indicating the order to use to evaluate segment overrides, if there * are more than one. Segment overrides with lower numbers are evaluated first.

*/ inline void SetEvaluationOrder(long long value) { m_evaluationOrderHasBeenSet = true; m_evaluationOrder = value; } /** *

A number indicating the order to use to evaluate segment overrides, if there * are more than one. Segment overrides with lower numbers are evaluated first.

*/ inline SegmentOverride& WithEvaluationOrder(long long value) { SetEvaluationOrder(value); return *this;} /** *

The ARN of the segment to use.

*/ inline const Aws::String& GetSegment() const{ return m_segment; } /** *

The ARN of the segment to use.

*/ inline bool SegmentHasBeenSet() const { return m_segmentHasBeenSet; } /** *

The ARN of the segment to use.

*/ inline void SetSegment(const Aws::String& value) { m_segmentHasBeenSet = true; m_segment = value; } /** *

The ARN of the segment to use.

*/ inline void SetSegment(Aws::String&& value) { m_segmentHasBeenSet = true; m_segment = std::move(value); } /** *

The ARN of the segment to use.

*/ inline void SetSegment(const char* value) { m_segmentHasBeenSet = true; m_segment.assign(value); } /** *

The ARN of the segment to use.

*/ inline SegmentOverride& WithSegment(const Aws::String& value) { SetSegment(value); return *this;} /** *

The ARN of the segment to use.

*/ inline SegmentOverride& WithSegment(Aws::String&& value) { SetSegment(std::move(value)); return *this;} /** *

The ARN of the segment to use.

*/ inline SegmentOverride& WithSegment(const char* value) { SetSegment(value); return *this;} /** *

The traffic allocation percentages among the feature variations to assign to * this segment. This is a set of key-value pairs. The keys are variation names. * The values represent the amount of traffic to allocate to that variation for * this segment. This is expressed in thousandths of a percent, so a weight of * 50000 represents 50% of traffic.

*/ inline const Aws::Map& GetWeights() const{ return m_weights; } /** *

The traffic allocation percentages among the feature variations to assign to * this segment. This is a set of key-value pairs. The keys are variation names. * The values represent the amount of traffic to allocate to that variation for * this segment. This is expressed in thousandths of a percent, so a weight of * 50000 represents 50% of traffic.

*/ inline bool WeightsHasBeenSet() const { return m_weightsHasBeenSet; } /** *

The traffic allocation percentages among the feature variations to assign to * this segment. This is a set of key-value pairs. The keys are variation names. * The values represent the amount of traffic to allocate to that variation for * this segment. This is expressed in thousandths of a percent, so a weight of * 50000 represents 50% of traffic.

*/ inline void SetWeights(const Aws::Map& value) { m_weightsHasBeenSet = true; m_weights = value; } /** *

The traffic allocation percentages among the feature variations to assign to * this segment. This is a set of key-value pairs. The keys are variation names. * The values represent the amount of traffic to allocate to that variation for * this segment. This is expressed in thousandths of a percent, so a weight of * 50000 represents 50% of traffic.

*/ inline void SetWeights(Aws::Map&& value) { m_weightsHasBeenSet = true; m_weights = std::move(value); } /** *

The traffic allocation percentages among the feature variations to assign to * this segment. This is a set of key-value pairs. The keys are variation names. * The values represent the amount of traffic to allocate to that variation for * this segment. This is expressed in thousandths of a percent, so a weight of * 50000 represents 50% of traffic.

*/ inline SegmentOverride& WithWeights(const Aws::Map& value) { SetWeights(value); return *this;} /** *

The traffic allocation percentages among the feature variations to assign to * this segment. This is a set of key-value pairs. The keys are variation names. * The values represent the amount of traffic to allocate to that variation for * this segment. This is expressed in thousandths of a percent, so a weight of * 50000 represents 50% of traffic.

*/ inline SegmentOverride& WithWeights(Aws::Map&& value) { SetWeights(std::move(value)); return *this;} /** *

The traffic allocation percentages among the feature variations to assign to * this segment. This is a set of key-value pairs. The keys are variation names. * The values represent the amount of traffic to allocate to that variation for * this segment. This is expressed in thousandths of a percent, so a weight of * 50000 represents 50% of traffic.

*/ inline SegmentOverride& AddWeights(const Aws::String& key, long long value) { m_weightsHasBeenSet = true; m_weights.emplace(key, value); return *this; } /** *

The traffic allocation percentages among the feature variations to assign to * this segment. This is a set of key-value pairs. The keys are variation names. * The values represent the amount of traffic to allocate to that variation for * this segment. This is expressed in thousandths of a percent, so a weight of * 50000 represents 50% of traffic.

*/ inline SegmentOverride& AddWeights(Aws::String&& key, long long value) { m_weightsHasBeenSet = true; m_weights.emplace(std::move(key), value); return *this; } /** *

The traffic allocation percentages among the feature variations to assign to * this segment. This is a set of key-value pairs. The keys are variation names. * The values represent the amount of traffic to allocate to that variation for * this segment. This is expressed in thousandths of a percent, so a weight of * 50000 represents 50% of traffic.

*/ inline SegmentOverride& AddWeights(const char* key, long long value) { m_weightsHasBeenSet = true; m_weights.emplace(key, value); return *this; } private: long long m_evaluationOrder; bool m_evaluationOrderHasBeenSet = false; Aws::String m_segment; bool m_segmentHasBeenSet = false; Aws::Map m_weights; bool m_weightsHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchEvidently } // namespace Aws