/
model_integration.go
538 lines (458 loc) · 14.1 KB
/
model_integration.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
/*
* REST API
*
* Rockset's REST API allows for creating and managing all resources in Rockset. Each supported endpoint is documented below. All requests must be authorized with a Rockset API key, which can be created in the [Rockset console](https://console.rockset.com). The API key must be provided as `ApiKey <api_key>` in the `Authorization` request header. For example: ``` Authorization: ApiKey aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT ``` All endpoints are only accessible via https. Build something awesome!
*
* API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// Integration Integrations that can be associated with data sources to create collections. Only one type of integration may be specified.
type Integration struct {
// descriptive label and unique identifier
Name string `json:"name"`
// longer explanation for the integration
Description *string `json:"description,omitempty"`
// list of collections that use the integration
Collections *[]Collection `json:"collections,omitempty"`
// email of user who created the integration
CreatedBy string `json:"created_by"`
// ISO-8601 date
CreatedAt *string `json:"created_at,omitempty"`
S3 *S3Integration `json:"s3,omitempty"`
Kinesis *KinesisIntegration `json:"kinesis,omitempty"`
Dynamodb *DynamodbIntegration `json:"dynamodb,omitempty"`
Redshift *RedshiftIntegration `json:"redshift,omitempty"`
Gcs *GcsIntegration `json:"gcs,omitempty"`
Segment *SegmentIntegration `json:"segment,omitempty"`
Kafka *KafkaIntegration `json:"kafka,omitempty"`
Mongodb *MongoDbIntegration `json:"mongodb,omitempty"`
}
// NewIntegration instantiates a new Integration 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 NewIntegration(name string, createdBy string) *Integration {
this := Integration{}
this.Name = name
this.CreatedBy = createdBy
return &this
}
// NewIntegrationWithDefaults instantiates a new Integration 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 NewIntegrationWithDefaults() *Integration {
this := Integration{}
return &this
}
// GetName returns the Name field value
func (o *Integration) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *Integration) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *Integration) SetName(v string) {
o.Name = v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *Integration) GetDescription() string {
if o == nil || o.Description == nil {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Integration) GetDescriptionOk() (*string, bool) {
if o == nil || o.Description == nil {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *Integration) HasDescription() bool {
if o != nil && o.Description != nil {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *Integration) SetDescription(v string) {
o.Description = &v
}
// GetCollections returns the Collections field value if set, zero value otherwise.
func (o *Integration) GetCollections() []Collection {
if o == nil || o.Collections == nil {
var ret []Collection
return ret
}
return *o.Collections
}
// GetCollectionsOk returns a tuple with the Collections field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Integration) GetCollectionsOk() (*[]Collection, bool) {
if o == nil || o.Collections == nil {
return nil, false
}
return o.Collections, true
}
// HasCollections returns a boolean if a field has been set.
func (o *Integration) HasCollections() bool {
if o != nil && o.Collections != nil {
return true
}
return false
}
// SetCollections gets a reference to the given []Collection and assigns it to the Collections field.
func (o *Integration) SetCollections(v []Collection) {
o.Collections = &v
}
// GetCreatedBy returns the CreatedBy field value
func (o *Integration) GetCreatedBy() string {
if o == nil {
var ret string
return ret
}
return o.CreatedBy
}
// GetCreatedByOk returns a tuple with the CreatedBy field value
// and a boolean to check if the value has been set.
func (o *Integration) GetCreatedByOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CreatedBy, true
}
// SetCreatedBy sets field value
func (o *Integration) SetCreatedBy(v string) {
o.CreatedBy = v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *Integration) GetCreatedAt() string {
if o == nil || o.CreatedAt == nil {
var ret string
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Integration) GetCreatedAtOk() (*string, bool) {
if o == nil || o.CreatedAt == nil {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *Integration) HasCreatedAt() bool {
if o != nil && o.CreatedAt != nil {
return true
}
return false
}
// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
func (o *Integration) SetCreatedAt(v string) {
o.CreatedAt = &v
}
// GetS3 returns the S3 field value if set, zero value otherwise.
func (o *Integration) GetS3() S3Integration {
if o == nil || o.S3 == nil {
var ret S3Integration
return ret
}
return *o.S3
}
// GetS3Ok returns a tuple with the S3 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Integration) GetS3Ok() (*S3Integration, bool) {
if o == nil || o.S3 == nil {
return nil, false
}
return o.S3, true
}
// HasS3 returns a boolean if a field has been set.
func (o *Integration) HasS3() bool {
if o != nil && o.S3 != nil {
return true
}
return false
}
// SetS3 gets a reference to the given S3Integration and assigns it to the S3 field.
func (o *Integration) SetS3(v S3Integration) {
o.S3 = &v
}
// GetKinesis returns the Kinesis field value if set, zero value otherwise.
func (o *Integration) GetKinesis() KinesisIntegration {
if o == nil || o.Kinesis == nil {
var ret KinesisIntegration
return ret
}
return *o.Kinesis
}
// GetKinesisOk returns a tuple with the Kinesis field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Integration) GetKinesisOk() (*KinesisIntegration, bool) {
if o == nil || o.Kinesis == nil {
return nil, false
}
return o.Kinesis, true
}
// HasKinesis returns a boolean if a field has been set.
func (o *Integration) HasKinesis() bool {
if o != nil && o.Kinesis != nil {
return true
}
return false
}
// SetKinesis gets a reference to the given KinesisIntegration and assigns it to the Kinesis field.
func (o *Integration) SetKinesis(v KinesisIntegration) {
o.Kinesis = &v
}
// GetDynamodb returns the Dynamodb field value if set, zero value otherwise.
func (o *Integration) GetDynamodb() DynamodbIntegration {
if o == nil || o.Dynamodb == nil {
var ret DynamodbIntegration
return ret
}
return *o.Dynamodb
}
// GetDynamodbOk returns a tuple with the Dynamodb field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Integration) GetDynamodbOk() (*DynamodbIntegration, bool) {
if o == nil || o.Dynamodb == nil {
return nil, false
}
return o.Dynamodb, true
}
// HasDynamodb returns a boolean if a field has been set.
func (o *Integration) HasDynamodb() bool {
if o != nil && o.Dynamodb != nil {
return true
}
return false
}
// SetDynamodb gets a reference to the given DynamodbIntegration and assigns it to the Dynamodb field.
func (o *Integration) SetDynamodb(v DynamodbIntegration) {
o.Dynamodb = &v
}
// GetRedshift returns the Redshift field value if set, zero value otherwise.
func (o *Integration) GetRedshift() RedshiftIntegration {
if o == nil || o.Redshift == nil {
var ret RedshiftIntegration
return ret
}
return *o.Redshift
}
// GetRedshiftOk returns a tuple with the Redshift field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Integration) GetRedshiftOk() (*RedshiftIntegration, bool) {
if o == nil || o.Redshift == nil {
return nil, false
}
return o.Redshift, true
}
// HasRedshift returns a boolean if a field has been set.
func (o *Integration) HasRedshift() bool {
if o != nil && o.Redshift != nil {
return true
}
return false
}
// SetRedshift gets a reference to the given RedshiftIntegration and assigns it to the Redshift field.
func (o *Integration) SetRedshift(v RedshiftIntegration) {
o.Redshift = &v
}
// GetGcs returns the Gcs field value if set, zero value otherwise.
func (o *Integration) GetGcs() GcsIntegration {
if o == nil || o.Gcs == nil {
var ret GcsIntegration
return ret
}
return *o.Gcs
}
// GetGcsOk returns a tuple with the Gcs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Integration) GetGcsOk() (*GcsIntegration, bool) {
if o == nil || o.Gcs == nil {
return nil, false
}
return o.Gcs, true
}
// HasGcs returns a boolean if a field has been set.
func (o *Integration) HasGcs() bool {
if o != nil && o.Gcs != nil {
return true
}
return false
}
// SetGcs gets a reference to the given GcsIntegration and assigns it to the Gcs field.
func (o *Integration) SetGcs(v GcsIntegration) {
o.Gcs = &v
}
// GetSegment returns the Segment field value if set, zero value otherwise.
func (o *Integration) GetSegment() SegmentIntegration {
if o == nil || o.Segment == nil {
var ret SegmentIntegration
return ret
}
return *o.Segment
}
// GetSegmentOk returns a tuple with the Segment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Integration) GetSegmentOk() (*SegmentIntegration, bool) {
if o == nil || o.Segment == nil {
return nil, false
}
return o.Segment, true
}
// HasSegment returns a boolean if a field has been set.
func (o *Integration) HasSegment() bool {
if o != nil && o.Segment != nil {
return true
}
return false
}
// SetSegment gets a reference to the given SegmentIntegration and assigns it to the Segment field.
func (o *Integration) SetSegment(v SegmentIntegration) {
o.Segment = &v
}
// GetKafka returns the Kafka field value if set, zero value otherwise.
func (o *Integration) GetKafka() KafkaIntegration {
if o == nil || o.Kafka == nil {
var ret KafkaIntegration
return ret
}
return *o.Kafka
}
// GetKafkaOk returns a tuple with the Kafka field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Integration) GetKafkaOk() (*KafkaIntegration, bool) {
if o == nil || o.Kafka == nil {
return nil, false
}
return o.Kafka, true
}
// HasKafka returns a boolean if a field has been set.
func (o *Integration) HasKafka() bool {
if o != nil && o.Kafka != nil {
return true
}
return false
}
// SetKafka gets a reference to the given KafkaIntegration and assigns it to the Kafka field.
func (o *Integration) SetKafka(v KafkaIntegration) {
o.Kafka = &v
}
// GetMongodb returns the Mongodb field value if set, zero value otherwise.
func (o *Integration) GetMongodb() MongoDbIntegration {
if o == nil || o.Mongodb == nil {
var ret MongoDbIntegration
return ret
}
return *o.Mongodb
}
// GetMongodbOk returns a tuple with the Mongodb field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Integration) GetMongodbOk() (*MongoDbIntegration, bool) {
if o == nil || o.Mongodb == nil {
return nil, false
}
return o.Mongodb, true
}
// HasMongodb returns a boolean if a field has been set.
func (o *Integration) HasMongodb() bool {
if o != nil && o.Mongodb != nil {
return true
}
return false
}
// SetMongodb gets a reference to the given MongoDbIntegration and assigns it to the Mongodb field.
func (o *Integration) SetMongodb(v MongoDbIntegration) {
o.Mongodb = &v
}
func (o Integration) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["name"] = o.Name
}
if o.Description != nil {
toSerialize["description"] = o.Description
}
if o.Collections != nil {
toSerialize["collections"] = o.Collections
}
if true {
toSerialize["created_by"] = o.CreatedBy
}
if o.CreatedAt != nil {
toSerialize["created_at"] = o.CreatedAt
}
if o.S3 != nil {
toSerialize["s3"] = o.S3
}
if o.Kinesis != nil {
toSerialize["kinesis"] = o.Kinesis
}
if o.Dynamodb != nil {
toSerialize["dynamodb"] = o.Dynamodb
}
if o.Redshift != nil {
toSerialize["redshift"] = o.Redshift
}
if o.Gcs != nil {
toSerialize["gcs"] = o.Gcs
}
if o.Segment != nil {
toSerialize["segment"] = o.Segment
}
if o.Kafka != nil {
toSerialize["kafka"] = o.Kafka
}
if o.Mongodb != nil {
toSerialize["mongodb"] = o.Mongodb
}
return json.Marshal(toSerialize)
}
type NullableIntegration struct {
value *Integration
isSet bool
}
func (v NullableIntegration) Get() *Integration {
return v.value
}
func (v *NullableIntegration) Set(val *Integration) {
v.value = val
v.isSet = true
}
func (v NullableIntegration) IsSet() bool {
return v.isSet
}
func (v *NullableIntegration) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableIntegration(val *Integration) *NullableIntegration {
return &NullableIntegration{value: val, isSet: true}
}
func (v NullableIntegration) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableIntegration) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}