AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
SamplingRule.h
1
6#pragma once
7#include <aws/xray/XRay_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Json
17{
18 class JsonValue;
19 class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace XRay
23{
24namespace Model
25{
26
36 {
37 public:
38 AWS_XRAY_API SamplingRule();
42
43
45
49 inline const Aws::String& GetRuleName() const{ return m_ruleName; }
50 inline bool RuleNameHasBeenSet() const { return m_ruleNameHasBeenSet; }
51 inline void SetRuleName(const Aws::String& value) { m_ruleNameHasBeenSet = true; m_ruleName = value; }
52 inline void SetRuleName(Aws::String&& value) { m_ruleNameHasBeenSet = true; m_ruleName = std::move(value); }
53 inline void SetRuleName(const char* value) { m_ruleNameHasBeenSet = true; m_ruleName.assign(value); }
54 inline SamplingRule& WithRuleName(const Aws::String& value) { SetRuleName(value); return *this;}
55 inline SamplingRule& WithRuleName(Aws::String&& value) { SetRuleName(std::move(value)); return *this;}
56 inline SamplingRule& WithRuleName(const char* value) { SetRuleName(value); return *this;}
58
60
64 inline const Aws::String& GetRuleARN() const{ return m_ruleARN; }
65 inline bool RuleARNHasBeenSet() const { return m_ruleARNHasBeenSet; }
66 inline void SetRuleARN(const Aws::String& value) { m_ruleARNHasBeenSet = true; m_ruleARN = value; }
67 inline void SetRuleARN(Aws::String&& value) { m_ruleARNHasBeenSet = true; m_ruleARN = std::move(value); }
68 inline void SetRuleARN(const char* value) { m_ruleARNHasBeenSet = true; m_ruleARN.assign(value); }
69 inline SamplingRule& WithRuleARN(const Aws::String& value) { SetRuleARN(value); return *this;}
70 inline SamplingRule& WithRuleARN(Aws::String&& value) { SetRuleARN(std::move(value)); return *this;}
71 inline SamplingRule& WithRuleARN(const char* value) { SetRuleARN(value); return *this;}
73
75
79 inline const Aws::String& GetResourceARN() const{ return m_resourceARN; }
80 inline bool ResourceARNHasBeenSet() const { return m_resourceARNHasBeenSet; }
81 inline void SetResourceARN(const Aws::String& value) { m_resourceARNHasBeenSet = true; m_resourceARN = value; }
82 inline void SetResourceARN(Aws::String&& value) { m_resourceARNHasBeenSet = true; m_resourceARN = std::move(value); }
83 inline void SetResourceARN(const char* value) { m_resourceARNHasBeenSet = true; m_resourceARN.assign(value); }
84 inline SamplingRule& WithResourceARN(const Aws::String& value) { SetResourceARN(value); return *this;}
85 inline SamplingRule& WithResourceARN(Aws::String&& value) { SetResourceARN(std::move(value)); return *this;}
86 inline SamplingRule& WithResourceARN(const char* value) { SetResourceARN(value); return *this;}
88
90
93 inline int GetPriority() const{ return m_priority; }
94 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
95 inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; }
96 inline SamplingRule& WithPriority(int value) { SetPriority(value); return *this;}
98
100
104 inline double GetFixedRate() const{ return m_fixedRate; }
105 inline bool FixedRateHasBeenSet() const { return m_fixedRateHasBeenSet; }
106 inline void SetFixedRate(double value) { m_fixedRateHasBeenSet = true; m_fixedRate = value; }
107 inline SamplingRule& WithFixedRate(double value) { SetFixedRate(value); return *this;}
109
111
116 inline int GetReservoirSize() const{ return m_reservoirSize; }
117 inline bool ReservoirSizeHasBeenSet() const { return m_reservoirSizeHasBeenSet; }
118 inline void SetReservoirSize(int value) { m_reservoirSizeHasBeenSet = true; m_reservoirSize = value; }
119 inline SamplingRule& WithReservoirSize(int value) { SetReservoirSize(value); return *this;}
121
123
127 inline const Aws::String& GetServiceName() const{ return m_serviceName; }
128 inline bool ServiceNameHasBeenSet() const { return m_serviceNameHasBeenSet; }
129 inline void SetServiceName(const Aws::String& value) { m_serviceNameHasBeenSet = true; m_serviceName = value; }
130 inline void SetServiceName(Aws::String&& value) { m_serviceNameHasBeenSet = true; m_serviceName = std::move(value); }
131 inline void SetServiceName(const char* value) { m_serviceNameHasBeenSet = true; m_serviceName.assign(value); }
132 inline SamplingRule& WithServiceName(const Aws::String& value) { SetServiceName(value); return *this;}
133 inline SamplingRule& WithServiceName(Aws::String&& value) { SetServiceName(std::move(value)); return *this;}
134 inline SamplingRule& WithServiceName(const char* value) { SetServiceName(value); return *this;}
136
138
142 inline const Aws::String& GetServiceType() const{ return m_serviceType; }
143 inline bool ServiceTypeHasBeenSet() const { return m_serviceTypeHasBeenSet; }
144 inline void SetServiceType(const Aws::String& value) { m_serviceTypeHasBeenSet = true; m_serviceType = value; }
145 inline void SetServiceType(Aws::String&& value) { m_serviceTypeHasBeenSet = true; m_serviceType = std::move(value); }
146 inline void SetServiceType(const char* value) { m_serviceTypeHasBeenSet = true; m_serviceType.assign(value); }
147 inline SamplingRule& WithServiceType(const Aws::String& value) { SetServiceType(value); return *this;}
148 inline SamplingRule& WithServiceType(Aws::String&& value) { SetServiceType(std::move(value)); return *this;}
149 inline SamplingRule& WithServiceType(const char* value) { SetServiceType(value); return *this;}
151
153
156 inline const Aws::String& GetHost() const{ return m_host; }
157 inline bool HostHasBeenSet() const { return m_hostHasBeenSet; }
158 inline void SetHost(const Aws::String& value) { m_hostHasBeenSet = true; m_host = value; }
159 inline void SetHost(Aws::String&& value) { m_hostHasBeenSet = true; m_host = std::move(value); }
160 inline void SetHost(const char* value) { m_hostHasBeenSet = true; m_host.assign(value); }
161 inline SamplingRule& WithHost(const Aws::String& value) { SetHost(value); return *this;}
162 inline SamplingRule& WithHost(Aws::String&& value) { SetHost(std::move(value)); return *this;}
163 inline SamplingRule& WithHost(const char* value) { SetHost(value); return *this;}
165
167
170 inline const Aws::String& GetHTTPMethod() const{ return m_hTTPMethod; }
171 inline bool HTTPMethodHasBeenSet() const { return m_hTTPMethodHasBeenSet; }
172 inline void SetHTTPMethod(const Aws::String& value) { m_hTTPMethodHasBeenSet = true; m_hTTPMethod = value; }
173 inline void SetHTTPMethod(Aws::String&& value) { m_hTTPMethodHasBeenSet = true; m_hTTPMethod = std::move(value); }
174 inline void SetHTTPMethod(const char* value) { m_hTTPMethodHasBeenSet = true; m_hTTPMethod.assign(value); }
175 inline SamplingRule& WithHTTPMethod(const Aws::String& value) { SetHTTPMethod(value); return *this;}
176 inline SamplingRule& WithHTTPMethod(Aws::String&& value) { SetHTTPMethod(std::move(value)); return *this;}
177 inline SamplingRule& WithHTTPMethod(const char* value) { SetHTTPMethod(value); return *this;}
179
181
184 inline const Aws::String& GetURLPath() const{ return m_uRLPath; }
185 inline bool URLPathHasBeenSet() const { return m_uRLPathHasBeenSet; }
186 inline void SetURLPath(const Aws::String& value) { m_uRLPathHasBeenSet = true; m_uRLPath = value; }
187 inline void SetURLPath(Aws::String&& value) { m_uRLPathHasBeenSet = true; m_uRLPath = std::move(value); }
188 inline void SetURLPath(const char* value) { m_uRLPathHasBeenSet = true; m_uRLPath.assign(value); }
189 inline SamplingRule& WithURLPath(const Aws::String& value) { SetURLPath(value); return *this;}
190 inline SamplingRule& WithURLPath(Aws::String&& value) { SetURLPath(std::move(value)); return *this;}
191 inline SamplingRule& WithURLPath(const char* value) { SetURLPath(value); return *this;}
193
195
198 inline int GetVersion() const{ return m_version; }
199 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
200 inline void SetVersion(int value) { m_versionHasBeenSet = true; m_version = value; }
201 inline SamplingRule& WithVersion(int value) { SetVersion(value); return *this;}
203
205
208 inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const{ return m_attributes; }
209 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
210 inline void SetAttributes(const Aws::Map<Aws::String, Aws::String>& value) { m_attributesHasBeenSet = true; m_attributes = value; }
211 inline void SetAttributes(Aws::Map<Aws::String, Aws::String>&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); }
213 inline SamplingRule& WithAttributes(Aws::Map<Aws::String, Aws::String>&& value) { SetAttributes(std::move(value)); return *this;}
214 inline SamplingRule& AddAttributes(const Aws::String& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; }
215 inline SamplingRule& AddAttributes(Aws::String&& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; }
216 inline SamplingRule& AddAttributes(const Aws::String& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; }
217 inline SamplingRule& AddAttributes(Aws::String&& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; }
218 inline SamplingRule& AddAttributes(const char* key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; }
219 inline SamplingRule& AddAttributes(Aws::String&& key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; }
220 inline SamplingRule& AddAttributes(const char* key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; }
222 private:
223
224 Aws::String m_ruleName;
225 bool m_ruleNameHasBeenSet = false;
226
227 Aws::String m_ruleARN;
228 bool m_ruleARNHasBeenSet = false;
229
230 Aws::String m_resourceARN;
231 bool m_resourceARNHasBeenSet = false;
232
233 int m_priority;
234 bool m_priorityHasBeenSet = false;
235
236 double m_fixedRate;
237 bool m_fixedRateHasBeenSet = false;
238
239 int m_reservoirSize;
240 bool m_reservoirSizeHasBeenSet = false;
241
242 Aws::String m_serviceName;
243 bool m_serviceNameHasBeenSet = false;
244
245 Aws::String m_serviceType;
246 bool m_serviceTypeHasBeenSet = false;
247
248 Aws::String m_host;
249 bool m_hostHasBeenSet = false;
250
251 Aws::String m_hTTPMethod;
252 bool m_hTTPMethodHasBeenSet = false;
253
254 Aws::String m_uRLPath;
255 bool m_uRLPathHasBeenSet = false;
256
257 int m_version;
258 bool m_versionHasBeenSet = false;
259
261 bool m_attributesHasBeenSet = false;
262 };
263
264} // namespace Model
265} // namespace XRay
266} // namespace Aws
SamplingRule & WithServiceName(Aws::String &&value)
AWS_XRAY_API Aws::Utils::Json::JsonValue Jsonize() const
void SetAttributes(const Aws::Map< Aws::String, Aws::String > &value)
SamplingRule & WithServiceName(const char *value)
SamplingRule & WithHost(const Aws::String &value)
void SetRuleName(const Aws::String &value)
void SetServiceType(const Aws::String &value)
void SetRuleName(Aws::String &&value)
void SetServiceType(Aws::String &&value)
SamplingRule & AddAttributes(Aws::String &&key, const Aws::String &value)
void SetRuleARN(const char *value)
SamplingRule & AddAttributes(Aws::String &&key, Aws::String &&value)
void SetHost(const Aws::String &value)
const Aws::String & GetHost() const
void SetURLPath(const Aws::String &value)
SamplingRule & WithServiceType(const Aws::String &value)
SamplingRule & WithRuleARN(const char *value)
SamplingRule & WithHTTPMethod(const Aws::String &value)
SamplingRule & WithFixedRate(double value)
SamplingRule & WithURLPath(const Aws::String &value)
void SetServiceType(const char *value)
SamplingRule & WithVersion(int value)
const Aws::String & GetRuleName() const
void SetResourceARN(Aws::String &&value)
void SetHTTPMethod(const char *value)
void SetServiceName(const Aws::String &value)
SamplingRule & AddAttributes(const Aws::String &key, Aws::String &&value)
SamplingRule & WithHost(const char *value)
void SetHost(Aws::String &&value)
SamplingRule & WithResourceARN(Aws::String &&value)
const Aws::String & GetServiceType() const
void SetAttributes(Aws::Map< Aws::String, Aws::String > &&value)
void SetHTTPMethod(Aws::String &&value)
SamplingRule & WithRuleName(const Aws::String &value)
SamplingRule & WithPriority(int value)
SamplingRule & WithServiceName(const Aws::String &value)
SamplingRule & AddAttributes(const char *key, Aws::String &&value)
SamplingRule & WithAttributes(Aws::Map< Aws::String, Aws::String > &&value)
SamplingRule & WithServiceType(const char *value)
void SetHost(const char *value)
SamplingRule & WithHost(Aws::String &&value)
SamplingRule & WithReservoirSize(int value)
void SetResourceARN(const char *value)
void SetRuleName(const char *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
SamplingRule & AddAttributes(const char *key, const char *value)
SamplingRule & AddAttributes(const Aws::String &key, const Aws::String &value)
SamplingRule & WithURLPath(const char *value)
SamplingRule & WithRuleARN(Aws::String &&value)
void SetRuleARN(const Aws::String &value)
void SetServiceName(Aws::String &&value)
SamplingRule & WithRuleARN(const Aws::String &value)
SamplingRule & WithAttributes(const Aws::Map< Aws::String, Aws::String > &value)
SamplingRule & WithHTTPMethod(Aws::String &&value)
void SetRuleARN(Aws::String &&value)
SamplingRule & WithResourceARN(const Aws::String &value)
void SetResourceARN(const Aws::String &value)
AWS_XRAY_API SamplingRule(Aws::Utils::Json::JsonView jsonValue)
void SetURLPath(Aws::String &&value)
const Aws::String & GetServiceName() const
SamplingRule & AddAttributes(Aws::String &&key, const char *value)
SamplingRule & WithURLPath(Aws::String &&value)
void SetServiceName(const char *value)
const Aws::String & GetResourceARN() const
const Aws::String & GetRuleARN() const
void SetHTTPMethod(const Aws::String &value)
SamplingRule & WithRuleName(Aws::String &&value)
SamplingRule & WithServiceType(Aws::String &&value)
const Aws::String & GetHTTPMethod() const
SamplingRule & WithResourceARN(const char *value)
SamplingRule & WithHTTPMethod(const char *value)
void SetFixedRate(double value)
void SetURLPath(const char *value)
SamplingRule & WithRuleName(const char *value)
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