/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace ElasticBeanstalk { namespace Model { /** *

Application request metrics for an AWS Elastic Beanstalk * environment.

See Also:

AWS * API Reference

*/ class ApplicationMetrics { public: AWS_ELASTICBEANSTALK_API ApplicationMetrics(); AWS_ELASTICBEANSTALK_API ApplicationMetrics(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICBEANSTALK_API ApplicationMetrics& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICBEANSTALK_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_ELASTICBEANSTALK_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The amount of time that the metrics cover (usually 10 seconds). For example, * you might have 5 requests (request_count) within the most recent * time slice of 10 seconds (duration).

*/ inline int GetDuration() const{ return m_duration; } /** *

The amount of time that the metrics cover (usually 10 seconds). For example, * you might have 5 requests (request_count) within the most recent * time slice of 10 seconds (duration).

*/ inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; } /** *

The amount of time that the metrics cover (usually 10 seconds). For example, * you might have 5 requests (request_count) within the most recent * time slice of 10 seconds (duration).

*/ inline void SetDuration(int value) { m_durationHasBeenSet = true; m_duration = value; } /** *

The amount of time that the metrics cover (usually 10 seconds). For example, * you might have 5 requests (request_count) within the most recent * time slice of 10 seconds (duration).

*/ inline ApplicationMetrics& WithDuration(int value) { SetDuration(value); return *this;} /** *

Average number of requests handled by the web server per second over the last * 10 seconds.

*/ inline int GetRequestCount() const{ return m_requestCount; } /** *

Average number of requests handled by the web server per second over the last * 10 seconds.

*/ inline bool RequestCountHasBeenSet() const { return m_requestCountHasBeenSet; } /** *

Average number of requests handled by the web server per second over the last * 10 seconds.

*/ inline void SetRequestCount(int value) { m_requestCountHasBeenSet = true; m_requestCount = value; } /** *

Average number of requests handled by the web server per second over the last * 10 seconds.

*/ inline ApplicationMetrics& WithRequestCount(int value) { SetRequestCount(value); return *this;} /** *

Represents the percentage of requests over the last 10 seconds that resulted * in each type of status code response.

*/ inline const StatusCodes& GetStatusCodes() const{ return m_statusCodes; } /** *

Represents the percentage of requests over the last 10 seconds that resulted * in each type of status code response.

*/ inline bool StatusCodesHasBeenSet() const { return m_statusCodesHasBeenSet; } /** *

Represents the percentage of requests over the last 10 seconds that resulted * in each type of status code response.

*/ inline void SetStatusCodes(const StatusCodes& value) { m_statusCodesHasBeenSet = true; m_statusCodes = value; } /** *

Represents the percentage of requests over the last 10 seconds that resulted * in each type of status code response.

*/ inline void SetStatusCodes(StatusCodes&& value) { m_statusCodesHasBeenSet = true; m_statusCodes = std::move(value); } /** *

Represents the percentage of requests over the last 10 seconds that resulted * in each type of status code response.

*/ inline ApplicationMetrics& WithStatusCodes(const StatusCodes& value) { SetStatusCodes(value); return *this;} /** *

Represents the percentage of requests over the last 10 seconds that resulted * in each type of status code response.

*/ inline ApplicationMetrics& WithStatusCodes(StatusCodes&& value) { SetStatusCodes(std::move(value)); return *this;} /** *

Represents the average latency for the slowest X percent of requests over the * last 10 seconds. Latencies are in seconds with one millisecond resolution.

*/ inline const Latency& GetLatency() const{ return m_latency; } /** *

Represents the average latency for the slowest X percent of requests over the * last 10 seconds. Latencies are in seconds with one millisecond resolution.

*/ inline bool LatencyHasBeenSet() const { return m_latencyHasBeenSet; } /** *

Represents the average latency for the slowest X percent of requests over the * last 10 seconds. Latencies are in seconds with one millisecond resolution.

*/ inline void SetLatency(const Latency& value) { m_latencyHasBeenSet = true; m_latency = value; } /** *

Represents the average latency for the slowest X percent of requests over the * last 10 seconds. Latencies are in seconds with one millisecond resolution.

*/ inline void SetLatency(Latency&& value) { m_latencyHasBeenSet = true; m_latency = std::move(value); } /** *

Represents the average latency for the slowest X percent of requests over the * last 10 seconds. Latencies are in seconds with one millisecond resolution.

*/ inline ApplicationMetrics& WithLatency(const Latency& value) { SetLatency(value); return *this;} /** *

Represents the average latency for the slowest X percent of requests over the * last 10 seconds. Latencies are in seconds with one millisecond resolution.

*/ inline ApplicationMetrics& WithLatency(Latency&& value) { SetLatency(std::move(value)); return *this;} private: int m_duration; bool m_durationHasBeenSet = false; int m_requestCount; bool m_requestCountHasBeenSet = false; StatusCodes m_statusCodes; bool m_statusCodesHasBeenSet = false; Latency m_latency; bool m_latencyHasBeenSet = false; }; } // namespace Model } // namespace ElasticBeanstalk } // namespace Aws