Subversion Repositories SmartDukaan

Rev

Rev 571 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 571 Rev 771
Line 26... Line 26...
26
public class Widget implements TBase<Widget._Fields>, java.io.Serializable, Cloneable, Comparable<Widget> {
26
public class Widget implements TBase<Widget._Fields>, java.io.Serializable, Cloneable, Comparable<Widget> {
27
  private static final TStruct STRUCT_DESC = new TStruct("Widget");
27
  private static final TStruct STRUCT_DESC = new TStruct("Widget");
28
 
28
 
29
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
29
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
30
  private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)2);
30
  private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)2);
31
  private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)3);
31
  private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)3);
32
  private static final TField ITEMS_FIELD_DESC = new TField("items", TType.LIST, (short)4);
32
  private static final TField ITEMS_FIELD_DESC = new TField("items", TType.LIST, (short)4);
33
  private static final TField ENABLED_FIELD_DESC = new TField("enabled", TType.BOOL, (short)5);
33
  private static final TField ENABLED_FIELD_DESC = new TField("enabled", TType.BOOL, (short)5);
34
  private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)6);
34
  private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)6);
35
  private static final TField SESSION_ID_FIELD_DESC = new TField("session_id", TType.BOOL, (short)7);
-
 
36
 
35
 
37
  private long id;
36
  private long id;
38
  private WidgetType type;
37
  private WidgetType type;
39
  private long customer_id;
38
  private long user_id;
40
  private List<WidgetItem> items;
39
  private List<WidgetItem> items;
41
  private boolean enabled;
40
  private boolean enabled;
42
  private String name;
41
  private String name;
43
  private boolean session_id;
-
 
44
 
42
 
45
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
43
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
46
  public enum _Fields implements TFieldIdEnum {
44
  public enum _Fields implements TFieldIdEnum {
47
    ID((short)1, "id"),
45
    ID((short)1, "id"),
48
    /**
46
    /**
49
     * 
47
     * 
50
     * @see WidgetType
48
     * @see WidgetType
51
     */
49
     */
52
    TYPE((short)2, "type"),
50
    TYPE((short)2, "type"),
53
    CUSTOMER_ID((short)3, "customer_id"),
51
    USER_ID((short)3, "user_id"),
54
    ITEMS((short)4, "items"),
52
    ITEMS((short)4, "items"),
55
    ENABLED((short)5, "enabled"),
53
    ENABLED((short)5, "enabled"),
56
    NAME((short)6, "name"),
54
    NAME((short)6, "name");
57
    SESSION_ID((short)7, "session_id");
-
 
58
 
55
 
59
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
56
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
60
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
57
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
61
 
58
 
62
    static {
59
    static {
Line 107... Line 104...
107
    }
104
    }
108
  }
105
  }
109
 
106
 
110
  // isset id assignments
107
  // isset id assignments
111
  private static final int __ID_ISSET_ID = 0;
108
  private static final int __ID_ISSET_ID = 0;
112
  private static final int __CUSTOMER_ID_ISSET_ID = 1;
109
  private static final int __USER_ID_ISSET_ID = 1;
113
  private static final int __ENABLED_ISSET_ID = 2;
110
  private static final int __ENABLED_ISSET_ID = 2;
114
  private static final int __SESSION_ID_ISSET_ID = 3;
-
 
115
  private BitSet __isset_bit_vector = new BitSet(4);
111
  private BitSet __isset_bit_vector = new BitSet(3);
116
 
112
 
117
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
113
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
118
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
114
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
119
        new FieldValueMetaData(TType.I64)));
115
        new FieldValueMetaData(TType.I64)));
120
    put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
116
    put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
121
        new EnumMetaData(TType.ENUM, WidgetType.class)));
117
        new EnumMetaData(TType.ENUM, WidgetType.class)));
122
    put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
118
    put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
123
        new FieldValueMetaData(TType.I64)));
119
        new FieldValueMetaData(TType.I64)));
124
    put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
120
    put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
125
        new ListMetaData(TType.LIST, 
121
        new ListMetaData(TType.LIST, 
126
            new StructMetaData(TType.STRUCT, WidgetItem.class))));
122
            new StructMetaData(TType.STRUCT, WidgetItem.class))));
127
    put(_Fields.ENABLED, new FieldMetaData("enabled", TFieldRequirementType.DEFAULT, 
123
    put(_Fields.ENABLED, new FieldMetaData("enabled", TFieldRequirementType.DEFAULT, 
128
        new FieldValueMetaData(TType.BOOL)));
124
        new FieldValueMetaData(TType.BOOL)));
129
    put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, 
125
    put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, 
130
        new FieldValueMetaData(TType.STRING)));
126
        new FieldValueMetaData(TType.STRING)));
131
    put(_Fields.SESSION_ID, new FieldMetaData("session_id", TFieldRequirementType.DEFAULT, 
-
 
132
        new FieldValueMetaData(TType.BOOL)));
-
 
133
  }});
127
  }});
134
 
128
 
135
  static {
129
  static {
136
    FieldMetaData.addStructMetaDataMap(Widget.class, metaDataMap);
130
    FieldMetaData.addStructMetaDataMap(Widget.class, metaDataMap);
137
  }
131
  }
Line 140... Line 134...
140
  }
134
  }
141
 
135
 
142
  public Widget(
136
  public Widget(
143
    long id,
137
    long id,
144
    WidgetType type,
138
    WidgetType type,
145
    long customer_id,
139
    long user_id,
146
    List<WidgetItem> items,
140
    List<WidgetItem> items,
147
    boolean enabled,
141
    boolean enabled,
148
    String name,
142
    String name)
149
    boolean session_id)
-
 
150
  {
143
  {
151
    this();
144
    this();
152
    this.id = id;
145
    this.id = id;
153
    setIdIsSet(true);
146
    setIdIsSet(true);
154
    this.type = type;
147
    this.type = type;
155
    this.customer_id = customer_id;
148
    this.user_id = user_id;
156
    setCustomer_idIsSet(true);
149
    setUser_idIsSet(true);
157
    this.items = items;
150
    this.items = items;
158
    this.enabled = enabled;
151
    this.enabled = enabled;
159
    setEnabledIsSet(true);
152
    setEnabledIsSet(true);
160
    this.name = name;
153
    this.name = name;
161
    this.session_id = session_id;
-
 
162
    setSession_idIsSet(true);
-
 
163
  }
154
  }
164
 
155
 
165
  /**
156
  /**
166
   * Performs a deep copy on <i>other</i>.
157
   * Performs a deep copy on <i>other</i>.
167
   */
158
   */
Line 170... Line 161...
170
    __isset_bit_vector.or(other.__isset_bit_vector);
161
    __isset_bit_vector.or(other.__isset_bit_vector);
171
    this.id = other.id;
162
    this.id = other.id;
172
    if (other.isSetType()) {
163
    if (other.isSetType()) {
173
      this.type = other.type;
164
      this.type = other.type;
174
    }
165
    }
175
    this.customer_id = other.customer_id;
166
    this.user_id = other.user_id;
176
    if (other.isSetItems()) {
167
    if (other.isSetItems()) {
177
      List<WidgetItem> __this__items = new ArrayList<WidgetItem>();
168
      List<WidgetItem> __this__items = new ArrayList<WidgetItem>();
178
      for (WidgetItem other_element : other.items) {
169
      for (WidgetItem other_element : other.items) {
179
        __this__items.add(new WidgetItem(other_element));
170
        __this__items.add(new WidgetItem(other_element));
180
      }
171
      }
Line 182... Line 173...
182
    }
173
    }
183
    this.enabled = other.enabled;
174
    this.enabled = other.enabled;
184
    if (other.isSetName()) {
175
    if (other.isSetName()) {
185
      this.name = other.name;
176
      this.name = other.name;
186
    }
177
    }
187
    this.session_id = other.session_id;
-
 
188
  }
178
  }
189
 
179
 
190
  public Widget deepCopy() {
180
  public Widget deepCopy() {
191
    return new Widget(this);
181
    return new Widget(this);
192
  }
182
  }
Line 249... Line 239...
249
    if (!value) {
239
    if (!value) {
250
      this.type = null;
240
      this.type = null;
251
    }
241
    }
252
  }
242
  }
253
 
243
 
254
  public long getCustomer_id() {
244
  public long getUser_id() {
255
    return this.customer_id;
245
    return this.user_id;
256
  }
246
  }
257
 
247
 
258
  public Widget setCustomer_id(long customer_id) {
248
  public Widget setUser_id(long user_id) {
259
    this.customer_id = customer_id;
249
    this.user_id = user_id;
260
    setCustomer_idIsSet(true);
250
    setUser_idIsSet(true);
261
    return this;
251
    return this;
262
  }
252
  }
263
 
253
 
264
  public void unsetCustomer_id() {
254
  public void unsetUser_id() {
265
    __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
255
    __isset_bit_vector.clear(__USER_ID_ISSET_ID);
266
  }
256
  }
267
 
257
 
268
  /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
258
  /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
269
  public boolean isSetCustomer_id() {
259
  public boolean isSetUser_id() {
270
    return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
260
    return __isset_bit_vector.get(__USER_ID_ISSET_ID);
271
  }
261
  }
272
 
262
 
273
  public void setCustomer_idIsSet(boolean value) {
263
  public void setUser_idIsSet(boolean value) {
274
    __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
264
    __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
275
  }
265
  }
276
 
266
 
277
  public int getItemsSize() {
267
  public int getItemsSize() {
278
    return (this.items == null) ? 0 : this.items.size();
268
    return (this.items == null) ? 0 : this.items.size();
279
  }
269
  }
Line 358... Line 348...
358
    if (!value) {
348
    if (!value) {
359
      this.name = null;
349
      this.name = null;
360
    }
350
    }
361
  }
351
  }
362
 
352
 
363
  public boolean isSession_id() {
-
 
364
    return this.session_id;
-
 
365
  }
-
 
366
 
-
 
367
  public Widget setSession_id(boolean session_id) {
-
 
368
    this.session_id = session_id;
-
 
369
    setSession_idIsSet(true);
-
 
370
    return this;
-
 
371
  }
-
 
372
 
-
 
373
  public void unsetSession_id() {
-
 
374
    __isset_bit_vector.clear(__SESSION_ID_ISSET_ID);
-
 
375
  }
-
 
376
 
-
 
377
  /** Returns true if field session_id is set (has been asigned a value) and false otherwise */
-
 
378
  public boolean isSetSession_id() {
-
 
379
    return __isset_bit_vector.get(__SESSION_ID_ISSET_ID);
-
 
380
  }
-
 
381
 
-
 
382
  public void setSession_idIsSet(boolean value) {
-
 
383
    __isset_bit_vector.set(__SESSION_ID_ISSET_ID, value);
-
 
384
  }
-
 
385
 
-
 
386
  public void setFieldValue(_Fields field, Object value) {
353
  public void setFieldValue(_Fields field, Object value) {
387
    switch (field) {
354
    switch (field) {
388
    case ID:
355
    case ID:
389
      if (value == null) {
356
      if (value == null) {
390
        unsetId();
357
        unsetId();
Line 399... Line 366...
399
      } else {
366
      } else {
400
        setType((WidgetType)value);
367
        setType((WidgetType)value);
401
      }
368
      }
402
      break;
369
      break;
403
 
370
 
404
    case CUSTOMER_ID:
371
    case USER_ID:
405
      if (value == null) {
372
      if (value == null) {
406
        unsetCustomer_id();
373
        unsetUser_id();
407
      } else {
374
      } else {
408
        setCustomer_id((Long)value);
375
        setUser_id((Long)value);
409
      }
376
      }
410
      break;
377
      break;
411
 
378
 
412
    case ITEMS:
379
    case ITEMS:
413
      if (value == null) {
380
      if (value == null) {
Line 431... Line 398...
431
      } else {
398
      } else {
432
        setName((String)value);
399
        setName((String)value);
433
      }
400
      }
434
      break;
401
      break;
435
 
402
 
436
    case SESSION_ID:
-
 
437
      if (value == null) {
-
 
438
        unsetSession_id();
-
 
439
      } else {
-
 
440
        setSession_id((Boolean)value);
-
 
441
      }
-
 
442
      break;
-
 
443
 
-
 
444
    }
403
    }
445
  }
404
  }
446
 
405
 
