/
model_quote_to_order_details_dto_end_user_info.go
497 lines (421 loc) · 14.7 KB
/
model_quote_to_order_details_dto_end_user_info.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
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
/*
XI Sdk Resellers
For Resellers. Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers.
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package xi_sdk_resellers
import (
"encoding/json"
)
// checks if the QuoteToOrderDetailsDTOEndUserInfo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &QuoteToOrderDetailsDTOEndUserInfo{}
// QuoteToOrderDetailsDTOEndUserInfo The contact information for the end user/customer provided by the reseller. Used to determine pricing and discounts.
type QuoteToOrderDetailsDTOEndUserInfo struct {
// The company name for the end user/customer.
CompanyName *string `json:"companyName,omitempty"`
// The contact name for the end user/customer.
Contact *string `json:"contact,omitempty"`
// The address line 1 for the end user/customer.
AddressLine1 *string `json:"addressLine1,omitempty"`
// The address line 2 for the end user/customer.
AddressLine2 *string `json:"addressLine2,omitempty"`
// The address line 3 for the end user/customer.
AddressLine3 *string `json:"addressLine3,omitempty"`
// The end user/customer's city.
City *string `json:"city,omitempty"`
// The end user/customer's state.
State *string `json:"state,omitempty"`
// The end user/customer's zip or postal code.
PostalCode *string `json:"postalCode,omitempty"`
// The end user/customer's two character ISO country code.
CountryCode *string `json:"countryCode,omitempty"`
// The end user/customer's phone number.
Email *string `json:"email,omitempty"`
// The end user/customer's phone number.
PhoneNumber *string `json:"phoneNumber,omitempty"`
}
// NewQuoteToOrderDetailsDTOEndUserInfo instantiates a new QuoteToOrderDetailsDTOEndUserInfo 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 NewQuoteToOrderDetailsDTOEndUserInfo() *QuoteToOrderDetailsDTOEndUserInfo {
this := QuoteToOrderDetailsDTOEndUserInfo{}
return &this
}
// NewQuoteToOrderDetailsDTOEndUserInfoWithDefaults instantiates a new QuoteToOrderDetailsDTOEndUserInfo 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 NewQuoteToOrderDetailsDTOEndUserInfoWithDefaults() *QuoteToOrderDetailsDTOEndUserInfo {
this := QuoteToOrderDetailsDTOEndUserInfo{}
return &this
}
// GetCompanyName returns the CompanyName field value if set, zero value otherwise.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetCompanyName() string {
if o == nil || IsNil(o.CompanyName) {
var ret string
return ret
}
return *o.CompanyName
}
// GetCompanyNameOk returns a tuple with the CompanyName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetCompanyNameOk() (*string, bool) {
if o == nil || IsNil(o.CompanyName) {
return nil, false
}
return o.CompanyName, true
}
// HasCompanyName returns a boolean if a field has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) HasCompanyName() bool {
if o != nil && !IsNil(o.CompanyName) {
return true
}
return false
}
// SetCompanyName gets a reference to the given string and assigns it to the CompanyName field.
func (o *QuoteToOrderDetailsDTOEndUserInfo) SetCompanyName(v string) {
o.CompanyName = &v
}
// GetContact returns the Contact field value if set, zero value otherwise.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetContact() string {
if o == nil || IsNil(o.Contact) {
var ret string
return ret
}
return *o.Contact
}
// GetContactOk returns a tuple with the Contact field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetContactOk() (*string, bool) {
if o == nil || IsNil(o.Contact) {
return nil, false
}
return o.Contact, true
}
// HasContact returns a boolean if a field has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) HasContact() bool {
if o != nil && !IsNil(o.Contact) {
return true
}
return false
}
// SetContact gets a reference to the given string and assigns it to the Contact field.
func (o *QuoteToOrderDetailsDTOEndUserInfo) SetContact(v string) {
o.Contact = &v
}
// GetAddressLine1 returns the AddressLine1 field value if set, zero value otherwise.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetAddressLine1() string {
if o == nil || IsNil(o.AddressLine1) {
var ret string
return ret
}
return *o.AddressLine1
}
// GetAddressLine1Ok returns a tuple with the AddressLine1 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetAddressLine1Ok() (*string, bool) {
if o == nil || IsNil(o.AddressLine1) {
return nil, false
}
return o.AddressLine1, true
}
// HasAddressLine1 returns a boolean if a field has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) HasAddressLine1() bool {
if o != nil && !IsNil(o.AddressLine1) {
return true
}
return false
}
// SetAddressLine1 gets a reference to the given string and assigns it to the AddressLine1 field.
func (o *QuoteToOrderDetailsDTOEndUserInfo) SetAddressLine1(v string) {
o.AddressLine1 = &v
}
// GetAddressLine2 returns the AddressLine2 field value if set, zero value otherwise.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetAddressLine2() string {
if o == nil || IsNil(o.AddressLine2) {
var ret string
return ret
}
return *o.AddressLine2
}
// GetAddressLine2Ok returns a tuple with the AddressLine2 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetAddressLine2Ok() (*string, bool) {
if o == nil || IsNil(o.AddressLine2) {
return nil, false
}
return o.AddressLine2, true
}
// HasAddressLine2 returns a boolean if a field has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) HasAddressLine2() bool {
if o != nil && !IsNil(o.AddressLine2) {
return true
}
return false
}
// SetAddressLine2 gets a reference to the given string and assigns it to the AddressLine2 field.
func (o *QuoteToOrderDetailsDTOEndUserInfo) SetAddressLine2(v string) {
o.AddressLine2 = &v
}
// GetAddressLine3 returns the AddressLine3 field value if set, zero value otherwise.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetAddressLine3() string {
if o == nil || IsNil(o.AddressLine3) {
var ret string
return ret
}
return *o.AddressLine3
}
// GetAddressLine3Ok returns a tuple with the AddressLine3 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetAddressLine3Ok() (*string, bool) {
if o == nil || IsNil(o.AddressLine3) {
return nil, false
}
return o.AddressLine3, true
}
// HasAddressLine3 returns a boolean if a field has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) HasAddressLine3() bool {
if o != nil && !IsNil(o.AddressLine3) {
return true
}
return false
}
// SetAddressLine3 gets a reference to the given string and assigns it to the AddressLine3 field.
func (o *QuoteToOrderDetailsDTOEndUserInfo) SetAddressLine3(v string) {
o.AddressLine3 = &v
}
// GetCity returns the City field value if set, zero value otherwise.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetCity() string {
if o == nil || IsNil(o.City) {
var ret string
return ret
}
return *o.City
}
// GetCityOk returns a tuple with the City field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetCityOk() (*string, bool) {
if o == nil || IsNil(o.City) {
return nil, false
}
return o.City, true
}
// HasCity returns a boolean if a field has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) HasCity() bool {
if o != nil && !IsNil(o.City) {
return true
}
return false
}
// SetCity gets a reference to the given string and assigns it to the City field.
func (o *QuoteToOrderDetailsDTOEndUserInfo) SetCity(v string) {
o.City = &v
}
// GetState returns the State field value if set, zero value otherwise.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetState() string {
if o == nil || IsNil(o.State) {
var ret string
return ret
}
return *o.State
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetStateOk() (*string, bool) {
if o == nil || IsNil(o.State) {
return nil, false
}
return o.State, true
}
// HasState returns a boolean if a field has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) HasState() bool {
if o != nil && !IsNil(o.State) {
return true
}
return false
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *QuoteToOrderDetailsDTOEndUserInfo) SetState(v string) {
o.State = &v
}
// GetPostalCode returns the PostalCode field value if set, zero value otherwise.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetPostalCode() string {
if o == nil || IsNil(o.PostalCode) {
var ret string
return ret
}
return *o.PostalCode
}
// GetPostalCodeOk returns a tuple with the PostalCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetPostalCodeOk() (*string, bool) {
if o == nil || IsNil(o.PostalCode) {
return nil, false
}
return o.PostalCode, true
}
// HasPostalCode returns a boolean if a field has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) HasPostalCode() bool {
if o != nil && !IsNil(o.PostalCode) {
return true
}
return false
}
// SetPostalCode gets a reference to the given string and assigns it to the PostalCode field.
func (o *QuoteToOrderDetailsDTOEndUserInfo) SetPostalCode(v string) {
o.PostalCode = &v
}
// GetCountryCode returns the CountryCode field value if set, zero value otherwise.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetCountryCode() string {
if o == nil || IsNil(o.CountryCode) {
var ret string
return ret
}
return *o.CountryCode
}
// GetCountryCodeOk returns a tuple with the CountryCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetCountryCodeOk() (*string, bool) {
if o == nil || IsNil(o.CountryCode) {
return nil, false
}
return o.CountryCode, true
}
// HasCountryCode returns a boolean if a field has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) HasCountryCode() bool {
if o != nil && !IsNil(o.CountryCode) {
return true
}
return false
}
// SetCountryCode gets a reference to the given string and assigns it to the CountryCode field.
func (o *QuoteToOrderDetailsDTOEndUserInfo) SetCountryCode(v string) {
o.CountryCode = &v
}
// GetEmail returns the Email field value if set, zero value otherwise.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetEmail() string {
if o == nil || IsNil(o.Email) {
var ret string
return ret
}
return *o.Email
}
// GetEmailOk returns a tuple with the Email field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetEmailOk() (*string, bool) {
if o == nil || IsNil(o.Email) {
return nil, false
}
return o.Email, true
}
// HasEmail returns a boolean if a field has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) HasEmail() bool {
if o != nil && !IsNil(o.Email) {
return true
}
return false
}
// SetEmail gets a reference to the given string and assigns it to the Email field.
func (o *QuoteToOrderDetailsDTOEndUserInfo) SetEmail(v string) {
o.Email = &v
}
// GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetPhoneNumber() string {
if o == nil || IsNil(o.PhoneNumber) {
var ret string
return ret
}
return *o.PhoneNumber
}
// GetPhoneNumberOk returns a tuple with the PhoneNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) GetPhoneNumberOk() (*string, bool) {
if o == nil || IsNil(o.PhoneNumber) {
return nil, false
}
return o.PhoneNumber, true
}
// HasPhoneNumber returns a boolean if a field has been set.
func (o *QuoteToOrderDetailsDTOEndUserInfo) HasPhoneNumber() bool {
if o != nil && !IsNil(o.PhoneNumber) {
return true
}
return false
}
// SetPhoneNumber gets a reference to the given string and assigns it to the PhoneNumber field.
func (o *QuoteToOrderDetailsDTOEndUserInfo) SetPhoneNumber(v string) {
o.PhoneNumber = &v
}
func (o QuoteToOrderDetailsDTOEndUserInfo) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o QuoteToOrderDetailsDTOEndUserInfo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CompanyName) {
toSerialize["companyName"] = o.CompanyName
}
if !IsNil(o.Contact) {
toSerialize["contact"] = o.Contact
}
if !IsNil(o.AddressLine1) {
toSerialize["addressLine1"] = o.AddressLine1
}
if !IsNil(o.AddressLine2) {
toSerialize["addressLine2"] = o.AddressLine2
}
if !IsNil(o.AddressLine3) {
toSerialize["addressLine3"] = o.AddressLine3
}
if !IsNil(o.City) {
toSerialize["city"] = o.City
}
if !IsNil(o.State) {
toSerialize["state"] = o.State
}
if !IsNil(o.PostalCode) {
toSerialize["postalCode"] = o.PostalCode
}
if !IsNil(o.CountryCode) {
toSerialize["countryCode"] = o.CountryCode
}
if !IsNil(o.Email) {
toSerialize["email"] = o.Email
}
if !IsNil(o.PhoneNumber) {
toSerialize["phoneNumber"] = o.PhoneNumber
}
return toSerialize, nil
}
type NullableQuoteToOrderDetailsDTOEndUserInfo struct {
value *QuoteToOrderDetailsDTOEndUserInfo
isSet bool
}
func (v NullableQuoteToOrderDetailsDTOEndUserInfo) Get() *QuoteToOrderDetailsDTOEndUserInfo {
return v.value
}
func (v *NullableQuoteToOrderDetailsDTOEndUserInfo) Set(val *QuoteToOrderDetailsDTOEndUserInfo) {
v.value = val
v.isSet = true
}
func (v NullableQuoteToOrderDetailsDTOEndUserInfo) IsSet() bool {
return v.isSet
}
func (v *NullableQuoteToOrderDetailsDTOEndUserInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableQuoteToOrderDetailsDTOEndUserInfo(val *QuoteToOrderDetailsDTOEndUserInfo) *NullableQuoteToOrderDetailsDTOEndUserInfo {
return &NullableQuoteToOrderDetailsDTOEndUserInfo{value: val, isSet: true}
}
func (v NullableQuoteToOrderDetailsDTOEndUserInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableQuoteToOrderDetailsDTOEndUserInfo) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}