AWS SDK for C++

AWS SDK for C++ Version 1.11.644

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 <aws/xray/model/SamplingRateBoost.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace XRay
24{
25namespace Model
26{
27
37 {
38 public:
39 AWS_XRAY_API SamplingRule() = default;
43
44
46
50 inline const Aws::String& GetRuleName() const { return m_ruleName; }
51 inline bool RuleNameHasBeenSet() const { return m_ruleNameHasBeenSet; }
52 template<typename RuleNameT = Aws::String>
53 void SetRuleName(RuleNameT&& value) { m_ruleNameHasBeenSet = true; m_ruleName = std::forward<RuleNameT>(value); }
54 template<typename RuleNameT = Aws::String>
55 SamplingRule& WithRuleName(RuleNameT&& value) { SetRuleName(std::forward<RuleNameT>(value)); return *this;}
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) { m_ruleARNHasBeenSet = true; m_ruleARN = std::forward<RuleARNT>(value); }
67 template<typename RuleARNT = Aws::String>
68 SamplingRule& WithRuleARN(RuleARNT&& value) { SetRuleARN(std::forward<RuleARNT>(value)); return *this;}
70
72
76 inline const Aws::String& GetResourceARN() const { return m_resourceARN; }
77 inline bool ResourceARNHasBeenSet() const { return m_resourceARNHasBeenSet; }
78 template<typename ResourceARNT = Aws::String>
79 void SetResourceARN(ResourceARNT&& value) { m_resourceARNHasBeenSet = true; m_resourceARN = std::forward<ResourceARNT>(value); }
80 template<typename ResourceARNT = Aws::String>
81 SamplingRule& WithResourceARN(ResourceARNT&& value) { SetResourceARN(std::forward<ResourceARNT>(value)); return *this;}
83
85
88 inline int GetPriority() const { return m_priority; }
89 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
90 inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; }
91 inline SamplingRule& WithPriority(int value) { SetPriority(value); return *this;}
93
95
99 inline double GetFixedRate() const { return m_fixedRate; }
100 inline bool FixedRateHasBeenSet() const { return m_fixedRateHasBeenSet; }
101 inline void SetFixedRate(double value) { m_fixedRateHasBeenSet = true; m_fixedRate = value; }
102 inline SamplingRule& WithFixedRate(double value) { SetFixedRate(value); return *this;}
104
106
111 inline int GetReservoirSize() const { return m_reservoirSize; }
112 inline bool ReservoirSizeHasBeenSet() const { return m_reservoirSizeHasBeenSet; }
113 inline void SetReservoirSize(int value) { m_reservoirSizeHasBeenSet = true; m_reservoirSize = value; }
114 inline SamplingRule& WithReservoirSize(int value) { SetReservoirSize(value); return *this;}
116
118
122 inline const Aws::String& GetServiceName() const { return m_serviceName; }
123 inline bool ServiceNameHasBeenSet() const { return m_serviceNameHasBeenSet; }
124 template<typename ServiceNameT = Aws::String>
125 void SetServiceName(ServiceNameT&& value) { m_serviceNameHasBeenSet = true; m_serviceName = std::forward<ServiceNameT>(value); }
126 template<typename ServiceNameT = Aws::String>
127 SamplingRule& WithServiceName(ServiceNameT&& value) { SetServiceName(std::forward<ServiceNameT>(value)); return *this;}
129
131
135 inline const Aws::String& GetServiceType() const { return m_serviceType; }
136 inline bool ServiceTypeHasBeenSet() const { return m_serviceTypeHasBeenSet; }
137 template<typename ServiceTypeT = Aws::String>
138 void SetServiceType(ServiceTypeT&& value) { m_serviceTypeHasBeenSet = true; m_serviceType = std::forward<ServiceTypeT>(value); }
139 template<typename ServiceTypeT = Aws::String>
140 SamplingRule& WithServiceType(ServiceTypeT&& value) { SetServiceType(std::forward<ServiceTypeT>(value)); return *this;}
142
144
147 inline const Aws::String& GetHost() const { return m_host; }
148 inline bool HostHasBeenSet() const { return m_hostHasBeenSet; }
149 template<typename HostT = Aws::String>
150 void SetHost(HostT&& value) { m_hostHasBeenSet = true; m_host = std::forward<HostT>(value); }
151 template<typename HostT = Aws::String>
152 SamplingRule& WithHost(HostT&& value) { SetHost(std::forward<HostT>(value)); return *this;}
154
156
159 inline const Aws::String& GetHTTPMethod() const { return m_hTTPMethod; }
160 inline bool HTTPMethodHasBeenSet() const { return m_hTTPMethodHasBeenSet; }
161 template<typename HTTPMethodT = Aws::String>
162 void SetHTTPMethod(HTTPMethodT&& value) { m_hTTPMethodHasBeenSet = true; m_hTTPMethod = std::forward<HTTPMethodT>(value); }
163 template<typename HTTPMethodT = Aws::String>
164 SamplingRule& WithHTTPMethod(HTTPMethodT&& value) { SetHTTPMethod(std::forward<HTTPMethodT>(value)); return *this;}
166
168
171 inline const Aws::String& GetURLPath() const { return m_uRLPath; }
172 inline bool URLPathHasBeenSet() const { return m_uRLPathHasBeenSet; }
173 template<typename URLPathT = Aws::String>
174 void SetURLPath(URLPathT&& value) { m_uRLPathHasBeenSet = true; m_uRLPath = std::forward<URLPathT>(value); }
175 template<typename URLPathT = Aws::String>
176 SamplingRule& WithURLPath(URLPathT&& value) { SetURLPath(std::forward<URLPathT>(value)); return *this;}
178
180
183 inline int GetVersion() const { return m_version; }
184 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
185 inline void SetVersion(int value) { m_versionHasBeenSet = true; m_version = value; }
186 inline SamplingRule& WithVersion(int value) { SetVersion(value); return *this;}
188
190
193 inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const { return m_attributes; }
194 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
195 template<typename AttributesT = Aws::Map<Aws::String, Aws::String>>
196 void SetAttributes(AttributesT&& value) { m_attributesHasBeenSet = true; m_attributes = std::forward<AttributesT>(value); }
197 template<typename AttributesT = Aws::Map<Aws::String, Aws::String>>
198 SamplingRule& WithAttributes(AttributesT&& value) { SetAttributes(std::forward<AttributesT>(value)); return *this;}
199 template<typename AttributesKeyT = Aws::String, typename AttributesValueT = Aws::String>
200 SamplingRule& AddAttributes(AttributesKeyT&& key, AttributesValueT&& value) {
201 m_attributesHasBeenSet = true; m_attributes.emplace(std::forward<AttributesKeyT>(key), std::forward<AttributesValueT>(value)); return *this;
202 }
204
206
211 inline const SamplingRateBoost& GetSamplingRateBoost() const { return m_samplingRateBoost; }
212 inline bool SamplingRateBoostHasBeenSet() const { return m_samplingRateBoostHasBeenSet; }
213 template<typename SamplingRateBoostT = SamplingRateBoost>
214 void SetSamplingRateBoost(SamplingRateBoostT&& value) { m_samplingRateBoostHasBeenSet = true; m_samplingRateBoost = std::forward<SamplingRateBoostT>(value); }
215 template<typename SamplingRateBoostT = SamplingRateBoost>
216 SamplingRule& WithSamplingRateBoost(SamplingRateBoostT&& value) { SetSamplingRateBoost(std::forward<SamplingRateBoostT>(value)); return *this;}
218 private:
219
220 Aws::String m_ruleName;
221 bool m_ruleNameHasBeenSet = false;
222
223 Aws::String m_ruleARN;
224 bool m_ruleARNHasBeenSet = false;
225
226 Aws::String m_resourceARN;
227 bool m_resourceARNHasBeenSet = false;
228
229 int m_priority{0};
230 bool m_priorityHasBeenSet = false;
231
232 double m_fixedRate{0.0};
233 bool m_fixedRateHasBeenSet = false;
234
235 int m_reservoirSize{0};
236 bool m_reservoirSizeHasBeenSet = false;
237
238 Aws::String m_serviceName;
239 bool m_serviceNameHasBeenSet = false;
240
241 Aws::String m_serviceType;
242 bool m_serviceTypeHasBeenSet = false;
243
244 Aws::String m_host;
245 bool m_hostHasBeenSet = false;
246
247 Aws::String m_hTTPMethod;
248 bool m_hTTPMethodHasBeenSet = false;
249
250 Aws::String m_uRLPath;
251 bool m_uRLPathHasBeenSet = false;
252
253 int m_version{0};
254 bool m_versionHasBeenSet = false;
255
257 bool m_attributesHasBeenSet = false;
258
259 SamplingRateBoost m_samplingRateBoost;
260 bool m_samplingRateBoostHasBeenSet = false;
261 };
262
263} // namespace Model
264} // namespace XRay
265} // 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