Subversion Repositories SmartDukaan

Rev

Rev 8915 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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