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/core/utils/memory/stl/AWSString.h>
9 #include <aws/core/utils/DateTime.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Json
17 {
18   class JsonValue;
19   class JsonView;
20 } // namespace Json
21 } // namespace Utils
22 namespace XRay
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Aggregated request sampling data for a sampling rule across all services for
29    * a 10-second window.</p><p><h3>See Also:</h3>   <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/SamplingStatisticSummary">AWS
31    * API Reference</a></p>
32    */
33   class AWS_XRAY_API SamplingStatisticSummary
34   {
35   public:
36     SamplingStatisticSummary();
37     SamplingStatisticSummary(Aws::Utils::Json::JsonView jsonValue);
38     SamplingStatisticSummary& operator=(Aws::Utils::Json::JsonView jsonValue);
39     Aws::Utils::Json::JsonValue Jsonize() const;
40 
41 
42     /**
43      * <p>The name of the sampling rule.</p>
44      */
GetRuleName()45     inline const Aws::String& GetRuleName() const{ return m_ruleName; }
46 
47     /**
48      * <p>The name of the sampling rule.</p>
49      */
RuleNameHasBeenSet()50     inline bool RuleNameHasBeenSet() const { return m_ruleNameHasBeenSet; }
51 
52     /**
53      * <p>The name of the sampling rule.</p>
54      */
SetRuleName(const Aws::String & value)55     inline void SetRuleName(const Aws::String& value) { m_ruleNameHasBeenSet = true; m_ruleName = value; }
56 
57     /**
58      * <p>The name of the sampling rule.</p>
59      */
SetRuleName(Aws::String && value)60     inline void SetRuleName(Aws::String&& value) { m_ruleNameHasBeenSet = true; m_ruleName = std::move(value); }
61 
62     /**
63      * <p>The name of the sampling rule.</p>
64      */
SetRuleName(const char * value)65     inline void SetRuleName(const char* value) { m_ruleNameHasBeenSet = true; m_ruleName.assign(value); }
66 
67     /**
68      * <p>The name of the sampling rule.</p>
69      */
WithRuleName(const Aws::String & value)70     inline SamplingStatisticSummary& WithRuleName(const Aws::String& value) { SetRuleName(value); return *this;}
71 
72     /**
73      * <p>The name of the sampling rule.</p>
74      */
WithRuleName(Aws::String && value)75     inline SamplingStatisticSummary& WithRuleName(Aws::String&& value) { SetRuleName(std::move(value)); return *this;}
76 
77     /**
78      * <p>The name of the sampling rule.</p>
79      */
WithRuleName(const char * value)80     inline SamplingStatisticSummary& WithRuleName(const char* value) { SetRuleName(value); return *this;}
81 
82 
83     /**
84      * <p>The start time of the reporting window.</p>
85      */
GetTimestamp()86     inline const Aws::Utils::DateTime& GetTimestamp() const{ return m_timestamp; }
87 
88     /**
89      * <p>The start time of the reporting window.</p>
90      */
TimestampHasBeenSet()91     inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
92 
93     /**
94      * <p>The start time of the reporting window.</p>
95      */
SetTimestamp(const Aws::Utils::DateTime & value)96     inline void SetTimestamp(const Aws::Utils::DateTime& value) { m_timestampHasBeenSet = true; m_timestamp = value; }
97 
98     /**
99      * <p>The start time of the reporting window.</p>
100      */
SetTimestamp(Aws::Utils::DateTime && value)101     inline void SetTimestamp(Aws::Utils::DateTime&& value) { m_timestampHasBeenSet = true; m_timestamp = std::move(value); }
102 
103     /**
104      * <p>The start time of the reporting window.</p>
105      */
WithTimestamp(const Aws::Utils::DateTime & value)106     inline SamplingStatisticSummary& WithTimestamp(const Aws::Utils::DateTime& value) { SetTimestamp(value); return *this;}
107 
108     /**
109      * <p>The start time of the reporting window.</p>
110      */
WithTimestamp(Aws::Utils::DateTime && value)111     inline SamplingStatisticSummary& WithTimestamp(Aws::Utils::DateTime&& value) { SetTimestamp(std::move(value)); return *this;}
112 
113 
114     /**
115      * <p>The number of requests that matched the rule.</p>
116      */
GetRequestCount()117     inline int GetRequestCount() const{ return m_requestCount; }
118 
119     /**
120      * <p>The number of requests that matched the rule.</p>
121      */
RequestCountHasBeenSet()122     inline bool RequestCountHasBeenSet() const { return m_requestCountHasBeenSet; }
123 
124     /**
125      * <p>The number of requests that matched the rule.</p>
126      */
SetRequestCount(int value)127     inline void SetRequestCount(int value) { m_requestCountHasBeenSet = true; m_requestCount = value; }
128 
129     /**
130      * <p>The number of requests that matched the rule.</p>
131      */
WithRequestCount(int value)132     inline SamplingStatisticSummary& WithRequestCount(int value) { SetRequestCount(value); return *this;}
133 
134 
135     /**
136      * <p>The number of requests recorded with borrowed reservoir quota.</p>
137      */
GetBorrowCount()138     inline int GetBorrowCount() const{ return m_borrowCount; }
139 
140     /**
141      * <p>The number of requests recorded with borrowed reservoir quota.</p>
142      */
BorrowCountHasBeenSet()143     inline bool BorrowCountHasBeenSet() const { return m_borrowCountHasBeenSet; }
144 
145     /**
146      * <p>The number of requests recorded with borrowed reservoir quota.</p>
147      */
SetBorrowCount(int value)148     inline void SetBorrowCount(int value) { m_borrowCountHasBeenSet = true; m_borrowCount = value; }
149 
150     /**
151      * <p>The number of requests recorded with borrowed reservoir quota.</p>
152      */
WithBorrowCount(int value)153     inline SamplingStatisticSummary& WithBorrowCount(int value) { SetBorrowCount(value); return *this;}
154 
155 
156     /**
157      * <p>The number of requests recorded.</p>
158      */
GetSampledCount()159     inline int GetSampledCount() const{ return m_sampledCount; }
160 
161     /**
162      * <p>The number of requests recorded.</p>
163      */
SampledCountHasBeenSet()164     inline bool SampledCountHasBeenSet() const { return m_sampledCountHasBeenSet; }
165 
166     /**
167      * <p>The number of requests recorded.</p>
168      */
SetSampledCount(int value)169     inline void SetSampledCount(int value) { m_sampledCountHasBeenSet = true; m_sampledCount = value; }
170 
171     /**
172      * <p>The number of requests recorded.</p>
173      */
WithSampledCount(int value)174     inline SamplingStatisticSummary& WithSampledCount(int value) { SetSampledCount(value); return *this;}
175 
176   private:
177 
178     Aws::String m_ruleName;
179     bool m_ruleNameHasBeenSet;
180 
181     Aws::Utils::DateTime m_timestamp;
182     bool m_timestampHasBeenSet;
183 
184     int m_requestCount;
185     bool m_requestCountHasBeenSet;
186 
187     int m_borrowCount;
188     bool m_borrowCountHasBeenSet;
189 
190     int m_sampledCount;
191     bool m_sampledCountHasBeenSet;
192   };
193 
194 } // namespace Model
195 } // namespace XRay
196 } // namespace Aws
197