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/monitoring/CloudWatch_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <aws/core/utils/DateTime.h> 12 #include <aws/monitoring/model/StatisticSet.h> 13 #include <aws/monitoring/model/StandardUnit.h> 14 #include <aws/monitoring/model/Dimension.h> 15 #include <utility> 16 17 namespace Aws 18 { 19 namespace Utils 20 { 21 namespace Xml 22 { 23 class XmlNode; 24 } // namespace Xml 25 } // namespace Utils 26 namespace CloudWatch 27 { 28 namespace Model 29 { 30 31 /** 32 * <p>Encapsulates the information sent to either create a metric or add new values 33 * to be aggregated into an existing metric.</p><p><h3>See Also:</h3> <a 34 * href="http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/MetricDatum">AWS 35 * API Reference</a></p> 36 */ 37 class AWS_CLOUDWATCH_API MetricDatum 38 { 39 public: 40 MetricDatum(); 41 MetricDatum(const Aws::Utils::Xml::XmlNode& xmlNode); 42 MetricDatum& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 43 44 void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 45 void OutputToStream(Aws::OStream& oStream, const char* location) const; 46 47 48 /** 49 * <p>The name of the metric.</p> 50 */ GetMetricName()51 inline const Aws::String& GetMetricName() const{ return m_metricName; } 52 53 /** 54 * <p>The name of the metric.</p> 55 */ MetricNameHasBeenSet()56 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; } 57 58 /** 59 * <p>The name of the metric.</p> 60 */ SetMetricName(const Aws::String & value)61 inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; } 62 63 /** 64 * <p>The name of the metric.</p> 65 */ SetMetricName(Aws::String && value)66 inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); } 67 68 /** 69 * <p>The name of the metric.</p> 70 */ SetMetricName(const char * value)71 inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); } 72 73 /** 74 * <p>The name of the metric.</p> 75 */ WithMetricName(const Aws::String & value)76 inline MetricDatum& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;} 77 78 /** 79 * <p>The name of the metric.</p> 80 */ WithMetricName(Aws::String && value)81 inline MetricDatum& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;} 82 83 /** 84 * <p>The name of the metric.</p> 85 */ WithMetricName(const char * value)86 inline MetricDatum& WithMetricName(const char* value) { SetMetricName(value); return *this;} 87 88 89 /** 90 * <p>The dimensions associated with the metric.</p> 91 */ GetDimensions()92 inline const Aws::Vector<Dimension>& GetDimensions() const{ return m_dimensions; } 93 94 /** 95 * <p>The dimensions associated with the metric.</p> 96 */ DimensionsHasBeenSet()97 inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; } 98 99 /** 100 * <p>The dimensions associated with the metric.</p> 101 */ SetDimensions(const Aws::Vector<Dimension> & value)102 inline void SetDimensions(const Aws::Vector<Dimension>& value) { m_dimensionsHasBeenSet = true; m_dimensions = value; } 103 104 /** 105 * <p>The dimensions associated with the metric.</p> 106 */ SetDimensions(Aws::Vector<Dimension> && value)107 inline void SetDimensions(Aws::Vector<Dimension>&& value) { m_dimensionsHasBeenSet = true; m_dimensions = std::move(value); } 108 109 /** 110 * <p>The dimensions associated with the metric.</p> 111 */ WithDimensions(const Aws::Vector<Dimension> & value)112 inline MetricDatum& WithDimensions(const Aws::Vector<Dimension>& value) { SetDimensions(value); return *this;} 113 114 /** 115 * <p>The dimensions associated with the metric.</p> 116 */ WithDimensions(Aws::Vector<Dimension> && value)117 inline MetricDatum& WithDimensions(Aws::Vector<Dimension>&& value) { SetDimensions(std::move(value)); return *this;} 118 119 /** 120 * <p>The dimensions associated with the metric.</p> 121 */ AddDimensions(const Dimension & value)122 inline MetricDatum& AddDimensions(const Dimension& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(value); return *this; } 123 124 /** 125 * <p>The dimensions associated with the metric.</p> 126 */ AddDimensions(Dimension && value)127 inline MetricDatum& AddDimensions(Dimension&& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(std::move(value)); return *this; } 128 129 130 /** 131 * <p>The time the metric data was received, expressed as the number of 132 * milliseconds since Jan 1, 1970 00:00:00 UTC.</p> 133 */ GetTimestamp()134 inline const Aws::Utils::DateTime& GetTimestamp() const{ return m_timestamp; } 135 136 /** 137 * <p>The time the metric data was received, expressed as the number of 138 * milliseconds since Jan 1, 1970 00:00:00 UTC.</p> 139 */ TimestampHasBeenSet()140 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; } 141 142 /** 143 * <p>The time the metric data was received, expressed as the number of 144 * milliseconds since Jan 1, 1970 00:00:00 UTC.</p> 145 */ SetTimestamp(const Aws::Utils::DateTime & value)146 inline void SetTimestamp(const Aws::Utils::DateTime& value) { m_timestampHasBeenSet = true; m_timestamp = value; } 147 148 /** 149 * <p>The time the metric data was received, expressed as the number of 150 * milliseconds since Jan 1, 1970 00:00:00 UTC.</p> 151 */ SetTimestamp(Aws::Utils::DateTime && value)152 inline void SetTimestamp(Aws::Utils::DateTime&& value) { m_timestampHasBeenSet = true; m_timestamp = std::move(value); } 153 154 /** 155 * <p>The time the metric data was received, expressed as the number of 156 * milliseconds since Jan 1, 1970 00:00:00 UTC.</p> 157 */ WithTimestamp(const Aws::Utils::DateTime & value)158 inline MetricDatum& WithTimestamp(const Aws::Utils::DateTime& value) { SetTimestamp(value); return *this;} 159 160 /** 161 * <p>The time the metric data was received, expressed as the number of 162 * milliseconds since Jan 1, 1970 00:00:00 UTC.</p> 163 */ WithTimestamp(Aws::Utils::DateTime && value)164 inline MetricDatum& WithTimestamp(Aws::Utils::DateTime&& value) { SetTimestamp(std::move(value)); return *this;} 165 166 167 /** 168 * <p>The value for the metric.</p> <p>Although the parameter accepts numbers of 169 * type Double, CloudWatch rejects values that are either too small or too large. 170 * Values must be in the range of -2^360 to 2^360. In addition, special values (for 171 * example, NaN, +Infinity, -Infinity) are not supported.</p> 172 */ GetValue()173 inline double GetValue() const{ return m_value; } 174 175 /** 176 * <p>The value for the metric.</p> <p>Although the parameter accepts numbers of 177 * type Double, CloudWatch rejects values that are either too small or too large. 178 * Values must be in the range of -2^360 to 2^360. In addition, special values (for 179 * example, NaN, +Infinity, -Infinity) are not supported.</p> 180 */ ValueHasBeenSet()181 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } 182 183 /** 184 * <p>The value for the metric.</p> <p>Although the parameter accepts numbers of 185 * type Double, CloudWatch rejects values that are either too small or too large. 186 * Values must be in the range of -2^360 to 2^360. In addition, special values (for 187 * example, NaN, +Infinity, -Infinity) are not supported.</p> 188 */ SetValue(double value)189 inline void SetValue(double value) { m_valueHasBeenSet = true; m_value = value; } 190 191 /** 192 * <p>The value for the metric.</p> <p>Although the parameter accepts numbers of 193 * type Double, CloudWatch rejects values that are either too small or too large. 194 * Values must be in the range of -2^360 to 2^360. In addition, special values (for 195 * example, NaN, +Infinity, -Infinity) are not supported.</p> 196 */ WithValue(double value)197 inline MetricDatum& WithValue(double value) { SetValue(value); return *this;} 198 199 200 /** 201 * <p>The statistical values for the metric.</p> 202 */ GetStatisticValues()203 inline const StatisticSet& GetStatisticValues() const{ return m_statisticValues; } 204 205 /** 206 * <p>The statistical values for the metric.</p> 207 */ StatisticValuesHasBeenSet()208 inline bool StatisticValuesHasBeenSet() const { return m_statisticValuesHasBeenSet; } 209 210 /** 211 * <p>The statistical values for the metric.</p> 212 */ SetStatisticValues(const StatisticSet & value)213 inline void SetStatisticValues(const StatisticSet& value) { m_statisticValuesHasBeenSet = true; m_statisticValues = value; } 214 215 /** 216 * <p>The statistical values for the metric.</p> 217 */ SetStatisticValues(StatisticSet && value)218 inline void SetStatisticValues(StatisticSet&& value) { m_statisticValuesHasBeenSet = true; m_statisticValues = std::move(value); } 219 220 /** 221 * <p>The statistical values for the metric.</p> 222 */ WithStatisticValues(const StatisticSet & value)223 inline MetricDatum& WithStatisticValues(const StatisticSet& value) { SetStatisticValues(value); return *this;} 224 225 /** 226 * <p>The statistical values for the metric.</p> 227 */ WithStatisticValues(StatisticSet && value)228 inline MetricDatum& WithStatisticValues(StatisticSet&& value) { SetStatisticValues(std::move(value)); return *this;} 229 230 231 /** 232 * <p>Array of numbers representing the values for the metric during the period. 233 * Each unique value is listed just once in this array, and the corresponding 234 * number in the <code>Counts</code> array specifies the number of times that value 235 * occurred during the period. You can include up to 150 unique values in each 236 * <code>PutMetricData</code> action that specifies a <code>Values</code> 237 * array.</p> <p>Although the <code>Values</code> array accepts numbers of type 238 * <code>Double</code>, CloudWatch rejects values that are either too small or too 239 * large. Values must be in the range of -2^360 to 2^360. In addition, special 240 * values (for example, NaN, +Infinity, -Infinity) are not supported.</p> 241 */ GetValues()242 inline const Aws::Vector<double>& GetValues() const{ return m_values; } 243 244 /** 245 * <p>Array of numbers representing the values for the metric during the period. 246 * Each unique value is listed just once in this array, and the corresponding 247 * number in the <code>Counts</code> array specifies the number of times that value 248 * occurred during the period. You can include up to 150 unique values in each 249 * <code>PutMetricData</code> action that specifies a <code>Values</code> 250 * array.</p> <p>Although the <code>Values</code> array accepts numbers of type 251 * <code>Double</code>, CloudWatch rejects values that are either too small or too 252 * large. Values must be in the range of -2^360 to 2^360. In addition, special 253 * values (for example, NaN, +Infinity, -Infinity) are not supported.</p> 254 */ ValuesHasBeenSet()255 inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; } 256 257 /** 258 * <p>Array of numbers representing the values for the metric during the period. 259 * Each unique value is listed just once in this array, and the corresponding 260 * number in the <code>Counts</code> array specifies the number of times that value 261 * occurred during the period. You can include up to 150 unique values in each 262 * <code>PutMetricData</code> action that specifies a <code>Values</code> 263 * array.</p> <p>Although the <code>Values</code> array accepts numbers of type 264 * <code>Double</code>, CloudWatch rejects values that are either too small or too 265 * large. Values must be in the range of -2^360 to 2^360. In addition, special 266 * values (for example, NaN, +Infinity, -Infinity) are not supported.</p> 267 */ SetValues(const Aws::Vector<double> & value)268 inline void SetValues(const Aws::Vector<double>& value) { m_valuesHasBeenSet = true; m_values = value; } 269 270 /** 271 * <p>Array of numbers representing the values for the metric during the period. 272 * Each unique value is listed just once in this array, and the corresponding 273 * number in the <code>Counts</code> array specifies the number of times that value 274 * occurred during the period. You can include up to 150 unique values in each 275 * <code>PutMetricData</code> action that specifies a <code>Values</code> 276 * array.</p> <p>Although the <code>Values</code> array accepts numbers of type 277 * <code>Double</code>, CloudWatch rejects values that are either too small or too 278 * large. Values must be in the range of -2^360 to 2^360. In addition, special 279 * values (for example, NaN, +Infinity, -Infinity) are not supported.</p> 280 */ SetValues(Aws::Vector<double> && value)281 inline void SetValues(Aws::Vector<double>&& value) { m_valuesHasBeenSet = true; m_values = std::move(value); } 282 283 /** 284 * <p>Array of numbers representing the values for the metric during the period. 285 * Each unique value is listed just once in this array, and the corresponding 286 * number in the <code>Counts</code> array specifies the number of times that value 287 * occurred during the period. You can include up to 150 unique values in each 288 * <code>PutMetricData</code> action that specifies a <code>Values</code> 289 * array.</p> <p>Although the <code>Values</code> array accepts numbers of type 290 * <code>Double</code>, CloudWatch rejects values that are either too small or too 291 * large. Values must be in the range of -2^360 to 2^360. In addition, special 292 * values (for example, NaN, +Infinity, -Infinity) are not supported.</p> 293 */ WithValues(const Aws::Vector<double> & value)294 inline MetricDatum& WithValues(const Aws::Vector<double>& value) { SetValues(value); return *this;} 295 296 /** 297 * <p>Array of numbers representing the values for the metric during the period. 298 * Each unique value is listed just once in this array, and the corresponding 299 * number in the <code>Counts</code> array specifies the number of times that value 300 * occurred during the period. You can include up to 150 unique values in each 301 * <code>PutMetricData</code> action that specifies a <code>Values</code> 302 * array.</p> <p>Although the <code>Values</code> array accepts numbers of type 303 * <code>Double</code>, CloudWatch rejects values that are either too small or too 304 * large. Values must be in the range of -2^360 to 2^360. In addition, special 305 * values (for example, NaN, +Infinity, -Infinity) are not supported.</p> 306 */ WithValues(Aws::Vector<double> && value)307 inline MetricDatum& WithValues(Aws::Vector<double>&& value) { SetValues(std::move(value)); return *this;} 308 309 /** 310 * <p>Array of numbers representing the values for the metric during the period. 311 * Each unique value is listed just once in this array, and the corresponding 312 * number in the <code>Counts</code> array specifies the number of times that value 313 * occurred during the period. You can include up to 150 unique values in each 314 * <code>PutMetricData</code> action that specifies a <code>Values</code> 315 * array.</p> <p>Although the <code>Values</code> array accepts numbers of type 316 * <code>Double</code>, CloudWatch rejects values that are either too small or too 317 * large. Values must be in the range of -2^360 to 2^360. In addition, special 318 * values (for example, NaN, +Infinity, -Infinity) are not supported.</p> 319 */ AddValues(double value)320 inline MetricDatum& AddValues(double value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; } 321 322 323 /** 324 * <p>Array of numbers that is used along with the <code>Values</code> array. Each 325 * number in the <code>Count</code> array is the number of times the corresponding 326 * value in the <code>Values</code> array occurred during the period. </p> <p>If 327 * you omit the <code>Counts</code> array, the default of 1 is used as the value 328 * for each count. If you include a <code>Counts</code> array, it must include the 329 * same amount of values as the <code>Values</code> array.</p> 330 */ GetCounts()331 inline const Aws::Vector<double>& GetCounts() const{ return m_counts; } 332 333 /** 334 * <p>Array of numbers that is used along with the <code>Values</code> array. Each 335 * number in the <code>Count</code> array is the number of times the corresponding 336 * value in the <code>Values</code> array occurred during the period. </p> <p>If 337 * you omit the <code>Counts</code> array, the default of 1 is used as the value 338 * for each count. If you include a <code>Counts</code> array, it must include the 339 * same amount of values as the <code>Values</code> array.</p> 340 */ CountsHasBeenSet()341 inline bool CountsHasBeenSet() const { return m_countsHasBeenSet; } 342 343 /** 344 * <p>Array of numbers that is used along with the <code>Values</code> array. Each 345 * number in the <code>Count</code> array is the number of times the corresponding 346 * value in the <code>Values</code> array occurred during the period. </p> <p>If 347 * you omit the <code>Counts</code> array, the default of 1 is used as the value 348 * for each count. If you include a <code>Counts</code> array, it must include the 349 * same amount of values as the <code>Values</code> array.</p> 350 */ SetCounts(const Aws::Vector<double> & value)351 inline void SetCounts(const Aws::Vector<double>& value) { m_countsHasBeenSet = true; m_counts = value; } 352 353 /** 354 * <p>Array of numbers that is used along with the <code>Values</code> array. Each 355 * number in the <code>Count</code> array is the number of times the corresponding 356 * value in the <code>Values</code> array occurred during the period. </p> <p>If 357 * you omit the <code>Counts</code> array, the default of 1 is used as the value 358 * for each count. If you include a <code>Counts</code> array, it must include the 359 * same amount of values as the <code>Values</code> array.</p> 360 */ SetCounts(Aws::Vector<double> && value)361 inline void SetCounts(Aws::Vector<double>&& value) { m_countsHasBeenSet = true; m_counts = std::move(value); } 362 363 /** 364 * <p>Array of numbers that is used along with the <code>Values</code> array. Each 365 * number in the <code>Count</code> array is the number of times the corresponding 366 * value in the <code>Values</code> array occurred during the period. </p> <p>If 367 * you omit the <code>Counts</code> array, the default of 1 is used as the value 368 * for each count. If you include a <code>Counts</code> array, it must include the 369 * same amount of values as the <code>Values</code> array.</p> 370 */ WithCounts(const Aws::Vector<double> & value)371 inline MetricDatum& WithCounts(const Aws::Vector<double>& value) { SetCounts(value); return *this;} 372 373 /** 374 * <p>Array of numbers that is used along with the <code>Values</code> array. Each 375 * number in the <code>Count</code> array is the number of times the corresponding 376 * value in the <code>Values</code> array occurred during the period. </p> <p>If 377 * you omit the <code>Counts</code> array, the default of 1 is used as the value 378 * for each count. If you include a <code>Counts</code> array, it must include the 379 * same amount of values as the <code>Values</code> array.</p> 380 */ WithCounts(Aws::Vector<double> && value)381 inline MetricDatum& WithCounts(Aws::Vector<double>&& value) { SetCounts(std::move(value)); return *this;} 382 383 /** 384 * <p>Array of numbers that is used along with the <code>Values</code> array. Each 385 * number in the <code>Count</code> array is the number of times the corresponding 386 * value in the <code>Values</code> array occurred during the period. </p> <p>If 387 * you omit the <code>Counts</code> array, the default of 1 is used as the value 388 * for each count. If you include a <code>Counts</code> array, it must include the 389 * same amount of values as the <code>Values</code> array.</p> 390 */ AddCounts(double value)391 inline MetricDatum& AddCounts(double value) { m_countsHasBeenSet = true; m_counts.push_back(value); return *this; } 392 393 394 /** 395 * <p>When you are using a <code>Put</code> operation, this defines what unit you 396 * want to use when storing the metric.</p> <p>In a <code>Get</code> operation, 397 * this displays the unit that is used for the metric.</p> 398 */ GetUnit()399 inline const StandardUnit& GetUnit() const{ return m_unit; } 400 401 /** 402 * <p>When you are using a <code>Put</code> operation, this defines what unit you 403 * want to use when storing the metric.</p> <p>In a <code>Get</code> operation, 404 * this displays the unit that is used for the metric.</p> 405 */ UnitHasBeenSet()406 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; } 407 408 /** 409 * <p>When you are using a <code>Put</code> operation, this defines what unit you 410 * want to use when storing the metric.</p> <p>In a <code>Get</code> operation, 411 * this displays the unit that is used for the metric.</p> 412 */ SetUnit(const StandardUnit & value)413 inline void SetUnit(const StandardUnit& value) { m_unitHasBeenSet = true; m_unit = value; } 414 415 /** 416 * <p>When you are using a <code>Put</code> operation, this defines what unit you 417 * want to use when storing the metric.</p> <p>In a <code>Get</code> operation, 418 * this displays the unit that is used for the metric.</p> 419 */ SetUnit(StandardUnit && value)420 inline void SetUnit(StandardUnit&& value) { m_unitHasBeenSet = true; m_unit = std::move(value); } 421 422 /** 423 * <p>When you are using a <code>Put</code> operation, this defines what unit you 424 * want to use when storing the metric.</p> <p>In a <code>Get</code> operation, 425 * this displays the unit that is used for the metric.</p> 426 */ WithUnit(const StandardUnit & value)427 inline MetricDatum& WithUnit(const StandardUnit& value) { SetUnit(value); return *this;} 428 429 /** 430 * <p>When you are using a <code>Put</code> operation, this defines what unit you 431 * want to use when storing the metric.</p> <p>In a <code>Get</code> operation, 432 * this displays the unit that is used for the metric.</p> 433 */ WithUnit(StandardUnit && value)434 inline MetricDatum& WithUnit(StandardUnit&& value) { SetUnit(std::move(value)); return *this;} 435 436 437 /** 438 * <p>Valid values are 1 and 60. Setting this to 1 specifies this metric as a 439 * high-resolution metric, so that CloudWatch stores the metric with sub-minute 440 * resolution down to one second. Setting this to 60 specifies this metric as a 441 * regular-resolution metric, which CloudWatch stores at 1-minute resolution. 442 * Currently, high resolution is available only for custom metrics. For more 443 * information about high-resolution metrics, see <a 444 * href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html#high-resolution-metrics">High-Resolution 445 * Metrics</a> in the <i>Amazon CloudWatch User Guide</i>. </p> <p>This field is 446 * optional, if you do not specify it the default of 60 is used.</p> 447 */ GetStorageResolution()448 inline int GetStorageResolution() const{ return m_storageResolution; } 449 450 /** 451 * <p>Valid values are 1 and 60. Setting this to 1 specifies this metric as a 452 * high-resolution metric, so that CloudWatch stores the metric with sub-minute 453 * resolution down to one second. Setting this to 60 specifies this metric as a 454 * regular-resolution metric, which CloudWatch stores at 1-minute resolution. 455 * Currently, high resolution is available only for custom metrics. For more 456 * information about high-resolution metrics, see <a 457 * href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html#high-resolution-metrics">High-Resolution 458 * Metrics</a> in the <i>Amazon CloudWatch User Guide</i>. </p> <p>This field is 459 * optional, if you do not specify it the default of 60 is used.</p> 460 */ StorageResolutionHasBeenSet()461 inline bool StorageResolutionHasBeenSet() const { return m_storageResolutionHasBeenSet; } 462 463 /** 464 * <p>Valid values are 1 and 60. Setting this to 1 specifies this metric as a 465 * high-resolution metric, so that CloudWatch stores the metric with sub-minute 466 * resolution down to one second. Setting this to 60 specifies this metric as a 467 * regular-resolution metric, which CloudWatch stores at 1-minute resolution. 468 * Currently, high resolution is available only for custom metrics. For more 469 * information about high-resolution metrics, see <a 470 * href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html#high-resolution-metrics">High-Resolution 471 * Metrics</a> in the <i>Amazon CloudWatch User Guide</i>. </p> <p>This field is 472 * optional, if you do not specify it the default of 60 is used.</p> 473 */ SetStorageResolution(int value)474 inline void SetStorageResolution(int value) { m_storageResolutionHasBeenSet = true; m_storageResolution = value; } 475 476 /** 477 * <p>Valid values are 1 and 60. Setting this to 1 specifies this metric as a 478 * high-resolution metric, so that CloudWatch stores the metric with sub-minute 479 * resolution down to one second. Setting this to 60 specifies this metric as a 480 * regular-resolution metric, which CloudWatch stores at 1-minute resolution. 481 * Currently, high resolution is available only for custom metrics. For more 482 * information about high-resolution metrics, see <a 483 * href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html#high-resolution-metrics">High-Resolution 484 * Metrics</a> in the <i>Amazon CloudWatch User Guide</i>. </p> <p>This field is 485 * optional, if you do not specify it the default of 60 is used.</p> 486 */ WithStorageResolution(int value)487 inline MetricDatum& WithStorageResolution(int value) { SetStorageResolution(value); return *this;} 488 489 private: 490 491 Aws::String m_metricName; 492 bool m_metricNameHasBeenSet; 493 494 Aws::Vector<Dimension> m_dimensions; 495 bool m_dimensionsHasBeenSet; 496 497 Aws::Utils::DateTime m_timestamp; 498 bool m_timestampHasBeenSet; 499 500 double m_value; 501 bool m_valueHasBeenSet; 502 503 StatisticSet m_statisticValues; 504 bool m_statisticValuesHasBeenSet; 505 506 Aws::Vector<double> m_values; 507 bool m_valuesHasBeenSet; 508 509 Aws::Vector<double> m_counts; 510 bool m_countsHasBeenSet; 511 512 StandardUnit m_unit; 513 bool m_unitHasBeenSet; 514 515 int m_storageResolution; 516 bool m_storageResolutionHasBeenSet; 517 }; 518 519 } // namespace Model 520 } // namespace CloudWatch 521 } // namespace Aws 522