/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace XRay { namespace Model { /** */ class AWS_XRAY_API CreateSamplingRuleRequest : public XRayRequest { public: CreateSamplingRuleRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateSamplingRule"; } Aws::String SerializePayload() const override; /** *

The rule definition.

*/ inline const SamplingRule& GetSamplingRule() const{ return m_samplingRule; } /** *

The rule definition.

*/ inline bool SamplingRuleHasBeenSet() const { return m_samplingRuleHasBeenSet; } /** *

The rule definition.

*/ inline void SetSamplingRule(const SamplingRule& value) { m_samplingRuleHasBeenSet = true; m_samplingRule = value; } /** *

The rule definition.

*/ inline void SetSamplingRule(SamplingRule&& value) { m_samplingRuleHasBeenSet = true; m_samplingRule = std::move(value); } /** *

The rule definition.

*/ inline CreateSamplingRuleRequest& WithSamplingRule(const SamplingRule& value) { SetSamplingRule(value); return *this;} /** *

The rule definition.

*/ inline CreateSamplingRuleRequest& WithSamplingRule(SamplingRule&& value) { SetSamplingRule(std::move(value)); return *this;} inline const Aws::Vector& GetTags() const{ return m_tags; } inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } inline CreateSamplingRuleRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} inline CreateSamplingRuleRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} inline CreateSamplingRuleRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } inline CreateSamplingRuleRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: SamplingRule m_samplingRule; bool m_samplingRuleHasBeenSet; Aws::Vector m_tags; bool m_tagsHasBeenSet; }; } // namespace Model } // namespace XRay } // namespace Aws