/
model_view_slash_price_200_response_data_inner.go
607 lines (516 loc) · 18.1 KB
/
model_view_slash_price_200_response_data_inner.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
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
/*
Tokopedia API
Tokopedia API
API version: 1.0
Contact: dev@sirclo.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package tokopedia
import (
"encoding/json"
)
// checks if the ViewSlashPrice200ResponseDataInner type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ViewSlashPrice200ResponseDataInner{}
// ViewSlashPrice200ResponseDataInner struct for ViewSlashPrice200ResponseDataInner
type ViewSlashPrice200ResponseDataInner struct {
// Slash Price Product Unique Identifier
SlashPriceProductId *int64 `json:"slash_price_product_id,omitempty"`
// Product Unique Identifier
ProductId *int64 `json:"product_id,omitempty"`
// Product Name
Name *string `json:"Name,omitempty"`
Price *ViewSlashPrice200ResponseDataInnerPrice `json:"price,omitempty"`
// Product Stock
Stock *int64 `json:"stock,omitempty"`
// Product URL
Url *string `json:"url,omitempty"`
// Product SKU
Sku *string `json:"sku,omitempty"`
// Product Discounted Price
DiscountedPrice *float64 `json:"discounted_price,omitempty"`
// Product Discounted Percentage
DiscountedPercentage *int64 `json:"discounted_percentage,omitempty"`
// Product Maximum Order
MaxOrder *int64 `json:"max_order,omitempty"`
// Slash Price Start Date Timestamp (format: 2021-09-27T13:25:00+07:00)
StartDate *string `json:"start_date,omitempty"`
// Slash Price Start Date Timestamp (format: 2021-09-28T01:24:00+07:00)
EndDate *string `json:"end_date,omitempty"`
Warehouses []ViewSlashPrice200ResponseDataInnerWarehousesInner `json:"warehouses,omitempty"`
// Slash Price Status
SlashPriceStatusId *int64 `json:"slash_price_status_id,omitempty"`
}
// NewViewSlashPrice200ResponseDataInner instantiates a new ViewSlashPrice200ResponseDataInner 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 NewViewSlashPrice200ResponseDataInner() *ViewSlashPrice200ResponseDataInner {
this := ViewSlashPrice200ResponseDataInner{}
return &this
}
// NewViewSlashPrice200ResponseDataInnerWithDefaults instantiates a new ViewSlashPrice200ResponseDataInner 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 NewViewSlashPrice200ResponseDataInnerWithDefaults() *ViewSlashPrice200ResponseDataInner {
this := ViewSlashPrice200ResponseDataInner{}
return &this
}
// GetSlashPriceProductId returns the SlashPriceProductId field value if set, zero value otherwise.
func (o *ViewSlashPrice200ResponseDataInner) GetSlashPriceProductId() int64 {
if o == nil || IsNil(o.SlashPriceProductId) {
var ret int64
return ret
}
return *o.SlashPriceProductId
}
// GetSlashPriceProductIdOk returns a tuple with the SlashPriceProductId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ViewSlashPrice200ResponseDataInner) GetSlashPriceProductIdOk() (*int64, bool) {
if o == nil || IsNil(o.SlashPriceProductId) {
return nil, false
}
return o.SlashPriceProductId, true
}
// HasSlashPriceProductId returns a boolean if a field has been set.
func (o *ViewSlashPrice200ResponseDataInner) HasSlashPriceProductId() bool {
if o != nil && !IsNil(o.SlashPriceProductId) {
return true
}
return false
}
// SetSlashPriceProductId gets a reference to the given int64 and assigns it to the SlashPriceProductId field.
func (o *ViewSlashPrice200ResponseDataInner) SetSlashPriceProductId(v int64) {
o.SlashPriceProductId = &v
}
// GetProductId returns the ProductId field value if set, zero value otherwise.
func (o *ViewSlashPrice200ResponseDataInner) GetProductId() int64 {
if o == nil || IsNil(o.ProductId) {
var ret int64
return ret
}
return *o.ProductId
}
// GetProductIdOk returns a tuple with the ProductId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ViewSlashPrice200ResponseDataInner) GetProductIdOk() (*int64, bool) {
if o == nil || IsNil(o.ProductId) {
return nil, false
}
return o.ProductId, true
}
// HasProductId returns a boolean if a field has been set.
func (o *ViewSlashPrice200ResponseDataInner) HasProductId() bool {
if o != nil && !IsNil(o.ProductId) {
return true
}
return false
}
// SetProductId gets a reference to the given int64 and assigns it to the ProductId field.
func (o *ViewSlashPrice200ResponseDataInner) SetProductId(v int64) {
o.ProductId = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ViewSlashPrice200ResponseDataInner) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ViewSlashPrice200ResponseDataInner) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *ViewSlashPrice200ResponseDataInner) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *ViewSlashPrice200ResponseDataInner) SetName(v string) {
o.Name = &v
}
// GetPrice returns the Price field value if set, zero value otherwise.
func (o *ViewSlashPrice200ResponseDataInner) GetPrice() ViewSlashPrice200ResponseDataInnerPrice {
if o == nil || IsNil(o.Price) {
var ret ViewSlashPrice200ResponseDataInnerPrice
return ret
}
return *o.Price
}
// GetPriceOk returns a tuple with the Price field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ViewSlashPrice200ResponseDataInner) GetPriceOk() (*ViewSlashPrice200ResponseDataInnerPrice, bool) {
if o == nil || IsNil(o.Price) {
return nil, false
}
return o.Price, true
}
// HasPrice returns a boolean if a field has been set.
func (o *ViewSlashPrice200ResponseDataInner) HasPrice() bool {
if o != nil && !IsNil(o.Price) {
return true
}
return false
}
// SetPrice gets a reference to the given ViewSlashPrice200ResponseDataInnerPrice and assigns it to the Price field.
func (o *ViewSlashPrice200ResponseDataInner) SetPrice(v ViewSlashPrice200ResponseDataInnerPrice) {
o.Price = &v
}
// GetStock returns the Stock field value if set, zero value otherwise.
func (o *ViewSlashPrice200ResponseDataInner) GetStock() int64 {
if o == nil || IsNil(o.Stock) {
var ret int64
return ret
}
return *o.Stock
}
// GetStockOk returns a tuple with the Stock field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ViewSlashPrice200ResponseDataInner) GetStockOk() (*int64, bool) {
if o == nil || IsNil(o.Stock) {
return nil, false
}
return o.Stock, true
}
// HasStock returns a boolean if a field has been set.
func (o *ViewSlashPrice200ResponseDataInner) HasStock() bool {
if o != nil && !IsNil(o.Stock) {
return true
}
return false
}
// SetStock gets a reference to the given int64 and assigns it to the Stock field.
func (o *ViewSlashPrice200ResponseDataInner) SetStock(v int64) {
o.Stock = &v
}
// GetUrl returns the Url field value if set, zero value otherwise.
func (o *ViewSlashPrice200ResponseDataInner) GetUrl() string {
if o == nil || IsNil(o.Url) {
var ret string
return ret
}
return *o.Url
}
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ViewSlashPrice200ResponseDataInner) GetUrlOk() (*string, bool) {
if o == nil || IsNil(o.Url) {
return nil, false
}
return o.Url, true
}
// HasUrl returns a boolean if a field has been set.
func (o *ViewSlashPrice200ResponseDataInner) HasUrl() bool {
if o != nil && !IsNil(o.Url) {
return true
}
return false
}
// SetUrl gets a reference to the given string and assigns it to the Url field.
func (o *ViewSlashPrice200ResponseDataInner) SetUrl(v string) {
o.Url = &v
}
// GetSku returns the Sku field value if set, zero value otherwise.
func (o *ViewSlashPrice200ResponseDataInner) GetSku() string {
if o == nil || IsNil(o.Sku) {
var ret string
return ret
}
return *o.Sku
}
// GetSkuOk returns a tuple with the Sku field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ViewSlashPrice200ResponseDataInner) GetSkuOk() (*string, bool) {
if o == nil || IsNil(o.Sku) {
return nil, false
}
return o.Sku, true
}
// HasSku returns a boolean if a field has been set.
func (o *ViewSlashPrice200ResponseDataInner) HasSku() bool {
if o != nil && !IsNil(o.Sku) {
return true
}
return false
}
// SetSku gets a reference to the given string and assigns it to the Sku field.
func (o *ViewSlashPrice200ResponseDataInner) SetSku(v string) {
o.Sku = &v
}
// GetDiscountedPrice returns the DiscountedPrice field value if set, zero value otherwise.
func (o *ViewSlashPrice200ResponseDataInner) GetDiscountedPrice() float64 {
if o == nil || IsNil(o.DiscountedPrice) {
var ret float64
return ret
}
return *o.DiscountedPrice
}
// GetDiscountedPriceOk returns a tuple with the DiscountedPrice field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ViewSlashPrice200ResponseDataInner) GetDiscountedPriceOk() (*float64, bool) {
if o == nil || IsNil(o.DiscountedPrice) {
return nil, false
}
return o.DiscountedPrice, true
}
// HasDiscountedPrice returns a boolean if a field has been set.
func (o *ViewSlashPrice200ResponseDataInner) HasDiscountedPrice() bool {
if o != nil && !IsNil(o.DiscountedPrice) {
return true
}
return false
}
// SetDiscountedPrice gets a reference to the given float64 and assigns it to the DiscountedPrice field.
func (o *ViewSlashPrice200ResponseDataInner) SetDiscountedPrice(v float64) {
o.DiscountedPrice = &v
}
// GetDiscountedPercentage returns the DiscountedPercentage field value if set, zero value otherwise.
func (o *ViewSlashPrice200ResponseDataInner) GetDiscountedPercentage() int64 {
if o == nil || IsNil(o.DiscountedPercentage) {
var ret int64
return ret
}
return *o.DiscountedPercentage
}
// GetDiscountedPercentageOk returns a tuple with the DiscountedPercentage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ViewSlashPrice200ResponseDataInner) GetDiscountedPercentageOk() (*int64, bool) {
if o == nil || IsNil(o.DiscountedPercentage) {
return nil, false
}
return o.DiscountedPercentage, true
}
// HasDiscountedPercentage returns a boolean if a field has been set.
func (o *ViewSlashPrice200ResponseDataInner) HasDiscountedPercentage() bool {
if o != nil && !IsNil(o.DiscountedPercentage) {
return true
}
return false
}
// SetDiscountedPercentage gets a reference to the given int64 and assigns it to the DiscountedPercentage field.
func (o *ViewSlashPrice200ResponseDataInner) SetDiscountedPercentage(v int64) {
o.DiscountedPercentage = &v
}
// GetMaxOrder returns the MaxOrder field value if set, zero value otherwise.
func (o *ViewSlashPrice200ResponseDataInner) GetMaxOrder() int64 {
if o == nil || IsNil(o.MaxOrder) {
var ret int64
return ret
}
return *o.MaxOrder
}
// GetMaxOrderOk returns a tuple with the MaxOrder field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ViewSlashPrice200ResponseDataInner) GetMaxOrderOk() (*int64, bool) {
if o == nil || IsNil(o.MaxOrder) {
return nil, false
}
return o.MaxOrder, true
}
// HasMaxOrder returns a boolean if a field has been set.
func (o *ViewSlashPrice200ResponseDataInner) HasMaxOrder() bool {
if o != nil && !IsNil(o.MaxOrder) {
return true
}
return false
}
// SetMaxOrder gets a reference to the given int64 and assigns it to the MaxOrder field.
func (o *ViewSlashPrice200ResponseDataInner) SetMaxOrder(v int64) {
o.MaxOrder = &v
}
// GetStartDate returns the StartDate field value if set, zero value otherwise.
func (o *ViewSlashPrice200ResponseDataInner) GetStartDate() string {
if o == nil || IsNil(o.StartDate) {
var ret string
return ret
}
return *o.StartDate
}
// GetStartDateOk returns a tuple with the StartDate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ViewSlashPrice200ResponseDataInner) GetStartDateOk() (*string, bool) {
if o == nil || IsNil(o.StartDate) {
return nil, false
}
return o.StartDate, true
}
// HasStartDate returns a boolean if a field has been set.
func (o *ViewSlashPrice200ResponseDataInner) HasStartDate() bool {
if o != nil && !IsNil(o.StartDate) {
return true
}
return false
}
// SetStartDate gets a reference to the given string and assigns it to the StartDate field.
func (o *ViewSlashPrice200ResponseDataInner) SetStartDate(v string) {
o.StartDate = &v
}
// GetEndDate returns the EndDate field value if set, zero value otherwise.
func (o *ViewSlashPrice200ResponseDataInner) GetEndDate() string {
if o == nil || IsNil(o.EndDate) {
var ret string
return ret
}
return *o.EndDate
}
// GetEndDateOk returns a tuple with the EndDate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ViewSlashPrice200ResponseDataInner) GetEndDateOk() (*string, bool) {
if o == nil || IsNil(o.EndDate) {
return nil, false
}
return o.EndDate, true
}
// HasEndDate returns a boolean if a field has been set.
func (o *ViewSlashPrice200ResponseDataInner) HasEndDate() bool {
if o != nil && !IsNil(o.EndDate) {
return true
}
return false
}
// SetEndDate gets a reference to the given string and assigns it to the EndDate field.
func (o *ViewSlashPrice200ResponseDataInner) SetEndDate(v string) {
o.EndDate = &v
}
// GetWarehouses returns the Warehouses field value if set, zero value otherwise.
func (o *ViewSlashPrice200ResponseDataInner) GetWarehouses() []ViewSlashPrice200ResponseDataInnerWarehousesInner {
if o == nil || IsNil(o.Warehouses) {
var ret []ViewSlashPrice200ResponseDataInnerWarehousesInner
return ret
}
return o.Warehouses
}
// GetWarehousesOk returns a tuple with the Warehouses field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ViewSlashPrice200ResponseDataInner) GetWarehousesOk() ([]ViewSlashPrice200ResponseDataInnerWarehousesInner, bool) {
if o == nil || IsNil(o.Warehouses) {
return nil, false
}
return o.Warehouses, true
}
// HasWarehouses returns a boolean if a field has been set.
func (o *ViewSlashPrice200ResponseDataInner) HasWarehouses() bool {
if o != nil && !IsNil(o.Warehouses) {
return true
}
return false
}
// SetWarehouses gets a reference to the given []ViewSlashPrice200ResponseDataInnerWarehousesInner and assigns it to the Warehouses field.
func (o *ViewSlashPrice200ResponseDataInner) SetWarehouses(v []ViewSlashPrice200ResponseDataInnerWarehousesInner) {
o.Warehouses = v
}
// GetSlashPriceStatusId returns the SlashPriceStatusId field value if set, zero value otherwise.
func (o *ViewSlashPrice200ResponseDataInner) GetSlashPriceStatusId() int64 {
if o == nil || IsNil(o.SlashPriceStatusId) {
var ret int64
return ret
}
return *o.SlashPriceStatusId
}
// GetSlashPriceStatusIdOk returns a tuple with the SlashPriceStatusId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ViewSlashPrice200ResponseDataInner) GetSlashPriceStatusIdOk() (*int64, bool) {
if o == nil || IsNil(o.SlashPriceStatusId) {
return nil, false
}
return o.SlashPriceStatusId, true
}
// HasSlashPriceStatusId returns a boolean if a field has been set.
func (o *ViewSlashPrice200ResponseDataInner) HasSlashPriceStatusId() bool {
if o != nil && !IsNil(o.SlashPriceStatusId) {
return true
}
return false
}
// SetSlashPriceStatusId gets a reference to the given int64 and assigns it to the SlashPriceStatusId field.
func (o *ViewSlashPrice200ResponseDataInner) SetSlashPriceStatusId(v int64) {
o.SlashPriceStatusId = &v
}
func (o ViewSlashPrice200ResponseDataInner) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ViewSlashPrice200ResponseDataInner) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.SlashPriceProductId) {
toSerialize["slash_price_product_id"] = o.SlashPriceProductId
}
if !IsNil(o.ProductId) {
toSerialize["product_id"] = o.ProductId
}
if !IsNil(o.Name) {
toSerialize["Name"] = o.Name
}
if !IsNil(o.Price) {
toSerialize["price"] = o.Price
}
if !IsNil(o.Stock) {
toSerialize["stock"] = o.Stock
}
if !IsNil(o.Url) {
toSerialize["url"] = o.Url
}
if !IsNil(o.Sku) {
toSerialize["sku"] = o.Sku
}
if !IsNil(o.DiscountedPrice) {
toSerialize["discounted_price"] = o.DiscountedPrice
}
if !IsNil(o.DiscountedPercentage) {
toSerialize["discounted_percentage"] = o.DiscountedPercentage
}
if !IsNil(o.MaxOrder) {
toSerialize["max_order"] = o.MaxOrder
}
if !IsNil(o.StartDate) {
toSerialize["start_date"] = o.StartDate
}
if !IsNil(o.EndDate) {
toSerialize["end_date"] = o.EndDate
}
if !IsNil(o.Warehouses) {
toSerialize["warehouses"] = o.Warehouses
}
if !IsNil(o.SlashPriceStatusId) {
toSerialize["slash_price_status_id"] = o.SlashPriceStatusId
}
return toSerialize, nil
}
type NullableViewSlashPrice200ResponseDataInner struct {
value *ViewSlashPrice200ResponseDataInner
isSet bool
}
func (v NullableViewSlashPrice200ResponseDataInner) Get() *ViewSlashPrice200ResponseDataInner {
return v.value
}
func (v *NullableViewSlashPrice200ResponseDataInner) Set(val *ViewSlashPrice200ResponseDataInner) {
v.value = val
v.isSet = true
}
func (v NullableViewSlashPrice200ResponseDataInner) IsSet() bool {
return v.isSet
}
func (v *NullableViewSlashPrice200ResponseDataInner) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableViewSlashPrice200ResponseDataInner(val *ViewSlashPrice200ResponseDataInner) *NullableViewSlashPrice200ResponseDataInner {
return &NullableViewSlashPrice200ResponseDataInner{value: val, isSet: true}
}
func (v NullableViewSlashPrice200ResponseDataInner) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableViewSlashPrice200ResponseDataInner) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}