AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
InstanceHardware.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/lightsail/Lightsail_EXPORTS.h>
9#include <aws/lightsail/model/Disk.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace Lightsail {
21namespace Model {
22
29 public:
30 AWS_LIGHTSAIL_API InstanceHardware() = default;
31 AWS_LIGHTSAIL_API InstanceHardware(Aws::Utils::Json::JsonView jsonValue);
33 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
34
36
39 inline int GetCpuCount() const { return m_cpuCount; }
40 inline bool CpuCountHasBeenSet() const { return m_cpuCountHasBeenSet; }
41 inline void SetCpuCount(int value) {
42 m_cpuCountHasBeenSet = true;
43 m_cpuCount = value;
44 }
45 inline InstanceHardware& WithCpuCount(int value) {
46 SetCpuCount(value);
47 return *this;
48 }
50
52
55 inline const Aws::Vector<Disk>& GetDisks() const { return m_disks; }
56 inline bool DisksHasBeenSet() const { return m_disksHasBeenSet; }
57 template <typename DisksT = Aws::Vector<Disk>>
58 void SetDisks(DisksT&& value) {
59 m_disksHasBeenSet = true;
60 m_disks = std::forward<DisksT>(value);
61 }
62 template <typename DisksT = Aws::Vector<Disk>>
63 InstanceHardware& WithDisks(DisksT&& value) {
64 SetDisks(std::forward<DisksT>(value));
65 return *this;
66 }
67 template <typename DisksT = Disk>
68 InstanceHardware& AddDisks(DisksT&& value) {
69 m_disksHasBeenSet = true;
70 m_disks.emplace_back(std::forward<DisksT>(value));
71 return *this;
72 }
74
76
79 inline double GetRamSizeInGb() const { return m_ramSizeInGb; }
80 inline bool RamSizeInGbHasBeenSet() const { return m_ramSizeInGbHasBeenSet; }
81 inline void SetRamSizeInGb(double value) {
82 m_ramSizeInGbHasBeenSet = true;
83 m_ramSizeInGb = value;
84 }
85 inline InstanceHardware& WithRamSizeInGb(double value) {
86 SetRamSizeInGb(value);
87 return *this;
88 }
90 private:
91 int m_cpuCount{0};
92
93 Aws::Vector<Disk> m_disks;
94
95 double m_ramSizeInGb{0.0};
96 bool m_cpuCountHasBeenSet = false;
97 bool m_disksHasBeenSet = false;
98 bool m_ramSizeInGbHasBeenSet = false;
99};
100
101} // namespace Model
102} // namespace Lightsail
103} // namespace Aws
AWS_LIGHTSAIL_API InstanceHardware & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
InstanceHardware & WithRamSizeInGb(double value)
InstanceHardware & AddDisks(DisksT &&value)
AWS_LIGHTSAIL_API InstanceHardware(Aws::Utils::Json::JsonView jsonValue)
InstanceHardware & WithCpuCount(int value)
AWS_LIGHTSAIL_API InstanceHardware()=default
const Aws::Vector< Disk > & GetDisks() const
InstanceHardware & WithDisks(DisksT &&value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue