AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
GpuInfo.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/ec2/EC2_EXPORTS.h>
10#include <aws/ec2/model/GpuDeviceInfo.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Xml {
17class XmlNode;
18} // namespace Xml
19} // namespace Utils
20namespace EC2 {
21namespace Model {
22
29class GpuInfo {
30 public:
31 AWS_EC2_API GpuInfo() = default;
32 AWS_EC2_API GpuInfo(const Aws::Utils::Xml::XmlNode& xmlNode);
33 AWS_EC2_API GpuInfo& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
34
35 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
36 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
37
39
42 inline const Aws::Vector<GpuDeviceInfo>& GetGpus() const { return m_gpus; }
43 inline bool GpusHasBeenSet() const { return m_gpusHasBeenSet; }
44 template <typename GpusT = Aws::Vector<GpuDeviceInfo>>
45 void SetGpus(GpusT&& value) {
46 m_gpusHasBeenSet = true;
47 m_gpus = std::forward<GpusT>(value);
48 }
49 template <typename GpusT = Aws::Vector<GpuDeviceInfo>>
50 GpuInfo& WithGpus(GpusT&& value) {
51 SetGpus(std::forward<GpusT>(value));
52 return *this;
53 }
54 template <typename GpusT = GpuDeviceInfo>
55 GpuInfo& AddGpus(GpusT&& value) {
56 m_gpusHasBeenSet = true;
57 m_gpus.emplace_back(std::forward<GpusT>(value));
58 return *this;
59 }
61
63
67 inline int GetTotalGpuMemoryInMiB() const { return m_totalGpuMemoryInMiB; }
68 inline bool TotalGpuMemoryInMiBHasBeenSet() const { return m_totalGpuMemoryInMiBHasBeenSet; }
69 inline void SetTotalGpuMemoryInMiB(int value) {
70 m_totalGpuMemoryInMiBHasBeenSet = true;
71 m_totalGpuMemoryInMiB = value;
72 }
73 inline GpuInfo& WithTotalGpuMemoryInMiB(int value) {
75 return *this;
76 }
78 private:
80
81 int m_totalGpuMemoryInMiB{0};
82 bool m_gpusHasBeenSet = false;
83 bool m_totalGpuMemoryInMiBHasBeenSet = false;
84};
85
86} // namespace Model
87} // namespace EC2
88} // namespace Aws
void SetGpus(GpusT &&value)
Definition GpuInfo.h:45
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
GpuInfo & AddGpus(GpusT &&value)
Definition GpuInfo.h:55
AWS_EC2_API GpuInfo & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool TotalGpuMemoryInMiBHasBeenSet() const
Definition GpuInfo.h:68
AWS_EC2_API GpuInfo()=default
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
GpuInfo & WithTotalGpuMemoryInMiB(int value)
Definition GpuInfo.h:73
GpuInfo & WithGpus(GpusT &&value)
Definition GpuInfo.h:50
bool GpusHasBeenSet() const
Definition GpuInfo.h:43
void SetTotalGpuMemoryInMiB(int value)
Definition GpuInfo.h:69
const Aws::Vector< GpuDeviceInfo > & GetGpus() const
Definition GpuInfo.h:42
int GetTotalGpuMemoryInMiB() const
Definition GpuInfo.h:67
AWS_EC2_API GpuInfo(const Aws::Utils::Xml::XmlNode &xmlNode)
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream