AWS SDK for C++

AWS SDK for C++ Version 1.11.930

Loading...
Searching...
No Matches
Memory.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/opensearchmemory/OpenSearchMemory_EXPORTS.h>
10#include <aws/opensearchmemory/model/MemoryType.h>
11#include <aws/opensearchmemory/model/SystemMetadata.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace OpenSearchMemory {
23namespace Model {
24
33class Memory {
34 public:
35 AWS_OPENSEARCHMEMORY_API Memory() = default;
36 AWS_OPENSEARCHMEMORY_API Memory(Aws::Utils::Json::JsonView jsonValue);
37 AWS_OPENSEARCHMEMORY_API Memory& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_OPENSEARCHMEMORY_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
44 inline const Aws::String& GetMemoryId() const { return m_memoryId; }
45 inline bool MemoryIdHasBeenSet() const { return m_memoryIdHasBeenSet; }
46 template <typename MemoryIdT = Aws::String>
47 void SetMemoryId(MemoryIdT&& value) {
48 m_memoryIdHasBeenSet = true;
49 m_memoryId = std::forward<MemoryIdT>(value);
50 }
51 template <typename MemoryIdT = Aws::String>
52 Memory& WithMemoryId(MemoryIdT&& value) {
53 SetMemoryId(std::forward<MemoryIdT>(value));
54 return *this;
55 }
57
59
62 inline MemoryType GetMemoryType() const { return m_memoryType; }
63 inline bool MemoryTypeHasBeenSet() const { return m_memoryTypeHasBeenSet; }
64 inline void SetMemoryType(MemoryType value) {
65 m_memoryTypeHasBeenSet = true;
66 m_memoryType = value;
67 }
69 SetMemoryType(value);
70 return *this;
71 }
73
75
81 inline const Aws::String& GetStrategyName() const { return m_strategyName; }
82 inline bool StrategyNameHasBeenSet() const { return m_strategyNameHasBeenSet; }
83 template <typename StrategyNameT = Aws::String>
84 void SetStrategyName(StrategyNameT&& value) {
85 m_strategyNameHasBeenSet = true;
86 m_strategyName = std::forward<StrategyNameT>(value);
87 }
88 template <typename StrategyNameT = Aws::String>
89 Memory& WithStrategyName(StrategyNameT&& value) {
90 SetStrategyName(std::forward<StrategyNameT>(value));
91 return *this;
92 }
94
96
99 inline const Aws::String& GetContent() const { return m_content; }
100 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
101 template <typename ContentT = Aws::String>
102 void SetContent(ContentT&& value) {
103 m_contentHasBeenSet = true;
104 m_content = std::forward<ContentT>(value);
105 }
106 template <typename ContentT = Aws::String>
107 Memory& WithContent(ContentT&& value) {
108 SetContent(std::forward<ContentT>(value));
109 return *this;
110 }
112
114
119 inline const SystemMetadata& GetSystemMetadata() const { return m_systemMetadata; }
120 inline bool SystemMetadataHasBeenSet() const { return m_systemMetadataHasBeenSet; }
121 template <typename SystemMetadataT = SystemMetadata>
122 void SetSystemMetadata(SystemMetadataT&& value) {
123 m_systemMetadataHasBeenSet = true;
124 m_systemMetadata = std::forward<SystemMetadataT>(value);
125 }
126 template <typename SystemMetadataT = SystemMetadata>
127 Memory& WithSystemMetadata(SystemMetadataT&& value) {
128 SetSystemMetadata(std::forward<SystemMetadataT>(value));
129 return *this;
130 }
132
134
137 inline const Aws::Map<Aws::String, Aws::String>& GetMetadata() const { return m_metadata; }
138 inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; }
139 template <typename MetadataT = Aws::Map<Aws::String, Aws::String>>
140 void SetMetadata(MetadataT&& value) {
141 m_metadataHasBeenSet = true;
142 m_metadata = std::forward<MetadataT>(value);
143 }
144 template <typename MetadataT = Aws::Map<Aws::String, Aws::String>>
145 Memory& WithMetadata(MetadataT&& value) {
146 SetMetadata(std::forward<MetadataT>(value));
147 return *this;
148 }
149 template <typename MetadataKeyT = Aws::String, typename MetadataValueT = Aws::String>
150 Memory& AddMetadata(MetadataKeyT&& key, MetadataValueT&& value) {
151 m_metadataHasBeenSet = true;
152 m_metadata.emplace(std::forward<MetadataKeyT>(key), std::forward<MetadataValueT>(value));
153 return *this;
154 }
156 private:
157 Aws::String m_memoryId;
158
159 MemoryType m_memoryType{MemoryType::NOT_SET};
160
161 Aws::String m_strategyName;
162
163 Aws::String m_content;
164
165 SystemMetadata m_systemMetadata;
166
168 bool m_memoryIdHasBeenSet = false;
169 bool m_memoryTypeHasBeenSet = false;
170 bool m_strategyNameHasBeenSet = false;
171 bool m_contentHasBeenSet = false;
172 bool m_systemMetadataHasBeenSet = false;
173 bool m_metadataHasBeenSet = false;
174};
175
176} // namespace Model
177} // namespace OpenSearchMemory
178} // namespace Aws
void SetStrategyName(StrategyNameT &&value)
Definition Memory.h:84
const Aws::String & GetStrategyName() const
Definition Memory.h:81
Memory & WithMemoryId(MemoryIdT &&value)
Definition Memory.h:52
AWS_OPENSEARCHMEMORY_API Memory()=default
Memory & AddMetadata(MetadataKeyT &&key, MetadataValueT &&value)
Definition Memory.h:150
Memory & WithStrategyName(StrategyNameT &&value)
Definition Memory.h:89
const Aws::Map< Aws::String, Aws::String > & GetMetadata() const
Definition Memory.h:137
void SetMetadata(MetadataT &&value)
Definition Memory.h:140
const Aws::String & GetContent() const
Definition Memory.h:99
Memory & WithContent(ContentT &&value)
Definition Memory.h:107
void SetMemoryId(MemoryIdT &&value)
Definition Memory.h:47
Memory & WithSystemMetadata(SystemMetadataT &&value)
Definition Memory.h:127
AWS_OPENSEARCHMEMORY_API Memory & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_OPENSEARCHMEMORY_API Memory(Aws::Utils::Json::JsonView jsonValue)
void SetMemoryType(MemoryType value)
Definition Memory.h:64
MemoryType GetMemoryType() const
Definition Memory.h:62
AWS_OPENSEARCHMEMORY_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetMemoryId() const
Definition Memory.h:44
Memory & WithMemoryType(MemoryType value)
Definition Memory.h:68
void SetSystemMetadata(SystemMetadataT &&value)
Definition Memory.h:122
const SystemMetadata & GetSystemMetadata() const
Definition Memory.h:119
Memory & WithMetadata(MetadataT &&value)
Definition Memory.h:145
void SetContent(ContentT &&value)
Definition Memory.h:102
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue