-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_mysql_data_source.go
371 lines (310 loc) · 10.8 KB
/
model_mysql_data_source.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
/*
Ambar OpenAPI Specification
Details about communicating with Ambar.cloud public endpoints. Supported HTTP rest endpoints and their request and response details.
API version: 2023-12-01
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package Ambar
import (
"encoding/json"
)
// checks if the MysqlDataSource type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &MysqlDataSource{}
// MysqlDataSource struct for MysqlDataSource
type MysqlDataSource struct {
// A case insensitive string for the host on which your MySQL database is running and which Ambar can use to reach the database.
Hostname string `json:"hostname"`
// The port number passed as a string which Ambar can use to connect to your MySQL database instance.
HostPort string `json:"hostPort"`
// The case sensitive string name of the database on your database host.
DatabaseName string `json:"databaseName"`
// The case sensitive string name of the table the DataSource should read.
TableName string `json:"tableName"`
// The name of a column where the value for any record is globally unique.
GloballyUniqueColumn string `json:"globallyUniqueColumn"`
// The name of a column which monotonically increases on database writes.
SerialColumn string `json:"serialColumn"`
// A case sensitive string for the name of the column in your table Ambar can partition on. Note that partition keys must be unique to a given sequence of records.
PartitioningColumn string `json:"partitioningColumn"`
// A case sensitive, comma separated list string of additional columns to be read from the table into Ambar.
AdditionalColumns string `json:"additionalColumns"`
// The server_id value used when starting the MySQL server. See MySQL docs for more information about this value and its defaults when not configured.
BinLogReplicationServerId string `json:"binLogReplicationServerId"`
// The hostname of the server responsible for terminating TLS connections for your server, for example if your server is behind a load balancer.
TlsTerminationOverrideHost string `json:"tlsTerminationOverrideHost"`
}
// NewMysqlDataSource instantiates a new MysqlDataSource 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 NewMysqlDataSource(hostname string, hostPort string, databaseName string, tableName string, globallyUniqueColumn string, serialColumn string, partitioningColumn string, additionalColumns string, binLogReplicationServerId string, tlsTerminationOverrideHost string) *MysqlDataSource {
this := MysqlDataSource{}
this.Hostname = hostname
this.HostPort = hostPort
this.DatabaseName = databaseName
this.TableName = tableName
this.GloballyUniqueColumn = globallyUniqueColumn
this.SerialColumn = serialColumn
this.PartitioningColumn = partitioningColumn
this.AdditionalColumns = additionalColumns
this.BinLogReplicationServerId = binLogReplicationServerId
this.TlsTerminationOverrideHost = tlsTerminationOverrideHost
return &this
}
// NewMysqlDataSourceWithDefaults instantiates a new MysqlDataSource 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 NewMysqlDataSourceWithDefaults() *MysqlDataSource {
this := MysqlDataSource{}
return &this
}
// GetHostname returns the Hostname field value
func (o *MysqlDataSource) GetHostname() string {
if o == nil {
var ret string
return ret
}
return o.Hostname
}
// GetHostnameOk returns a tuple with the Hostname field value
// and a boolean to check if the value has been set.
func (o *MysqlDataSource) GetHostnameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Hostname, true
}
// SetHostname sets field value
func (o *MysqlDataSource) SetHostname(v string) {
o.Hostname = v
}
// GetHostPort returns the HostPort field value
func (o *MysqlDataSource) GetHostPort() string {
if o == nil {
var ret string
return ret
}
return o.HostPort
}
// GetHostPortOk returns a tuple with the HostPort field value
// and a boolean to check if the value has been set.
func (o *MysqlDataSource) GetHostPortOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.HostPort, true
}
// SetHostPort sets field value
func (o *MysqlDataSource) SetHostPort(v string) {
o.HostPort = v
}
// GetDatabaseName returns the DatabaseName field value
func (o *MysqlDataSource) GetDatabaseName() string {
if o == nil {
var ret string
return ret
}
return o.DatabaseName
}
// GetDatabaseNameOk returns a tuple with the DatabaseName field value
// and a boolean to check if the value has been set.
func (o *MysqlDataSource) GetDatabaseNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DatabaseName, true
}
// SetDatabaseName sets field value
func (o *MysqlDataSource) SetDatabaseName(v string) {
o.DatabaseName = v
}
// GetTableName returns the TableName field value
func (o *MysqlDataSource) GetTableName() string {
if o == nil {
var ret string
return ret
}
return o.TableName
}
// GetTableNameOk returns a tuple with the TableName field value
// and a boolean to check if the value has been set.
func (o *MysqlDataSource) GetTableNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.TableName, true
}
// SetTableName sets field value
func (o *MysqlDataSource) SetTableName(v string) {
o.TableName = v
}
// GetGloballyUniqueColumn returns the GloballyUniqueColumn field value
func (o *MysqlDataSource) GetGloballyUniqueColumn() string {
if o == nil {
var ret string
return ret
}
return o.GloballyUniqueColumn
}
// GetGloballyUniqueColumnOk returns a tuple with the GloballyUniqueColumn field value
// and a boolean to check if the value has been set.
func (o *MysqlDataSource) GetGloballyUniqueColumnOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.GloballyUniqueColumn, true
}
// SetGloballyUniqueColumn sets field value
func (o *MysqlDataSource) SetGloballyUniqueColumn(v string) {
o.GloballyUniqueColumn = v
}
// GetSerialColumn returns the SerialColumn field value
func (o *MysqlDataSource) GetSerialColumn() string {
if o == nil {
var ret string
return ret
}
return o.SerialColumn
}
// GetSerialColumnOk returns a tuple with the SerialColumn field value
// and a boolean to check if the value has been set.
func (o *MysqlDataSource) GetSerialColumnOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.SerialColumn, true
}
// SetSerialColumn sets field value
func (o *MysqlDataSource) SetSerialColumn(v string) {
o.SerialColumn = v
}
// GetPartitioningColumn returns the PartitioningColumn field value
func (o *MysqlDataSource) GetPartitioningColumn() string {
if o == nil {
var ret string
return ret
}
return o.PartitioningColumn
}
// GetPartitioningColumnOk returns a tuple with the PartitioningColumn field value
// and a boolean to check if the value has been set.
func (o *MysqlDataSource) GetPartitioningColumnOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.PartitioningColumn, true
}
// SetPartitioningColumn sets field value
func (o *MysqlDataSource) SetPartitioningColumn(v string) {
o.PartitioningColumn = v
}
// GetAdditionalColumns returns the AdditionalColumns field value
func (o *MysqlDataSource) GetAdditionalColumns() string {
if o == nil {
var ret string
return ret
}
return o.AdditionalColumns
}
// GetAdditionalColumnsOk returns a tuple with the AdditionalColumns field value
// and a boolean to check if the value has been set.
func (o *MysqlDataSource) GetAdditionalColumnsOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AdditionalColumns, true
}
// SetAdditionalColumns sets field value
func (o *MysqlDataSource) SetAdditionalColumns(v string) {
o.AdditionalColumns = v
}
// GetBinLogReplicationServerId returns the BinLogReplicationServerId field value
func (o *MysqlDataSource) GetBinLogReplicationServerId() string {
if o == nil {
var ret string
return ret
}
return o.BinLogReplicationServerId
}
// GetBinLogReplicationServerIdOk returns a tuple with the BinLogReplicationServerId field value
// and a boolean to check if the value has been set.
func (o *MysqlDataSource) GetBinLogReplicationServerIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.BinLogReplicationServerId, true
}
// SetBinLogReplicationServerId sets field value
func (o *MysqlDataSource) SetBinLogReplicationServerId(v string) {
o.BinLogReplicationServerId = v
}
// GetTlsTerminationOverrideHost returns the TlsTerminationOverrideHost field value
func (o *MysqlDataSource) GetTlsTerminationOverrideHost() string {
if o == nil {
var ret string
return ret
}
return o.TlsTerminationOverrideHost
}
// GetTlsTerminationOverrideHostOk returns a tuple with the TlsTerminationOverrideHost field value
// and a boolean to check if the value has been set.
func (o *MysqlDataSource) GetTlsTerminationOverrideHostOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.TlsTerminationOverrideHost, true
}
// SetTlsTerminationOverrideHost sets field value
func (o *MysqlDataSource) SetTlsTerminationOverrideHost(v string) {
o.TlsTerminationOverrideHost = v
}
func (o MysqlDataSource) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o MysqlDataSource) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["hostname"] = o.Hostname
toSerialize["hostPort"] = o.HostPort
toSerialize["databaseName"] = o.DatabaseName
toSerialize["tableName"] = o.TableName
toSerialize["globallyUniqueColumn"] = o.GloballyUniqueColumn
toSerialize["serialColumn"] = o.SerialColumn
toSerialize["partitioningColumn"] = o.PartitioningColumn
toSerialize["additionalColumns"] = o.AdditionalColumns
toSerialize["binLogReplicationServerId"] = o.BinLogReplicationServerId
toSerialize["tlsTerminationOverrideHost"] = o.TlsTerminationOverrideHost
return toSerialize, nil
}
type NullableMysqlDataSource struct {
value *MysqlDataSource
isSet bool
}
func (v NullableMysqlDataSource) Get() *MysqlDataSource {
return v.value
}
func (v *NullableMysqlDataSource) Set(val *MysqlDataSource) {
v.value = val
v.isSet = true
}
func (v NullableMysqlDataSource) IsSet() bool {
return v.isSet
}
func (v *NullableMysqlDataSource) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMysqlDataSource(val *MysqlDataSource) *NullableMysqlDataSource {
return &NullableMysqlDataSource{value: val, isSet: true}
}
func (v NullableMysqlDataSource) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMysqlDataSource) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}