Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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