AWS SDK for C++

AWS SDK for C++ Version 1.11.783

Loading...
Searching...
No Matches
CapacityAllocation.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/AllocationType.h>
11#include <aws/ec2/model/CapacityAllocationMetadataEntry.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 CapacityAllocation() = default;
33 AWS_EC2_API CapacityAllocation(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
44 inline AllocationType GetAllocationType() const { return m_allocationType; }
45 inline bool AllocationTypeHasBeenSet() const { return m_allocationTypeHasBeenSet; }
46 inline void SetAllocationType(AllocationType value) {
47 m_allocationTypeHasBeenSet = true;
48 m_allocationType = value;
49 }
51 SetAllocationType(value);
52 return *this;
53 }
55
57
62 inline int GetCount() const { return m_count; }
63 inline bool CountHasBeenSet() const { return m_countHasBeenSet; }
64 inline void SetCount(int value) {
65 m_countHasBeenSet = true;
66 m_count = value;
67 }
68 inline CapacityAllocation& WithCount(int value) {
69 SetCount(value);
70 return *this;
71 }
73
75
79 inline const Aws::Vector<CapacityAllocationMetadataEntry>& GetAllocationMetadata() const { return m_allocationMetadata; }
80 inline bool AllocationMetadataHasBeenSet() const { return m_allocationMetadataHasBeenSet; }
81 template <typename AllocationMetadataT = Aws::Vector<CapacityAllocationMetadataEntry>>
82 void SetAllocationMetadata(AllocationMetadataT&& value) {
83 m_allocationMetadataHasBeenSet = true;
84 m_allocationMetadata = std::forward<AllocationMetadataT>(value);
85 }
86 template <typename AllocationMetadataT = Aws::Vector<CapacityAllocationMetadataEntry>>
87 CapacityAllocation& WithAllocationMetadata(AllocationMetadataT&& value) {
88 SetAllocationMetadata(std::forward<AllocationMetadataT>(value));
89 return *this;
90 }
91 template <typename AllocationMetadataT = CapacityAllocationMetadataEntry>
92 CapacityAllocation& AddAllocationMetadata(AllocationMetadataT&& value) {
93 m_allocationMetadataHasBeenSet = true;
94 m_allocationMetadata.emplace_back(std::forward<AllocationMetadataT>(value));
95 return *this;
96 }
98 private:
100
101 int m_count{0};
102
104 bool m_allocationTypeHasBeenSet = false;
105 bool m_countHasBeenSet = false;
106 bool m_allocationMetadataHasBeenSet = false;
107};
108
109} // namespace Model
110} // namespace EC2
111} // namespace Aws
CapacityAllocation & WithCount(int value)
AWS_EC2_API CapacityAllocation & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API CapacityAllocation()=default
const Aws::Vector< CapacityAllocationMetadataEntry > & GetAllocationMetadata() const
CapacityAllocation & WithAllocationMetadata(AllocationMetadataT &&value)
void SetAllocationType(AllocationType value)
CapacityAllocation & WithAllocationType(AllocationType value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_EC2_API CapacityAllocation(const Aws::Utils::Xml::XmlNode &xmlNode)
CapacityAllocation & AddAllocationMetadata(AllocationMetadataT &&value)
void SetAllocationMetadata(AllocationMetadataT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream