-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_cluster_connection_strings.go
292 lines (244 loc) · 11.5 KB
/
model_cluster_connection_strings.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
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// ClusterConnectionStrings Collection of Uniform Resource Locators that point to the MongoDB database.
type ClusterConnectionStrings struct {
// Private endpoint-aware connection strings that use AWS-hosted clusters with Amazon Web Services (AWS) PrivateLink. Each key identifies an Amazon Web Services (AWS) interface endpoint. Each value identifies the related `mongodb://` connection string that you use to connect to MongoDB Cloud through the interface endpoint that the key names.
// Read only field.
AwsPrivateLink *map[string]string `json:"awsPrivateLink,omitempty"`
// Private endpoint-aware connection strings that use AWS-hosted clusters with Amazon Web Services (AWS) PrivateLink. Each key identifies an Amazon Web Services (AWS) interface endpoint. Each value identifies the related `mongodb://` connection string that you use to connect to Atlas through the interface endpoint that the key names.
// Read only field.
AwsPrivateLinkSrv *map[string]string `json:"awsPrivateLinkSrv,omitempty"`
// Network peering connection strings for each interface Virtual Private Cloud (VPC) endpoint that you configured to connect to this cluster. This connection string uses the `mongodb+srv://` protocol. The resource returns this parameter once someone creates a network peering connection to this cluster. This protocol tells the application to look up the host seed list in the Domain Name System (DNS). This list synchronizes with the nodes in a cluster. If the connection string uses this Uniform Resource Identifier (URI) format, you don't need to append the seed list or change the URI if the nodes change. Use this URI format if your driver supports it. If it doesn't, use connectionStrings.private. For Amazon Web Services (AWS) clusters, this resource returns this parameter only if you enable custom DNS.
// Read only field.
Private *string `json:"private,omitempty"`
// List of private endpoint-aware connection strings that you can use to connect to this cluster through a private endpoint. This parameter returns only if you deployed a private endpoint to all regions to which you deployed this clusters' nodes.
// Read only field.
PrivateEndpoint *[]ClusterDescriptionConnectionStringsPrivateEndpoint `json:"privateEndpoint,omitempty"`
// Network peering connection strings for each interface Virtual Private Cloud (VPC) endpoint that you configured to connect to this cluster. This connection string uses the `mongodb+srv://` protocol. The resource returns this parameter when someone creates a network peering connection to this cluster. This protocol tells the application to look up the host seed list in the Domain Name System (DNS). This list synchronizes with the nodes in a cluster. If the connection string uses this Uniform Resource Identifier (URI) format, you don't need to append the seed list or change the Uniform Resource Identifier (URI) if the nodes change. Use this Uniform Resource Identifier (URI) format if your driver supports it. If it doesn't, use `connectionStrings.private`. For Amazon Web Services (AWS) clusters, this parameter returns only if you [enable custom DNS](https://docs.atlas.mongodb.com/reference/api/aws-custom-dns-update/).
// Read only field.
PrivateSrv *string `json:"privateSrv,omitempty"`
// Public connection string that you can use to connect to this cluster. This connection string uses the `mongodb://` protocol.
// Read only field.
Standard *string `json:"standard,omitempty"`
// Public connection string that you can use to connect to this cluster. This connection string uses the `mongodb+srv://` protocol.
// Read only field.
StandardSrv *string `json:"standardSrv,omitempty"`
}
// NewClusterConnectionStrings instantiates a new ClusterConnectionStrings 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 NewClusterConnectionStrings() *ClusterConnectionStrings {
this := ClusterConnectionStrings{}
return &this
}
// NewClusterConnectionStringsWithDefaults instantiates a new ClusterConnectionStrings 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 NewClusterConnectionStringsWithDefaults() *ClusterConnectionStrings {
this := ClusterConnectionStrings{}
return &this
}
// GetAwsPrivateLink returns the AwsPrivateLink field value if set, zero value otherwise
func (o *ClusterConnectionStrings) GetAwsPrivateLink() map[string]string {
if o == nil || IsNil(o.AwsPrivateLink) {
var ret map[string]string
return ret
}
return *o.AwsPrivateLink
}
// GetAwsPrivateLinkOk returns a tuple with the AwsPrivateLink field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterConnectionStrings) GetAwsPrivateLinkOk() (*map[string]string, bool) {
if o == nil || IsNil(o.AwsPrivateLink) {
return nil, false
}
return o.AwsPrivateLink, true
}
// HasAwsPrivateLink returns a boolean if a field has been set.
func (o *ClusterConnectionStrings) HasAwsPrivateLink() bool {
if o != nil && !IsNil(o.AwsPrivateLink) {
return true
}
return false
}
// SetAwsPrivateLink gets a reference to the given map[string]string and assigns it to the AwsPrivateLink field.
func (o *ClusterConnectionStrings) SetAwsPrivateLink(v map[string]string) {
o.AwsPrivateLink = &v
}
// GetAwsPrivateLinkSrv returns the AwsPrivateLinkSrv field value if set, zero value otherwise
func (o *ClusterConnectionStrings) GetAwsPrivateLinkSrv() map[string]string {
if o == nil || IsNil(o.AwsPrivateLinkSrv) {
var ret map[string]string
return ret
}
return *o.AwsPrivateLinkSrv
}
// GetAwsPrivateLinkSrvOk returns a tuple with the AwsPrivateLinkSrv field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterConnectionStrings) GetAwsPrivateLinkSrvOk() (*map[string]string, bool) {
if o == nil || IsNil(o.AwsPrivateLinkSrv) {
return nil, false
}
return o.AwsPrivateLinkSrv, true
}
// HasAwsPrivateLinkSrv returns a boolean if a field has been set.
func (o *ClusterConnectionStrings) HasAwsPrivateLinkSrv() bool {
if o != nil && !IsNil(o.AwsPrivateLinkSrv) {
return true
}
return false
}
// SetAwsPrivateLinkSrv gets a reference to the given map[string]string and assigns it to the AwsPrivateLinkSrv field.
func (o *ClusterConnectionStrings) SetAwsPrivateLinkSrv(v map[string]string) {
o.AwsPrivateLinkSrv = &v
}
// GetPrivate returns the Private field value if set, zero value otherwise
func (o *ClusterConnectionStrings) GetPrivate() string {
if o == nil || IsNil(o.Private) {
var ret string
return ret
}
return *o.Private
}
// GetPrivateOk returns a tuple with the Private field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterConnectionStrings) GetPrivateOk() (*string, bool) {
if o == nil || IsNil(o.Private) {
return nil, false
}
return o.Private, true
}
// HasPrivate returns a boolean if a field has been set.
func (o *ClusterConnectionStrings) HasPrivate() bool {
if o != nil && !IsNil(o.Private) {
return true
}
return false
}
// SetPrivate gets a reference to the given string and assigns it to the Private field.
func (o *ClusterConnectionStrings) SetPrivate(v string) {
o.Private = &v
}
// GetPrivateEndpoint returns the PrivateEndpoint field value if set, zero value otherwise
func (o *ClusterConnectionStrings) GetPrivateEndpoint() []ClusterDescriptionConnectionStringsPrivateEndpoint {
if o == nil || IsNil(o.PrivateEndpoint) {
var ret []ClusterDescriptionConnectionStringsPrivateEndpoint
return ret
}
return *o.PrivateEndpoint
}
// GetPrivateEndpointOk returns a tuple with the PrivateEndpoint field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterConnectionStrings) GetPrivateEndpointOk() (*[]ClusterDescriptionConnectionStringsPrivateEndpoint, bool) {
if o == nil || IsNil(o.PrivateEndpoint) {
return nil, false
}
return o.PrivateEndpoint, true
}
// HasPrivateEndpoint returns a boolean if a field has been set.
func (o *ClusterConnectionStrings) HasPrivateEndpoint() bool {
if o != nil && !IsNil(o.PrivateEndpoint) {
return true
}
return false
}
// SetPrivateEndpoint gets a reference to the given []ClusterDescriptionConnectionStringsPrivateEndpoint and assigns it to the PrivateEndpoint field.
func (o *ClusterConnectionStrings) SetPrivateEndpoint(v []ClusterDescriptionConnectionStringsPrivateEndpoint) {
o.PrivateEndpoint = &v
}
// GetPrivateSrv returns the PrivateSrv field value if set, zero value otherwise
func (o *ClusterConnectionStrings) GetPrivateSrv() string {
if o == nil || IsNil(o.PrivateSrv) {
var ret string
return ret
}
return *o.PrivateSrv
}
// GetPrivateSrvOk returns a tuple with the PrivateSrv field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterConnectionStrings) GetPrivateSrvOk() (*string, bool) {
if o == nil || IsNil(o.PrivateSrv) {
return nil, false
}
return o.PrivateSrv, true
}
// HasPrivateSrv returns a boolean if a field has been set.
func (o *ClusterConnectionStrings) HasPrivateSrv() bool {
if o != nil && !IsNil(o.PrivateSrv) {
return true
}
return false
}
// SetPrivateSrv gets a reference to the given string and assigns it to the PrivateSrv field.
func (o *ClusterConnectionStrings) SetPrivateSrv(v string) {
o.PrivateSrv = &v
}
// GetStandard returns the Standard field value if set, zero value otherwise
func (o *ClusterConnectionStrings) GetStandard() string {
if o == nil || IsNil(o.Standard) {
var ret string
return ret
}
return *o.Standard
}
// GetStandardOk returns a tuple with the Standard field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterConnectionStrings) GetStandardOk() (*string, bool) {
if o == nil || IsNil(o.Standard) {
return nil, false
}
return o.Standard, true
}
// HasStandard returns a boolean if a field has been set.
func (o *ClusterConnectionStrings) HasStandard() bool {
if o != nil && !IsNil(o.Standard) {
return true
}
return false
}
// SetStandard gets a reference to the given string and assigns it to the Standard field.
func (o *ClusterConnectionStrings) SetStandard(v string) {
o.Standard = &v
}
// GetStandardSrv returns the StandardSrv field value if set, zero value otherwise
func (o *ClusterConnectionStrings) GetStandardSrv() string {
if o == nil || IsNil(o.StandardSrv) {
var ret string
return ret
}
return *o.StandardSrv
}
// GetStandardSrvOk returns a tuple with the StandardSrv field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterConnectionStrings) GetStandardSrvOk() (*string, bool) {
if o == nil || IsNil(o.StandardSrv) {
return nil, false
}
return o.StandardSrv, true
}
// HasStandardSrv returns a boolean if a field has been set.
func (o *ClusterConnectionStrings) HasStandardSrv() bool {
if o != nil && !IsNil(o.StandardSrv) {
return true
}
return false
}
// SetStandardSrv gets a reference to the given string and assigns it to the StandardSrv field.
func (o *ClusterConnectionStrings) SetStandardSrv(v string) {
o.StandardSrv = &v
}
func (o ClusterConnectionStrings) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ClusterConnectionStrings) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
return toSerialize, nil
}