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/elasticbeanstalk/ElasticBeanstalk_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h> 9 10 namespace Aws 11 { 12 namespace Utils 13 { 14 namespace Xml 15 { 16 class XmlNode; 17 } // namespace Xml 18 } // namespace Utils 19 namespace ElasticBeanstalk 20 { 21 namespace Model 22 { 23 24 /** 25 * <p>CPU utilization metrics for an instance.</p><p><h3>See Also:</h3> <a 26 * href="http://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CPUUtilization">AWS 27 * API Reference</a></p> 28 */ 29 class AWS_ELASTICBEANSTALK_API CPUUtilization 30 { 31 public: 32 CPUUtilization(); 33 CPUUtilization(const Aws::Utils::Xml::XmlNode& xmlNode); 34 CPUUtilization& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 35 36 void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 37 void OutputToStream(Aws::OStream& oStream, const char* location) const; 38 39 40 /** 41 * <p>Percentage of time that the CPU has spent in the <code>User</code> state over 42 * the last 10 seconds.</p> 43 */ GetUser()44 inline double GetUser() const{ return m_user; } 45 46 /** 47 * <p>Percentage of time that the CPU has spent in the <code>User</code> state over 48 * the last 10 seconds.</p> 49 */ UserHasBeenSet()50 inline bool UserHasBeenSet() const { return m_userHasBeenSet; } 51 52 /** 53 * <p>Percentage of time that the CPU has spent in the <code>User</code> state over 54 * the last 10 seconds.</p> 55 */ SetUser(double value)56 inline void SetUser(double value) { m_userHasBeenSet = true; m_user = value; } 57 58 /** 59 * <p>Percentage of time that the CPU has spent in the <code>User</code> state over 60 * the last 10 seconds.</p> 61 */ WithUser(double value)62 inline CPUUtilization& WithUser(double value) { SetUser(value); return *this;} 63 64 65 /** 66 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 67 * has spent in the <code>Nice</code> state over the last 10 seconds.</p> 68 */ GetNice()69 inline double GetNice() const{ return m_nice; } 70 71 /** 72 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 73 * has spent in the <code>Nice</code> state over the last 10 seconds.</p> 74 */ NiceHasBeenSet()75 inline bool NiceHasBeenSet() const { return m_niceHasBeenSet; } 76 77 /** 78 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 79 * has spent in the <code>Nice</code> state over the last 10 seconds.</p> 80 */ SetNice(double value)81 inline void SetNice(double value) { m_niceHasBeenSet = true; m_nice = value; } 82 83 /** 84 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 85 * has spent in the <code>Nice</code> state over the last 10 seconds.</p> 86 */ WithNice(double value)87 inline CPUUtilization& WithNice(double value) { SetNice(value); return *this;} 88 89 90 /** 91 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 92 * has spent in the <code>System</code> state over the last 10 seconds.</p> 93 */ GetSystem()94 inline double GetSystem() const{ return m_system; } 95 96 /** 97 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 98 * has spent in the <code>System</code> state over the last 10 seconds.</p> 99 */ SystemHasBeenSet()100 inline bool SystemHasBeenSet() const { return m_systemHasBeenSet; } 101 102 /** 103 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 104 * has spent in the <code>System</code> state over the last 10 seconds.</p> 105 */ SetSystem(double value)106 inline void SetSystem(double value) { m_systemHasBeenSet = true; m_system = value; } 107 108 /** 109 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 110 * has spent in the <code>System</code> state over the last 10 seconds.</p> 111 */ WithSystem(double value)112 inline CPUUtilization& WithSystem(double value) { SetSystem(value); return *this;} 113 114 115 /** 116 * <p>Percentage of time that the CPU has spent in the <code>Idle</code> state over 117 * the last 10 seconds.</p> 118 */ GetIdle()119 inline double GetIdle() const{ return m_idle; } 120 121 /** 122 * <p>Percentage of time that the CPU has spent in the <code>Idle</code> state over 123 * the last 10 seconds.</p> 124 */ IdleHasBeenSet()125 inline bool IdleHasBeenSet() const { return m_idleHasBeenSet; } 126 127 /** 128 * <p>Percentage of time that the CPU has spent in the <code>Idle</code> state over 129 * the last 10 seconds.</p> 130 */ SetIdle(double value)131 inline void SetIdle(double value) { m_idleHasBeenSet = true; m_idle = value; } 132 133 /** 134 * <p>Percentage of time that the CPU has spent in the <code>Idle</code> state over 135 * the last 10 seconds.</p> 136 */ WithIdle(double value)137 inline CPUUtilization& WithIdle(double value) { SetIdle(value); return *this;} 138 139 140 /** 141 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 142 * has spent in the <code>I/O Wait</code> state over the last 10 seconds.</p> 143 */ GetIOWait()144 inline double GetIOWait() const{ return m_iOWait; } 145 146 /** 147 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 148 * has spent in the <code>I/O Wait</code> state over the last 10 seconds.</p> 149 */ IOWaitHasBeenSet()150 inline bool IOWaitHasBeenSet() const { return m_iOWaitHasBeenSet; } 151 152 /** 153 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 154 * has spent in the <code>I/O Wait</code> state over the last 10 seconds.</p> 155 */ SetIOWait(double value)156 inline void SetIOWait(double value) { m_iOWaitHasBeenSet = true; m_iOWait = value; } 157 158 /** 159 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 160 * has spent in the <code>I/O Wait</code> state over the last 10 seconds.</p> 161 */ WithIOWait(double value)162 inline CPUUtilization& WithIOWait(double value) { SetIOWait(value); return *this;} 163 164 165 /** 166 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 167 * has spent in the <code>IRQ</code> state over the last 10 seconds.</p> 168 */ GetIRQ()169 inline double GetIRQ() const{ return m_iRQ; } 170 171 /** 172 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 173 * has spent in the <code>IRQ</code> state over the last 10 seconds.</p> 174 */ IRQHasBeenSet()175 inline bool IRQHasBeenSet() const { return m_iRQHasBeenSet; } 176 177 /** 178 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 179 * has spent in the <code>IRQ</code> state over the last 10 seconds.</p> 180 */ SetIRQ(double value)181 inline void SetIRQ(double value) { m_iRQHasBeenSet = true; m_iRQ = value; } 182 183 /** 184 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 185 * has spent in the <code>IRQ</code> state over the last 10 seconds.</p> 186 */ WithIRQ(double value)187 inline CPUUtilization& WithIRQ(double value) { SetIRQ(value); return *this;} 188 189 190 /** 191 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 192 * has spent in the <code>SoftIRQ</code> state over the last 10 seconds.</p> 193 */ GetSoftIRQ()194 inline double GetSoftIRQ() const{ return m_softIRQ; } 195 196 /** 197 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 198 * has spent in the <code>SoftIRQ</code> state over the last 10 seconds.</p> 199 */ SoftIRQHasBeenSet()200 inline bool SoftIRQHasBeenSet() const { return m_softIRQHasBeenSet; } 201 202 /** 203 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 204 * has spent in the <code>SoftIRQ</code> state over the last 10 seconds.</p> 205 */ SetSoftIRQ(double value)206 inline void SetSoftIRQ(double value) { m_softIRQHasBeenSet = true; m_softIRQ = value; } 207 208 /** 209 * <p>Available on Linux environments only.</p> <p>Percentage of time that the CPU 210 * has spent in the <code>SoftIRQ</code> state over the last 10 seconds.</p> 211 */ WithSoftIRQ(double value)212 inline CPUUtilization& WithSoftIRQ(double value) { SetSoftIRQ(value); return *this;} 213 214 215 /** 216 * <p>Available on Windows environments only.</p> <p>Percentage of time that the 217 * CPU has spent in the <code>Privileged</code> state over the last 10 seconds.</p> 218 */ GetPrivileged()219 inline double GetPrivileged() const{ return m_privileged; } 220 221 /** 222 * <p>Available on Windows environments only.</p> <p>Percentage of time that the 223 * CPU has spent in the <code>Privileged</code> state over the last 10 seconds.</p> 224 */ PrivilegedHasBeenSet()225 inline bool PrivilegedHasBeenSet() const { return m_privilegedHasBeenSet; } 226 227 /** 228 * <p>Available on Windows environments only.</p> <p>Percentage of time that the 229 * CPU has spent in the <code>Privileged</code> state over the last 10 seconds.</p> 230 */ SetPrivileged(double value)231 inline void SetPrivileged(double value) { m_privilegedHasBeenSet = true; m_privileged = value; } 232 233 /** 234 * <p>Available on Windows environments only.</p> <p>Percentage of time that the 235 * CPU has spent in the <code>Privileged</code> state over the last 10 seconds.</p> 236 */ WithPrivileged(double value)237 inline CPUUtilization& WithPrivileged(double value) { SetPrivileged(value); return *this;} 238 239 private: 240 241 double m_user; 242 bool m_userHasBeenSet; 243 244 double m_nice; 245 bool m_niceHasBeenSet; 246 247 double m_system; 248 bool m_systemHasBeenSet; 249 250 double m_idle; 251 bool m_idleHasBeenSet; 252 253 double m_iOWait; 254 bool m_iOWaitHasBeenSet; 255 256 double m_iRQ; 257 bool m_iRQHasBeenSet; 258 259 double m_softIRQ; 260 bool m_softIRQHasBeenSet; 261 262 double m_privileged; 263 bool m_privilegedHasBeenSet; 264 }; 265 266 } // namespace Model 267 } // namespace ElasticBeanstalk 268 } // namespace Aws 269