-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_private_link_endpoint.go
430 lines (360 loc) · 14 KB
/
model_private_link_endpoint.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
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// PrivateLinkEndpoint struct for PrivateLinkEndpoint
type PrivateLinkEndpoint struct {
// Cloud service provider that serves the requested endpoint.
// Read only field.
CloudProvider string `json:"cloudProvider"`
// Flag that indicates whether MongoDB Cloud received a request to remove the specified private endpoint from the private endpoint service.
// Read only field.
DeleteRequested *bool `json:"deleteRequested,omitempty"`
// Error message returned when requesting private connection resource. The resource returns `null` if the request succeeded.
// Read only field.
ErrorMessage *string `json:"errorMessage,omitempty"`
// State of the Amazon Web Service PrivateLink connection when MongoDB Cloud received this request.
// Read only field.
ConnectionStatus *string `json:"connectionStatus,omitempty"`
// Unique 24-hexadecimal digit string that identifies the interface endpoint.
// Read only field.
InterfaceEndpointId *string `json:"interfaceEndpointId,omitempty"`
// Human-readable label that MongoDB Cloud generates that identifies the private endpoint connection.
// Read only field.
PrivateEndpointConnectionName *string `json:"privateEndpointConnectionName,omitempty"`
// IPv4 address of the private endpoint in your Azure VNet that someone added to this private endpoint service.
PrivateEndpointIPAddress *string `json:"privateEndpointIPAddress,omitempty"`
// Unique string that identifies the Azure private endpoint's network interface that someone added to this private endpoint service.
// Read only field.
PrivateEndpointResourceId *string `json:"privateEndpointResourceId,omitempty"`
// State of the Azure Private Link Service connection when MongoDB Cloud received this request. Alternatively: State of the Google Cloud network endpoint group when MongoDB Cloud received this request.
// Read only field.
Status *string `json:"status,omitempty"`
// Human-readable label that identifies a set of endpoints.
// Read only field.
EndpointGroupName *string `json:"endpointGroupName,omitempty"`
// List of individual private endpoints that comprise this endpoint group.
// Read only field.
Endpoints *[]GCPConsumerForwardingRule `json:"endpoints,omitempty"`
}
// NewPrivateLinkEndpoint instantiates a new PrivateLinkEndpoint 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 NewPrivateLinkEndpoint(cloudProvider string) *PrivateLinkEndpoint {
this := PrivateLinkEndpoint{}
this.CloudProvider = cloudProvider
return &this
}
// NewPrivateLinkEndpointWithDefaults instantiates a new PrivateLinkEndpoint 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 NewPrivateLinkEndpointWithDefaults() *PrivateLinkEndpoint {
this := PrivateLinkEndpoint{}
return &this
}
// GetCloudProvider returns the CloudProvider field value
func (o *PrivateLinkEndpoint) GetCloudProvider() string {
if o == nil {
var ret string
return ret
}
return o.CloudProvider
}
// GetCloudProviderOk returns a tuple with the CloudProvider field value
// and a boolean to check if the value has been set.
func (o *PrivateLinkEndpoint) GetCloudProviderOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CloudProvider, true
}
// SetCloudProvider sets field value
func (o *PrivateLinkEndpoint) SetCloudProvider(v string) {
o.CloudProvider = v
}
// GetDeleteRequested returns the DeleteRequested field value if set, zero value otherwise
func (o *PrivateLinkEndpoint) GetDeleteRequested() bool {
if o == nil || IsNil(o.DeleteRequested) {
var ret bool
return ret
}
return *o.DeleteRequested
}
// GetDeleteRequestedOk returns a tuple with the DeleteRequested field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrivateLinkEndpoint) GetDeleteRequestedOk() (*bool, bool) {
if o == nil || IsNil(o.DeleteRequested) {
return nil, false
}
return o.DeleteRequested, true
}
// HasDeleteRequested returns a boolean if a field has been set.
func (o *PrivateLinkEndpoint) HasDeleteRequested() bool {
if o != nil && !IsNil(o.DeleteRequested) {
return true
}
return false
}
// SetDeleteRequested gets a reference to the given bool and assigns it to the DeleteRequested field.
func (o *PrivateLinkEndpoint) SetDeleteRequested(v bool) {
o.DeleteRequested = &v
}
// GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise
func (o *PrivateLinkEndpoint) GetErrorMessage() string {
if o == nil || IsNil(o.ErrorMessage) {
var ret string
return ret
}
return *o.ErrorMessage
}
// GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrivateLinkEndpoint) GetErrorMessageOk() (*string, bool) {
if o == nil || IsNil(o.ErrorMessage) {
return nil, false
}
return o.ErrorMessage, true
}
// HasErrorMessage returns a boolean if a field has been set.
func (o *PrivateLinkEndpoint) HasErrorMessage() bool {
if o != nil && !IsNil(o.ErrorMessage) {
return true
}
return false
}
// SetErrorMessage gets a reference to the given string and assigns it to the ErrorMessage field.
func (o *PrivateLinkEndpoint) SetErrorMessage(v string) {
o.ErrorMessage = &v
}
// GetConnectionStatus returns the ConnectionStatus field value if set, zero value otherwise
func (o *PrivateLinkEndpoint) GetConnectionStatus() string {
if o == nil || IsNil(o.ConnectionStatus) {
var ret string
return ret
}
return *o.ConnectionStatus
}
// GetConnectionStatusOk returns a tuple with the ConnectionStatus field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrivateLinkEndpoint) GetConnectionStatusOk() (*string, bool) {
if o == nil || IsNil(o.ConnectionStatus) {
return nil, false
}
return o.ConnectionStatus, true
}
// HasConnectionStatus returns a boolean if a field has been set.
func (o *PrivateLinkEndpoint) HasConnectionStatus() bool {
if o != nil && !IsNil(o.ConnectionStatus) {
return true
}
return false
}
// SetConnectionStatus gets a reference to the given string and assigns it to the ConnectionStatus field.
func (o *PrivateLinkEndpoint) SetConnectionStatus(v string) {
o.ConnectionStatus = &v
}
// GetInterfaceEndpointId returns the InterfaceEndpointId field value if set, zero value otherwise
func (o *PrivateLinkEndpoint) GetInterfaceEndpointId() string {
if o == nil || IsNil(o.InterfaceEndpointId) {
var ret string
return ret
}
return *o.InterfaceEndpointId
}
// GetInterfaceEndpointIdOk returns a tuple with the InterfaceEndpointId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrivateLinkEndpoint) GetInterfaceEndpointIdOk() (*string, bool) {
if o == nil || IsNil(o.InterfaceEndpointId) {
return nil, false
}
return o.InterfaceEndpointId, true
}
// HasInterfaceEndpointId returns a boolean if a field has been set.
func (o *PrivateLinkEndpoint) HasInterfaceEndpointId() bool {
if o != nil && !IsNil(o.InterfaceEndpointId) {
return true
}
return false
}
// SetInterfaceEndpointId gets a reference to the given string and assigns it to the InterfaceEndpointId field.
func (o *PrivateLinkEndpoint) SetInterfaceEndpointId(v string) {
o.InterfaceEndpointId = &v
}
// GetPrivateEndpointConnectionName returns the PrivateEndpointConnectionName field value if set, zero value otherwise
func (o *PrivateLinkEndpoint) GetPrivateEndpointConnectionName() string {
if o == nil || IsNil(o.PrivateEndpointConnectionName) {
var ret string
return ret
}
return *o.PrivateEndpointConnectionName
}
// GetPrivateEndpointConnectionNameOk returns a tuple with the PrivateEndpointConnectionName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrivateLinkEndpoint) GetPrivateEndpointConnectionNameOk() (*string, bool) {
if o == nil || IsNil(o.PrivateEndpointConnectionName) {
return nil, false
}
return o.PrivateEndpointConnectionName, true
}
// HasPrivateEndpointConnectionName returns a boolean if a field has been set.
func (o *PrivateLinkEndpoint) HasPrivateEndpointConnectionName() bool {
if o != nil && !IsNil(o.PrivateEndpointConnectionName) {
return true
}
return false
}
// SetPrivateEndpointConnectionName gets a reference to the given string and assigns it to the PrivateEndpointConnectionName field.
func (o *PrivateLinkEndpoint) SetPrivateEndpointConnectionName(v string) {
o.PrivateEndpointConnectionName = &v
}
// GetPrivateEndpointIPAddress returns the PrivateEndpointIPAddress field value if set, zero value otherwise
func (o *PrivateLinkEndpoint) GetPrivateEndpointIPAddress() string {
if o == nil || IsNil(o.PrivateEndpointIPAddress) {
var ret string
return ret
}
return *o.PrivateEndpointIPAddress
}
// GetPrivateEndpointIPAddressOk returns a tuple with the PrivateEndpointIPAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrivateLinkEndpoint) GetPrivateEndpointIPAddressOk() (*string, bool) {
if o == nil || IsNil(o.PrivateEndpointIPAddress) {
return nil, false
}
return o.PrivateEndpointIPAddress, true
}
// HasPrivateEndpointIPAddress returns a boolean if a field has been set.
func (o *PrivateLinkEndpoint) HasPrivateEndpointIPAddress() bool {
if o != nil && !IsNil(o.PrivateEndpointIPAddress) {
return true
}
return false
}
// SetPrivateEndpointIPAddress gets a reference to the given string and assigns it to the PrivateEndpointIPAddress field.
func (o *PrivateLinkEndpoint) SetPrivateEndpointIPAddress(v string) {
o.PrivateEndpointIPAddress = &v
}
// GetPrivateEndpointResourceId returns the PrivateEndpointResourceId field value if set, zero value otherwise
func (o *PrivateLinkEndpoint) GetPrivateEndpointResourceId() string {
if o == nil || IsNil(o.PrivateEndpointResourceId) {
var ret string
return ret
}
return *o.PrivateEndpointResourceId
}
// GetPrivateEndpointResourceIdOk returns a tuple with the PrivateEndpointResourceId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrivateLinkEndpoint) GetPrivateEndpointResourceIdOk() (*string, bool) {
if o == nil || IsNil(o.PrivateEndpointResourceId) {
return nil, false
}
return o.PrivateEndpointResourceId, true
}
// HasPrivateEndpointResourceId returns a boolean if a field has been set.
func (o *PrivateLinkEndpoint) HasPrivateEndpointResourceId() bool {
if o != nil && !IsNil(o.PrivateEndpointResourceId) {
return true
}
return false
}
// SetPrivateEndpointResourceId gets a reference to the given string and assigns it to the PrivateEndpointResourceId field.
func (o *PrivateLinkEndpoint) SetPrivateEndpointResourceId(v string) {
o.PrivateEndpointResourceId = &v
}
// GetStatus returns the Status field value if set, zero value otherwise
func (o *PrivateLinkEndpoint) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrivateLinkEndpoint) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *PrivateLinkEndpoint) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *PrivateLinkEndpoint) SetStatus(v string) {
o.Status = &v
}
// GetEndpointGroupName returns the EndpointGroupName field value if set, zero value otherwise
func (o *PrivateLinkEndpoint) GetEndpointGroupName() string {
if o == nil || IsNil(o.EndpointGroupName) {
var ret string
return ret
}
return *o.EndpointGroupName
}
// GetEndpointGroupNameOk returns a tuple with the EndpointGroupName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrivateLinkEndpoint) GetEndpointGroupNameOk() (*string, bool) {
if o == nil || IsNil(o.EndpointGroupName) {
return nil, false
}
return o.EndpointGroupName, true
}
// HasEndpointGroupName returns a boolean if a field has been set.
func (o *PrivateLinkEndpoint) HasEndpointGroupName() bool {
if o != nil && !IsNil(o.EndpointGroupName) {
return true
}
return false
}
// SetEndpointGroupName gets a reference to the given string and assigns it to the EndpointGroupName field.
func (o *PrivateLinkEndpoint) SetEndpointGroupName(v string) {
o.EndpointGroupName = &v
}
// GetEndpoints returns the Endpoints field value if set, zero value otherwise
func (o *PrivateLinkEndpoint) GetEndpoints() []GCPConsumerForwardingRule {
if o == nil || IsNil(o.Endpoints) {
var ret []GCPConsumerForwardingRule
return ret
}
return *o.Endpoints
}
// GetEndpointsOk returns a tuple with the Endpoints field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrivateLinkEndpoint) GetEndpointsOk() (*[]GCPConsumerForwardingRule, bool) {
if o == nil || IsNil(o.Endpoints) {
return nil, false
}
return o.Endpoints, true
}
// HasEndpoints returns a boolean if a field has been set.
func (o *PrivateLinkEndpoint) HasEndpoints() bool {
if o != nil && !IsNil(o.Endpoints) {
return true
}
return false
}
// SetEndpoints gets a reference to the given []GCPConsumerForwardingRule and assigns it to the Endpoints field.
func (o *PrivateLinkEndpoint) SetEndpoints(v []GCPConsumerForwardingRule) {
o.Endpoints = &v
}
func (o PrivateLinkEndpoint) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PrivateLinkEndpoint) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.PrivateEndpointIPAddress) {
toSerialize["privateEndpointIPAddress"] = o.PrivateEndpointIPAddress
}
return toSerialize, nil
}