1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/xray/XRay_EXPORTS.h> 8 #include <aws/xray/XRayRequest.h> 9 #include <aws/xray/model/SamplingRule.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <aws/xray/model/Tag.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 namespace XRay 17 { 18 namespace Model 19 { 20 21 /** 22 */ 23 class AWS_XRAY_API CreateSamplingRuleRequest : public XRayRequest 24 { 25 public: 26 CreateSamplingRuleRequest(); 27 28 // Service request name is the Operation name which will send this request out, 29 // each operation should has unique request name, so that we can get operation's name from this request. 30 // Note: this is not true for response, multiple operations may have the same response name, 31 // so we can not get operation's name from response. GetServiceRequestName()32 inline virtual const char* GetServiceRequestName() const override { return "CreateSamplingRule"; } 33 34 Aws::String SerializePayload() const override; 35 36 37 /** 38 * <p>The rule definition.</p> 39 */ GetSamplingRule()40 inline const SamplingRule& GetSamplingRule() const{ return m_samplingRule; } 41 42 /** 43 * <p>The rule definition.</p> 44 */ SamplingRuleHasBeenSet()45 inline bool SamplingRuleHasBeenSet() const { return m_samplingRuleHasBeenSet; } 46 47 /** 48 * <p>The rule definition.</p> 49 */ SetSamplingRule(const SamplingRule & value)50 inline void SetSamplingRule(const SamplingRule& value) { m_samplingRuleHasBeenSet = true; m_samplingRule = value; } 51 52 /** 53 * <p>The rule definition.</p> 54 */ SetSamplingRule(SamplingRule && value)55 inline void SetSamplingRule(SamplingRule&& value) { m_samplingRuleHasBeenSet = true; m_samplingRule = std::move(value); } 56 57 /** 58 * <p>The rule definition.</p> 59 */ WithSamplingRule(const SamplingRule & value)60 inline CreateSamplingRuleRequest& WithSamplingRule(const SamplingRule& value) { SetSamplingRule(value); return *this;} 61 62 /** 63 * <p>The rule definition.</p> 64 */ WithSamplingRule(SamplingRule && value)65 inline CreateSamplingRuleRequest& WithSamplingRule(SamplingRule&& value) { SetSamplingRule(std::move(value)); return *this;} 66 67 68 /** 69 * <p>A map that contains one or more tag keys and tag values to attach to an X-Ray 70 * sampling rule. For more information about ways to use tags, see <a 71 * href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging 72 * Amazon Web Services resources</a> in the <i>Amazon Web Services General 73 * Reference</i>.</p> <p>The following restrictions apply to tags:</p> <ul> <li> 74 * <p>Maximum number of user-applied tags per resource: 50</p> </li> <li> 75 * <p>Maximum tag key length: 128 Unicode characters</p> </li> <li> <p>Maximum tag 76 * value length: 256 Unicode characters</p> </li> <li> <p>Valid values for key and 77 * value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and 78 * @</p> </li> <li> <p>Tag keys and values are case sensitive.</p> </li> <li> 79 * <p>Don't use <code>aws:</code> as a prefix for keys; it's reserved for Amazon 80 * Web Services use.</p> </li> </ul> 81 */ GetTags()82 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; } 83 84 /** 85 * <p>A map that contains one or more tag keys and tag values to attach to an X-Ray 86 * sampling rule. For more information about ways to use tags, see <a 87 * href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging 88 * Amazon Web Services resources</a> in the <i>Amazon Web Services General 89 * Reference</i>.</p> <p>The following restrictions apply to tags:</p> <ul> <li> 90 * <p>Maximum number of user-applied tags per resource: 50</p> </li> <li> 91 * <p>Maximum tag key length: 128 Unicode characters</p> </li> <li> <p>Maximum tag 92 * value length: 256 Unicode characters</p> </li> <li> <p>Valid values for key and 93 * value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and 94 * @</p> </li> <li> <p>Tag keys and values are case sensitive.</p> </li> <li> 95 * <p>Don't use <code>aws:</code> as a prefix for keys; it's reserved for Amazon 96 * Web Services use.</p> </li> </ul> 97 */ TagsHasBeenSet()98 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } 99 100 /** 101 * <p>A map that contains one or more tag keys and tag values to attach to an X-Ray 102 * sampling rule. For more information about ways to use tags, see <a 103 * href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging 104 * Amazon Web Services resources</a> in the <i>Amazon Web Services General 105 * Reference</i>.</p> <p>The following restrictions apply to tags:</p> <ul> <li> 106 * <p>Maximum number of user-applied tags per resource: 50</p> </li> <li> 107 * <p>Maximum tag key length: 128 Unicode characters</p> </li> <li> <p>Maximum tag 108 * value length: 256 Unicode characters</p> </li> <li> <p>Valid values for key and 109 * value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and 110 * @</p> </li> <li> <p>Tag keys and values are case sensitive.</p> </li> <li> 111 * <p>Don't use <code>aws:</code> as a prefix for keys; it's reserved for Amazon 112 * Web Services use.</p> </li> </ul> 113 */ SetTags(const Aws::Vector<Tag> & value)114 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; } 115 116 /** 117 * <p>A map that contains one or more tag keys and tag values to attach to an X-Ray 118 * sampling rule. For more information about ways to use tags, see <a 119 * href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging 120 * Amazon Web Services resources</a> in the <i>Amazon Web Services General 121 * Reference</i>.</p> <p>The following restrictions apply to tags:</p> <ul> <li> 122 * <p>Maximum number of user-applied tags per resource: 50</p> </li> <li> 123 * <p>Maximum tag key length: 128 Unicode characters</p> </li> <li> <p>Maximum tag 124 * value length: 256 Unicode characters</p> </li> <li> <p>Valid values for key and 125 * value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and 126 * @</p> </li> <li> <p>Tag keys and values are case sensitive.</p> </li> <li> 127 * <p>Don't use <code>aws:</code> as a prefix for keys; it's reserved for Amazon 128 * Web Services use.</p> </li> </ul> 129 */ SetTags(Aws::Vector<Tag> && value)130 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } 131 132 /** 133 * <p>A map that contains one or more tag keys and tag values to attach to an X-Ray 134 * sampling rule. For more information about ways to use tags, see <a 135 * href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging 136 * Amazon Web Services resources</a> in the <i>Amazon Web Services General 137 * Reference</i>.</p> <p>The following restrictions apply to tags:</p> <ul> <li> 138 * <p>Maximum number of user-applied tags per resource: 50</p> </li> <li> 139 * <p>Maximum tag key length: 128 Unicode characters</p> </li> <li> <p>Maximum tag 140 * value length: 256 Unicode characters</p> </li> <li> <p>Valid values for key and 141 * value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and 142 * @</p> </li> <li> <p>Tag keys and values are case sensitive.</p> </li> <li> 143 * <p>Don't use <code>aws:</code> as a prefix for keys; it's reserved for Amazon 144 * Web Services use.</p> </li> </ul> 145 */ WithTags(const Aws::Vector<Tag> & value)146 inline CreateSamplingRuleRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;} 147 148 /** 149 * <p>A map that contains one or more tag keys and tag values to attach to an X-Ray 150 * sampling rule. For more information about ways to use tags, see <a 151 * href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging 152 * Amazon Web Services resources</a> in the <i>Amazon Web Services General 153 * Reference</i>.</p> <p>The following restrictions apply to tags:</p> <ul> <li> 154 * <p>Maximum number of user-applied tags per resource: 50</p> </li> <li> 155 * <p>Maximum tag key length: 128 Unicode characters</p> </li> <li> <p>Maximum tag 156 * value length: 256 Unicode characters</p> </li> <li> <p>Valid values for key and 157 * value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and 158 * @</p> </li> <li> <p>Tag keys and values are case sensitive.</p> </li> <li> 159 * <p>Don't use <code>aws:</code> as a prefix for keys; it's reserved for Amazon 160 * Web Services use.</p> </li> </ul> 161 */ WithTags(Aws::Vector<Tag> && value)162 inline CreateSamplingRuleRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;} 163 164 /** 165 * <p>A map that contains one or more tag keys and tag values to attach to an X-Ray 166 * sampling rule. For more information about ways to use tags, see <a 167 * href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging 168 * Amazon Web Services resources</a> in the <i>Amazon Web Services General 169 * Reference</i>.</p> <p>The following restrictions apply to tags:</p> <ul> <li> 170 * <p>Maximum number of user-applied tags per resource: 50</p> </li> <li> 171 * <p>Maximum tag key length: 128 Unicode characters</p> </li> <li> <p>Maximum tag 172 * value length: 256 Unicode characters</p> </li> <li> <p>Valid values for key and 173 * value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and 174 * @</p> </li> <li> <p>Tag keys and values are case sensitive.</p> </li> <li> 175 * <p>Don't use <code>aws:</code> as a prefix for keys; it's reserved for Amazon 176 * Web Services use.</p> </li> </ul> 177 */ AddTags(const Tag & value)178 inline CreateSamplingRuleRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } 179 180 /** 181 * <p>A map that contains one or more tag keys and tag values to attach to an X-Ray 182 * sampling rule. For more information about ways to use tags, see <a 183 * href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging 184 * Amazon Web Services resources</a> in the <i>Amazon Web Services General 185 * Reference</i>.</p> <p>The following restrictions apply to tags:</p> <ul> <li> 186 * <p>Maximum number of user-applied tags per resource: 50</p> </li> <li> 187 * <p>Maximum tag key length: 128 Unicode characters</p> </li> <li> <p>Maximum tag 188 * value length: 256 Unicode characters</p> </li> <li> <p>Valid values for key and 189 * value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and 190 * @</p> </li> <li> <p>Tag keys and values are case sensitive.</p> </li> <li> 191 * <p>Don't use <code>aws:</code> as a prefix for keys; it's reserved for Amazon 192 * Web Services use.</p> </li> </ul> 193 */ AddTags(Tag && value)194 inline CreateSamplingRuleRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } 195 196 private: 197 198 SamplingRule m_samplingRule; 199 bool m_samplingRuleHasBeenSet; 200 201 Aws::Vector<Tag> m_tags; 202 bool m_tagsHasBeenSet; 203 }; 204 205 } // namespace Model 206 } // namespace XRay 207 } // namespace Aws 208