aws-sdk-glue 1.147.0

AWS SDK for AWS Glue
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The <code>Field</code> object has information about the different properties associated with a field in the connector.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Field {
    /// <p>A unique identifier for the field.</p>
    pub field_name: ::std::option::Option<::std::string::String>,
    /// <p>A readable label used for the field.</p>
    pub label: ::std::option::Option<::std::string::String>,
    /// <p>A description of the field.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The type of data in the field.</p>
    pub field_type: ::std::option::Option<crate::types::FieldDataType>,
    /// <p>Indicates whether this field can used as a primary key for the given entity.</p>
    pub is_primary_key: ::std::option::Option<bool>,
    /// <p>Indicates whether this field can be nullable or not.</p>
    pub is_nullable: ::std::option::Option<bool>,
    /// <p>Indicates whether this field can be added in Select clause of SQL query or whether it is retrievable or not.</p>
    pub is_retrievable: ::std::option::Option<bool>,
    /// <p>Indicates whether this field can used in a filter clause (<code>WHERE</code> clause) of a SQL statement when querying data.</p>
    pub is_filterable: ::std::option::Option<bool>,
    /// <p>Indicates whether a given field can be used in partitioning the query made to SaaS.</p>
    pub is_partitionable: ::std::option::Option<bool>,
    /// <p>Indicates whether this field can be created as part of a destination write.</p>
    pub is_createable: ::std::option::Option<bool>,
    /// <p>Indicates whether this field can be updated as part of a destination write.</p>
    pub is_updateable: ::std::option::Option<bool>,
    /// <p>Indicates whether this field can be upserted as part of a destination write.</p>
    pub is_upsertable: ::std::option::Option<bool>,
    /// <p>Indicates whether this field is populated automatically when the object is created, such as a created at timestamp.</p>
    pub is_default_on_create: ::std::option::Option<bool>,
    /// <p>A list of supported values for the field.</p>
    pub supported_values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Indicates the support filter operators for this field.</p>
    pub supported_filter_operators: ::std::option::Option<::std::vec::Vec<crate::types::FieldFilterOperator>>,
    /// <p>A parent field name for a nested field.</p>
    pub parent_field: ::std::option::Option<::std::string::String>,
    /// <p>The data type returned by the SaaS API, such as “picklist” or “textarea” from Salesforce.</p>
    pub native_data_type: ::std::option::Option<::std::string::String>,
    /// <p>Optional map of keys which may be returned.</p>
    pub custom_properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl Field {
    /// <p>A unique identifier for the field.</p>
    pub fn field_name(&self) -> ::std::option::Option<&str> {
        self.field_name.as_deref()
    }
    /// <p>A readable label used for the field.</p>
    pub fn label(&self) -> ::std::option::Option<&str> {
        self.label.as_deref()
    }
    /// <p>A description of the field.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The type of data in the field.</p>
    pub fn field_type(&self) -> ::std::option::Option<&crate::types::FieldDataType> {
        self.field_type.as_ref()
    }
    /// <p>Indicates whether this field can used as a primary key for the given entity.</p>
    pub fn is_primary_key(&self) -> ::std::option::Option<bool> {
        self.is_primary_key
    }
    /// <p>Indicates whether this field can be nullable or not.</p>
    pub fn is_nullable(&self) -> ::std::option::Option<bool> {
        self.is_nullable
    }
    /// <p>Indicates whether this field can be added in Select clause of SQL query or whether it is retrievable or not.</p>
    pub fn is_retrievable(&self) -> ::std::option::Option<bool> {
        self.is_retrievable
    }
    /// <p>Indicates whether this field can used in a filter clause (<code>WHERE</code> clause) of a SQL statement when querying data.</p>
    pub fn is_filterable(&self) -> ::std::option::Option<bool> {
        self.is_filterable
    }
    /// <p>Indicates whether a given field can be used in partitioning the query made to SaaS.</p>
    pub fn is_partitionable(&self) -> ::std::option::Option<bool> {
        self.is_partitionable
    }
    /// <p>Indicates whether this field can be created as part of a destination write.</p>
    pub fn is_createable(&self) -> ::std::option::Option<bool> {
        self.is_createable
    }
    /// <p>Indicates whether this field can be updated as part of a destination write.</p>
    pub fn is_updateable(&self) -> ::std::option::Option<bool> {
        self.is_updateable
    }
    /// <p>Indicates whether this field can be upserted as part of a destination write.</p>
    pub fn is_upsertable(&self) -> ::std::option::Option<bool> {
        self.is_upsertable
    }
    /// <p>Indicates whether this field is populated automatically when the object is created, such as a created at timestamp.</p>
    pub fn is_default_on_create(&self) -> ::std::option::Option<bool> {
        self.is_default_on_create
    }
    /// <p>A list of supported values for the field.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.supported_values.is_none()`.
    pub fn supported_values(&self) -> &[::std::string::String] {
        self.supported_values.as_deref().unwrap_or_default()
    }
    /// <p>Indicates the support filter operators for this field.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.supported_filter_operators.is_none()`.
    pub fn supported_filter_operators(&self) -> &[crate::types::FieldFilterOperator] {
        self.supported_filter_operators.as_deref().unwrap_or_default()
    }
    /// <p>A parent field name for a nested field.</p>
    pub fn parent_field(&self) -> ::std::option::Option<&str> {
        self.parent_field.as_deref()
    }
    /// <p>The data type returned by the SaaS API, such as “picklist” or “textarea” from Salesforce.</p>
    pub fn native_data_type(&self) -> ::std::option::Option<&str> {
        self.native_data_type.as_deref()
    }
    /// <p>Optional map of keys which may be returned.</p>
    pub fn custom_properties(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.custom_properties.as_ref()
    }
}
impl Field {
    /// Creates a new builder-style object to manufacture [`Field`](crate::types::Field).
    pub fn builder() -> crate::types::builders::FieldBuilder {
        crate::types::builders::FieldBuilder::default()
    }
}

/// A builder for [`Field`](crate::types::Field).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct FieldBuilder {
    pub(crate) field_name: ::std::option::Option<::std::string::String>,
    pub(crate) label: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) field_type: ::std::option::Option<crate::types::FieldDataType>,
    pub(crate) is_primary_key: ::std::option::Option<bool>,
    pub(crate) is_nullable: ::std::option::Option<bool>,
    pub(crate) is_retrievable: ::std::option::Option<bool>,
    pub(crate) is_filterable: ::std::option::Option<bool>,
    pub(crate) is_partitionable: ::std::option::Option<bool>,
    pub(crate) is_createable: ::std::option::Option<bool>,
    pub(crate) is_updateable: ::std::option::Option<bool>,
    pub(crate) is_upsertable: ::std::option::Option<bool>,
    pub(crate) is_default_on_create: ::std::option::Option<bool>,
    pub(crate) supported_values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) supported_filter_operators: ::std::option::Option<::std::vec::Vec<crate::types::FieldFilterOperator>>,
    pub(crate) parent_field: ::std::option::Option<::std::string::String>,
    pub(crate) native_data_type: ::std::option::Option<::std::string::String>,
    pub(crate) custom_properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl FieldBuilder {
    /// <p>A unique identifier for the field.</p>
    pub fn field_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.field_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the field.</p>
    pub fn set_field_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.field_name = input;
        self
    }
    /// <p>A unique identifier for the field.</p>
    pub fn get_field_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.field_name
    }
    /// <p>A readable label used for the field.</p>
    pub fn label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.label = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A readable label used for the field.</p>
    pub fn set_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.label = input;
        self
    }
    /// <p>A readable label used for the field.</p>
    pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
        &self.label
    }
    /// <p>A description of the field.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the field.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the field.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The type of data in the field.</p>
    pub fn field_type(mut self, input: crate::types::FieldDataType) -> Self {
        self.field_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of data in the field.</p>
    pub fn set_field_type(mut self, input: ::std::option::Option<crate::types::FieldDataType>) -> Self {
        self.field_type = input;
        self
    }
    /// <p>The type of data in the field.</p>
    pub fn get_field_type(&self) -> &::std::option::Option<crate::types::FieldDataType> {
        &self.field_type
    }
    /// <p>Indicates whether this field can used as a primary key for the given entity.</p>
    pub fn is_primary_key(mut self, input: bool) -> Self {
        self.is_primary_key = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether this field can used as a primary key for the given entity.</p>
    pub fn set_is_primary_key(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_primary_key = input;
        self
    }
    /// <p>Indicates whether this field can used as a primary key for the given entity.</p>
    pub fn get_is_primary_key(&self) -> &::std::option::Option<bool> {
        &self.is_primary_key
    }
    /// <p>Indicates whether this field can be nullable or not.</p>
    pub fn is_nullable(mut self, input: bool) -> Self {
        self.is_nullable = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether this field can be nullable or not.</p>
    pub fn set_is_nullable(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_nullable = input;
        self
    }
    /// <p>Indicates whether this field can be nullable or not.</p>
    pub fn get_is_nullable(&self) -> &::std::option::Option<bool> {
        &self.is_nullable
    }
    /// <p>Indicates whether this field can be added in Select clause of SQL query or whether it is retrievable or not.</p>
    pub fn is_retrievable(mut self, input: bool) -> Self {
        self.is_retrievable = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether this field can be added in Select clause of SQL query or whether it is retrievable or not.</p>
    pub fn set_is_retrievable(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_retrievable = input;
        self
    }
    /// <p>Indicates whether this field can be added in Select clause of SQL query or whether it is retrievable or not.</p>
    pub fn get_is_retrievable(&self) -> &::std::option::Option<bool> {
        &self.is_retrievable
    }
    /// <p>Indicates whether this field can used in a filter clause (<code>WHERE</code> clause) of a SQL statement when querying data.</p>
    pub fn is_filterable(mut self, input: bool) -> Self {
        self.is_filterable = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether this field can used in a filter clause (<code>WHERE</code> clause) of a SQL statement when querying data.</p>
    pub fn set_is_filterable(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_filterable = input;
        self
    }
    /// <p>Indicates whether this field can used in a filter clause (<code>WHERE</code> clause) of a SQL statement when querying data.</p>
    pub fn get_is_filterable(&self) -> &::std::option::Option<bool> {
        &self.is_filterable
    }
    /// <p>Indicates whether a given field can be used in partitioning the query made to SaaS.</p>
    pub fn is_partitionable(mut self, input: bool) -> Self {
        self.is_partitionable = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether a given field can be used in partitioning the query made to SaaS.</p>
    pub fn set_is_partitionable(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_partitionable = input;
        self
    }
    /// <p>Indicates whether a given field can be used in partitioning the query made to SaaS.</p>
    pub fn get_is_partitionable(&self) -> &::std::option::Option<bool> {
        &self.is_partitionable
    }
    /// <p>Indicates whether this field can be created as part of a destination write.</p>
    pub fn is_createable(mut self, input: bool) -> Self {
        self.is_createable = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether this field can be created as part of a destination write.</p>
    pub fn set_is_createable(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_createable = input;
        self
    }
    /// <p>Indicates whether this field can be created as part of a destination write.</p>
    pub fn get_is_createable(&self) -> &::std::option::Option<bool> {
        &self.is_createable
    }
    /// <p>Indicates whether this field can be updated as part of a destination write.</p>
    pub fn is_updateable(mut self, input: bool) -> Self {
        self.is_updateable = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether this field can be updated as part of a destination write.</p>
    pub fn set_is_updateable(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_updateable = input;
        self
    }
    /// <p>Indicates whether this field can be updated as part of a destination write.</p>
    pub fn get_is_updateable(&self) -> &::std::option::Option<bool> {
        &self.is_updateable
    }
    /// <p>Indicates whether this field can be upserted as part of a destination write.</p>
    pub fn is_upsertable(mut self, input: bool) -> Self {
        self.is_upsertable = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether this field can be upserted as part of a destination write.</p>
    pub fn set_is_upsertable(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_upsertable = input;
        self
    }
    /// <p>Indicates whether this field can be upserted as part of a destination write.</p>
    pub fn get_is_upsertable(&self) -> &::std::option::Option<bool> {
        &self.is_upsertable
    }
    /// <p>Indicates whether this field is populated automatically when the object is created, such as a created at timestamp.</p>
    pub fn is_default_on_create(mut self, input: bool) -> Self {
        self.is_default_on_create = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether this field is populated automatically when the object is created, such as a created at timestamp.</p>
    pub fn set_is_default_on_create(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_default_on_create = input;
        self
    }
    /// <p>Indicates whether this field is populated automatically when the object is created, such as a created at timestamp.</p>
    pub fn get_is_default_on_create(&self) -> &::std::option::Option<bool> {
        &self.is_default_on_create
    }
    /// Appends an item to `supported_values`.
    ///
    /// To override the contents of this collection use [`set_supported_values`](Self::set_supported_values).
    ///
    /// <p>A list of supported values for the field.</p>
    pub fn supported_values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.supported_values.unwrap_or_default();
        v.push(input.into());
        self.supported_values = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of supported values for the field.</p>
    pub fn set_supported_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.supported_values = input;
        self
    }
    /// <p>A list of supported values for the field.</p>
    pub fn get_supported_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.supported_values
    }
    /// Appends an item to `supported_filter_operators`.
    ///
    /// To override the contents of this collection use [`set_supported_filter_operators`](Self::set_supported_filter_operators).
    ///
    /// <p>Indicates the support filter operators for this field.</p>
    pub fn supported_filter_operators(mut self, input: crate::types::FieldFilterOperator) -> Self {
        let mut v = self.supported_filter_operators.unwrap_or_default();
        v.push(input);
        self.supported_filter_operators = ::std::option::Option::Some(v);
        self
    }
    /// <p>Indicates the support filter operators for this field.</p>
    pub fn set_supported_filter_operators(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FieldFilterOperator>>) -> Self {
        self.supported_filter_operators = input;
        self
    }
    /// <p>Indicates the support filter operators for this field.</p>
    pub fn get_supported_filter_operators(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FieldFilterOperator>> {
        &self.supported_filter_operators
    }
    /// <p>A parent field name for a nested field.</p>
    pub fn parent_field(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.parent_field = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A parent field name for a nested field.</p>
    pub fn set_parent_field(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.parent_field = input;
        self
    }
    /// <p>A parent field name for a nested field.</p>
    pub fn get_parent_field(&self) -> &::std::option::Option<::std::string::String> {
        &self.parent_field
    }
    /// <p>The data type returned by the SaaS API, such as “picklist” or “textarea” from Salesforce.</p>
    pub fn native_data_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.native_data_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The data type returned by the SaaS API, such as “picklist” or “textarea” from Salesforce.</p>
    pub fn set_native_data_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.native_data_type = input;
        self
    }
    /// <p>The data type returned by the SaaS API, such as “picklist” or “textarea” from Salesforce.</p>
    pub fn get_native_data_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.native_data_type
    }
    /// Adds a key-value pair to `custom_properties`.
    ///
    /// To override the contents of this collection use [`set_custom_properties`](Self::set_custom_properties).
    ///
    /// <p>Optional map of keys which may be returned.</p>
    pub fn custom_properties(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        let mut hash_map = self.custom_properties.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.custom_properties = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Optional map of keys which may be returned.</p>
    pub fn set_custom_properties(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.custom_properties = input;
        self
    }
    /// <p>Optional map of keys which may be returned.</p>
    pub fn get_custom_properties(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.custom_properties
    }
    /// Consumes the builder and constructs a [`Field`](crate::types::Field).
    pub fn build(self) -> crate::types::Field {
        crate::types::Field {
            field_name: self.field_name,
            label: self.label,
            description: self.description,
            field_type: self.field_type,
            is_primary_key: self.is_primary_key,
            is_nullable: self.is_nullable,
            is_retrievable: self.is_retrievable,
            is_filterable: self.is_filterable,
            is_partitionable: self.is_partitionable,
            is_createable: self.is_createable,
            is_updateable: self.is_updateable,
            is_upsertable: self.is_upsertable,
            is_default_on_create: self.is_default_on_create,
            supported_values: self.supported_values,
            supported_filter_operators: self.supported_filter_operators,
            parent_field: self.parent_field,
            native_data_type: self.native_data_type,
            custom_properties: self.custom_properties,
        }
    }
}