AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
GpuInfo.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/model/GpuDeviceInfo.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Xml
18{
19 class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace EC2
23{
24namespace Model
25{
26
33 class GpuInfo
34 {
35 public:
36 AWS_EC2_API GpuInfo() = default;
37 AWS_EC2_API GpuInfo(const Aws::Utils::Xml::XmlNode& xmlNode);
38 AWS_EC2_API GpuInfo& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39
40 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
42
43
45
48 inline const Aws::Vector<GpuDeviceInfo>& GetGpus() const { return m_gpus; }
49 inline bool GpusHasBeenSet() const { return m_gpusHasBeenSet; }
50 template<typename GpusT = Aws::Vector<GpuDeviceInfo>>
51 void SetGpus(GpusT&& value) { m_gpusHasBeenSet = true; m_gpus = std::forward<GpusT>(value); }
52 template<typename GpusT = Aws::Vector<GpuDeviceInfo>>
53 GpuInfo& WithGpus(GpusT&& value) { SetGpus(std::forward<GpusT>(value)); return *this;}
54 template<typename GpusT = GpuDeviceInfo>
55 GpuInfo& AddGpus(GpusT&& value) { m_gpusHasBeenSet = true; m_gpus.emplace_back(std::forward<GpusT>(value)); return *this; }
57
59
63 inline int GetTotalGpuMemoryInMiB() const { return m_totalGpuMemoryInMiB; }
64 inline bool TotalGpuMemoryInMiBHasBeenSet() const { return m_totalGpuMemoryInMiBHasBeenSet; }
65 inline void SetTotalGpuMemoryInMiB(int value) { m_totalGpuMemoryInMiBHasBeenSet = true; m_totalGpuMemoryInMiB = value; }
66 inline GpuInfo& WithTotalGpuMemoryInMiB(int value) { SetTotalGpuMemoryInMiB(value); return *this;}
68 private:
69
71 bool m_gpusHasBeenSet = false;
72
73 int m_totalGpuMemoryInMiB{0};
74 bool m_totalGpuMemoryInMiBHasBeenSet = false;
75 };
76
77} // namespace Model
78} // namespace EC2
79} // namespace Aws
void SetGpus(GpusT &&value)
Definition GpuInfo.h:51
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:64
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:66
GpuInfo & WithGpus(GpusT &&value)
Definition GpuInfo.h:53
bool GpusHasBeenSet() const
Definition GpuInfo.h:49
void SetTotalGpuMemoryInMiB(int value)
Definition GpuInfo.h:65
const Aws::Vector< GpuDeviceInfo > & GetGpus() const
Definition GpuInfo.h:48
int GetTotalGpuMemoryInMiB() const
Definition GpuInfo.h:63
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