AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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() = default;
42
43
45
49 inline const Aws::String& GetRuleName() const { return m_ruleName; }
50 inline bool RuleNameHasBeenSet() const { return m_ruleNameHasBeenSet; }
51 template<typename RuleNameT = Aws::String>
52 void SetRuleName(RuleNameT&& value) { m_ruleNameHasBeenSet = true; m_ruleName = std::forward<RuleNameT>(value); }
53 template<typename RuleNameT = Aws::String>
54 SamplingRule& WithRuleName(RuleNameT&& value) { SetRuleName(std::forward<RuleNameT>(value)); return *this;}
56
58
62 inline const Aws::String& GetRuleARN() const { return m_ruleARN; }
63 inline bool RuleARNHasBeenSet() const { return m_ruleARNHasBeenSet; }
64 template<typename RuleARNT = Aws::String>
65 void SetRuleARN(RuleARNT&& value) { m_ruleARNHasBeenSet = true; m_ruleARN = std::forward<RuleARNT>(value); }
66 template<typename RuleARNT = Aws::String>
67 SamplingRule& WithRuleARN(RuleARNT&& value) { SetRuleARN(std::forward<RuleARNT>(value)); return *this;}
69
71
75 inline const Aws::String& GetResourceARN() const { return m_resourceARN; }
76 inline bool ResourceARNHasBeenSet() const { return m_resourceARNHasBeenSet; }
77 template<typename ResourceARNT = Aws::String>
78 void SetResourceARN(ResourceARNT&& value) { m_resourceARNHasBeenSet = true; m_resourceARN = std::forward<ResourceARNT>(value); }
79 template<typename ResourceARNT = Aws::String>
80 SamplingRule& WithResourceARN(ResourceARNT&& value) { SetResourceARN(std::forward<ResourceARNT>(value)); return *this;}
82
84
87 inline int GetPriority() const { return m_priority; }
88 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
89 inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; }
90 inline SamplingRule& WithPriority(int value) { SetPriority(value); return *this;}
92
94
98 inline double GetFixedRate() const { return m_fixedRate; }
99 inline bool FixedRateHasBeenSet() const { return m_fixedRateHasBeenSet; }
100 inline void SetFixedRate(double value) { m_fixedRateHasBeenSet = true; m_fixedRate = value; }
101 inline SamplingRule& WithFixedRate(double value) { SetFixedRate(value); return *this;}
103
105
110 inline int GetReservoirSize() const { return m_reservoirSize; }
111 inline bool ReservoirSizeHasBeenSet() const { return m_reservoirSizeHasBeenSet; }
112 inline void SetReservoirSize(int value) { m_reservoirSizeHasBeenSet = true; m_reservoirSize = value; }
113 inline SamplingRule& WithReservoirSize(int value) { SetReservoirSize(value); return *this;}
115
117
121 inline const Aws::String& GetServiceName() const { return m_serviceName; }
122 inline bool ServiceNameHasBeenSet() const { return m_serviceNameHasBeenSet; }
123 template<typename ServiceNameT = Aws::String>
124 void SetServiceName(ServiceNameT&& value) { m_serviceNameHasBeenSet = true; m_serviceName = std::forward<ServiceNameT>(value); }
125 template<typename ServiceNameT = Aws::String>
126 SamplingRule& WithServiceName(ServiceNameT&& value) { SetServiceName(std::forward<ServiceNameT>(value)); return *this;}
128
130
134 inline const Aws::String& GetServiceType() const { return m_serviceType; }
135 inline bool ServiceTypeHasBeenSet() const { return m_serviceTypeHasBeenSet; }
136 template<typename ServiceTypeT = Aws::String>
137 void SetServiceType(ServiceTypeT&& value) { m_serviceTypeHasBeenSet = true; m_serviceType = std::forward<ServiceTypeT>(value); }
138 template<typename ServiceTypeT = Aws::String>
139 SamplingRule& WithServiceType(ServiceTypeT&& value) { SetServiceType(std::forward<ServiceTypeT>(value)); return *this;}
141
143
146 inline const Aws::String& GetHost() const { return m_host; }
147 inline bool HostHasBeenSet() const { return m_hostHasBeenSet; }
148 template<typename HostT = Aws::String>
149 void SetHost(HostT&& value) { m_hostHasBeenSet = true; m_host = std::forward<HostT>(value); }
150 template<typename HostT = Aws::String>
151 SamplingRule& WithHost(HostT&& value) { SetHost(std::forward<HostT>(value)); return *this;}
153
155
158 inline const Aws::String& GetHTTPMethod() const { return m_hTTPMethod; }
159 inline bool HTTPMethodHasBeenSet() const { return m_hTTPMethodHasBeenSet; }
160 template<typename HTTPMethodT = Aws::String>
161 void SetHTTPMethod(HTTPMethodT&& value) { m_hTTPMethodHasBeenSet = true; m_hTTPMethod = std::forward<HTTPMethodT>(value); }
162 template<typename HTTPMethodT = Aws::String>
163 SamplingRule& WithHTTPMethod(HTTPMethodT&& value) { SetHTTPMethod(std::forward<HTTPMethodT>(value)); return *this;}
165
167
170 inline const Aws::String& GetURLPath() const { return m_uRLPath; }
171 inline bool URLPathHasBeenSet() const { return m_uRLPathHasBeenSet; }
172 template<typename URLPathT = Aws::String>
173 void SetURLPath(URLPathT&& value) { m_uRLPathHasBeenSet = true; m_uRLPath = std::forward<URLPathT>(value); }
174 template<typename URLPathT = Aws::String>
175 SamplingRule& WithURLPath(URLPathT&& value) { SetURLPath(std::forward<URLPathT>(value)); return *this;}
177
179
182 inline int GetVersion() const { return m_version; }
183 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
184 inline void SetVersion(int value) { m_versionHasBeenSet = true; m_version = value; }
185 inline SamplingRule& WithVersion(int value) { SetVersion(value); return *this;}
187
189
192 inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const { return m_attributes; }
193 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
194 template<typename AttributesT = Aws::Map<Aws::String, Aws::String>>
195 void SetAttributes(AttributesT&& value) { m_attributesHasBeenSet = true; m_attributes = std::forward<AttributesT>(value); }
196 template<typename AttributesT = Aws::Map<Aws::String, Aws::String>>
197 SamplingRule& WithAttributes(AttributesT&& value) { SetAttributes(std::forward<AttributesT>(value)); return *this;}
198 template<typename AttributesKeyT = Aws::String, typename AttributesValueT = Aws::String>
199 SamplingRule& AddAttributes(AttributesKeyT&& key, AttributesValueT&& value) {
200 m_attributesHasBeenSet = true; m_attributes.emplace(std::forward<AttributesKeyT>(key), std::forward<AttributesValueT>(value)); return *this;
201 }
203 private:
204
205 Aws::String m_ruleName;
206 bool m_ruleNameHasBeenSet = false;
207
208 Aws::String m_ruleARN;
209 bool m_ruleARNHasBeenSet = false;
210
211 Aws::String m_resourceARN;
212 bool m_resourceARNHasBeenSet = false;
213
214 int m_priority{0};
215 bool m_priorityHasBeenSet = false;
216
217 double m_fixedRate{0.0};
218 bool m_fixedRateHasBeenSet = false;
219
220 int m_reservoirSize{0};
221 bool m_reservoirSizeHasBeenSet = false;
222
223 Aws::String m_serviceName;
224 bool m_serviceNameHasBeenSet = false;
225
226 Aws::String m_serviceType;
227 bool m_serviceTypeHasBeenSet = false;
228
229 Aws::String m_host;
230 bool m_hostHasBeenSet = false;
231
232 Aws::String m_hTTPMethod;
233 bool m_hTTPMethodHasBeenSet = false;
234
235 Aws::String m_uRLPath;
236 bool m_uRLPathHasBeenSet = false;
237
238 int m_version{0};
239 bool m_versionHasBeenSet = false;
240
242 bool m_attributesHasBeenSet = false;
243 };
244
245} // namespace Model
246} // namespace XRay
247} // 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)
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)
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)
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