AWS SDK for C++

AWS SDK for C++ Version 1.11.745

Loading...
Searching...
No Matches
Field.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/core/utils/memory/stl/AWSVector.h>
10#include <aws/glue/Glue_EXPORTS.h>
11#include <aws/glue/model/FieldDataType.h>
12#include <aws/glue/model/FieldFilterOperator.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace Glue {
24namespace Model {
25
32class Field {
33 public:
34 AWS_GLUE_API Field() = default;
35 AWS_GLUE_API Field(Aws::Utils::Json::JsonView jsonValue);
36 AWS_GLUE_API Field& operator=(Aws::Utils::Json::JsonView jsonValue);
38
40
43 inline const Aws::String& GetFieldName() const { return m_fieldName; }
44 inline bool FieldNameHasBeenSet() const { return m_fieldNameHasBeenSet; }
45 template <typename FieldNameT = Aws::String>
46 void SetFieldName(FieldNameT&& value) {
47 m_fieldNameHasBeenSet = true;
48 m_fieldName = std::forward<FieldNameT>(value);
49 }
50 template <typename FieldNameT = Aws::String>
51 Field& WithFieldName(FieldNameT&& value) {
52 SetFieldName(std::forward<FieldNameT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetLabel() const { return m_label; }
62 inline bool LabelHasBeenSet() const { return m_labelHasBeenSet; }
63 template <typename LabelT = Aws::String>
64 void SetLabel(LabelT&& value) {
65 m_labelHasBeenSet = true;
66 m_label = std::forward<LabelT>(value);
67 }
68 template <typename LabelT = Aws::String>
69 Field& WithLabel(LabelT&& value) {
70 SetLabel(std::forward<LabelT>(value));
71 return *this;
72 }
74
76
79 inline const Aws::String& GetDescription() const { return m_description; }
80 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
81 template <typename DescriptionT = Aws::String>
82 void SetDescription(DescriptionT&& value) {
83 m_descriptionHasBeenSet = true;
84 m_description = std::forward<DescriptionT>(value);
85 }
86 template <typename DescriptionT = Aws::String>
87 Field& WithDescription(DescriptionT&& value) {
88 SetDescription(std::forward<DescriptionT>(value));
89 return *this;
90 }
92
94
97 inline FieldDataType GetFieldType() const { return m_fieldType; }
98 inline bool FieldTypeHasBeenSet() const { return m_fieldTypeHasBeenSet; }
99 inline void SetFieldType(FieldDataType value) {
100 m_fieldTypeHasBeenSet = true;
101 m_fieldType = value;
102 }
104 SetFieldType(value);
105 return *this;
106 }
108
110
114 inline bool GetIsPrimaryKey() const { return m_isPrimaryKey; }
115 inline bool IsPrimaryKeyHasBeenSet() const { return m_isPrimaryKeyHasBeenSet; }
116 inline void SetIsPrimaryKey(bool value) {
117 m_isPrimaryKeyHasBeenSet = true;
118 m_isPrimaryKey = value;
119 }
120 inline Field& WithIsPrimaryKey(bool value) {
121 SetIsPrimaryKey(value);
122 return *this;
123 }
125
127
130 inline bool GetIsNullable() const { return m_isNullable; }
131 inline bool IsNullableHasBeenSet() const { return m_isNullableHasBeenSet; }
132 inline void SetIsNullable(bool value) {
133 m_isNullableHasBeenSet = true;
134 m_isNullable = value;
135 }
136 inline Field& WithIsNullable(bool value) {
137 SetIsNullable(value);
138 return *this;
139 }
141
143
147 inline bool GetIsRetrievable() const { return m_isRetrievable; }
148 inline bool IsRetrievableHasBeenSet() const { return m_isRetrievableHasBeenSet; }
149 inline void SetIsRetrievable(bool value) {
150 m_isRetrievableHasBeenSet = true;
151 m_isRetrievable = value;
152 }
153 inline Field& WithIsRetrievable(bool value) {
154 SetIsRetrievable(value);
155 return *this;
156 }
158
160
164 inline bool GetIsFilterable() const { return m_isFilterable; }
165 inline bool IsFilterableHasBeenSet() const { return m_isFilterableHasBeenSet; }
166 inline void SetIsFilterable(bool value) {
167 m_isFilterableHasBeenSet = true;
168 m_isFilterable = value;
169 }
170 inline Field& WithIsFilterable(bool value) {
171 SetIsFilterable(value);
172 return *this;
173 }
175
177
181 inline bool GetIsPartitionable() const { return m_isPartitionable; }
182 inline bool IsPartitionableHasBeenSet() const { return m_isPartitionableHasBeenSet; }
183 inline void SetIsPartitionable(bool value) {
184 m_isPartitionableHasBeenSet = true;
185 m_isPartitionable = value;
186 }
187 inline Field& WithIsPartitionable(bool value) {
188 SetIsPartitionable(value);
189 return *this;
190 }
192
194
198 inline bool GetIsCreateable() const { return m_isCreateable; }
199 inline bool IsCreateableHasBeenSet() const { return m_isCreateableHasBeenSet; }
200 inline void SetIsCreateable(bool value) {
201 m_isCreateableHasBeenSet = true;
202 m_isCreateable = value;
203 }
204 inline Field& WithIsCreateable(bool value) {
205 SetIsCreateable(value);
206 return *this;
207 }
209
211
215 inline bool GetIsUpdateable() const { return m_isUpdateable; }
216 inline bool IsUpdateableHasBeenSet() const { return m_isUpdateableHasBeenSet; }
217 inline void SetIsUpdateable(bool value) {
218 m_isUpdateableHasBeenSet = true;
219 m_isUpdateable = value;
220 }
221 inline Field& WithIsUpdateable(bool value) {
222 SetIsUpdateable(value);
223 return *this;
224 }
226
228
232 inline bool GetIsUpsertable() const { return m_isUpsertable; }
233 inline bool IsUpsertableHasBeenSet() const { return m_isUpsertableHasBeenSet; }
234 inline void SetIsUpsertable(bool value) {
235 m_isUpsertableHasBeenSet = true;
236 m_isUpsertable = value;
237 }
238 inline Field& WithIsUpsertable(bool value) {
239 SetIsUpsertable(value);
240 return *this;
241 }
243
245
249 inline bool GetIsDefaultOnCreate() const { return m_isDefaultOnCreate; }
250 inline bool IsDefaultOnCreateHasBeenSet() const { return m_isDefaultOnCreateHasBeenSet; }
251 inline void SetIsDefaultOnCreate(bool value) {
252 m_isDefaultOnCreateHasBeenSet = true;
253 m_isDefaultOnCreate = value;
254 }
255 inline Field& WithIsDefaultOnCreate(bool value) {
257 return *this;
258 }
260
262
265 inline const Aws::Vector<Aws::String>& GetSupportedValues() const { return m_supportedValues; }
266 inline bool SupportedValuesHasBeenSet() const { return m_supportedValuesHasBeenSet; }
267 template <typename SupportedValuesT = Aws::Vector<Aws::String>>
268 void SetSupportedValues(SupportedValuesT&& value) {
269 m_supportedValuesHasBeenSet = true;
270 m_supportedValues = std::forward<SupportedValuesT>(value);
271 }
272 template <typename SupportedValuesT = Aws::Vector<Aws::String>>
273 Field& WithSupportedValues(SupportedValuesT&& value) {
274 SetSupportedValues(std::forward<SupportedValuesT>(value));
275 return *this;
276 }
277 template <typename SupportedValuesT = Aws::String>
278 Field& AddSupportedValues(SupportedValuesT&& value) {
279 m_supportedValuesHasBeenSet = true;
280 m_supportedValues.emplace_back(std::forward<SupportedValuesT>(value));
281 return *this;
282 }
284
286
289 inline const Aws::Vector<FieldFilterOperator>& GetSupportedFilterOperators() const { return m_supportedFilterOperators; }
290 inline bool SupportedFilterOperatorsHasBeenSet() const { return m_supportedFilterOperatorsHasBeenSet; }
291 template <typename SupportedFilterOperatorsT = Aws::Vector<FieldFilterOperator>>
292 void SetSupportedFilterOperators(SupportedFilterOperatorsT&& value) {
293 m_supportedFilterOperatorsHasBeenSet = true;
294 m_supportedFilterOperators = std::forward<SupportedFilterOperatorsT>(value);
295 }
296 template <typename SupportedFilterOperatorsT = Aws::Vector<FieldFilterOperator>>
297 Field& WithSupportedFilterOperators(SupportedFilterOperatorsT&& value) {
298 SetSupportedFilterOperators(std::forward<SupportedFilterOperatorsT>(value));
299 return *this;
300 }
302 m_supportedFilterOperatorsHasBeenSet = true;
303 m_supportedFilterOperators.push_back(value);
304 return *this;
305 }
307
309
312 inline const Aws::String& GetParentField() const { return m_parentField; }
313 inline bool ParentFieldHasBeenSet() const { return m_parentFieldHasBeenSet; }
314 template <typename ParentFieldT = Aws::String>
315 void SetParentField(ParentFieldT&& value) {
316 m_parentFieldHasBeenSet = true;
317 m_parentField = std::forward<ParentFieldT>(value);
318 }
319 template <typename ParentFieldT = Aws::String>
320 Field& WithParentField(ParentFieldT&& value) {
321 SetParentField(std::forward<ParentFieldT>(value));
322 return *this;
323 }
325
327
331 inline const Aws::String& GetNativeDataType() const { return m_nativeDataType; }
332 inline bool NativeDataTypeHasBeenSet() const { return m_nativeDataTypeHasBeenSet; }
333 template <typename NativeDataTypeT = Aws::String>
334 void SetNativeDataType(NativeDataTypeT&& value) {
335 m_nativeDataTypeHasBeenSet = true;
336 m_nativeDataType = std::forward<NativeDataTypeT>(value);
337 }
338 template <typename NativeDataTypeT = Aws::String>
339 Field& WithNativeDataType(NativeDataTypeT&& value) {
340 SetNativeDataType(std::forward<NativeDataTypeT>(value));
341 return *this;
342 }
344
346
349 inline const Aws::Map<Aws::String, Aws::String>& GetCustomProperties() const { return m_customProperties; }
350 inline bool CustomPropertiesHasBeenSet() const { return m_customPropertiesHasBeenSet; }
351 template <typename CustomPropertiesT = Aws::Map<Aws::String, Aws::String>>
352 void SetCustomProperties(CustomPropertiesT&& value) {
353 m_customPropertiesHasBeenSet = true;
354 m_customProperties = std::forward<CustomPropertiesT>(value);
355 }
356 template <typename CustomPropertiesT = Aws::Map<Aws::String, Aws::String>>
357 Field& WithCustomProperties(CustomPropertiesT&& value) {
358 SetCustomProperties(std::forward<CustomPropertiesT>(value));
359 return *this;
360 }
361 template <typename CustomPropertiesKeyT = Aws::String, typename CustomPropertiesValueT = Aws::String>
362 Field& AddCustomProperties(CustomPropertiesKeyT&& key, CustomPropertiesValueT&& value) {
363 m_customPropertiesHasBeenSet = true;
364 m_customProperties.emplace(std::forward<CustomPropertiesKeyT>(key), std::forward<CustomPropertiesValueT>(value));
365 return *this;
366 }
368 private:
369 Aws::String m_fieldName;
370
371 Aws::String m_label;
372
373 Aws::String m_description;
374
376
377 bool m_isPrimaryKey{false};
378
379 bool m_isNullable{false};
380
381 bool m_isRetrievable{false};
382
383 bool m_isFilterable{false};
384
385 bool m_isPartitionable{false};
386
387 bool m_isCreateable{false};
388
389 bool m_isUpdateable{false};
390
391 bool m_isUpsertable{false};
392
393 bool m_isDefaultOnCreate{false};
394
395 Aws::Vector<Aws::String> m_supportedValues;
396
397 Aws::Vector<FieldFilterOperator> m_supportedFilterOperators;
398
399 Aws::String m_parentField;
400
401 Aws::String m_nativeDataType;
402
403 Aws::Map<Aws::String, Aws::String> m_customProperties;
404 bool m_fieldNameHasBeenSet = false;
405 bool m_labelHasBeenSet = false;
406 bool m_descriptionHasBeenSet = false;
407 bool m_fieldTypeHasBeenSet = false;
408 bool m_isPrimaryKeyHasBeenSet = false;
409 bool m_isNullableHasBeenSet = false;
410 bool m_isRetrievableHasBeenSet = false;
411 bool m_isFilterableHasBeenSet = false;
412 bool m_isPartitionableHasBeenSet = false;
413 bool m_isCreateableHasBeenSet = false;
414 bool m_isUpdateableHasBeenSet = false;
415 bool m_isUpsertableHasBeenSet = false;
416 bool m_isDefaultOnCreateHasBeenSet = false;
417 bool m_supportedValuesHasBeenSet = false;
418 bool m_supportedFilterOperatorsHasBeenSet = false;
419 bool m_parentFieldHasBeenSet = false;
420 bool m_nativeDataTypeHasBeenSet = false;
421 bool m_customPropertiesHasBeenSet = false;
422};
423
424} // namespace Model
425} // namespace Glue
426} // namespace Aws
AWS_GLUE_API Field & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetDescription(DescriptionT &&value)
Definition Field.h:82
bool ParentFieldHasBeenSet() const
Definition Field.h:313
bool IsRetrievableHasBeenSet() const
Definition Field.h:148
void SetIsNullable(bool value)
Definition Field.h:132
const Aws::String & GetParentField() const
Definition Field.h:312
const Aws::String & GetFieldName() const
Definition Field.h:43
Field & WithIsNullable(bool value)
Definition Field.h:136
bool IsNullableHasBeenSet() const
Definition Field.h:131
void SetFieldType(FieldDataType value)
Definition Field.h:99
bool GetIsDefaultOnCreate() const
Definition Field.h:249
bool FieldNameHasBeenSet() const
Definition Field.h:44
AWS_GLUE_API Field(Aws::Utils::Json::JsonView jsonValue)
void SetIsCreateable(bool value)
Definition Field.h:200
Field & WithSupportedValues(SupportedValuesT &&value)
Definition Field.h:273
Field & WithIsUpdateable(bool value)
Definition Field.h:221
bool IsDefaultOnCreateHasBeenSet() const
Definition Field.h:250
void SetSupportedFilterOperators(SupportedFilterOperatorsT &&value)
Definition Field.h:292
bool IsUpdateableHasBeenSet() const
Definition Field.h:216
bool GetIsRetrievable() const
Definition Field.h:147
Field & WithIsPartitionable(bool value)
Definition Field.h:187
void SetIsDefaultOnCreate(bool value)
Definition Field.h:251
bool NativeDataTypeHasBeenSet() const
Definition Field.h:332
Field & WithFieldName(FieldNameT &&value)
Definition Field.h:51
bool IsUpsertableHasBeenSet() const
Definition Field.h:233
const Aws::String & GetNativeDataType() const
Definition Field.h:331
void SetNativeDataType(NativeDataTypeT &&value)
Definition Field.h:334
bool IsPartitionableHasBeenSet() const
Definition Field.h:182
Field & WithCustomProperties(CustomPropertiesT &&value)
Definition Field.h:357
Field & WithIsPrimaryKey(bool value)
Definition Field.h:120
bool IsFilterableHasBeenSet() const
Definition Field.h:165
bool IsCreateableHasBeenSet() const
Definition Field.h:199
void SetIsPartitionable(bool value)
Definition Field.h:183
Field & WithFieldType(FieldDataType value)
Definition Field.h:103
const Aws::Vector< FieldFilterOperator > & GetSupportedFilterOperators() const
Definition Field.h:289
AWS_GLUE_API Field()=default
Field & WithIsRetrievable(bool value)
Definition Field.h:153
Field & WithNativeDataType(NativeDataTypeT &&value)
Definition Field.h:339
bool IsPrimaryKeyHasBeenSet() const
Definition Field.h:115
Field & WithLabel(LabelT &&value)
Definition Field.h:69
void SetSupportedValues(SupportedValuesT &&value)
Definition Field.h:268
void SetIsUpdateable(bool value)
Definition Field.h:217
bool SupportedFilterOperatorsHasBeenSet() const
Definition Field.h:290
Field & WithIsDefaultOnCreate(bool value)
Definition Field.h:255
const Aws::Map< Aws::String, Aws::String > & GetCustomProperties() const
Definition Field.h:349
bool CustomPropertiesHasBeenSet() const
Definition Field.h:350
FieldDataType GetFieldType() const
Definition Field.h:97
bool GetIsPrimaryKey() const
Definition Field.h:114
AWS_GLUE_API Aws::Utils::Json::JsonValue Jsonize() const
bool GetIsNullable() const
Definition Field.h:130
void SetIsPrimaryKey(bool value)
Definition Field.h:116
void SetParentField(ParentFieldT &&value)
Definition Field.h:315
bool GetIsFilterable() const
Definition Field.h:164
void SetFieldName(FieldNameT &&value)
Definition Field.h:46
Field & WithIsCreateable(bool value)
Definition Field.h:204
Field & WithIsUpsertable(bool value)
Definition Field.h:238
bool GetIsUpsertable() const
Definition Field.h:232
bool SupportedValuesHasBeenSet() const
Definition Field.h:266
bool FieldTypeHasBeenSet() const
Definition Field.h:98
void SetIsUpsertable(bool value)
Definition Field.h:234
bool DescriptionHasBeenSet() const
Definition Field.h:80
const Aws::String & GetLabel() const
Definition Field.h:61
const Aws::String & GetDescription() const
Definition Field.h:79
bool LabelHasBeenSet() const
Definition Field.h:62
Field & WithSupportedFilterOperators(SupportedFilterOperatorsT &&value)
Definition Field.h:297
void SetIsRetrievable(bool value)
Definition Field.h:149
bool GetIsCreateable() const
Definition Field.h:198
bool GetIsPartitionable() const
Definition Field.h:181
Field & WithParentField(ParentFieldT &&value)
Definition Field.h:320
Field & AddCustomProperties(CustomPropertiesKeyT &&key, CustomPropertiesValueT &&value)
Definition Field.h:362
void SetIsFilterable(bool value)
Definition Field.h:166
Field & AddSupportedFilterOperators(FieldFilterOperator value)
Definition Field.h:301
Field & WithDescription(DescriptionT &&value)
Definition Field.h:87
bool GetIsUpdateable() const
Definition Field.h:215
void SetCustomProperties(CustomPropertiesT &&value)
Definition Field.h:352
Field & WithIsFilterable(bool value)
Definition Field.h:170
void SetLabel(LabelT &&value)
Definition Field.h:64
const Aws::Vector< Aws::String > & GetSupportedValues() const
Definition Field.h:265
Field & AddSupportedValues(SupportedValuesT &&value)
Definition Field.h:278
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
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue