-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathCampaignsVouchersCreateResponseBody.java
More file actions
1113 lines (858 loc) · 33 KB
/
CampaignsVouchersCreateResponseBody.java
File metadata and controls
1113 lines (858 loc) · 33 KB
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
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Voucherify API
* Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
*
* The version of the OpenAPI document: v2018-08-01
* Contact: support@voucherify.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.voucherify.client.model;
import java.util.Objects;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.voucherify.client.model.CampaignsVouchersCreateResponseBodyGift;
import io.voucherify.client.model.CampaignsVouchersCreateResponseBodyLoyaltyCard;
import io.voucherify.client.model.CampaignsVouchersCreateResponseBodyPublish;
import io.voucherify.client.model.CampaignsVouchersCreateResponseBodyRedemption;
import io.voucherify.client.model.Category;
import io.voucherify.client.model.Discount;
import io.voucherify.client.model.ValidationRulesAssignmentsList;
import io.voucherify.client.model.ValidityHours;
import io.voucherify.client.model.ValidityTimeframe;
import io.voucherify.client.model.VoucherAssets;
import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.jackson.nullable.JsonNullable;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import io.voucherify.client.JSON;
/**
* Response body schema for **POST** `v1/campaigns/{campaignId}/vouchers/{code}` and **POST** `v1/campaigns/{campaignId}/vouchers`.
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class CampaignsVouchersCreateResponseBody {
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private String id;
public static final String SERIALIZED_NAME_CODE = "code";
@SerializedName(SERIALIZED_NAME_CODE)
private String code;
public static final String SERIALIZED_NAME_CAMPAIGN = "campaign";
@SerializedName(SERIALIZED_NAME_CAMPAIGN)
private String campaign;
public static final String SERIALIZED_NAME_CAMPAIGN_ID = "campaign_id";
@SerializedName(SERIALIZED_NAME_CAMPAIGN_ID)
private String campaignId;
public static final String SERIALIZED_NAME_CATEGORY = "category";
@SerializedName(SERIALIZED_NAME_CATEGORY)
private String category;
public static final String SERIALIZED_NAME_CATEGORY_ID = "category_id";
@SerializedName(SERIALIZED_NAME_CATEGORY_ID)
private String categoryId;
/**
* Defines the type of the voucher.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
GIFT_VOUCHER("GIFT_VOUCHER"),
DISCOUNT_VOUCHER("DISCOUNT_VOUCHER"),
LOYALTY_CARD("LOYALTY_CARD");
private String value;
TypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<TypeEnum> {
@Override
public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TypeEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private TypeEnum type;
public static final String SERIALIZED_NAME_DISCOUNT = "discount";
@SerializedName(SERIALIZED_NAME_DISCOUNT)
private Discount discount;
public static final String SERIALIZED_NAME_GIFT = "gift";
@SerializedName(SERIALIZED_NAME_GIFT)
private CampaignsVouchersCreateResponseBodyGift gift;
public static final String SERIALIZED_NAME_LOYALTY_CARD = "loyalty_card";
@SerializedName(SERIALIZED_NAME_LOYALTY_CARD)
private CampaignsVouchersCreateResponseBodyLoyaltyCard loyaltyCard;
public static final String SERIALIZED_NAME_START_DATE = "start_date";
@SerializedName(SERIALIZED_NAME_START_DATE)
private OffsetDateTime startDate;
public static final String SERIALIZED_NAME_EXPIRATION_DATE = "expiration_date";
@SerializedName(SERIALIZED_NAME_EXPIRATION_DATE)
private OffsetDateTime expirationDate;
public static final String SERIALIZED_NAME_VALIDITY_TIMEFRAME = "validity_timeframe";
@SerializedName(SERIALIZED_NAME_VALIDITY_TIMEFRAME)
private ValidityTimeframe validityTimeframe;
/**
* Gets or Sets validityDayOfWeek
*/
@JsonAdapter(ValidityDayOfWeekEnum.Adapter.class)
public enum ValidityDayOfWeekEnum {
NUMBER_0(0),
NUMBER_1(1),
NUMBER_2(2),
NUMBER_3(3),
NUMBER_4(4),
NUMBER_5(5),
NUMBER_6(6);
private Integer value;
ValidityDayOfWeekEnum(Integer value) {
this.value = value;
}
public Integer getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ValidityDayOfWeekEnum fromValue(Integer value) {
for (ValidityDayOfWeekEnum b : ValidityDayOfWeekEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<ValidityDayOfWeekEnum> {
@Override
public void write(final JsonWriter jsonWriter, final ValidityDayOfWeekEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ValidityDayOfWeekEnum read(final JsonReader jsonReader) throws IOException {
Integer value = jsonReader.nextInt();
return ValidityDayOfWeekEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_VALIDITY_DAY_OF_WEEK = "validity_day_of_week";
@SerializedName(SERIALIZED_NAME_VALIDITY_DAY_OF_WEEK)
private List<ValidityDayOfWeekEnum> validityDayOfWeek;
public static final String SERIALIZED_NAME_VALIDITY_HOURS = "validity_hours";
@SerializedName(SERIALIZED_NAME_VALIDITY_HOURS)
private ValidityHours validityHours;
public static final String SERIALIZED_NAME_ACTIVE = "active";
@SerializedName(SERIALIZED_NAME_ACTIVE)
private Boolean active;
public static final String SERIALIZED_NAME_ADDITIONAL_INFO = "additional_info";
@SerializedName(SERIALIZED_NAME_ADDITIONAL_INFO)
private String additionalInfo;
public static final String SERIALIZED_NAME_METADATA = "metadata";
@SerializedName(SERIALIZED_NAME_METADATA)
private Map<String, Object> metadata;
public static final String SERIALIZED_NAME_ASSETS = "assets";
@SerializedName(SERIALIZED_NAME_ASSETS)
private VoucherAssets assets;
public static final String SERIALIZED_NAME_IS_REFERRAL_CODE = "is_referral_code";
@SerializedName(SERIALIZED_NAME_IS_REFERRAL_CODE)
private Boolean isReferralCode;
public static final String SERIALIZED_NAME_CREATED_AT = "created_at";
@SerializedName(SERIALIZED_NAME_CREATED_AT)
private OffsetDateTime createdAt;
public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at";
@SerializedName(SERIALIZED_NAME_UPDATED_AT)
private OffsetDateTime updatedAt;
public static final String SERIALIZED_NAME_HOLDER_ID = "holder_id";
@SerializedName(SERIALIZED_NAME_HOLDER_ID)
private String holderId;
public static final String SERIALIZED_NAME_REFERRER_ID = "referrer_id";
@SerializedName(SERIALIZED_NAME_REFERRER_ID)
private String referrerId;
public static final String SERIALIZED_NAME_OBJECT = "object";
@SerializedName(SERIALIZED_NAME_OBJECT)
private String _object = "voucher";
public static final String SERIALIZED_NAME_PUBLISH = "publish";
@SerializedName(SERIALIZED_NAME_PUBLISH)
private CampaignsVouchersCreateResponseBodyPublish publish;
public static final String SERIALIZED_NAME_REDEMPTION = "redemption";
@SerializedName(SERIALIZED_NAME_REDEMPTION)
private CampaignsVouchersCreateResponseBodyRedemption redemption;
public static final String SERIALIZED_NAME_CATEGORIES = "categories";
@SerializedName(SERIALIZED_NAME_CATEGORIES)
private List<Category> categories;
public static final String SERIALIZED_NAME_VALIDATION_RULES_ASSIGNMENTS = "validation_rules_assignments";
@SerializedName(SERIALIZED_NAME_VALIDATION_RULES_ASSIGNMENTS)
private ValidationRulesAssignmentsList validationRulesAssignments;
public CampaignsVouchersCreateResponseBody() {
}
public CampaignsVouchersCreateResponseBody id(String id) {
this.id = id;
return this;
}
/**
* Assigned by the Voucherify API, identifies the voucher.
* @return id
**/
@javax.annotation.Nullable
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public CampaignsVouchersCreateResponseBody code(String code) {
this.code = code;
return this;
}
/**
* A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.
* @return code
**/
@javax.annotation.Nullable
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public CampaignsVouchersCreateResponseBody campaign(String campaign) {
this.campaign = campaign;
return this;
}
/**
* A unique campaign name, identifies the voucher's parent campaign.
* @return campaign
**/
@javax.annotation.Nullable
public String getCampaign() {
return campaign;
}
public void setCampaign(String campaign) {
this.campaign = campaign;
}
public CampaignsVouchersCreateResponseBody campaignId(String campaignId) {
this.campaignId = campaignId;
return this;
}
/**
* Assigned by the Voucherify API, identifies the voucher's parent campaign.
* @return campaignId
**/
@javax.annotation.Nullable
public String getCampaignId() {
return campaignId;
}
public void setCampaignId(String campaignId) {
this.campaignId = campaignId;
}
public CampaignsVouchersCreateResponseBody category(String category) {
this.category = category;
return this;
}
/**
* Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.
* @return category
**/
@javax.annotation.Nullable
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public CampaignsVouchersCreateResponseBody categoryId(String categoryId) {
this.categoryId = categoryId;
return this;
}
/**
* Unique category ID assigned by Voucherify.
* @return categoryId
**/
@javax.annotation.Nullable
public String getCategoryId() {
return categoryId;
}
public void setCategoryId(String categoryId) {
this.categoryId = categoryId;
}
public CampaignsVouchersCreateResponseBody type(TypeEnum type) {
this.type = type;
return this;
}
/**
* Defines the type of the voucher.
* @return type
**/
@javax.annotation.Nullable
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
public CampaignsVouchersCreateResponseBody discount(Discount discount) {
this.discount = discount;
return this;
}
/**
* Get discount
* @return discount
**/
@javax.annotation.Nullable
public Discount getDiscount() {
return discount;
}
public void setDiscount(Discount discount) {
this.discount = discount;
}
public CampaignsVouchersCreateResponseBody gift(CampaignsVouchersCreateResponseBodyGift gift) {
this.gift = gift;
return this;
}
/**
* Get gift
* @return gift
**/
@javax.annotation.Nullable
public CampaignsVouchersCreateResponseBodyGift getGift() {
return gift;
}
public void setGift(CampaignsVouchersCreateResponseBodyGift gift) {
this.gift = gift;
}
public CampaignsVouchersCreateResponseBody loyaltyCard(CampaignsVouchersCreateResponseBodyLoyaltyCard loyaltyCard) {
this.loyaltyCard = loyaltyCard;
return this;
}
/**
* Get loyaltyCard
* @return loyaltyCard
**/
@javax.annotation.Nullable
public CampaignsVouchersCreateResponseBodyLoyaltyCard getLoyaltyCard() {
return loyaltyCard;
}
public void setLoyaltyCard(CampaignsVouchersCreateResponseBodyLoyaltyCard loyaltyCard) {
this.loyaltyCard = loyaltyCard;
}
public CampaignsVouchersCreateResponseBody startDate(OffsetDateTime startDate) {
this.startDate = startDate;
return this;
}
/**
* Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date.
* @return startDate
**/
@javax.annotation.Nullable
public OffsetDateTime getStartDate() {
return startDate;
}
public void setStartDate(OffsetDateTime startDate) {
this.startDate = startDate;
}
public CampaignsVouchersCreateResponseBody expirationDate(OffsetDateTime expirationDate) {
this.expirationDate = expirationDate;
return this;
}
/**
* Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date.
* @return expirationDate
**/
@javax.annotation.Nullable
public OffsetDateTime getExpirationDate() {
return expirationDate;
}
public void setExpirationDate(OffsetDateTime expirationDate) {
this.expirationDate = expirationDate;
}
public CampaignsVouchersCreateResponseBody validityTimeframe(ValidityTimeframe validityTimeframe) {
this.validityTimeframe = validityTimeframe;
return this;
}
/**
* Get validityTimeframe
* @return validityTimeframe
**/
@javax.annotation.Nullable
public ValidityTimeframe getValidityTimeframe() {
return validityTimeframe;
}
public void setValidityTimeframe(ValidityTimeframe validityTimeframe) {
this.validityTimeframe = validityTimeframe;
}
public CampaignsVouchersCreateResponseBody validityDayOfWeek(List<ValidityDayOfWeekEnum> validityDayOfWeek) {
this.validityDayOfWeek = validityDayOfWeek;
return this;
}
public CampaignsVouchersCreateResponseBody addValidityDayOfWeekItem(ValidityDayOfWeekEnum validityDayOfWeekItem) {
if (this.validityDayOfWeek == null) {
this.validityDayOfWeek = new ArrayList<>();
}
this.validityDayOfWeek.add(validityDayOfWeekItem);
return this;
}
/**
* Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
* @return validityDayOfWeek
**/
@javax.annotation.Nullable
public List<ValidityDayOfWeekEnum> getValidityDayOfWeek() {
return validityDayOfWeek;
}
public void setValidityDayOfWeek(List<ValidityDayOfWeekEnum> validityDayOfWeek) {
this.validityDayOfWeek = validityDayOfWeek;
}
public CampaignsVouchersCreateResponseBody validityHours(ValidityHours validityHours) {
this.validityHours = validityHours;
return this;
}
/**
* Get validityHours
* @return validityHours
**/
@javax.annotation.Nullable
public ValidityHours getValidityHours() {
return validityHours;
}
public void setValidityHours(ValidityHours validityHours) {
this.validityHours = validityHours;
}
public CampaignsVouchersCreateResponseBody active(Boolean active) {
this.active = active;
return this;
}
/**
* A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher
* @return active
**/
@javax.annotation.Nullable
public Boolean getActive() {
return active;
}
public void setActive(Boolean active) {
this.active = active;
}
public CampaignsVouchersCreateResponseBody additionalInfo(String additionalInfo) {
this.additionalInfo = additionalInfo;
return this;
}
/**
* An optional field to keep any extra textual information about the code such as a code description and details.
* @return additionalInfo
**/
@javax.annotation.Nullable
public String getAdditionalInfo() {
return additionalInfo;
}
public void setAdditionalInfo(String additionalInfo) {
this.additionalInfo = additionalInfo;
}
public CampaignsVouchersCreateResponseBody metadata(Map<String, Object> metadata) {
this.metadata = metadata;
return this;
}
/**
* The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format.
* @return metadata
**/
@javax.annotation.Nullable
public Map<String, Object> getMetadata() {
return metadata;
}
public void setMetadata(Map<String, Object> metadata) {
this.metadata = metadata;
}
public CampaignsVouchersCreateResponseBody assets(VoucherAssets assets) {
this.assets = assets;
return this;
}
/**
* Get assets
* @return assets
**/
@javax.annotation.Nullable
public VoucherAssets getAssets() {
return assets;
}
public void setAssets(VoucherAssets assets) {
this.assets = assets;
}
public CampaignsVouchersCreateResponseBody isReferralCode(Boolean isReferralCode) {
this.isReferralCode = isReferralCode;
return this;
}
/**
* Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.
* @return isReferralCode
**/
@javax.annotation.Nullable
public Boolean getIsReferralCode() {
return isReferralCode;
}
public void setIsReferralCode(Boolean isReferralCode) {
this.isReferralCode = isReferralCode;
}
public CampaignsVouchersCreateResponseBody createdAt(OffsetDateTime createdAt) {
this.createdAt = createdAt;
return this;
}
/**
* Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format.
* @return createdAt
**/
@javax.annotation.Nullable
public OffsetDateTime getCreatedAt() {
return createdAt;
}
public void setCreatedAt(OffsetDateTime createdAt) {
this.createdAt = createdAt;
}
public CampaignsVouchersCreateResponseBody updatedAt(OffsetDateTime updatedAt) {
this.updatedAt = updatedAt;
return this;
}
/**
* Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.
* @return updatedAt
**/
@javax.annotation.Nullable
public OffsetDateTime getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(OffsetDateTime updatedAt) {
this.updatedAt = updatedAt;
}
public CampaignsVouchersCreateResponseBody holderId(String holderId) {
this.holderId = holderId;
return this;
}
/**
* Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.
* @return holderId
**/
@javax.annotation.Nullable
public String getHolderId() {
return holderId;
}
public void setHolderId(String holderId) {
this.holderId = holderId;
}
public CampaignsVouchersCreateResponseBody referrerId(String referrerId) {
this.referrerId = referrerId;
return this;
}
/**
* Unique identifier of the referring person.
* @return referrerId
**/
@javax.annotation.Nullable
public String getReferrerId() {
return referrerId;
}
public void setReferrerId(String referrerId) {
this.referrerId = referrerId;
}
public CampaignsVouchersCreateResponseBody _object(String _object) {
this._object = _object;
return this;
}
/**
* The type of the object represented by JSON. Default is `voucher`.
* @return _object
**/
@javax.annotation.Nullable
public String getObject() {
return _object;
}
public void setObject(String _object) {
this._object = _object;
}
public CampaignsVouchersCreateResponseBody publish(CampaignsVouchersCreateResponseBodyPublish publish) {
this.publish = publish;
return this;
}
/**
* Get publish
* @return publish
**/
@javax.annotation.Nullable
public CampaignsVouchersCreateResponseBodyPublish getPublish() {
return publish;
}
public void setPublish(CampaignsVouchersCreateResponseBodyPublish publish) {
this.publish = publish;
}
public CampaignsVouchersCreateResponseBody redemption(CampaignsVouchersCreateResponseBodyRedemption redemption) {
this.redemption = redemption;
return this;
}
/**
* Get redemption
* @return redemption
**/
@javax.annotation.Nullable
public CampaignsVouchersCreateResponseBodyRedemption getRedemption() {
return redemption;
}
public void setRedemption(CampaignsVouchersCreateResponseBodyRedemption redemption) {
this.redemption = redemption;
}
public CampaignsVouchersCreateResponseBody categories(List<Category> categories) {
this.categories = categories;
return this;
}
public CampaignsVouchersCreateResponseBody addCategoriesItem(Category categoriesItem) {
if (this.categories == null) {
this.categories = new ArrayList<>();
}
this.categories.add(categoriesItem);
return this;
}
/**
* Contains details about the category.
* @return categories
**/
@javax.annotation.Nullable
public List<Category> getCategories() {
return categories;
}
public void setCategories(List<Category> categories) {
this.categories = categories;
}
public CampaignsVouchersCreateResponseBody validationRulesAssignments(ValidationRulesAssignmentsList validationRulesAssignments) {
this.validationRulesAssignments = validationRulesAssignments;
return this;
}
/**
* Get validationRulesAssignments
* @return validationRulesAssignments
**/
@javax.annotation.Nullable
public ValidationRulesAssignmentsList getValidationRulesAssignments() {
return validationRulesAssignments;
}
public void setValidationRulesAssignments(ValidationRulesAssignmentsList validationRulesAssignments) {
this.validationRulesAssignments = validationRulesAssignments;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CampaignsVouchersCreateResponseBody campaignsVouchersCreateResponseBody = (CampaignsVouchersCreateResponseBody) o;
return Objects.equals(this.id, campaignsVouchersCreateResponseBody.id) &&
Objects.equals(this.code, campaignsVouchersCreateResponseBody.code) &&
Objects.equals(this.campaign, campaignsVouchersCreateResponseBody.campaign) &&
Objects.equals(this.campaignId, campaignsVouchersCreateResponseBody.campaignId) &&
Objects.equals(this.category, campaignsVouchersCreateResponseBody.category) &&
Objects.equals(this.categoryId, campaignsVouchersCreateResponseBody.categoryId) &&
Objects.equals(this.type, campaignsVouchersCreateResponseBody.type) &&
Objects.equals(this.discount, campaignsVouchersCreateResponseBody.discount) &&
Objects.equals(this.gift, campaignsVouchersCreateResponseBody.gift) &&
Objects.equals(this.loyaltyCard, campaignsVouchersCreateResponseBody.loyaltyCard) &&
Objects.equals(this.startDate, campaignsVouchersCreateResponseBody.startDate) &&
Objects.equals(this.expirationDate, campaignsVouchersCreateResponseBody.expirationDate) &&
Objects.equals(this.validityTimeframe, campaignsVouchersCreateResponseBody.validityTimeframe) &&
Objects.equals(this.validityDayOfWeek, campaignsVouchersCreateResponseBody.validityDayOfWeek) &&
Objects.equals(this.validityHours, campaignsVouchersCreateResponseBody.validityHours) &&
Objects.equals(this.active, campaignsVouchersCreateResponseBody.active) &&
Objects.equals(this.additionalInfo, campaignsVouchersCreateResponseBody.additionalInfo) &&
Objects.equals(this.metadata, campaignsVouchersCreateResponseBody.metadata) &&
Objects.equals(this.assets, campaignsVouchersCreateResponseBody.assets) &&
Objects.equals(this.isReferralCode, campaignsVouchersCreateResponseBody.isReferralCode) &&
Objects.equals(this.createdAt, campaignsVouchersCreateResponseBody.createdAt) &&
Objects.equals(this.updatedAt, campaignsVouchersCreateResponseBody.updatedAt) &&
Objects.equals(this.holderId, campaignsVouchersCreateResponseBody.holderId) &&
Objects.equals(this.referrerId, campaignsVouchersCreateResponseBody.referrerId) &&
Objects.equals(this._object, campaignsVouchersCreateResponseBody._object) &&
Objects.equals(this.publish, campaignsVouchersCreateResponseBody.publish) &&
Objects.equals(this.redemption, campaignsVouchersCreateResponseBody.redemption) &&
Objects.equals(this.categories, campaignsVouchersCreateResponseBody.categories) &&
Objects.equals(this.validationRulesAssignments, campaignsVouchersCreateResponseBody.validationRulesAssignments);
}
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}
@Override
public int hashCode() {
return Objects.hash(id, code, campaign, campaignId, category, categoryId, type, discount, gift, loyaltyCard, startDate, expirationDate, validityTimeframe, validityDayOfWeek, validityHours, active, additionalInfo, metadata, assets, isReferralCode, createdAt, updatedAt, holderId, referrerId, _object, publish, redemption, categories, validationRulesAssignments);
}
private static <T> int hashCodeNullable(JsonNullable<T> a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CampaignsVouchersCreateResponseBody {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" campaign: ").append(toIndentedString(campaign)).append("\n");
sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" categoryId: ").append(toIndentedString(categoryId)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" discount: ").append(toIndentedString(discount)).append("\n");
sb.append(" gift: ").append(toIndentedString(gift)).append("\n");
sb.append(" loyaltyCard: ").append(toIndentedString(loyaltyCard)).append("\n");
sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n");
sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n");
sb.append(" validityTimeframe: ").append(toIndentedString(validityTimeframe)).append("\n");
sb.append(" validityDayOfWeek: ").append(toIndentedString(validityDayOfWeek)).append("\n");
sb.append(" validityHours: ").append(toIndentedString(validityHours)).append("\n");
sb.append(" active: ").append(toIndentedString(active)).append("\n");
sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n");
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
sb.append(" assets: ").append(toIndentedString(assets)).append("\n");
sb.append(" isReferralCode: ").append(toIndentedString(isReferralCode)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");