Subversion Repositories SmartDukaan

Rev

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