-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_patch_proxy_request.go
374 lines (314 loc) · 11.3 KB
/
model_patch_proxy_request.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
/*
Basis Theory API
## Getting Started * Sign-in to [Basis Theory](https://basistheory.com) and go to [Applications](https://portal.basistheory.com/applications) * Create a Basis Theory Private Application * All permissions should be selected * Paste the API Key into the `BT-API-KEY` variable
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package basistheory
import (
"encoding/json"
)
// checks if the PatchProxyRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PatchProxyRequest{}
// PatchProxyRequest struct for PatchProxyRequest
type PatchProxyRequest struct {
Name NullableString `json:"name,omitempty"`
DestinationUrl NullableString `json:"destination_url,omitempty"`
RequestTransform *ProxyTransform `json:"request_transform,omitempty"`
ResponseTransform *ProxyTransform `json:"response_transform,omitempty"`
Application *Application `json:"application,omitempty"`
Configuration map[string]string `json:"configuration,omitempty"`
RequireAuth NullableBool `json:"require_auth,omitempty"`
}
// NewPatchProxyRequest instantiates a new PatchProxyRequest 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 NewPatchProxyRequest() *PatchProxyRequest {
this := PatchProxyRequest{}
return &this
}
// NewPatchProxyRequestWithDefaults instantiates a new PatchProxyRequest 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 NewPatchProxyRequestWithDefaults() *PatchProxyRequest {
this := PatchProxyRequest{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PatchProxyRequest) GetName() string {
if o == nil || IsNil(o.Name.Get()) {
var ret string
return ret
}
return *o.Name.Get()
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *PatchProxyRequest) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Name.Get(), o.Name.IsSet()
}
// HasName returns a boolean if a field is not nil.
func (o *PatchProxyRequest) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given NullableString and assigns it to the Name field.
func (o *PatchProxyRequest) SetName(v string) {
o.Name.Set(&v)
}
// SetNameNil sets the value for Name to be an explicit nil
func (o *PatchProxyRequest) SetNameNil() {
o.Name.Set(nil)
}
// UnsetName ensures that no value is present for Name, not even an explicit nil
func (o *PatchProxyRequest) UnsetName() {
o.Name.Unset()
}
// GetDestinationUrl returns the DestinationUrl field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PatchProxyRequest) GetDestinationUrl() string {
if o == nil || IsNil(o.DestinationUrl.Get()) {
var ret string
return ret
}
return *o.DestinationUrl.Get()
}
// GetDestinationUrlOk returns a tuple with the DestinationUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *PatchProxyRequest) GetDestinationUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.DestinationUrl.Get(), o.DestinationUrl.IsSet()
}
// HasDestinationUrl returns a boolean if a field is not nil.
func (o *PatchProxyRequest) HasDestinationUrl() bool {
if o != nil && !IsNil(o.DestinationUrl) {
return true
}
return false
}
// SetDestinationUrl gets a reference to the given NullableString and assigns it to the DestinationUrl field.
func (o *PatchProxyRequest) SetDestinationUrl(v string) {
o.DestinationUrl.Set(&v)
}
// SetDestinationUrlNil sets the value for DestinationUrl to be an explicit nil
func (o *PatchProxyRequest) SetDestinationUrlNil() {
o.DestinationUrl.Set(nil)
}
// UnsetDestinationUrl ensures that no value is present for DestinationUrl, not even an explicit nil
func (o *PatchProxyRequest) UnsetDestinationUrl() {
o.DestinationUrl.Unset()
}
// GetRequestTransform returns the RequestTransform field value if set, zero value otherwise.
func (o *PatchProxyRequest) GetRequestTransform() ProxyTransform {
if o == nil || IsNil(o.RequestTransform) {
var ret ProxyTransform
return ret
}
return *o.RequestTransform
}
// GetRequestTransformOk returns a tuple with the RequestTransform field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PatchProxyRequest) GetRequestTransformOk() (*ProxyTransform, bool) {
if o == nil || IsNil(o.RequestTransform) {
return nil, false
}
return o.RequestTransform, true
}
// HasRequestTransform returns a boolean if a field is not nil.
func (o *PatchProxyRequest) HasRequestTransform() bool {
if o != nil && !IsNil(o.RequestTransform) {
return true
}
return false
}
// SetRequestTransform gets a reference to the given ProxyTransform and assigns it to the RequestTransform field.
func (o *PatchProxyRequest) SetRequestTransform(v ProxyTransform) {
o.RequestTransform = &v
}
// GetResponseTransform returns the ResponseTransform field value if set, zero value otherwise.
func (o *PatchProxyRequest) GetResponseTransform() ProxyTransform {
if o == nil || IsNil(o.ResponseTransform) {
var ret ProxyTransform
return ret
}
return *o.ResponseTransform
}
// GetResponseTransformOk returns a tuple with the ResponseTransform field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PatchProxyRequest) GetResponseTransformOk() (*ProxyTransform, bool) {
if o == nil || IsNil(o.ResponseTransform) {
return nil, false
}
return o.ResponseTransform, true
}
// HasResponseTransform returns a boolean if a field is not nil.
func (o *PatchProxyRequest) HasResponseTransform() bool {
if o != nil && !IsNil(o.ResponseTransform) {
return true
}
return false
}
// SetResponseTransform gets a reference to the given ProxyTransform and assigns it to the ResponseTransform field.
func (o *PatchProxyRequest) SetResponseTransform(v ProxyTransform) {
o.ResponseTransform = &v
}
// GetApplication returns the Application field value if set, zero value otherwise.
func (o *PatchProxyRequest) GetApplication() Application {
if o == nil || IsNil(o.Application) {
var ret Application
return ret
}
return *o.Application
}
// GetApplicationOk returns a tuple with the Application field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PatchProxyRequest) GetApplicationOk() (*Application, bool) {
if o == nil || IsNil(o.Application) {
return nil, false
}
return o.Application, true
}
// HasApplication returns a boolean if a field is not nil.
func (o *PatchProxyRequest) HasApplication() bool {
if o != nil && !IsNil(o.Application) {
return true
}
return false
}
// SetApplication gets a reference to the given Application and assigns it to the Application field.
func (o *PatchProxyRequest) SetApplication(v Application) {
o.Application = &v
}
// GetConfiguration returns the Configuration field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PatchProxyRequest) GetConfiguration() map[string]string {
if o == nil {
var ret map[string]string
return ret
}
return o.Configuration
}
// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *PatchProxyRequest) GetConfigurationOk() (*map[string]string, bool) {
if o == nil || IsNil(o.Configuration) {
return nil, false
}
return &o.Configuration, true
}
// HasConfiguration returns a boolean if a field is not nil.
func (o *PatchProxyRequest) HasConfiguration() bool {
if o != nil && !IsNil(o.Configuration) {
return true
}
return false
}
// SetConfiguration gets a reference to the given map[string]string and assigns it to the Configuration field.
func (o *PatchProxyRequest) SetConfiguration(v map[string]string) {
o.Configuration = v
}
// GetRequireAuth returns the RequireAuth field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PatchProxyRequest) GetRequireAuth() bool {
if o == nil || IsNil(o.RequireAuth.Get()) {
var ret bool
return ret
}
return *o.RequireAuth.Get()
}
// GetRequireAuthOk returns a tuple with the RequireAuth field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *PatchProxyRequest) GetRequireAuthOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.RequireAuth.Get(), o.RequireAuth.IsSet()
}
// HasRequireAuth returns a boolean if a field is not nil.
func (o *PatchProxyRequest) HasRequireAuth() bool {
if o != nil && !IsNil(o.RequireAuth) {
return true
}
return false
}
// SetRequireAuth gets a reference to the given NullableBool and assigns it to the RequireAuth field.
func (o *PatchProxyRequest) SetRequireAuth(v bool) {
o.RequireAuth.Set(&v)
}
// SetRequireAuthNil sets the value for RequireAuth to be an explicit nil
func (o *PatchProxyRequest) SetRequireAuthNil() {
o.RequireAuth.Set(nil)
}
// UnsetRequireAuth ensures that no value is present for RequireAuth, not even an explicit nil
func (o *PatchProxyRequest) UnsetRequireAuth() {
o.RequireAuth.Unset()
}
func (o PatchProxyRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PatchProxyRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.Name.IsSet() {
toSerialize["name"] = o.Name.Get()
}
if o.DestinationUrl.IsSet() {
toSerialize["destination_url"] = o.DestinationUrl.Get()
}
if !IsNil(o.RequestTransform) {
toSerialize["request_transform"] = o.RequestTransform
}
if !IsNil(o.ResponseTransform) {
toSerialize["response_transform"] = o.ResponseTransform
}
if !IsNil(o.Application) {
toSerialize["application"] = o.Application
}
if o.Configuration != nil {
toSerialize["configuration"] = o.Configuration
}
if o.RequireAuth.IsSet() {
toSerialize["require_auth"] = o.RequireAuth.Get()
}
return toSerialize, nil
}
type NullablePatchProxyRequest struct {
value *PatchProxyRequest
isSet bool
}
func (v NullablePatchProxyRequest) Get() *PatchProxyRequest {
return v.value
}
func (v *NullablePatchProxyRequest) Set(val *PatchProxyRequest) {
v.value = val
v.isSet = true
}
func (v NullablePatchProxyRequest) IsSet() bool {
return v.isSet
}
func (v *NullablePatchProxyRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePatchProxyRequest(val *PatchProxyRequest) *NullablePatchProxyRequest {
return &NullablePatchProxyRequest{value: val, isSet: true}
}
func (v NullablePatchProxyRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePatchProxyRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}