AWS SDK for C++

AWS SDK for C++ Version 1.11.740

Loading...
Searching...
No Matches
Attachment.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/qbusiness/QBusiness_EXPORTS.h>
10#include <aws/qbusiness/model/AttachmentStatus.h>
11#include <aws/qbusiness/model/CopyFromSource.h>
12#include <aws/qbusiness/model/ErrorDetail.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace QBusiness {
24namespace Model {
25
33 public:
34 AWS_QBUSINESS_API Attachment() = default;
35 AWS_QBUSINESS_API Attachment(Aws::Utils::Json::JsonView jsonValue);
36 AWS_QBUSINESS_API Attachment& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_QBUSINESS_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Aws::String& GetAttachmentId() const { return m_attachmentId; }
44 inline bool AttachmentIdHasBeenSet() const { return m_attachmentIdHasBeenSet; }
45 template <typename AttachmentIdT = Aws::String>
46 void SetAttachmentId(AttachmentIdT&& value) {
47 m_attachmentIdHasBeenSet = true;
48 m_attachmentId = std::forward<AttachmentIdT>(value);
49 }
50 template <typename AttachmentIdT = Aws::String>
51 Attachment& WithAttachmentId(AttachmentIdT&& value) {
52 SetAttachmentId(std::forward<AttachmentIdT>(value));
53 return *this;
54 }
56
58
62 inline const Aws::String& GetConversationId() const { return m_conversationId; }
63 inline bool ConversationIdHasBeenSet() const { return m_conversationIdHasBeenSet; }
64 template <typename ConversationIdT = Aws::String>
65 void SetConversationId(ConversationIdT&& value) {
66 m_conversationIdHasBeenSet = true;
67 m_conversationId = std::forward<ConversationIdT>(value);
68 }
69 template <typename ConversationIdT = Aws::String>
70 Attachment& WithConversationId(ConversationIdT&& value) {
71 SetConversationId(std::forward<ConversationIdT>(value));
72 return *this;
73 }
75
77
80 inline const Aws::String& GetName() const { return m_name; }
81 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
82 template <typename NameT = Aws::String>
83 void SetName(NameT&& value) {
84 m_nameHasBeenSet = true;
85 m_name = std::forward<NameT>(value);
86 }
87 template <typename NameT = Aws::String>
88 Attachment& WithName(NameT&& value) {
89 SetName(std::forward<NameT>(value));
90 return *this;
91 }
93
95
99 inline const CopyFromSource& GetCopyFrom() const { return m_copyFrom; }
100 inline bool CopyFromHasBeenSet() const { return m_copyFromHasBeenSet; }
101 template <typename CopyFromT = CopyFromSource>
102 void SetCopyFrom(CopyFromT&& value) {
103 m_copyFromHasBeenSet = true;
104 m_copyFrom = std::forward<CopyFromT>(value);
105 }
106 template <typename CopyFromT = CopyFromSource>
107 Attachment& WithCopyFrom(CopyFromT&& value) {
108 SetCopyFrom(std::forward<CopyFromT>(value));
109 return *this;
110 }
112
114
117 inline const Aws::String& GetFileType() const { return m_fileType; }
118 inline bool FileTypeHasBeenSet() const { return m_fileTypeHasBeenSet; }
119 template <typename FileTypeT = Aws::String>
120 void SetFileType(FileTypeT&& value) {
121 m_fileTypeHasBeenSet = true;
122 m_fileType = std::forward<FileTypeT>(value);
123 }
124 template <typename FileTypeT = Aws::String>
125 Attachment& WithFileType(FileTypeT&& value) {
126 SetFileType(std::forward<FileTypeT>(value));
127 return *this;
128 }
130
132
135 inline int GetFileSize() const { return m_fileSize; }
136 inline bool FileSizeHasBeenSet() const { return m_fileSizeHasBeenSet; }
137 inline void SetFileSize(int value) {
138 m_fileSizeHasBeenSet = true;
139 m_fileSize = value;
140 }
141 inline Attachment& WithFileSize(int value) {
142 SetFileSize(value);
143 return *this;
144 }
146
148
151 inline const Aws::String& GetMd5chksum() const { return m_md5chksum; }
152 inline bool Md5chksumHasBeenSet() const { return m_md5chksumHasBeenSet; }
153 template <typename Md5chksumT = Aws::String>
154 void SetMd5chksum(Md5chksumT&& value) {
155 m_md5chksumHasBeenSet = true;
156 m_md5chksum = std::forward<Md5chksumT>(value);
157 }
158 template <typename Md5chksumT = Aws::String>
159 Attachment& WithMd5chksum(Md5chksumT&& value) {
160 SetMd5chksum(std::forward<Md5chksumT>(value));
161 return *this;
162 }
164
166
169 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
170 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
171 template <typename CreatedAtT = Aws::Utils::DateTime>
172 void SetCreatedAt(CreatedAtT&& value) {
173 m_createdAtHasBeenSet = true;
174 m_createdAt = std::forward<CreatedAtT>(value);
175 }
176 template <typename CreatedAtT = Aws::Utils::DateTime>
177 Attachment& WithCreatedAt(CreatedAtT&& value) {
178 SetCreatedAt(std::forward<CreatedAtT>(value));
179 return *this;
180 }
182
184
187 inline AttachmentStatus GetStatus() const { return m_status; }
188 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
189 inline void SetStatus(AttachmentStatus value) {
190 m_statusHasBeenSet = true;
191 m_status = value;
192 }
194 SetStatus(value);
195 return *this;
196 }
198
200
204 inline const ErrorDetail& GetError() const { return m_error; }
205 inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
206 template <typename ErrorT = ErrorDetail>
207 void SetError(ErrorT&& value) {
208 m_errorHasBeenSet = true;
209 m_error = std::forward<ErrorT>(value);
210 }
211 template <typename ErrorT = ErrorDetail>
212 Attachment& WithError(ErrorT&& value) {
213 SetError(std::forward<ErrorT>(value));
214 return *this;
215 }
217 private:
218 Aws::String m_attachmentId;
219
220 Aws::String m_conversationId;
221
222 Aws::String m_name;
223
224 CopyFromSource m_copyFrom;
225
226 Aws::String m_fileType;
227
228 int m_fileSize{0};
229
230 Aws::String m_md5chksum;
231
232 Aws::Utils::DateTime m_createdAt{};
233
235
236 ErrorDetail m_error;
237 bool m_attachmentIdHasBeenSet = false;
238 bool m_conversationIdHasBeenSet = false;
239 bool m_nameHasBeenSet = false;
240 bool m_copyFromHasBeenSet = false;
241 bool m_fileTypeHasBeenSet = false;
242 bool m_fileSizeHasBeenSet = false;
243 bool m_md5chksumHasBeenSet = false;
244 bool m_createdAtHasBeenSet = false;
245 bool m_statusHasBeenSet = false;
246 bool m_errorHasBeenSet = false;
247};
248
249} // namespace Model
250} // namespace QBusiness
251} // namespace Aws
AWS_QBUSINESS_API Attachment(Aws::Utils::Json::JsonView jsonValue)
AWS_QBUSINESS_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Utils::DateTime & GetCreatedAt() const
Definition Attachment.h:169
AWS_QBUSINESS_API Attachment & operator=(Aws::Utils::Json::JsonView jsonValue)
Attachment & WithConversationId(ConversationIdT &&value)
Definition Attachment.h:70
const Aws::String & GetConversationId() const
Definition Attachment.h:62
Attachment & WithAttachmentId(AttachmentIdT &&value)
Definition Attachment.h:51
Attachment & WithCopyFrom(CopyFromT &&value)
Definition Attachment.h:107
void SetMd5chksum(Md5chksumT &&value)
Definition Attachment.h:154
const CopyFromSource & GetCopyFrom() const
Definition Attachment.h:99
const Aws::String & GetAttachmentId() const
Definition Attachment.h:43
void SetName(NameT &&value)
Definition Attachment.h:83
Attachment & WithError(ErrorT &&value)
Definition Attachment.h:212
void SetError(ErrorT &&value)
Definition Attachment.h:207
Attachment & WithFileType(FileTypeT &&value)
Definition Attachment.h:125
AttachmentStatus GetStatus() const
Definition Attachment.h:187
Attachment & WithStatus(AttachmentStatus value)
Definition Attachment.h:193
void SetFileType(FileTypeT &&value)
Definition Attachment.h:120
const Aws::String & GetMd5chksum() const
Definition Attachment.h:151
void SetCopyFrom(CopyFromT &&value)
Definition Attachment.h:102
const Aws::String & GetName() const
Definition Attachment.h:80
const Aws::String & GetFileType() const
Definition Attachment.h:117
Attachment & WithName(NameT &&value)
Definition Attachment.h:88
Attachment & WithMd5chksum(Md5chksumT &&value)
Definition Attachment.h:159
Attachment & WithFileSize(int value)
Definition Attachment.h:141
const ErrorDetail & GetError() const
Definition Attachment.h:204
void SetAttachmentId(AttachmentIdT &&value)
Definition Attachment.h:46
void SetConversationId(ConversationIdT &&value)
Definition Attachment.h:65
Attachment & WithCreatedAt(CreatedAtT &&value)
Definition Attachment.h:177
void SetCreatedAt(CreatedAtT &&value)
Definition Attachment.h:172
AWS_QBUSINESS_API Attachment()=default
void SetStatus(AttachmentStatus value)
Definition Attachment.h:189
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue