/
model_ldap_verify_connectivity_job_request_params.go
272 lines (232 loc) · 9.6 KB
/
model_ldap_verify_connectivity_job_request_params.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
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// LDAPVerifyConnectivityJobRequestParams Request information needed to verify an Lightweight Directory Access Protocol (LDAP) over Transport Layer Security (TLS) configuration. The response does not return the **bindPassword**.
type LDAPVerifyConnectivityJobRequestParams struct {
// Lightweight Directory Access Protocol (LDAP) query template that MongoDB Cloud applies to create an LDAP query to return the LDAP groups associated with the authenticated MongoDB user. MongoDB Cloud uses this parameter only for user authorization. Use the `{USER}` placeholder in the Uniform Resource Locator (URL) to substitute the authenticated username. The query relates to the host specified with the hostname. Format this query per [RFC 4515](https://datatracker.ietf.org/doc/html/rfc4515) and [RFC 4516](https://datatracker.ietf.org/doc/html/rfc4516).
// Write only field.
AuthzQueryTemplate *string `json:"authzQueryTemplate,omitempty"`
// Password that MongoDB Cloud uses to authenticate the **bindUsername**.
// Write only field.
BindPassword string `json:"bindPassword"`
// Full Distinguished Name (DN) of the Lightweight Directory Access Protocol (LDAP) user that MongoDB Cloud uses to connect to the LDAP host. LDAP distinguished names must be formatted according to RFC 2253.
BindUsername string `json:"bindUsername"`
// Certificate Authority (CA) certificate that MongoDB Cloud uses to verify the identity of the Lightweight Directory Access Protocol (LDAP) host. MongoDB Cloud allows self-signed certificates. To delete an assigned value, pass an empty string: `\"caCertificate\": \"\"`.
CaCertificate *string `json:"caCertificate,omitempty"`
// Human-readable label that identifies the hostname or Internet Protocol (IP) address of the Lightweight Directory Access Protocol (LDAP) host. This host must have access to the internet or have a Virtual Private Cloud (VPC) peering connection to your cluster.
Hostname string `json:"hostname"`
// List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships.
// Read only field.
Links *[]Link `json:"links,omitempty"`
// IANA port to which the Lightweight Directory Access Protocol (LDAP) host listens for client connections.
Port int `json:"port"`
}
// NewLDAPVerifyConnectivityJobRequestParams instantiates a new LDAPVerifyConnectivityJobRequestParams 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 NewLDAPVerifyConnectivityJobRequestParams(bindPassword string, bindUsername string, hostname string, port int) *LDAPVerifyConnectivityJobRequestParams {
this := LDAPVerifyConnectivityJobRequestParams{}
var authzQueryTemplate string = "{USER}?memberOf?base"
this.AuthzQueryTemplate = &authzQueryTemplate
this.BindPassword = bindPassword
this.BindUsername = bindUsername
this.Hostname = hostname
this.Port = port
return &this
}
// NewLDAPVerifyConnectivityJobRequestParamsWithDefaults instantiates a new LDAPVerifyConnectivityJobRequestParams 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 NewLDAPVerifyConnectivityJobRequestParamsWithDefaults() *LDAPVerifyConnectivityJobRequestParams {
this := LDAPVerifyConnectivityJobRequestParams{}
var authzQueryTemplate string = "{USER}?memberOf?base"
this.AuthzQueryTemplate = &authzQueryTemplate
var port int = 636
this.Port = port
return &this
}
// GetAuthzQueryTemplate returns the AuthzQueryTemplate field value if set, zero value otherwise
func (o *LDAPVerifyConnectivityJobRequestParams) GetAuthzQueryTemplate() string {
if o == nil || IsNil(o.AuthzQueryTemplate) {
var ret string
return ret
}
return *o.AuthzQueryTemplate
}
// GetAuthzQueryTemplateOk returns a tuple with the AuthzQueryTemplate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LDAPVerifyConnectivityJobRequestParams) GetAuthzQueryTemplateOk() (*string, bool) {
if o == nil || IsNil(o.AuthzQueryTemplate) {
return nil, false
}
return o.AuthzQueryTemplate, true
}
// HasAuthzQueryTemplate returns a boolean if a field has been set.
func (o *LDAPVerifyConnectivityJobRequestParams) HasAuthzQueryTemplate() bool {
if o != nil && !IsNil(o.AuthzQueryTemplate) {
return true
}
return false
}
// SetAuthzQueryTemplate gets a reference to the given string and assigns it to the AuthzQueryTemplate field.
func (o *LDAPVerifyConnectivityJobRequestParams) SetAuthzQueryTemplate(v string) {
o.AuthzQueryTemplate = &v
}
// GetBindPassword returns the BindPassword field value
func (o *LDAPVerifyConnectivityJobRequestParams) GetBindPassword() string {
if o == nil {
var ret string
return ret
}
return o.BindPassword
}
// GetBindPasswordOk returns a tuple with the BindPassword field value
// and a boolean to check if the value has been set.
func (o *LDAPVerifyConnectivityJobRequestParams) GetBindPasswordOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.BindPassword, true
}
// SetBindPassword sets field value
func (o *LDAPVerifyConnectivityJobRequestParams) SetBindPassword(v string) {
o.BindPassword = v
}
// GetBindUsername returns the BindUsername field value
func (o *LDAPVerifyConnectivityJobRequestParams) GetBindUsername() string {
if o == nil {
var ret string
return ret
}
return o.BindUsername
}
// GetBindUsernameOk returns a tuple with the BindUsername field value
// and a boolean to check if the value has been set.
func (o *LDAPVerifyConnectivityJobRequestParams) GetBindUsernameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.BindUsername, true
}
// SetBindUsername sets field value
func (o *LDAPVerifyConnectivityJobRequestParams) SetBindUsername(v string) {
o.BindUsername = v
}
// GetCaCertificate returns the CaCertificate field value if set, zero value otherwise
func (o *LDAPVerifyConnectivityJobRequestParams) GetCaCertificate() string {
if o == nil || IsNil(o.CaCertificate) {
var ret string
return ret
}
return *o.CaCertificate
}
// GetCaCertificateOk returns a tuple with the CaCertificate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LDAPVerifyConnectivityJobRequestParams) GetCaCertificateOk() (*string, bool) {
if o == nil || IsNil(o.CaCertificate) {
return nil, false
}
return o.CaCertificate, true
}
// HasCaCertificate returns a boolean if a field has been set.
func (o *LDAPVerifyConnectivityJobRequestParams) HasCaCertificate() bool {
if o != nil && !IsNil(o.CaCertificate) {
return true
}
return false
}
// SetCaCertificate gets a reference to the given string and assigns it to the CaCertificate field.
func (o *LDAPVerifyConnectivityJobRequestParams) SetCaCertificate(v string) {
o.CaCertificate = &v
}
// GetHostname returns the Hostname field value
func (o *LDAPVerifyConnectivityJobRequestParams) 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 *LDAPVerifyConnectivityJobRequestParams) GetHostnameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Hostname, true
}
// SetHostname sets field value
func (o *LDAPVerifyConnectivityJobRequestParams) SetHostname(v string) {
o.Hostname = v
}
// GetLinks returns the Links field value if set, zero value otherwise
func (o *LDAPVerifyConnectivityJobRequestParams) GetLinks() []Link {
if o == nil || IsNil(o.Links) {
var ret []Link
return ret
}
return *o.Links
}
// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LDAPVerifyConnectivityJobRequestParams) GetLinksOk() (*[]Link, bool) {
if o == nil || IsNil(o.Links) {
return nil, false
}
return o.Links, true
}
// HasLinks returns a boolean if a field has been set.
func (o *LDAPVerifyConnectivityJobRequestParams) HasLinks() bool {
if o != nil && !IsNil(o.Links) {
return true
}
return false
}
// SetLinks gets a reference to the given []Link and assigns it to the Links field.
func (o *LDAPVerifyConnectivityJobRequestParams) SetLinks(v []Link) {
o.Links = &v
}
// GetPort returns the Port field value
func (o *LDAPVerifyConnectivityJobRequestParams) GetPort() int {
if o == nil {
var ret int
return ret
}
return o.Port
}
// GetPortOk returns a tuple with the Port field value
// and a boolean to check if the value has been set.
func (o *LDAPVerifyConnectivityJobRequestParams) GetPortOk() (*int, bool) {
if o == nil {
return nil, false
}
return &o.Port, true
}
// SetPort sets field value
func (o *LDAPVerifyConnectivityJobRequestParams) SetPort(v int) {
o.Port = v
}
func (o LDAPVerifyConnectivityJobRequestParams) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o LDAPVerifyConnectivityJobRequestParams) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AuthzQueryTemplate) {
toSerialize["authzQueryTemplate"] = o.AuthzQueryTemplate
}
toSerialize["bindPassword"] = o.BindPassword
toSerialize["bindUsername"] = o.BindUsername
if !IsNil(o.CaCertificate) {
toSerialize["caCertificate"] = o.CaCertificate
}
toSerialize["hostname"] = o.Hostname
toSerialize["port"] = o.Port
return toSerialize, nil
}