447
  public void setFieldValue(int fieldID, Object value) {
406
  public void setFieldValue(int fieldID, Object value) {
448
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
407
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 454... Line 413...
454
      return new Long(getId());
413
      return new Long(getId());
455
 
414
 
456
    case TYPE:
415
    case TYPE:
457
      return getType();
416
      return getType();
458
 
417
 
459
    case CUSTOMER_ID:
418
    case USER_ID:
460
      return new Long(getCustomer_id());
419
      return new Long(getUser_id());
461
 
420
 
462
    case ITEMS:
421
    case ITEMS:
463
      return getItems();
422
      return getItems();
464
 
423
 
465
    case ENABLED:
424
    case ENABLED:
466
      return new Boolean(isEnabled());
425
      return new Boolean(isEnabled());
467
 
426
 
468
    case NAME:
427
    case NAME:
469
      return getName();
428
      return getName();
470
 
429
 
471
    case SESSION_ID:
-
 
472
      return new Boolean(isSession_id());
-
 
473
 
-
 
474
    }
430
    }
475
    throw new IllegalStateException();
431
    throw new IllegalStateException();
476
  }
432
  }
477
 
433
 
478
  public Object getFieldValue(int fieldId) {
434
  public Object getFieldValue(int fieldId) {
Line 484... Line 440...
484
    switch (field) {
440
    switch (field) {
485
    case ID:
441
    case ID:
486
      return isSetId();
442
      return isSetId();
487
    case TYPE:
443
    case TYPE:
488
      return isSetType();
444
      return isSetType();
489
    case CUSTOMER_ID:
445
    case USER_ID:
490
      return isSetCustomer_id();
446
      return isSetUser_id();
491
    case ITEMS:
447
    case ITEMS:
492
      return isSetItems();
448
      return isSetItems();
493
    case ENABLED:
449
    case ENABLED:
494
      return isSetEnabled();
450
      return isSetEnabled();
495
    case NAME:
451
    case NAME:
496
      return isSetName();
452
      return isSetName();
497
    case SESSION_ID:
-
 
498
      return isSetSession_id();
-
 
499
    }
453
    }
500
    throw new IllegalStateException();
454
    throw new IllegalStateException();
501
  }
455
  }
502
 
456
 
503
  public boolean isSet(int fieldID) {
457
  public boolean isSet(int fieldID) {
Line 533... Line 487...
533
        return false;
487
        return false;
534
      if (!this.type.equals(that.type))
488
      if (!this.type.equals(that.type))
535
        return false;
489
        return false;
536
    }
490
    }
537
 
491
 
538
    boolean this_present_customer_id = true;
492
    boolean this_present_user_id = true;
539
    boolean that_present_customer_id = true;
493
    boolean that_present_user_id = true;
540
    if (this_present_customer_id || that_present_customer_id) {
494
    if (this_present_user_id || that_present_user_id) {
541
      if (!(this_present_customer_id && that_present_customer_id))
495
      if (!(this_present_user_id && that_present_user_id))
542
        return false;
496
        return false;
543
      if (this.customer_id != that.customer_id)
497
      if (this.user_id != that.user_id)
544
        return false;
498
        return false;
545
    }
499
    }
546
 
500
 
547
    boolean this_present_items = true && this.isSetItems();
501
    boolean this_present_items = true && this.isSetItems();
548
    boolean that_present_items = true && that.isSetItems();
502
    boolean that_present_items = true && that.isSetItems();
Line 569... Line 523...
569
        return false;
523
        return false;
570
      if (!this.name.equals(that.name))
524
      if (!this.name.equals(that.name))
571
        return false;
525
        return false;
572
    }
526
    }
573
 
527
 
574
    boolean this_present_session_id = true;
-
 
575
    boolean that_present_session_id = true;
-
 
576
    if (this_present_session_id || that_present_session_id) {
-
 
577
      if (!(this_present_session_id && that_present_session_id))
-
 
578
        return false;
-
 
579
      if (this.session_id != that.session_id)
-
 
580
        return false;
-
 
581
    }
-
 
582
 
-
 
583
    return true;
528
    return true;
584
  }
529
  }
585
 
530
 
586
  @Override
531
  @Override
587
  public int hashCode() {
532
  public int hashCode() {
Line 610... Line 555...
610
    }
555
    }
611
    lastComparison = TBaseHelper.compareTo(type, typedOther.type);
556
    lastComparison = TBaseHelper.compareTo(type, typedOther.type);
