AWS SDK for C++

AWS SDK for C++ Version 1.11.695

Loading...
Searching...
No Matches
SamplingRule.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/xray/XRay_EXPORTS.h>
10#include <aws/xray/model/SamplingRateBoost.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace XRay {
22namespace Model {
23
33 public:
34 AWS_XRAY_API SamplingRule() = default;
38
40
44 inline const Aws::String& GetRuleName() const { return m_ruleName; }
45 inline bool RuleNameHasBeenSet() const { return m_ruleNameHasBeenSet; }
46 template <typename RuleNameT = Aws::String>
47 void SetRuleName(RuleNameT&& value) {
48 m_ruleNameHasBeenSet = true;
49 m_ruleName = std::forward<RuleNameT>(value);
50 }
51 template <typename RuleNameT = Aws::String>
52 SamplingRule& WithRuleName(RuleNameT&& value) {
53 SetRuleName(std::forward<RuleNameT>(value));
54 return *this;
55 }
57
59
63 inline const Aws::String& GetRuleARN() const { return m_ruleARN; }
64 inline bool RuleARNHasBeenSet() const { return m_ruleARNHasBeenSet; }
65 template <typename RuleARNT = Aws::String>
66 void SetRuleARN(RuleARNT&& value) {
67 m_ruleARNHasBeenSet = true;
68 m_ruleARN = std::forward<RuleARNT>(value);
69 }
70 template <typename RuleARNT = Aws::String>
71 SamplingRule& WithRuleARN(RuleARNT&& value) {
72 SetRuleARN(std::forward<RuleARNT>(value));
73 return *this;
74 }
76
78
82 inline const Aws::String& GetResourceARN() const { return m_resourceARN; }
83 inline bool ResourceARNHasBeenSet() const { return m_resourceARNHasBeenSet; }
84 template <typename ResourceARNT = Aws::String>
85 void SetResourceARN(ResourceARNT&& value) {
86 m_resourceARNHasBeenSet = true;
87 m_resourceARN = std::forward<ResourceARNT>(value);
88 }
89 template <typename ResourceARNT = Aws::String>
90 SamplingRule& WithResourceARN(ResourceARNT&& value) {
91 SetResourceARN(std::forward<ResourceARNT>(value));
92 return *this;
93 }
95
97
100 inline int GetPriority() const { return m_priority; }
101 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
102 inline void SetPriority(int value) {
103 m_priorityHasBeenSet = true;
104 m_priority = value;
105 }
106 inline SamplingRule& WithPriority(int value) {
107 SetPriority(value);
108 return *this;
109 }
111
113
117 inline double GetFixedRate() const { return m_fixedRate; }
118 inline bool FixedRateHasBeenSet() const { return m_fixedRateHasBeenSet; }
119 inline void SetFixedRate(double value) {
120 m_fixedRateHasBeenSet = true;
121 m_fixedRate = value;
122 }
123 inline SamplingRule& WithFixedRate(double value) {
124 SetFixedRate(value);
125 return *this;
126 }
128
130
135 inline int GetReservoirSize() const { return m_reservoirSize; }
136 inline bool ReservoirSizeHasBeenSet() const { return m_reservoirSizeHasBeenSet; }
137 inline void SetReservoirSize(int value) {
138 m_reservoirSizeHasBeenSet = true;
139 m_reservoirSize = value;
140 }
141 inline SamplingRule& WithReservoirSize(int value) {
142 SetReservoirSize(value);
143 return *this;
144 }
146
148
152 inline const Aws::String& GetServiceName() const { return m_serviceName; }
153 inline bool ServiceNameHasBeenSet() const { return m_serviceNameHasBeenSet; }
154 template <typename ServiceNameT = Aws::String>
155 void SetServiceName(ServiceNameT&& value) {
156 m_serviceNameHasBeenSet = true;
157 m_serviceName = std::forward<ServiceNameT>(value);
158 }
159 template <typename ServiceNameT = Aws::String>
160 SamplingRule& WithServiceName(ServiceNameT&& value) {
161 SetServiceName(std::forward<ServiceNameT>(value));
162 return *this;
163 }
165
167
171 inline const Aws::String& GetServiceType() const { return m_serviceType; }
172 inline bool ServiceTypeHasBeenSet() const { return m_serviceTypeHasBeenSet; }
173 template <typename ServiceTypeT = Aws::String>
174 void SetServiceType(ServiceTypeT&& value) {
175 m_serviceTypeHasBeenSet = true;
176 m_serviceType = std::forward<ServiceTypeT>(value);
177 }
178 template <typename ServiceTypeT = Aws::String>
179 SamplingRule& WithServiceType(ServiceTypeT&& value) {
180 SetServiceType(std::forward<ServiceTypeT>(value));
181 return *this;
182 }
184
186
189 inline const Aws::String& GetHost() const { return m_host; }
190 inline bool HostHasBeenSet() const { return m_hostHasBeenSet; }
191 template <typename HostT = Aws::String>
192 void SetHost(HostT&& value) {
193 m_hostHasBeenSet = true;
194 m_host = std::forward<HostT>(value);
195 }
196 template <typename HostT = Aws::String>
197 SamplingRule& WithHost(HostT&& value) {
198 SetHost(std::forward<HostT>(value));
199 return *this;
200 }
202
204
207 inline const Aws::String& GetHTTPMethod() const { return m_hTTPMethod; }
208 inline bool HTTPMethodHasBeenSet() const { return m_hTTPMethodHasBeenSet; }
209 template <typename HTTPMethodT = Aws::String>
210 void SetHTTPMethod(HTTPMethodT&& value) {
211 m_hTTPMethodHasBeenSet = true;
212 m_hTTPMethod = std::forward<HTTPMethodT>(value);
213 }
214 template <typename HTTPMethodT = Aws::String>
215 SamplingRule& WithHTTPMethod(HTTPMethodT&& value) {
216 SetHTTPMethod(std::forward<HTTPMethodT>(value));
217 return *this;
218 }
220
222
225 inline const Aws::String& GetURLPath() const { return m_uRLPath; }
226 inline bool URLPathHasBeenSet() const { return m_uRLPathHasBeenSet; }
227 template <typename URLPathT = Aws::String>
228 void SetURLPath(URLPathT&& value) {
229 m_uRLPathHasBeenSet = true;
230 m_uRLPath = std::forward<URLPathT>(value);
231 }
232 template <typename URLPathT = Aws::String>
233 SamplingRule& WithURLPath(URLPathT&& value) {
234 SetURLPath(std::forward<URLPathT>(value));
235 return *this;
236 }
238
240
243 inline int GetVersion() const { return m_version; }
244 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
245 inline void SetVersion(int value) {
246 m_versionHasBeenSet = true;
247 m_version = value;
248 }
249 inline SamplingRule& WithVersion(int value) {
250 SetVersion(value);
251 return *this;
252 }
254
256
259 inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const { return m_attributes; }
260 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
261 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
262 void SetAttributes(AttributesT&& value) {
263 m_attributesHasBeenSet = true;
264 m_attributes = std::forward<AttributesT>(value);
265 }
266 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
267 SamplingRule& WithAttributes(AttributesT&& value) {
268 SetAttributes(std::forward<AttributesT>(value));
269 return *this;
270 }
271 template <typename AttributesKeyT = Aws::String, typename AttributesValueT = Aws::String>
272 SamplingRule& AddAttributes(AttributesKeyT&& key, AttributesValueT&& value) {
273 m_attributesHasBeenSet = true;
274 m_attributes.emplace(std::forward<AttributesKeyT>(key), std::forward<AttributesValueT>(value));
275 return *this;
276 }
278
280
285 inline const SamplingRateBoost& GetSamplingRateBoost() const { return m_samplingRateBoost; }
286 inline bool SamplingRateBoostHasBeenSet() const { return m_samplingRateBoostHasBeenSet; }
287 template <typename SamplingRateBoostT = SamplingRateBoost>
288 void SetSamplingRateBoost(SamplingRateBoostT&& value) {
289 m_samplingRateBoostHasBeenSet = true;
290 m_samplingRateBoost = std::forward<SamplingRateBoostT>(value);
291 }
292 template <typename SamplingRateBoostT = SamplingRateBoost>
293 SamplingRule& WithSamplingRateBoost(SamplingRateBoostT&& value) {
294 SetSamplingRateBoost(std::forward<SamplingRateBoostT>(value));
295 return *this;
296 }
298 private:
299 Aws::String m_ruleName;
300 bool m_ruleNameHasBeenSet = false;
301
302 Aws::String m_ruleARN;
303 bool m_ruleARNHasBeenSet = false;
304
305 Aws::String m_resourceARN;
306 bool m_resourceARNHasBeenSet = false;
307
308 int m_priority{0};
309 bool m_priorityHasBeenSet = false;
310
311 double m_fixedRate{0.0};
312 bool m_fixedRateHasBeenSet = false;
313
314 int m_reservoirSize{0};
315 bool m_reservoirSizeHasBeenSet = false;
316
317 Aws::String m_serviceName;
318 bool m_serviceNameHasBeenSet = false;
319
320 Aws::String m_serviceType;
321 bool m_serviceTypeHasBeenSet = false;
322
323 Aws::String m_host;
324 bool m_hostHasBeenSet = false;
325
326 Aws::String m_hTTPMethod;
327 bool m_hTTPMethodHasBeenSet = false;
328
329 Aws::String m_uRLPath;
330 bool m_uRLPathHasBeenSet = false;
331
332 int m_version{0};
333 bool m_versionHasBeenSet = false;
334
336 bool m_attributesHasBeenSet = false;
337
338 SamplingRateBoost m_samplingRateBoost;
339 bool m_samplingRateBoostHasBeenSet = false;
340};
341
342} // namespace Model
343} // namespace XRay
344} // namespace Aws
AWS_XRAY_API Aws::Utils::Json::JsonValue Jsonize() const
SamplingRule & WithServiceType(ServiceTypeT &&value)
SamplingRule & WithAttributes(AttributesT &&value)
void SetHTTPMethod(HTTPMethodT &&value)
SamplingRule & WithServiceName(ServiceNameT &&value)
SamplingRule & WithSamplingRateBoost(SamplingRateBoostT &&value)
const Aws::String & GetHost() const
SamplingRule & WithURLPath(URLPathT &&value)
SamplingRule & WithHTTPMethod(HTTPMethodT &&value)
SamplingRule & WithHost(HostT &&value)
SamplingRule & WithFixedRate(double value)
void SetServiceName(ServiceNameT &&value)
SamplingRule & WithVersion(int value)
const Aws::String & GetRuleName() const
void SetURLPath(URLPathT &&value)
SamplingRule & WithRuleName(RuleNameT &&value)
void SetServiceType(ServiceTypeT &&value)
SamplingRule & AddAttributes(AttributesKeyT &&key, AttributesValueT &&value)
const Aws::String & GetServiceType() const
SamplingRule & WithPriority(int value)
void SetRuleName(RuleNameT &&value)
void SetRuleARN(RuleARNT &&value)
SamplingRule & WithRuleARN(RuleARNT &&value)
void SetSamplingRateBoost(SamplingRateBoostT &&value)
SamplingRule & WithReservoirSize(int value)
AWS_XRAY_API SamplingRule & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetURLPath() const
const Aws::Map< Aws::String, Aws::String > & GetAttributes() const
void SetResourceARN(ResourceARNT &&value)
SamplingRule & WithResourceARN(ResourceARNT &&value)
AWS_XRAY_API SamplingRule(Aws::Utils::Json::JsonView jsonValue)
void SetHost(HostT &&value)
const Aws::String & GetServiceName() const
const Aws::String & GetResourceARN() const
const Aws::String & GetRuleARN() const
AWS_XRAY_API SamplingRule()=default
void SetAttributes(AttributesT &&value)
const Aws::String & GetHTTPMethod() const
void SetFixedRate(double value)
const SamplingRateBoost & GetSamplingRateBoost() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue