Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
553 chandransh 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.user;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class Widget implements TBase<Widget._Fields>, java.io.Serializable, Cloneable, Comparable<Widget> {
27
  private static final TStruct STRUCT_DESC = new TStruct("Widget");
28
 
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);
771 rajveer 31
  private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)3);
553 chandransh 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);
34
  private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)6);
35
 
36
  private long id;
37
  private WidgetType type;
771 rajveer 38
  private long user_id;
553 chandransh 39
  private List<WidgetItem> items;
40
  private boolean enabled;
41
  private String name;
42
 
43
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
44
  public enum _Fields implements TFieldIdEnum {
45
    ID((short)1, "id"),
46
    /**
47
     * 
48
     * @see WidgetType
49
     */
50
    TYPE((short)2, "type"),
771 rajveer 51
    USER_ID((short)3, "user_id"),
553 chandransh 52
    ITEMS((short)4, "items"),
53
    ENABLED((short)5, "enabled"),
771 rajveer 54
    NAME((short)6, "name");
553 chandransh 55
 
56
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
57
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
58
 
59
    static {
60
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
61
        byId.put((int)field._thriftId, field);
62
        byName.put(field.getFieldName(), field);
63
      }
64
    }
65
 
66
    /**
67
     * Find the _Fields constant that matches fieldId, or null if its not found.
68
     */
69
    public static _Fields findByThriftId(int fieldId) {
70
      return byId.get(fieldId);
71
    }
72
 
73
    /**
74
     * Find the _Fields constant that matches fieldId, throwing an exception
75
     * if it is not found.
76
     */
77
    public static _Fields findByThriftIdOrThrow(int fieldId) {
78
      _Fields fields = findByThriftId(fieldId);
79
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
80
      return fields;
81
    }
82
 
83
    /**
84
     * Find the _Fields constant that matches name, or null if its not found.
85
     */
86
    public static _Fields findByName(String name) {
87
      return byName.get(name);
88
    }
89
 
90
    private final short _thriftId;
91
    private final String _fieldName;
92
 
93
    _Fields(short thriftId, String fieldName) {
94
      _thriftId = thriftId;
95
      _fieldName = fieldName;
96
    }
97
 
98
    public short getThriftFieldId() {
99
      return _thriftId;
100
    }
101
 
102
    public String getFieldName() {
103
      return _fieldName;
104
    }
105
  }
106
 
107
  // isset id assignments
108
  private static final int __ID_ISSET_ID = 0;
771 rajveer 109
  private static final int __USER_ID_ISSET_ID = 1;
553 chandransh 110
  private static final int __ENABLED_ISSET_ID = 2;
771 rajveer 111
  private BitSet __isset_bit_vector = new BitSet(3);
553 chandransh 112
 
113
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
114
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
115
        new FieldValueMetaData(TType.I64)));
116
    put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
117
        new EnumMetaData(TType.ENUM, WidgetType.class)));
771 rajveer 118
    put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
553 chandransh 119
        new FieldValueMetaData(TType.I64)));
120
    put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
121
        new ListMetaData(TType.LIST, 
122
            new StructMetaData(TType.STRUCT, WidgetItem.class))));
123
    put(_Fields.ENABLED, new FieldMetaData("enabled", TFieldRequirementType.DEFAULT, 
124
        new FieldValueMetaData(TType.BOOL)));
125
    put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, 
126
        new FieldValueMetaData(TType.STRING)));
127
  }});
128
 
129
  static {
130
    FieldMetaData.addStructMetaDataMap(Widget.class, metaDataMap);
131
  }
132
 
133
  public Widget() {
134
  }
135
 
136
  public Widget(
137
    long id,
138
    WidgetType type,
771 rajveer 139
    long user_id,
553 chandransh 140
    List<WidgetItem> items,
141
    boolean enabled,
771 rajveer 142
    String name)
553 chandransh 143
  {
144
    this();
145
    this.id = id;
146
    setIdIsSet(true);
147
    this.type = type;
771 rajveer 148
    this.user_id = user_id;
149
    setUser_idIsSet(true);
553 chandransh 150
    this.items = items;
151
    this.enabled = enabled;
152
    setEnabledIsSet(true);
153
    this.name = name;
154
  }
155
 
156
  /**
157
   * Performs a deep copy on <i>other</i>.
158
   */
159
  public Widget(Widget other) {
160
    __isset_bit_vector.clear();
161
    __isset_bit_vector.or(other.__isset_bit_vector);
162
    this.id = other.id;
163
    if (other.isSetType()) {
164
      this.type = other.type;
165
    }
771 rajveer 166
    this.user_id = other.user_id;
553 chandransh 167
    if (other.isSetItems()) {
168
      List<WidgetItem> __this__items = new ArrayList<WidgetItem>();
169
      for (WidgetItem other_element : other.items) {
170
        __this__items.add(new WidgetItem(other_element));
171
      }
172
      this.items = __this__items;
173
    }
174
    this.enabled = other.enabled;
175
    if (other.isSetName()) {
176
      this.name = other.name;
177
    }
178
  }
179
 
180
  public Widget deepCopy() {
181
    return new Widget(this);
182
  }
183
 
184
  @Deprecated
185
  public Widget clone() {
186
    return new Widget(this);
187
  }
188
 
189
  public long getId() {
190
    return this.id;
191
  }
192
 
193
  public Widget setId(long id) {
194
    this.id = id;
195
    setIdIsSet(true);
196
    return this;
197
  }
198
 
199
  public void unsetId() {
200
    __isset_bit_vector.clear(__ID_ISSET_ID);
201
  }
202
 
203
  /** Returns true if field id is set (has been asigned a value) and false otherwise */
204
  public boolean isSetId() {
205
    return __isset_bit_vector.get(__ID_ISSET_ID);
206
  }
207
 
208
  public void setIdIsSet(boolean value) {
209
    __isset_bit_vector.set(__ID_ISSET_ID, value);
210
  }
211
 
212
  /**
213
   * 
214
   * @see WidgetType
215
   */
216
  public WidgetType getType() {
217
    return this.type;
218
  }
219
 
220
  /**
221
   * 
222
   * @see WidgetType
223
   */
224
  public Widget setType(WidgetType type) {
225
    this.type = type;
226
    return this;
227
  }
228
 
229
  public void unsetType() {
230
    this.type = null;
231
  }
232
 
233
  /** Returns true if field type is set (has been asigned a value) and false otherwise */
234
  public boolean isSetType() {
235
    return this.type != null;
236
  }
237
 
238
  public void setTypeIsSet(boolean value) {
239
    if (!value) {
240
      this.type = null;
241
    }
242
  }
243
 
771 rajveer 244
  public long getUser_id() {
245
    return this.user_id;
553 chandransh 246
  }
247
 
771 rajveer 248
  public Widget setUser_id(long user_id) {
249
    this.user_id = user_id;
250
    setUser_idIsSet(true);
553 chandransh 251
    return this;
252
  }
253
 
771 rajveer 254
  public void unsetUser_id() {
255
    __isset_bit_vector.clear(__USER_ID_ISSET_ID);
553 chandransh 256
  }
257
 
771 rajveer 258
  /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
259
  public boolean isSetUser_id() {
260
    return __isset_bit_vector.get(__USER_ID_ISSET_ID);
553 chandransh 261
  }
262
 
771 rajveer 263
  public void setUser_idIsSet(boolean value) {
264
    __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
553 chandransh 265
  }
266
 
267
  public int getItemsSize() {
268
    return (this.items == null) ? 0 : this.items.size();
269
  }
270
 
271
  public java.util.Iterator<WidgetItem> getItemsIterator() {
272
    return (this.items == null) ? null : this.items.iterator();
273
  }
274
 
275
  public void addToItems(WidgetItem elem) {
276
    if (this.items == null) {
277
      this.items = new ArrayList<WidgetItem>();
278
    }
279
    this.items.add(elem);
280
  }
281
 
282
  public List<WidgetItem> getItems() {
283
    return this.items;
284
  }
285
 
286
  public Widget setItems(List<WidgetItem> items) {
287
    this.items = items;
288
    return this;
289
  }
290
 
291
  public void unsetItems() {
292
    this.items = null;
293
  }
294
 
295
  /** Returns true if field items is set (has been asigned a value) and false otherwise */
296
  public boolean isSetItems() {
297
    return this.items != null;
298
  }
299
 
300
  public void setItemsIsSet(boolean value) {
301
    if (!value) {
302
      this.items = null;
303
    }
304
  }
305
 
306
  public boolean isEnabled() {
307
    return this.enabled;
308
  }
309
 
310
  public Widget setEnabled(boolean enabled) {
311
    this.enabled = enabled;
312
    setEnabledIsSet(true);
313
    return this;
314
  }
315
 
316
  public void unsetEnabled() {
317
    __isset_bit_vector.clear(__ENABLED_ISSET_ID);
318
  }
319
 
320
  /** Returns true if field enabled is set (has been asigned a value) and false otherwise */
321
  public boolean isSetEnabled() {
322
    return __isset_bit_vector.get(__ENABLED_ISSET_ID);
323
  }
324
 
325
  public void setEnabledIsSet(boolean value) {
326
    __isset_bit_vector.set(__ENABLED_ISSET_ID, value);
327
  }
328
 
329
  public String getName() {
330
    return this.name;
331
  }
332
 
333
  public Widget setName(String name) {
334
    this.name = name;
335
    return this;
336
  }
337
 
338
  public void unsetName() {
339
    this.name = null;
340
  }
341
 
342
  /** Returns true if field name is set (has been asigned a value) and false otherwise */
343
  public boolean isSetName() {
344
    return this.name != null;
345
  }
346
 
347
  public void setNameIsSet(boolean value) {
348
    if (!value) {
349
      this.name = null;
350
    }
351
  }
352
 
353
  public void setFieldValue(_Fields field, Object value) {
354
    switch (field) {
355
    case ID:
356
      if (value == null) {
357
        unsetId();
358
      } else {
359
        setId((Long)value);
360
      }
361
      break;
362
 
363
    case TYPE:
364
      if (value == null) {
365
        unsetType();
366
      } else {
367
        setType((WidgetType)value);
368
      }
369
      break;
370
 
771 rajveer 371
    case USER_ID:
553 chandransh 372
      if (value == null) {
771 rajveer 373
        unsetUser_id();
553 chandransh 374
      } else {
771 rajveer 375
        setUser_id((Long)value);
553 chandransh 376
      }
377
      break;
378
 
379
    case ITEMS:
380
      if (value == null) {
381
        unsetItems();
382
      } else {
383
        setItems((List<WidgetItem>)value);
384
      }
385
      break;
386
 
387
    case ENABLED:
388
      if (value == null) {
389
        unsetEnabled();
390
      } else {
391
        setEnabled((Boolean)value);
392
      }
393
      break;
394
 
395
    case NAME:
396
      if (value == null) {
397
        unsetName();
398
      } else {
399
        setName((String)value);
400
      }
401
      break;
402
 
403
    }
404
  }
405
 
406
  public void setFieldValue(int fieldID, Object value) {
407
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
408
  }
409
 
410
  public Object getFieldValue(_Fields field) {
411
    switch (field) {
412
    case ID:
413
      return new Long(getId());
414
 
415
    case TYPE:
416
      return getType();
417
 
771 rajveer 418
    case USER_ID:
419
      return new Long(getUser_id());
553 chandransh 420
 
421
    case ITEMS:
422
      return getItems();
423
 
424
    case ENABLED:
425
      return new Boolean(isEnabled());
426
 
427
    case NAME:
428
      return getName();
429
 
430
    }
431
    throw new IllegalStateException();
432
  }
433
 
434
  public Object getFieldValue(int fieldId) {
435
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
436
  }
437
 
438
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
439
  public boolean isSet(_Fields field) {
440
    switch (field) {
441
    case ID:
442
      return isSetId();
443
    case TYPE:
444
      return isSetType();
771 rajveer 445
    case USER_ID:
446
      return isSetUser_id();
553 chandransh 447
    case ITEMS:
448
      return isSetItems();
449
    case ENABLED:
450
      return isSetEnabled();
451
    case NAME:
452
      return isSetName();
453
    }
454
    throw new IllegalStateException();
455
  }
456
 
457
  public boolean isSet(int fieldID) {
458
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
459
  }
460
 
461
  @Override
462
  public boolean equals(Object that) {
463
    if (that == null)
464
      return false;
465
    if (that instanceof Widget)
466
      return this.equals((Widget)that);
467
    return false;
468
  }
469
 
470
  public boolean equals(Widget that) {
471
    if (that == null)
472
      return false;
473
 
474
    boolean this_present_id = true;
475
    boolean that_present_id = true;
476
    if (this_present_id || that_present_id) {
477
      if (!(this_present_id && that_present_id))
478
        return false;
479
      if (this.id != that.id)
480
        return false;
481
    }
482
 
483
    boolean this_present_type = true && this.isSetType();
484
    boolean that_present_type = true && that.isSetType();
485
    if (this_present_type || that_present_type) {
486
      if (!(this_present_type && that_present_type))
487
        return false;
488
      if (!this.type.equals(that.type))
489
        return false;
490
    }
491
 
771 rajveer 492
    boolean this_present_user_id = true;
493
    boolean that_present_user_id = true;
494
    if (this_present_user_id || that_present_user_id) {
495
      if (!(this_present_user_id && that_present_user_id))
553 chandransh 496
        return false;
771 rajveer 497
      if (this.user_id != that.user_id)
553 chandransh 498
        return false;
499
    }
500
 
501
    boolean this_present_items = true && this.isSetItems();
502
    boolean that_present_items = true && that.isSetItems();
503
    if (this_present_items || that_present_items) {
504
      if (!(this_present_items && that_present_items))
505
        return false;
506
      if (!this.items.equals(that.items))
507
        return false;
508
    }
509
 
510
    boolean this_present_enabled = true;
511
    boolean that_present_enabled = true;
512
    if (this_present_enabled || that_present_enabled) {
513
      if (!(this_present_enabled && that_present_enabled))
514
        return false;
515
      if (this.enabled != that.enabled)
516
        return false;
517
    }
518
 
519
    boolean this_present_name = true && this.isSetName();
520
    boolean that_present_name = true && that.isSetName();
521
    if (this_present_name || that_present_name) {
522
      if (!(this_present_name && that_present_name))
523
        return false;
524
      if (!this.name.equals(that.name))
525
        return false;
526
    }
527
 
528
    return true;
529
  }
530
 
531
  @Override
532
  public int hashCode() {
533
    return 0;
534
  }
535
 
536
  public int compareTo(Widget other) {
537
    if (!getClass().equals(other.getClass())) {
538
      return getClass().getName().compareTo(other.getClass().getName());
539
    }
540
 
541
    int lastComparison = 0;
542
    Widget typedOther = (Widget)other;
543
 
544
    lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
545
    if (lastComparison != 0) {
546
      return lastComparison;
547
    }
548
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
549
    if (lastComparison != 0) {
550
      return lastComparison;
551
    }
552
    lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
553
    if (lastComparison != 0) {
554
      return lastComparison;
555
    }
556
    lastComparison = TBaseHelper.compareTo(type, typedOther.type);
557
    if (lastComparison != 0) {
558
      return lastComparison;
559
    }
771 rajveer 560
    lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
553 chandransh 561
    if (lastComparison != 0) {
562
      return lastComparison;
563
    }
771 rajveer 564
    lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
553 chandransh 565
    if (lastComparison != 0) {
566
      return lastComparison;
567
    }
568
    lastComparison = Boolean.valueOf(isSetItems()).compareTo(isSetItems());
569
    if (lastComparison != 0) {
570
      return lastComparison;
571
    }
572
    lastComparison = TBaseHelper.compareTo(items, typedOther.items);
573
    if (lastComparison != 0) {
574
      return lastComparison;
575
    }
576
    lastComparison = Boolean.valueOf(isSetEnabled()).compareTo(isSetEnabled());
577
    if (lastComparison != 0) {
578
      return lastComparison;
579
    }
580
    lastComparison = TBaseHelper.compareTo(enabled, typedOther.enabled);
581
    if (lastComparison != 0) {
582
      return lastComparison;
583
    }
584
    lastComparison = Boolean.valueOf(isSetName()).compareTo(isSetName());
585
    if (lastComparison != 0) {
586
      return lastComparison;
587
    }
588
    lastComparison = TBaseHelper.compareTo(name, typedOther.name);
589
    if (lastComparison != 0) {
590
      return lastComparison;
591
    }
592
    return 0;
593
  }
594
 
595
  public void read(TProtocol iprot) throws TException {
596
    TField field;
597
    iprot.readStructBegin();
598
    while (true)
599
    {
600
      field = iprot.readFieldBegin();
601
      if (field.type == TType.STOP) { 
602
        break;
603
      }
604
      _Fields fieldId = _Fields.findByThriftId(field.id);
605
      if (fieldId == null) {
606
        TProtocolUtil.skip(iprot, field.type);
607
      } else {
608
        switch (fieldId) {
609
          case ID:
610
            if (field.type == TType.I64) {
611
              this.id = iprot.readI64();
612
              setIdIsSet(true);
613
            } else { 
614
              TProtocolUtil.skip(iprot, field.type);
615
            }
616
            break;
617
          case TYPE:
618
            if (field.type == TType.I32) {
619
              this.type = WidgetType.findByValue(iprot.readI32());
620
            } else { 
621
              TProtocolUtil.skip(iprot, field.type);
622
            }
623
            break;
771 rajveer 624
          case USER_ID:
553 chandransh 625
            if (field.type == TType.I64) {
771 rajveer 626
              this.user_id = iprot.readI64();
627
              setUser_idIsSet(true);
553 chandransh 628
            } else { 
629
              TProtocolUtil.skip(iprot, field.type);
630
            }
631
            break;
632
          case ITEMS:
633
            if (field.type == TType.LIST) {
634
              {
771 rajveer 635
                TList _list12 = iprot.readListBegin();
636
                this.items = new ArrayList<WidgetItem>(_list12.size);
637
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
553 chandransh 638
                {
771 rajveer 639
                  WidgetItem _elem14;
640
                  _elem14 = new WidgetItem();
641
                  _elem14.read(iprot);
642
                  this.items.add(_elem14);
553 chandransh 643
                }
644
                iprot.readListEnd();
645
              }
646
            } else { 
647
              TProtocolUtil.skip(iprot, field.type);
648
            }
649
            break;
650
          case ENABLED:
651
            if (field.type == TType.BOOL) {
652
              this.enabled = iprot.readBool();
653
              setEnabledIsSet(true);
654
            } else { 
655
              TProtocolUtil.skip(iprot, field.type);
656
            }
657
            break;
658
          case NAME:
659
            if (field.type == TType.STRING) {
660
              this.name = iprot.readString();
661
            } else { 
662
              TProtocolUtil.skip(iprot, field.type);
663
            }
664
            break;
665
        }
666
        iprot.readFieldEnd();
667
      }
668
    }
669
    iprot.readStructEnd();
670
    validate();
671
  }
672
 
673
  public void write(TProtocol oprot) throws TException {
674
    validate();
675
 
676
    oprot.writeStructBegin(STRUCT_DESC);
677
    oprot.writeFieldBegin(ID_FIELD_DESC);
678
    oprot.writeI64(this.id);
679
    oprot.writeFieldEnd();
680
    if (this.type != null) {
681
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
682
      oprot.writeI32(this.type.getValue());
683
      oprot.writeFieldEnd();
684
    }
771 rajveer 685
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
686
    oprot.writeI64(this.user_id);
553 chandransh 687
    oprot.writeFieldEnd();
688
    if (this.items != null) {
689
      oprot.writeFieldBegin(ITEMS_FIELD_DESC);
690
      {
691
        oprot.writeListBegin(new TList(TType.STRUCT, this.items.size()));
771 rajveer 692
        for (WidgetItem _iter15 : this.items)
553 chandransh 693
        {
771 rajveer 694
          _iter15.write(oprot);
553 chandransh 695
        }
696
        oprot.writeListEnd();
697
      }
698
      oprot.writeFieldEnd();
699
    }
700
    oprot.writeFieldBegin(ENABLED_FIELD_DESC);
701
    oprot.writeBool(this.enabled);
702
    oprot.writeFieldEnd();
703
    if (this.name != null) {
704
      oprot.writeFieldBegin(NAME_FIELD_DESC);
705
      oprot.writeString(this.name);
706
      oprot.writeFieldEnd();
707
    }
708
    oprot.writeFieldStop();
709
    oprot.writeStructEnd();
710
  }
711
 
712
  @Override
713
  public String toString() {
714
    StringBuilder sb = new StringBuilder("Widget(");
715
    boolean first = true;
716
 
717
    sb.append("id:");
718
    sb.append(this.id);
719
    first = false;
720
    if (!first) sb.append(", ");
721
    sb.append("type:");
722
    if (this.type == null) {
723
      sb.append("null");
724
    } else {
725
      String type_name = type.name();
726
      if (type_name != null) {
727
        sb.append(type_name);
728
        sb.append(" (");
729
      }
730
      sb.append(this.type);
731
      if (type_name != null) {
732
        sb.append(")");
733
      }
734
    }
735
    first = false;
736
    if (!first) sb.append(", ");
771 rajveer 737
    sb.append("user_id:");
738
    sb.append(this.user_id);
553 chandransh 739
    first = false;
740
    if (!first) sb.append(", ");
741
    sb.append("items:");
742
    if (this.items == null) {
743
      sb.append("null");
744
    } else {
745
      sb.append(this.items);
746
    }
747
    first = false;
748
    if (!first) sb.append(", ");
749
    sb.append("enabled:");
750
    sb.append(this.enabled);
751
    first = false;
752
    if (!first) sb.append(", ");
753
    sb.append("name:");
754
    if (this.name == null) {
755
      sb.append("null");
756
    } else {
757
      sb.append(this.name);
758
    }
759
    first = false;
760
    sb.append(")");
761
    return sb.toString();
762
  }
763
 
764
  public void validate() throws TException {
765
    // check for required fields
766
  }
767
 
768
}
769