612
    if (lastComparison != 0) {
557
    if (lastComparison != 0) {
613
      return lastComparison;
558
      return lastComparison;
614
    }
559
    }
615
    lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
560
    lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
616
    if (lastComparison != 0) {
561
    if (lastComparison != 0) {
617
      return lastComparison;
562
      return lastComparison;
618
    }
563
    }
619
    lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
564
    lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
620
    if (lastComparison != 0) {
565
    if (lastComparison != 0) {
621
      return lastComparison;
566
      return lastComparison;
622
    }
567
    }
623
    lastComparison = Boolean.valueOf(isSetItems()).compareTo(isSetItems());
568
    lastComparison = Boolean.valueOf(isSetItems()).compareTo(isSetItems());
624
    if (lastComparison != 0) {
569
    if (lastComparison != 0) {
Line 642... Line 587...
642
    }
587
    }
643
    lastComparison = TBaseHelper.compareTo(name, typedOther.name);
588
    lastComparison = TBaseHelper.compareTo(name, typedOther.name);
644
    if (lastComparison != 0) {
589
    if (lastComparison != 0) {
645
      return lastComparison;
590
      return lastComparison;
646
    }
591
    }
647
    lastComparison = Boolean.valueOf(isSetSession_id()).compareTo(isSetSession_id());
-
 
648
    if (lastComparison != 0) {
-
 
649
      return lastComparison;
-
 
650
    }
-
 
651
    lastComparison = TBaseHelper.compareTo(session_id, typedOther.session_id);
-
 
652
    if (lastComparison != 0) {
-
 
653
      return lastComparison;
-
 
654
    }
-
 
655
    return 0;
592
    return 0;
656
  }
593
  }
657
 
594
 
658
  public void read(TProtocol iprot) throws TException {
595
  public void read(TProtocol iprot) throws TException {
659
    TField field;
596
    TField field;
Line 682... Line 619...
682
              this.type = WidgetType.findByValue(iprot.readI32());
619
              this.type = WidgetType.findByValue(iprot.readI32());
683
            } else { 
620
            } else { 
684
              TProtocolUtil.skip(iprot, field.type);
621
              TProtocolUtil.skip(iprot, field.type);
685
            }
622
            }
686
            break;
623
            break;
687
          case CUSTOMER_ID:
624
          case USER_ID:
688
            if (field.type == TType.I64) {
625
            if (field.type == TType.I64) {
689
              this.customer_id = iprot.readI64();
626
              this.user_id = iprot.readI64();
690
              setCustomer_idIsSet(true);
627
              setUser_idIsSet(true);
691
            } else { 
628
            } else { 
692
              TProtocolUtil.skip(iprot, field.type);
629
              TProtocolUtil.skip(iprot, field.type);
693
            }
630
            }
694
            break;
631
            break;
695
          case ITEMS:
632
          case ITEMS:
696
            if (field.type == TType.LIST) {
633
            if (field.type == TType.LIST) {
697
              {
634
              {
698
                TList _list17 = iprot.readListBegin();
635
                TList _list12 = iprot.readListBegin();
699
                this.items = new ArrayList<WidgetItem>(_list17.size);
636
                this.items = new ArrayList<WidgetItem>(_list12.size);
700
                for (int _i18 = 0; _i18 < _list17.size; ++_i18)
637
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
701
                {
638
                {
702
                  WidgetItem _elem19;
639
                  WidgetItem _elem14;
703
                  _elem19 = new WidgetItem();
640
                  _elem14 = new WidgetItem();
704
                  _elem19.read(iprot);
641
                  _elem14.read(iprot);
705
                  this.items.add(_elem19);
642
                  this.items.add(_elem14);
706
                }
643
                }
707
                iprot.readListEnd();
644
                iprot.readListEnd();
708
              }
645
              }
709
            } else { 
646
            } else { 
710
              TProtocolUtil.skip(iprot, field.type);
647
              TProtocolUtil.skip(iprot, field.type);
Line 723... Line 660...
723
              this.name = iprot.readString();
660
              this.name = iprot.readString();
724
            } else { 
661
            } else { 
725
              TProtocolUtil.skip(iprot, field.type);
662
              TProtocolUtil.skip(iprot, field.type);
726
            }
663
            }
