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/xray/model/ErrorStatistics.h> 9 #include <aws/xray/model/FaultStatistics.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>Response statistics for a service.</p><p><h3>See Also:</h3> <a 29 * href="http://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/ServiceStatistics">AWS 30 * API Reference</a></p> 31 */ 32 class AWS_XRAY_API ServiceStatistics 33 { 34 public: 35 ServiceStatistics(); 36 ServiceStatistics(Aws::Utils::Json::JsonView jsonValue); 37 ServiceStatistics& operator=(Aws::Utils::Json::JsonView jsonValue); 38 Aws::Utils::Json::JsonValue Jsonize() const; 39 40 41 /** 42 * <p>The number of requests that completed with a 2xx Success status code.</p> 43 */ GetOkCount()44 inline long long GetOkCount() const{ return m_okCount; } 45 46 /** 47 * <p>The number of requests that completed with a 2xx Success status code.</p> 48 */ OkCountHasBeenSet()49 inline bool OkCountHasBeenSet() const { return m_okCountHasBeenSet; } 50 51 /** 52 * <p>The number of requests that completed with a 2xx Success status code.</p> 53 */ SetOkCount(long long value)54 inline void SetOkCount(long long value) { m_okCountHasBeenSet = true; m_okCount = value; } 55 56 /** 57 * <p>The number of requests that completed with a 2xx Success status code.</p> 58 */ WithOkCount(long long value)59 inline ServiceStatistics& WithOkCount(long long value) { SetOkCount(value); return *this;} 60 61 62 /** 63 * <p>Information about requests that failed with a 4xx Client Error status 64 * code.</p> 65 */ GetErrorStatistics()66 inline const ErrorStatistics& GetErrorStatistics() const{ return m_errorStatistics; } 67 68 /** 69 * <p>Information about requests that failed with a 4xx Client Error status 70 * code.</p> 71 */ ErrorStatisticsHasBeenSet()72 inline bool ErrorStatisticsHasBeenSet() const { return m_errorStatisticsHasBeenSet; } 73 74 /** 75 * <p>Information about requests that failed with a 4xx Client Error status 76 * code.</p> 77 */ SetErrorStatistics(const ErrorStatistics & value)78 inline void SetErrorStatistics(const ErrorStatistics& value) { m_errorStatisticsHasBeenSet = true; m_errorStatistics = value; } 79 80 /** 81 * <p>Information about requests that failed with a 4xx Client Error status 82 * code.</p> 83 */ SetErrorStatistics(ErrorStatistics && value)84 inline void SetErrorStatistics(ErrorStatistics&& value) { m_errorStatisticsHasBeenSet = true; m_errorStatistics = std::move(value); } 85 86 /** 87 * <p>Information about requests that failed with a 4xx Client Error status 88 * code.</p> 89 */ WithErrorStatistics(const ErrorStatistics & value)90 inline ServiceStatistics& WithErrorStatistics(const ErrorStatistics& value) { SetErrorStatistics(value); return *this;} 91 92 /** 93 * <p>Information about requests that failed with a 4xx Client Error status 94 * code.</p> 95 */ WithErrorStatistics(ErrorStatistics && value)96 inline ServiceStatistics& WithErrorStatistics(ErrorStatistics&& value) { SetErrorStatistics(std::move(value)); return *this;} 97 98 99 /** 100 * <p>Information about requests that failed with a 5xx Server Error status 101 * code.</p> 102 */ GetFaultStatistics()103 inline const FaultStatistics& GetFaultStatistics() const{ return m_faultStatistics; } 104 105 /** 106 * <p>Information about requests that failed with a 5xx Server Error status 107 * code.</p> 108 */ FaultStatisticsHasBeenSet()109 inline bool FaultStatisticsHasBeenSet() const { return m_faultStatisticsHasBeenSet; } 110 111 /** 112 * <p>Information about requests that failed with a 5xx Server Error status 113 * code.</p> 114 */ SetFaultStatistics(const FaultStatistics & value)115 inline void SetFaultStatistics(const FaultStatistics& value) { m_faultStatisticsHasBeenSet = true; m_faultStatistics = value; } 116 117 /** 118 * <p>Information about requests that failed with a 5xx Server Error status 119 * code.</p> 120 */ SetFaultStatistics(FaultStatistics && value)121 inline void SetFaultStatistics(FaultStatistics&& value) { m_faultStatisticsHasBeenSet = true; m_faultStatistics = std::move(value); } 122 123 /** 124 * <p>Information about requests that failed with a 5xx Server Error status 125 * code.</p> 126 */ WithFaultStatistics(const FaultStatistics & value)127 inline ServiceStatistics& WithFaultStatistics(const FaultStatistics& value) { SetFaultStatistics(value); return *this;} 128 129 /** 130 * <p>Information about requests that failed with a 5xx Server Error status 131 * code.</p> 132 */ WithFaultStatistics(FaultStatistics && value)133 inline ServiceStatistics& WithFaultStatistics(FaultStatistics&& value) { SetFaultStatistics(std::move(value)); return *this;} 134 135 136 /** 137 * <p>The total number of completed requests.</p> 138 */ GetTotalCount()139 inline long long GetTotalCount() const{ return m_totalCount; } 140 141 /** 142 * <p>The total number of completed requests.</p> 143 */ TotalCountHasBeenSet()144 inline bool TotalCountHasBeenSet() const { return m_totalCountHasBeenSet; } 145 146 /** 147 * <p>The total number of completed requests.</p> 148 */ SetTotalCount(long long value)149 inline void SetTotalCount(long long value) { m_totalCountHasBeenSet = true; m_totalCount = value; } 150 151 /** 152 * <p>The total number of completed requests.</p> 153 */ WithTotalCount(long long value)154 inline ServiceStatistics& WithTotalCount(long long value) { SetTotalCount(value); return *this;} 155 156 157 /** 158 * <p>The aggregate response time of completed requests.</p> 159 */ GetTotalResponseTime()160 inline double GetTotalResponseTime() const{ return m_totalResponseTime; } 161 162 /** 163 * <p>The aggregate response time of completed requests.</p> 164 */ TotalResponseTimeHasBeenSet()165 inline bool TotalResponseTimeHasBeenSet() const { return m_totalResponseTimeHasBeenSet; } 166 167 /** 168 * <p>The aggregate response time of completed requests.</p> 169 */ SetTotalResponseTime(double value)170 inline void SetTotalResponseTime(double value) { m_totalResponseTimeHasBeenSet = true; m_totalResponseTime = value; } 171 172 /** 173 * <p>The aggregate response time of completed requests.</p> 174 */ WithTotalResponseTime(double value)175 inline ServiceStatistics& WithTotalResponseTime(double value) { SetTotalResponseTime(value); return *this;} 176 177 private: 178 179 long long m_okCount; 180 bool m_okCountHasBeenSet; 181 182 ErrorStatistics m_errorStatistics; 183 bool m_errorStatisticsHasBeenSet; 184 185 FaultStatistics m_faultStatistics; 186 bool m_faultStatisticsHasBeenSet; 187 188 long long m_totalCount; 189 bool m_totalCountHasBeenSet; 190 191 double m_totalResponseTime; 192 bool m_totalResponseTimeHasBeenSet; 193 }; 194 195 } // namespace Model 196 } // namespace XRay 197 } // namespace Aws 198