AWS SDK for C++

AWS SDK for C++ Version 1.11.744

Loading...
Searching...
No Matches
GpuDeviceInfo.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/GpuDeviceMemoryInfo.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Xml {
18class XmlNode;
19} // namespace Xml
20} // namespace Utils
21namespace EC2 {
22namespace Model {
23
31 public:
32 AWS_EC2_API GpuDeviceInfo() = default;
33 AWS_EC2_API GpuDeviceInfo(const Aws::Utils::Xml::XmlNode& xmlNode);
34 AWS_EC2_API GpuDeviceInfo& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
35
36 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
37 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
38
40
43 inline const Aws::String& GetName() const { return m_name; }
44 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
45 template <typename NameT = Aws::String>
46 void SetName(NameT&& value) {
47 m_nameHasBeenSet = true;
48 m_name = std::forward<NameT>(value);
49 }
50 template <typename NameT = Aws::String>
51 GpuDeviceInfo& WithName(NameT&& value) {
52 SetName(std::forward<NameT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetManufacturer() const { return m_manufacturer; }
62 inline bool ManufacturerHasBeenSet() const { return m_manufacturerHasBeenSet; }
63 template <typename ManufacturerT = Aws::String>
64 void SetManufacturer(ManufacturerT&& value) {
65 m_manufacturerHasBeenSet = true;
66 m_manufacturer = std::forward<ManufacturerT>(value);
67 }
68 template <typename ManufacturerT = Aws::String>
69 GpuDeviceInfo& WithManufacturer(ManufacturerT&& value) {
70 SetManufacturer(std::forward<ManufacturerT>(value));
71 return *this;
72 }
74
76
79 inline int GetCount() const { return m_count; }
80 inline bool CountHasBeenSet() const { return m_countHasBeenSet; }
81 inline void SetCount(int value) {
82 m_countHasBeenSet = true;
83 m_count = value;
84 }
85 inline GpuDeviceInfo& WithCount(int value) {
86 SetCount(value);
87 return *this;
88 }
90
92
95 inline int GetLogicalGpuCount() const { return m_logicalGpuCount; }
96 inline bool LogicalGpuCountHasBeenSet() const { return m_logicalGpuCountHasBeenSet; }
97 inline void SetLogicalGpuCount(int value) {
98 m_logicalGpuCountHasBeenSet = true;
99 m_logicalGpuCount = value;
100 }
102 SetLogicalGpuCount(value);
103 return *this;
104 }
106
108
112 inline double GetGpuPartitionSize() const { return m_gpuPartitionSize; }
113 inline bool GpuPartitionSizeHasBeenSet() const { return m_gpuPartitionSizeHasBeenSet; }
114 inline void SetGpuPartitionSize(double value) {
115 m_gpuPartitionSizeHasBeenSet = true;
116 m_gpuPartitionSize = value;
117 }
118 inline GpuDeviceInfo& WithGpuPartitionSize(double value) {
119 SetGpuPartitionSize(value);
120 return *this;
121 }
123
125
128 inline const Aws::Vector<Aws::String>& GetWorkloads() const { return m_workloads; }
129 inline bool WorkloadsHasBeenSet() const { return m_workloadsHasBeenSet; }
130 template <typename WorkloadsT = Aws::Vector<Aws::String>>
131 void SetWorkloads(WorkloadsT&& value) {
132 m_workloadsHasBeenSet = true;
133 m_workloads = std::forward<WorkloadsT>(value);
134 }
135 template <typename WorkloadsT = Aws::Vector<Aws::String>>
136 GpuDeviceInfo& WithWorkloads(WorkloadsT&& value) {
137 SetWorkloads(std::forward<WorkloadsT>(value));
138 return *this;
139 }
140 template <typename WorkloadsT = Aws::String>
141 GpuDeviceInfo& AddWorkloads(WorkloadsT&& value) {
142 m_workloadsHasBeenSet = true;
143 m_workloads.emplace_back(std::forward<WorkloadsT>(value));
144 return *this;
145 }
147
149
152 inline const GpuDeviceMemoryInfo& GetMemoryInfo() const { return m_memoryInfo; }
153 inline bool MemoryInfoHasBeenSet() const { return m_memoryInfoHasBeenSet; }
154 template <typename MemoryInfoT = GpuDeviceMemoryInfo>
155 void SetMemoryInfo(MemoryInfoT&& value) {
156 m_memoryInfoHasBeenSet = true;
157 m_memoryInfo = std::forward<MemoryInfoT>(value);
158 }
159 template <typename MemoryInfoT = GpuDeviceMemoryInfo>
160 GpuDeviceInfo& WithMemoryInfo(MemoryInfoT&& value) {
161 SetMemoryInfo(std::forward<MemoryInfoT>(value));
162 return *this;
163 }
165 private:
166 Aws::String m_name;
167
168 Aws::String m_manufacturer;
169
170 int m_count{0};
171
172 int m_logicalGpuCount{0};
173
174 double m_gpuPartitionSize{0.0};
175
176 Aws::Vector<Aws::String> m_workloads;
177
178 GpuDeviceMemoryInfo m_memoryInfo;
179 bool m_nameHasBeenSet = false;
180 bool m_manufacturerHasBeenSet = false;
181 bool m_countHasBeenSet = false;
182 bool m_logicalGpuCountHasBeenSet = false;
183 bool m_gpuPartitionSizeHasBeenSet = false;
184 bool m_workloadsHasBeenSet = false;
185 bool m_memoryInfoHasBeenSet = false;
186};
187
188} // namespace Model
189} // namespace EC2
190} // namespace Aws
GpuDeviceInfo & WithGpuPartitionSize(double value)
const Aws::String & GetName() const
GpuDeviceInfo & WithWorkloads(WorkloadsT &&value)
const GpuDeviceMemoryInfo & GetMemoryInfo() const
GpuDeviceInfo & AddWorkloads(WorkloadsT &&value)
GpuDeviceInfo & WithMemoryInfo(MemoryInfoT &&value)
const Aws::Vector< Aws::String > & GetWorkloads() const
GpuDeviceInfo & WithManufacturer(ManufacturerT &&value)
void SetWorkloads(WorkloadsT &&value)
const Aws::String & GetManufacturer() const
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetGpuPartitionSize(double value)
void SetMemoryInfo(MemoryInfoT &&value)
AWS_EC2_API GpuDeviceInfo & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
GpuDeviceInfo & WithLogicalGpuCount(int value)
void SetManufacturer(ManufacturerT &&value)
GpuDeviceInfo & WithName(NameT &&value)
AWS_EC2_API GpuDeviceInfo()=default
GpuDeviceInfo & WithCount(int value)
void SetName(NameT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_EC2_API GpuDeviceInfo(const Aws::Utils::Xml::XmlNode &xmlNode)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream