Subversion Repositories SmartDukaan

Rev

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