-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_data_lake_database_data_source_settings.go
538 lines (454 loc) · 17.6 KB
/
model_data_lake_database_data_source_settings.go
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
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// DataLakeDatabaseDataSourceSettings Data store that maps to a collection for this data lake.
type DataLakeDatabaseDataSourceSettings struct {
// Flag that validates the scheme in the specified URLs. If `true`, allows insecure `HTTP` scheme, doesn't verify the server's certificate chain and hostname, and accepts any certificate with any hostname presented by the server. If `false`, allows secure `HTTPS` scheme only.
AllowInsecure *bool `json:"allowInsecure,omitempty"`
// Human-readable label that identifies the collection in the database. For creating a wildcard (`*`) collection, you must omit this parameter.
Collection *string `json:"collection,omitempty"`
// Regex pattern to use for creating the wildcard (*) collection. To learn more about the regex syntax, see [Go programming language](https://pkg.go.dev/regexp).
CollectionRegex *string `json:"collectionRegex,omitempty"`
// Human-readable label that identifies the database, which contains the collection in the cluster. You must omit this parameter to generate wildcard (`*`) collections for dynamically generated databases.
Database *string `json:"database,omitempty"`
// Regex pattern to use for creating the wildcard (*) database. To learn more about the regex syntax, see [Go programming language](https://pkg.go.dev/regexp).
DatabaseRegex *string `json:"databaseRegex,omitempty"`
// Human-readable label that identifies the dataset that Atlas generates for an ingestion pipeline run or Online Archive.
DatasetName *string `json:"datasetName,omitempty"`
// Human-readable label that matches against the dataset names for ingestion pipeline runs or Online Archives.
DatasetPrefix *string `json:"datasetPrefix,omitempty"`
// File format that MongoDB Cloud uses if it encounters a file without a file extension while searching **storeName**.
DefaultFormat *string `json:"defaultFormat,omitempty"`
// File path that controls how MongoDB Cloud searches for and parses files in the **storeName** before mapping them to a collection.Specify ``/`` to capture all files and folders from the ``prefix`` path.
Path *string `json:"path,omitempty"`
// Name for the field that includes the provenance of the documents in the results. MongoDB Cloud returns different fields in the results for each supported provider.
ProvenanceFieldName *string `json:"provenanceFieldName,omitempty"`
// Human-readable label that identifies the data store that MongoDB Cloud maps to the collection.
StoreName *string `json:"storeName,omitempty"`
// Unsigned integer that specifies how many fields of the dataset name to trim from the left of the dataset name before mapping the remaining fields to a wildcard collection name.
TrimLevel *int `json:"trimLevel,omitempty"`
// URLs of the publicly accessible data files. You can't specify URLs that require authentication. Atlas Data Lake creates a partition for each URL. If empty or omitted, Data Lake uses the URLs from the store specified in the **dataSources.storeName** parameter.
Urls *[]string `json:"urls,omitempty"`
}
// NewDataLakeDatabaseDataSourceSettings instantiates a new DataLakeDatabaseDataSourceSettings object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewDataLakeDatabaseDataSourceSettings() *DataLakeDatabaseDataSourceSettings {
this := DataLakeDatabaseDataSourceSettings{}
var allowInsecure bool = false
this.AllowInsecure = &allowInsecure
return &this
}
// NewDataLakeDatabaseDataSourceSettingsWithDefaults instantiates a new DataLakeDatabaseDataSourceSettings object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewDataLakeDatabaseDataSourceSettingsWithDefaults() *DataLakeDatabaseDataSourceSettings {
this := DataLakeDatabaseDataSourceSettings{}
var allowInsecure bool = false
this.AllowInsecure = &allowInsecure
return &this
}
// GetAllowInsecure returns the AllowInsecure field value if set, zero value otherwise
func (o *DataLakeDatabaseDataSourceSettings) GetAllowInsecure() bool {
if o == nil || IsNil(o.AllowInsecure) {
var ret bool
return ret
}
return *o.AllowInsecure
}
// GetAllowInsecureOk returns a tuple with the AllowInsecure field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataLakeDatabaseDataSourceSettings) GetAllowInsecureOk() (*bool, bool) {
if o == nil || IsNil(o.AllowInsecure) {
return nil, false
}
return o.AllowInsecure, true
}
// HasAllowInsecure returns a boolean if a field has been set.
func (o *DataLakeDatabaseDataSourceSettings) HasAllowInsecure() bool {
if o != nil && !IsNil(o.AllowInsecure) {
return true
}
return false
}
// SetAllowInsecure gets a reference to the given bool and assigns it to the AllowInsecure field.
func (o *DataLakeDatabaseDataSourceSettings) SetAllowInsecure(v bool) {
o.AllowInsecure = &v
}
// GetCollection returns the Collection field value if set, zero value otherwise
func (o *DataLakeDatabaseDataSourceSettings) GetCollection() string {
if o == nil || IsNil(o.Collection) {
var ret string
return ret
}
return *o.Collection
}
// GetCollectionOk returns a tuple with the Collection field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataLakeDatabaseDataSourceSettings) GetCollectionOk() (*string, bool) {
if o == nil || IsNil(o.Collection) {
return nil, false
}
return o.Collection, true
}
// HasCollection returns a boolean if a field has been set.
func (o *DataLakeDatabaseDataSourceSettings) HasCollection() bool {
if o != nil && !IsNil(o.Collection) {
return true
}
return false
}
// SetCollection gets a reference to the given string and assigns it to the Collection field.
func (o *DataLakeDatabaseDataSourceSettings) SetCollection(v string) {
o.Collection = &v
}
// GetCollectionRegex returns the CollectionRegex field value if set, zero value otherwise
func (o *DataLakeDatabaseDataSourceSettings) GetCollectionRegex() string {
if o == nil || IsNil(o.CollectionRegex) {
var ret string
return ret
}
return *o.CollectionRegex
}
// GetCollectionRegexOk returns a tuple with the CollectionRegex field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataLakeDatabaseDataSourceSettings) GetCollectionRegexOk() (*string, bool) {
if o == nil || IsNil(o.CollectionRegex) {
return nil, false
}
return o.CollectionRegex, true
}
// HasCollectionRegex returns a boolean if a field has been set.
func (o *DataLakeDatabaseDataSourceSettings) HasCollectionRegex() bool {
if o != nil && !IsNil(o.CollectionRegex) {
return true
}
return false
}
// SetCollectionRegex gets a reference to the given string and assigns it to the CollectionRegex field.
func (o *DataLakeDatabaseDataSourceSettings) SetCollectionRegex(v string) {
o.CollectionRegex = &v
}
// GetDatabase returns the Database field value if set, zero value otherwise
func (o *DataLakeDatabaseDataSourceSettings) GetDatabase() string {
if o == nil || IsNil(o.Database) {
var ret string
return ret
}
return *o.Database
}
// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataLakeDatabaseDataSourceSettings) GetDatabaseOk() (*string, bool) {
if o == nil || IsNil(o.Database) {
return nil, false
}
return o.Database, true
}
// HasDatabase returns a boolean if a field has been set.
func (o *DataLakeDatabaseDataSourceSettings) HasDatabase() bool {
if o != nil && !IsNil(o.Database) {
return true
}
return false
}
// SetDatabase gets a reference to the given string and assigns it to the Database field.
func (o *DataLakeDatabaseDataSourceSettings) SetDatabase(v string) {
o.Database = &v
}
// GetDatabaseRegex returns the DatabaseRegex field value if set, zero value otherwise
func (o *DataLakeDatabaseDataSourceSettings) GetDatabaseRegex() string {
if o == nil || IsNil(o.DatabaseRegex) {
var ret string
return ret
}
return *o.DatabaseRegex
}
// GetDatabaseRegexOk returns a tuple with the DatabaseRegex field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataLakeDatabaseDataSourceSettings) GetDatabaseRegexOk() (*string, bool) {
if o == nil || IsNil(o.DatabaseRegex) {
return nil, false
}
return o.DatabaseRegex, true
}
// HasDatabaseRegex returns a boolean if a field has been set.
func (o *DataLakeDatabaseDataSourceSettings) HasDatabaseRegex() bool {
if o != nil && !IsNil(o.DatabaseRegex) {
return true
}
return false
}
// SetDatabaseRegex gets a reference to the given string and assigns it to the DatabaseRegex field.
func (o *DataLakeDatabaseDataSourceSettings) SetDatabaseRegex(v string) {
o.DatabaseRegex = &v
}
// GetDatasetName returns the DatasetName field value if set, zero value otherwise
func (o *DataLakeDatabaseDataSourceSettings) GetDatasetName() string {
if o == nil || IsNil(o.DatasetName) {
var ret string
return ret
}
return *o.DatasetName
}
// GetDatasetNameOk returns a tuple with the DatasetName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataLakeDatabaseDataSourceSettings) GetDatasetNameOk() (*string, bool) {
if o == nil || IsNil(o.DatasetName) {
return nil, false
}
return o.DatasetName, true
}
// HasDatasetName returns a boolean if a field has been set.
func (o *DataLakeDatabaseDataSourceSettings) HasDatasetName() bool {
if o != nil && !IsNil(o.DatasetName) {
return true
}
return false
}
// SetDatasetName gets a reference to the given string and assigns it to the DatasetName field.
func (o *DataLakeDatabaseDataSourceSettings) SetDatasetName(v string) {
o.DatasetName = &v
}
// GetDatasetPrefix returns the DatasetPrefix field value if set, zero value otherwise
func (o *DataLakeDatabaseDataSourceSettings) GetDatasetPrefix() string {
if o == nil || IsNil(o.DatasetPrefix) {
var ret string
return ret
}
return *o.DatasetPrefix
}
// GetDatasetPrefixOk returns a tuple with the DatasetPrefix field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataLakeDatabaseDataSourceSettings) GetDatasetPrefixOk() (*string, bool) {
if o == nil || IsNil(o.DatasetPrefix) {
return nil, false
}
return o.DatasetPrefix, true
}
// HasDatasetPrefix returns a boolean if a field has been set.
func (o *DataLakeDatabaseDataSourceSettings) HasDatasetPrefix() bool {
if o != nil && !IsNil(o.DatasetPrefix) {
return true
}
return false
}
// SetDatasetPrefix gets a reference to the given string and assigns it to the DatasetPrefix field.
func (o *DataLakeDatabaseDataSourceSettings) SetDatasetPrefix(v string) {
o.DatasetPrefix = &v
}
// GetDefaultFormat returns the DefaultFormat field value if set, zero value otherwise
func (o *DataLakeDatabaseDataSourceSettings) GetDefaultFormat() string {
if o == nil || IsNil(o.DefaultFormat) {
var ret string
return ret
}
return *o.DefaultFormat
}
// GetDefaultFormatOk returns a tuple with the DefaultFormat field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataLakeDatabaseDataSourceSettings) GetDefaultFormatOk() (*string, bool) {
if o == nil || IsNil(o.DefaultFormat) {
return nil, false
}
return o.DefaultFormat, true
}
// HasDefaultFormat returns a boolean if a field has been set.
func (o *DataLakeDatabaseDataSourceSettings) HasDefaultFormat() bool {
if o != nil && !IsNil(o.DefaultFormat) {
return true
}
return false
}
// SetDefaultFormat gets a reference to the given string and assigns it to the DefaultFormat field.
func (o *DataLakeDatabaseDataSourceSettings) SetDefaultFormat(v string) {
o.DefaultFormat = &v
}
// GetPath returns the Path field value if set, zero value otherwise
func (o *DataLakeDatabaseDataSourceSettings) GetPath() string {
if o == nil || IsNil(o.Path) {
var ret string
return ret
}
return *o.Path
}
// GetPathOk returns a tuple with the Path field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataLakeDatabaseDataSourceSettings) GetPathOk() (*string, bool) {
if o == nil || IsNil(o.Path) {
return nil, false
}
return o.Path, true
}
// HasPath returns a boolean if a field has been set.
func (o *DataLakeDatabaseDataSourceSettings) HasPath() bool {
if o != nil && !IsNil(o.Path) {
return true
}
return false
}
// SetPath gets a reference to the given string and assigns it to the Path field.
func (o *DataLakeDatabaseDataSourceSettings) SetPath(v string) {
o.Path = &v
}
// GetProvenanceFieldName returns the ProvenanceFieldName field value if set, zero value otherwise
func (o *DataLakeDatabaseDataSourceSettings) GetProvenanceFieldName() string {
if o == nil || IsNil(o.ProvenanceFieldName) {
var ret string
return ret
}
return *o.ProvenanceFieldName
}
// GetProvenanceFieldNameOk returns a tuple with the ProvenanceFieldName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataLakeDatabaseDataSourceSettings) GetProvenanceFieldNameOk() (*string, bool) {
if o == nil || IsNil(o.ProvenanceFieldName) {
return nil, false
}
return o.ProvenanceFieldName, true
}
// HasProvenanceFieldName returns a boolean if a field has been set.
func (o *DataLakeDatabaseDataSourceSettings) HasProvenanceFieldName() bool {
if o != nil && !IsNil(o.ProvenanceFieldName) {
return true
}
return false
}
// SetProvenanceFieldName gets a reference to the given string and assigns it to the ProvenanceFieldName field.
func (o *DataLakeDatabaseDataSourceSettings) SetProvenanceFieldName(v string) {
o.ProvenanceFieldName = &v
}
// GetStoreName returns the StoreName field value if set, zero value otherwise
func (o *DataLakeDatabaseDataSourceSettings) GetStoreName() string {
if o == nil || IsNil(o.StoreName) {
var ret string
return ret
}
return *o.StoreName
}
// GetStoreNameOk returns a tuple with the StoreName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataLakeDatabaseDataSourceSettings) GetStoreNameOk() (*string, bool) {
if o == nil || IsNil(o.StoreName) {
return nil, false
}
return o.StoreName, true
}
// HasStoreName returns a boolean if a field has been set.
func (o *DataLakeDatabaseDataSourceSettings) HasStoreName() bool {
if o != nil && !IsNil(o.StoreName) {
return true
}
return false
}
// SetStoreName gets a reference to the given string and assigns it to the StoreName field.
func (o *DataLakeDatabaseDataSourceSettings) SetStoreName(v string) {
o.StoreName = &v
}
// GetTrimLevel returns the TrimLevel field value if set, zero value otherwise
func (o *DataLakeDatabaseDataSourceSettings) GetTrimLevel() int {
if o == nil || IsNil(o.TrimLevel) {
var ret int
return ret
}
return *o.TrimLevel
}
// GetTrimLevelOk returns a tuple with the TrimLevel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataLakeDatabaseDataSourceSettings) GetTrimLevelOk() (*int, bool) {
if o == nil || IsNil(o.TrimLevel) {
return nil, false
}
return o.TrimLevel, true
}
// HasTrimLevel returns a boolean if a field has been set.
func (o *DataLakeDatabaseDataSourceSettings) HasTrimLevel() bool {
if o != nil && !IsNil(o.TrimLevel) {
return true
}
return false
}
// SetTrimLevel gets a reference to the given int and assigns it to the TrimLevel field.
func (o *DataLakeDatabaseDataSourceSettings) SetTrimLevel(v int) {
o.TrimLevel = &v
}
// GetUrls returns the Urls field value if set, zero value otherwise
func (o *DataLakeDatabaseDataSourceSettings) GetUrls() []string {
if o == nil || IsNil(o.Urls) {
var ret []string
return ret
}
return *o.Urls
}
// GetUrlsOk returns a tuple with the Urls field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataLakeDatabaseDataSourceSettings) GetUrlsOk() (*[]string, bool) {
if o == nil || IsNil(o.Urls) {
return nil, false
}
return o.Urls, true
}
// HasUrls returns a boolean if a field has been set.
func (o *DataLakeDatabaseDataSourceSettings) HasUrls() bool {
if o != nil && !IsNil(o.Urls) {
return true
}
return false
}
// SetUrls gets a reference to the given []string and assigns it to the Urls field.
func (o *DataLakeDatabaseDataSourceSettings) SetUrls(v []string) {
o.Urls = &v
}
func (o DataLakeDatabaseDataSourceSettings) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DataLakeDatabaseDataSourceSettings) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AllowInsecure) {
toSerialize["allowInsecure"] = o.AllowInsecure
}
if !IsNil(o.Collection) {
toSerialize["collection"] = o.Collection
}
if !IsNil(o.CollectionRegex) {
toSerialize["collectionRegex"] = o.CollectionRegex
}
if !IsNil(o.Database) {
toSerialize["database"] = o.Database
}
if !IsNil(o.DatabaseRegex) {
toSerialize["databaseRegex"] = o.DatabaseRegex
}
if !IsNil(o.DatasetName) {
toSerialize["datasetName"] = o.DatasetName
}
if !IsNil(o.DatasetPrefix) {
toSerialize["datasetPrefix"] = o.DatasetPrefix
}
if !IsNil(o.DefaultFormat) {
toSerialize["defaultFormat"] = o.DefaultFormat
}
if !IsNil(o.Path) {
toSerialize["path"] = o.Path
}
if !IsNil(o.ProvenanceFieldName) {
toSerialize["provenanceFieldName"] = o.ProvenanceFieldName
}
if !IsNil(o.StoreName) {
toSerialize["storeName"] = o.StoreName
}
if !IsNil(o.TrimLevel) {
toSerialize["trimLevel"] = o.TrimLevel
}
if !IsNil(o.Urls) {
toSerialize["urls"] = o.Urls
}
return toSerialize, nil
}