727
            break;
664
            break;
728
          case SESSION_ID:
-
 
729
            if (field.type == TType.BOOL) {
-
 
730
              this.session_id = iprot.readBool();
-
 
731
              setSession_idIsSet(true);
-
 
732
            } else { 
-
 
733
              TProtocolUtil.skip(iprot, field.type);
-
 
734
            }
-
 
735
            break;
-
 
736
        }
665
        }
737
        iprot.readFieldEnd();
666
        iprot.readFieldEnd();
738
      }
667
      }
739
    }
668
    }
740
    iprot.readStructEnd();
669
    iprot.readStructEnd();
Line 751... Line 680...
751
    if (this.type != null) {
680
    if (this.type != null) {
752
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
681
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
753
      oprot.writeI32(this.type.getValue());
682
      oprot.writeI32(this.type.getValue());
754
      oprot.writeFieldEnd();
683
      oprot.writeFieldEnd();
755
    }
684
    }
756
    oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
685
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
757
    oprot.writeI64(this.customer_id);
686
    oprot.writeI64(this.user_id);
758
    oprot.writeFieldEnd();
687
    oprot.writeFieldEnd();
759
    if (this.items != null) {
688
    if (this.items != null) {
760
      oprot.writeFieldBegin(ITEMS_FIELD_DESC);
689
      oprot.writeFieldBegin(ITEMS_FIELD_DESC);
761
      {
690
      {
762
        oprot.writeListBegin(new TList(TType.STRUCT, this.items.size()));
691
        oprot.writeListBegin(new TList(TType.STRUCT, this.items.size()));
763
        for (WidgetItem _iter20 : this.items)
692
        for (WidgetItem _iter15 : this.items)
764
        {
693
        {
765
          _iter20.write(oprot);
694
          _iter15.write(oprot);
766
        }
695
        }
767
        oprot.writeListEnd();
696
        oprot.writeListEnd();
768
      }
697
      }
769
      oprot.writeFieldEnd();
698
      oprot.writeFieldEnd();
770
    }
699
    }
Line 774... Line 703...
774
    if (this.name != null) {
703
    if (this.name != null) {
775
      oprot.writeFieldBegin(NAME_FIELD_DESC);
704
      oprot.writeFieldBegin(NAME_FIELD_DESC);
776
      oprot.writeString(this.name);
705
      oprot.writeString(this.name);
777
      oprot.writeFieldEnd();
706
      oprot.writeFieldEnd();
778
    }
707
    }
779
    oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
-
 
780
    oprot.writeBool(this.session_id);
-
 
781
    oprot.writeFieldEnd();
-
 
782
    oprot.writeFieldStop();
708
    oprot.writeFieldStop();
783
    oprot.writeStructEnd();
709
    oprot.writeStructEnd();
784
  }
710
  }
785
 
711
 
786
  @Override
712
  @Override
Line 806... Line 732...
806
        sb.append(")");
732
        sb.append(")");
807
      }
733
      }
808
    }
734
    }
809
    first = false;
735
    first = false;
810
    if (!first) sb.append(", ");
736
    if (!first) sb.append(", ");
811
    sb.append("customer_id:");
737
    sb.append("user_id:");
812
    sb.append(this.customer_id);
738
    sb.append(this.user_id);
813
    first = false;
739
    first = false;
814
    if (!first) sb.append(", ");
740
    if (!first) sb.append(", ");
815
    sb.append("items:");
741
    sb.append("items:");
816
    if (this.items == null) {
742
    if (this.items == null) {
817
      sb.append("null");
743
      sb.append("null");
Line 829... Line 755...
829
      sb.append("null");
755
      sb.append("null");
830
    } else {
756
    } else {
831
      sb.append(this.name);
757
      sb.append(this.name);
832
    }
758
    }
833
    first = false;
759
    first = false;
834
    if (!first) sb.append(", ");
-
 
835
    sb.append("session_id:");
-
 
836
    sb.append(this.session_id);
-
 
837
    first = false;
-
 
838
    sb.append(")");
760
    sb.append(")");
839
    return sb.toString();
761
    return sb.toString();
840
  }
762
  }
841
 
763
 
842
  public void validate() throws TException {
764
  public void validate() throws TException {