Subversion Repositories SmartDukaan

Rev

Rev 9048 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9048 Rev 9057
Line 28... Line 28...
28
  private static final org.apache.thrift.protocol.TField ADGROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("adgroupId", org.apache.thrift.protocol.TType.I64, (short)3);
28
  private static final org.apache.thrift.protocol.TField ADGROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("adgroupId", org.apache.thrift.protocol.TType.I64, (short)3);
29
  private static final org.apache.thrift.protocol.TField CATALOG_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("catalogItemId", org.apache.thrift.protocol.TType.I64, (short)4);
29
  private static final org.apache.thrift.protocol.TField CATALOG_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("catalogItemId", org.apache.thrift.protocol.TType.I64, (short)4);
30
  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)5);
30
  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)5);
31
  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)6);
31
  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)6);
32
  private static final org.apache.thrift.protocol.TField BID_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("bidAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)7);
32
  private static final org.apache.thrift.protocol.TField BID_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("bidAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)7);
-
 
33
  private static final org.apache.thrift.protocol.TField STOCK_LINKED_FIELD_DESC = new org.apache.thrift.protocol.TField("stockLinked", org.apache.thrift.protocol.TType.I32, (short)8);
33
 
34
 
34
  private long id; // required
35
  private long id; // required
35
  private long campaignId; // required
36
  private long campaignId; // required
36
  private long adgroupId; // required
37
  private long adgroupId; // required
37
  private long catalogItemId; // required
38
  private long catalogItemId; // required
38
  private String name; // required
39
  private String name; // required
39
  private AdwordsAdGroupStatus status; // required
40
  private AdwordsAdGroupStatus status; // required
40
  private double bidAmount; // required
41
  private double bidAmount; // required
-
 
42
  private int stockLinked; // required
41
 
43
 
42
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
44
  /** 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 {
45
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
44
    ID((short)1, "id"),
46
    ID((short)1, "id"),
45
    CAMPAIGN_ID((short)2, "campaignId"),
47
    CAMPAIGN_ID((short)2, "campaignId"),
Line 49... Line 51...
49
    /**
51
    /**
50
     * 
52
     * 
51
     * @see AdwordsAdGroupStatus
53
     * @see AdwordsAdGroupStatus
52
     */
54
     */
53
    STATUS((short)6, "status"),
55
    STATUS((short)6, "status"),
54
    BID_AMOUNT((short)7, "bidAmount");
56
    BID_AMOUNT((short)7, "bidAmount"),
-
 
57
    STOCK_LINKED((short)8, "stockLinked");
55
 
58
 
56
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
59
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
57
 
60
 
58
    static {
61
    static {
59
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
62
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 78... Line 81...
78
          return NAME;
81
          return NAME;
79
        case 6: // STATUS
82
        case 6: // STATUS
80
          return STATUS;
83
          return STATUS;
81
        case 7: // BID_AMOUNT
84
        case 7: // BID_AMOUNT
82
          return BID_AMOUNT;
85
          return BID_AMOUNT;
-
 
86
        case 8: // STOCK_LINKED
-
 
87
          return STOCK_LINKED;
83
        default:
88
        default:
84
          return null;
89
          return null;
85
      }
90
      }
86
    }
91
    }
87
 
92
 
Line 123... Line 128...
123
  private static final int __ID_ISSET_ID = 0;
128
  private static final int __ID_ISSET_ID = 0;
124
  private static final int __CAMPAIGNID_ISSET_ID = 1;
129
  private static final int __CAMPAIGNID_ISSET_ID = 1;
125
  private static final int __ADGROUPID_ISSET_ID = 2;
130
  private static final int __ADGROUPID_ISSET_ID = 2;
126
  private static final int __CATALOGITEMID_ISSET_ID = 3;
131
  private static final int __CATALOGITEMID_ISSET_ID = 3;
127
  private static final int __BIDAMOUNT_ISSET_ID = 4;
132
  private static final int __BIDAMOUNT_ISSET_ID = 4;
-
 
133
  private static final int __STOCKLINKED_ISSET_ID = 5;
128
  private BitSet __isset_bit_vector = new BitSet(5);
134
  private BitSet __isset_bit_vector = new BitSet(6);
129
 
135
 
130
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
136
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
131
  static {
137
  static {
132
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
138
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
133
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
139
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 142... Line 148...
142
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
148
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
143
    tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
149
    tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
144
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AdwordsAdGroupStatus.class)));
150
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AdwordsAdGroupStatus.class)));
145
    tmpMap.put(_Fields.BID_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("bidAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
151
    tmpMap.put(_Fields.BID_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("bidAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
146
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
152
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
153
    tmpMap.put(_Fields.STOCK_LINKED, new org.apache.thrift.meta_data.FieldMetaData("stockLinked", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
154
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
147
    metaDataMap = Collections.unmodifiableMap(tmpMap);
155
    metaDataMap = Collections.unmodifiableMap(tmpMap);
148
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AdwordsAdGroup.class, metaDataMap);
156
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AdwordsAdGroup.class, metaDataMap);
149
  }
157
  }
150
 
158
 
151
  public AdwordsAdGroup() {
159
  public AdwordsAdGroup() {
Line 156... Line 164...
156
    long campaignId,
164
    long campaignId,
157
    long adgroupId,
165
    long adgroupId,
158
    long catalogItemId,
166
    long catalogItemId,
159
    String name,
167
    String name,
160
    AdwordsAdGroupStatus status,
168
    AdwordsAdGroupStatus status,
161
    double bidAmount)
169
    double bidAmount,
-
 
170
    int stockLinked)
162
  {
171
  {
163
    this();
172
    this();
164
    this.id = id;
173
    this.id = id;
165
    setIdIsSet(true);
174
    setIdIsSet(true);
166
    this.campaignId = campaignId;
175
    this.campaignId = campaignId;
Line 171... Line 180...
171
    setCatalogItemIdIsSet(true);
180
    setCatalogItemIdIsSet(true);
172
    this.name = name;
181
    this.name = name;
173
    this.status = status;
182
    this.status = status;
174
    this.bidAmount = bidAmount;
183
    this.bidAmount = bidAmount;
175
    setBidAmountIsSet(true);
184
    setBidAmountIsSet(true);
-
 
185
    this.stockLinked = stockLinked;
-
 
186
    setStockLinkedIsSet(true);
176
  }
187
  }
177
 
188
 
178
  /**
189
  /**
179
   * Performs a deep copy on <i>other</i>.
190
   * Performs a deep copy on <i>other</i>.
180
   */
191
   */
Line 190... Line 201...
190
    }
201
    }
191
    if (other.isSetStatus()) {
202
    if (other.isSetStatus()) {
192
      this.status = other.status;
203
      this.status = other.status;
193
    }
204
    }
194
    this.bidAmount = other.bidAmount;
205
    this.bidAmount = other.bidAmount;
-
 
206
    this.stockLinked = other.stockLinked;
195
  }
207
  }
196
 
208
 
197
  public AdwordsAdGroup deepCopy() {
209
  public AdwordsAdGroup deepCopy() {
198
    return new AdwordsAdGroup(this);
210
    return new AdwordsAdGroup(this);
199
  }
211
  }
Line 210... Line 222...
210
    this.catalogItemId = 0;
222
    this.catalogItemId = 0;
211
    this.name = null;
223
    this.name = null;
212
    this.status = null;
224
    this.status = null;
213
    setBidAmountIsSet(false);
225
    setBidAmountIsSet(false);
214
    this.bidAmount = 0.0;
226
    this.bidAmount = 0.0;
-
 
227
    setStockLinkedIsSet(false);
-
 
228
    this.stockLinked = 0;
215
  }
229
  }
216
 
230
 
217
  public long getId() {
231
  public long getId() {
218
    return this.id;
232
    return this.id;
219
  }
233
  }
Line 376... Line 390...
376
 
390
 
377
  public void setBidAmountIsSet(boolean value) {
391
  public void setBidAmountIsSet(boolean value) {
378
    __isset_bit_vector.set(__BIDAMOUNT_ISSET_ID, value);
392
    __isset_bit_vector.set(__BIDAMOUNT_ISSET_ID, value);
379
  }
393
  }
380
 
394
 
-
 
395
  public int getStockLinked() {
-
 
396
    return this.stockLinked;
-
 
397
  }
-
 
398
 
-
 
399
  public void setStockLinked(int stockLinked) {
-
 
400
    this.stockLinked = stockLinked;
-
 
401
    setStockLinkedIsSet(true);
-
 
402
  }
-
 
403
 
-
 
404
  public void unsetStockLinked() {
-
 
405
    __isset_bit_vector.clear(__STOCKLINKED_ISSET_ID);
-
 
406
  }
-
 
407
 
-
 
408
  /** Returns true if field stockLinked is set (has been assigned a value) and false otherwise */
-
 
409
  public boolean isSetStockLinked() {
-
 
410
    return __isset_bit_vector.get(__STOCKLINKED_ISSET_ID);
-
 
411
  }
-
 
412
 
-
 
413
  public void setStockLinkedIsSet(boolean value) {
-
 
414
    __isset_bit_vector.set(__STOCKLINKED_ISSET_ID, value);
-
 
415
  }
-
 
416
 
381
  public void setFieldValue(_Fields field, Object value) {
417
  public void setFieldValue(_Fields field, Object value) {
382
    switch (field) {
418
    switch (field) {
383
    case ID:
419
    case ID:
384
      if (value == null) {
420
      if (value == null) {
385
        unsetId();
421
        unsetId();
Line 434... Line 470...
434
      } else {
470
      } else {
435
        setBidAmount((Double)value);
471
        setBidAmount((Double)value);
436
      }
472
      }
437
      break;
473
      break;
438
 
474
 
-
 
475
    case STOCK_LINKED:
-
 
476
      if (value == null) {
-
 
477
        unsetStockLinked();
-
 
478
      } else {
-
 
479
        setStockLinked((Integer)value);
-
 
480
      }
-
 
481
      break;
-
 
482
 
439
    }
483
    }
440
  }
484
  }
441
 
485
 
442
  public Object getFieldValue(_Fields field) {
486
  public Object getFieldValue(_Fields field) {
443
    switch (field) {
487
    switch (field) {
Line 460... Line 504...
460
      return getStatus();
504
      return getStatus();
461
 
505
 
462
    case BID_AMOUNT:
506
    case BID_AMOUNT:
463
      return Double.valueOf(getBidAmount());
507
      return Double.valueOf(getBidAmount());
464
 
508
 
-
 
509
    case STOCK_LINKED:
-
 
510
      return Integer.valueOf(getStockLinked());
-
 
511
 
465
    }
512
    }
466
    throw new IllegalStateException();
513
    throw new IllegalStateException();
467
  }
514
  }
468
 
515
 
469
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
516
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 485... Line 532...
485
      return isSetName();
532
      return isSetName();
486
    case STATUS:
533
    case STATUS:
487
      return isSetStatus();
534
      return isSetStatus();
488
    case BID_AMOUNT:
535
    case BID_AMOUNT:
489
      return isSetBidAmount();
536
      return isSetBidAmount();
-
 
537
    case STOCK_LINKED:
-
 
538
      return isSetStockLinked();
490
    }
539
    }
491
    throw new IllegalStateException();
540
    throw new IllegalStateException();
492
  }
541
  }
493
 
542
 
494
  @Override
543
  @Override
Line 565... Line 614...
565
        return false;
614
        return false;
566
      if (this.bidAmount != that.bidAmount)
615
      if (this.bidAmount != that.bidAmount)
567
        return false;
616
        return false;
568
    }
617
    }
569
 
618
 
-
 
619
    boolean this_present_stockLinked = true;
-
 
620
    boolean that_present_stockLinked = true;
-
 
621
    if (this_present_stockLinked || that_present_stockLinked) {
-
 
622
      if (!(this_present_stockLinked && that_present_stockLinked))
-
 
623
        return false;
-
 
624
      if (this.stockLinked != that.stockLinked)
-
 
625
        return false;
-
 
626
    }
-
 
627
 
570
    return true;
628
    return true;
571
  }
629
  }
572
 
630
 
573
  @Override
631
  @Override
574
  public int hashCode() {
632
  public int hashCode() {
Line 651... Line 709...
651
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bidAmount, typedOther.bidAmount);
709
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bidAmount, typedOther.bidAmount);
652
      if (lastComparison != 0) {
710
      if (lastComparison != 0) {
653
        return lastComparison;
711
        return lastComparison;
654
      }
712
      }
655
    }
713
    }
-
 
714
    lastComparison = Boolean.valueOf(isSetStockLinked()).compareTo(typedOther.isSetStockLinked());
-
 
715
    if (lastComparison != 0) {
-
 
716
      return lastComparison;
-
 
717
    }
-
 
718
    if (isSetStockLinked()) {
-
 
719
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stockLinked, typedOther.stockLinked);
-
 
720
      if (lastComparison != 0) {
-
 
721
        return lastComparison;
-
 
722
      }
-
 
723
    }
656
    return 0;
724
    return 0;
657
  }
725
  }
658
 
726
 
659
  public _Fields fieldForId(int fieldId) {
727
  public _Fields fieldForId(int fieldId) {
660
    return _Fields.findByThriftId(fieldId);
728
    return _Fields.findByThriftId(fieldId);
Line 722... Line 790...
722
            setBidAmountIsSet(true);
790
            setBidAmountIsSet(true);
723
          } else { 
791
          } else { 
724
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
792
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
725
          }
793
          }
726
          break;
794
          break;
-
 
795
        case 8: // STOCK_LINKED
-
 
796
          if (field.type == org.apache.thrift.protocol.TType.I32) {
-
 
797
            this.stockLinked = iprot.readI32();
-
 
798
            setStockLinkedIsSet(true);
-
 
799
          } else { 
-
 
800
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
801
          }
-
 
802
          break;
727
        default:
803
        default:
728
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
804
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
729
      }
805
      }
730
      iprot.readFieldEnd();
806
      iprot.readFieldEnd();
731
    }
807
    }
Line 760... Line 836...
760
      oprot.writeFieldEnd();
836
      oprot.writeFieldEnd();
761
    }
837
    }
762
    oprot.writeFieldBegin(BID_AMOUNT_FIELD_DESC);
838
    oprot.writeFieldBegin(BID_AMOUNT_FIELD_DESC);
763
    oprot.writeDouble(this.bidAmount);
839
    oprot.writeDouble(this.bidAmount);
764
    oprot.writeFieldEnd();
840
    oprot.writeFieldEnd();
-
 
841
    oprot.writeFieldBegin(STOCK_LINKED_FIELD_DESC);
-
 
842
    oprot.writeI32(this.stockLinked);
-
 
843
    oprot.writeFieldEnd();
765
    oprot.writeFieldStop();
844
    oprot.writeFieldStop();
766
    oprot.writeStructEnd();
845
    oprot.writeStructEnd();
767
  }
846
  }
768
 
847
 
769
  @Override
848
  @Override
Line 804... Line 883...
804
    first = false;
883
    first = false;
805
    if (!first) sb.append(", ");
884
    if (!first) sb.append(", ");
806
    sb.append("bidAmount:");
885
    sb.append("bidAmount:");
807
    sb.append(this.bidAmount);
886
    sb.append(this.bidAmount);
808
    first = false;
887
    first = false;
-
 
888
    if (!first) sb.append(", ");
-
 
889
    sb.append("stockLinked:");
-
 
890
    sb.append(this.stockLinked);
-
 
891
    first = false;
809
    sb.append(")");
892
    sb.append(")");
810
    return sb.toString();
893
    return sb.toString();
811
  }
894
  }
812
 
895
 
813
  public void validate() throws org.apache.thrift.TException {
896
  public void validate() throws org.apache.thrift.TException {