Subversion Repositories SmartDukaan

Rev

Rev 8282 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8282 Rev 10450
Line 23... Line 23...
23
public class AmazonFbaInventorySnapshot implements org.apache.thrift.TBase<AmazonFbaInventorySnapshot, AmazonFbaInventorySnapshot._Fields>, java.io.Serializable, Cloneable {
23
public class AmazonFbaInventorySnapshot implements org.apache.thrift.TBase<AmazonFbaInventorySnapshot, AmazonFbaInventorySnapshot._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AmazonFbaInventorySnapshot");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AmazonFbaInventorySnapshot");
25
 
25
 
26
  private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);
26
  private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField AVAILABILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("availability", org.apache.thrift.protocol.TType.I64, (short)2);
27
  private static final org.apache.thrift.protocol.TField AVAILABILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("availability", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
28
  private static final org.apache.thrift.protocol.TField IS_OOS_FIELD_DESC = new org.apache.thrift.protocol.TField("is_oos", org.apache.thrift.protocol.TType.BOOL, (short)3);
28
 
29
 
29
  private long item_id; // required
30
  private long item_id; // required
30
  private long availability; // required
31
  private long availability; // required
-
 
32
  private boolean is_oos; // required
31
 
33
 
32
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
35
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
34
    ITEM_ID((short)1, "item_id"),
36
    ITEM_ID((short)1, "item_id"),
35
    AVAILABILITY((short)2, "availability");
37
    AVAILABILITY((short)2, "availability"),
-
 
38
    IS_OOS((short)3, "is_oos");
36
 
39
 
37
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
40
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
38
 
41
 
39
    static {
42
    static {
40
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
43
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 49... Line 52...
49
      switch(fieldId) {
52
      switch(fieldId) {
50
        case 1: // ITEM_ID
53
        case 1: // ITEM_ID
51
          return ITEM_ID;
54
          return ITEM_ID;
52
        case 2: // AVAILABILITY
55
        case 2: // AVAILABILITY
53
          return AVAILABILITY;
56
          return AVAILABILITY;
-
 
57
        case 3: // IS_OOS
-
 
58
          return IS_OOS;
54
        default:
59
        default:
55
          return null;
60
          return null;
56
      }
61
      }
57
    }
62
    }
58
 
63
 
Line 91... Line 96...
91
  }
96
  }
92
 
97
 
93
  // isset id assignments
98
  // isset id assignments
94
  private static final int __ITEM_ID_ISSET_ID = 0;
99
  private static final int __ITEM_ID_ISSET_ID = 0;
95
  private static final int __AVAILABILITY_ISSET_ID = 1;
100
  private static final int __AVAILABILITY_ISSET_ID = 1;
-
 
101
  private static final int __IS_OOS_ISSET_ID = 2;
96
  private BitSet __isset_bit_vector = new BitSet(2);
102
  private BitSet __isset_bit_vector = new BitSet(3);
97
 
103
 
98
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
104
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
99
  static {
105
  static {
100
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
106
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
101
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
107
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
102
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
108
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
103
    tmpMap.put(_Fields.AVAILABILITY, new org.apache.thrift.meta_data.FieldMetaData("availability", org.apache.thrift.TFieldRequirementType.DEFAULT, 
109
    tmpMap.put(_Fields.AVAILABILITY, new org.apache.thrift.meta_data.FieldMetaData("availability", org.apache.thrift.TFieldRequirementType.DEFAULT, 
104
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
110
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
111
    tmpMap.put(_Fields.IS_OOS, new org.apache.thrift.meta_data.FieldMetaData("is_oos", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
112
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
105
    metaDataMap = Collections.unmodifiableMap(tmpMap);
113
    metaDataMap = Collections.unmodifiableMap(tmpMap);
106
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AmazonFbaInventorySnapshot.class, metaDataMap);
114
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AmazonFbaInventorySnapshot.class, metaDataMap);
107
  }
115
  }
108
 
116
 
109
  public AmazonFbaInventorySnapshot() {
117
  public AmazonFbaInventorySnapshot() {
110
  }
118
  }
111
 
119
 
112
  public AmazonFbaInventorySnapshot(
120
  public AmazonFbaInventorySnapshot(
113
    long item_id,
121
    long item_id,
114
    long availability)
122
    long availability,
-
 
123
    boolean is_oos)
115
  {
124
  {
116
    this();
125
    this();
117
    this.item_id = item_id;
126
    this.item_id = item_id;
118
    setItem_idIsSet(true);
127
    setItem_idIsSet(true);
119
    this.availability = availability;
128
    this.availability = availability;
120
    setAvailabilityIsSet(true);
129
    setAvailabilityIsSet(true);
-
 
130
    this.is_oos = is_oos;
-
 
131
    setIs_oosIsSet(true);
121
  }
132
  }
122
 
133
 
123
  /**
134
  /**
124
   * Performs a deep copy on <i>other</i>.
135
   * Performs a deep copy on <i>other</i>.
125
   */
136
   */
126
  public AmazonFbaInventorySnapshot(AmazonFbaInventorySnapshot other) {
137
  public AmazonFbaInventorySnapshot(AmazonFbaInventorySnapshot other) {
127
    __isset_bit_vector.clear();
138
    __isset_bit_vector.clear();
128
    __isset_bit_vector.or(other.__isset_bit_vector);
139
    __isset_bit_vector.or(other.__isset_bit_vector);
129
    this.item_id = other.item_id;
140
    this.item_id = other.item_id;
130
    this.availability = other.availability;
141
    this.availability = other.availability;
-
 
142
    this.is_oos = other.is_oos;
131
  }
143
  }
132
 
144
 
133
  public AmazonFbaInventorySnapshot deepCopy() {
145
  public AmazonFbaInventorySnapshot deepCopy() {
134
    return new AmazonFbaInventorySnapshot(this);
146
    return new AmazonFbaInventorySnapshot(this);
135
  }
147
  }
Line 138... Line 150...
138
  public void clear() {
150
  public void clear() {
139
    setItem_idIsSet(false);
151
    setItem_idIsSet(false);
140
    this.item_id = 0;
152
    this.item_id = 0;
141
    setAvailabilityIsSet(false);
153
    setAvailabilityIsSet(false);
142
    this.availability = 0;
154
    this.availability = 0;
-
 
155
    setIs_oosIsSet(false);
-
 
156
    this.is_oos = false;
143
  }
157
  }
144
 
158
 
145
  public long getItem_id() {
159
  public long getItem_id() {
146
    return this.item_id;
160
    return this.item_id;
147
  }
161
  }
Line 184... Line 198...
184
 
198
 
185
  public void setAvailabilityIsSet(boolean value) {
199
  public void setAvailabilityIsSet(boolean value) {
186
    __isset_bit_vector.set(__AVAILABILITY_ISSET_ID, value);
200
    __isset_bit_vector.set(__AVAILABILITY_ISSET_ID, value);
187
  }
201
  }
188
 
202
 
-
 
203
  public boolean isIs_oos() {
-
 
204
    return this.is_oos;
-
 
205
  }
-
 
206
 
-
 
207
  public void setIs_oos(boolean is_oos) {
-
 
208
    this.is_oos = is_oos;
-
 
209
    setIs_oosIsSet(true);
-
 
210
  }
-
 
211
 
-
 
212
  public void unsetIs_oos() {
-
 
213
    __isset_bit_vector.clear(__IS_OOS_ISSET_ID);
-
 
214
  }
-
 
215
 
-
 
216
  /** Returns true if field is_oos is set (has been assigned a value) and false otherwise */
-
 
217
  public boolean isSetIs_oos() {
-
 
218
    return __isset_bit_vector.get(__IS_OOS_ISSET_ID);
-
 
219
  }
-
 
220
 
-
 
221
  public void setIs_oosIsSet(boolean value) {
-
 
222
    __isset_bit_vector.set(__IS_OOS_ISSET_ID, value);
-
 
223
  }
-
 
224
 
189
  public void setFieldValue(_Fields field, Object value) {
225
  public void setFieldValue(_Fields field, Object value) {
190
    switch (field) {
226
    switch (field) {
191
    case ITEM_ID:
227
    case ITEM_ID:
192
      if (value == null) {
228
      if (value == null) {
193
        unsetItem_id();
229
        unsetItem_id();
Line 202... Line 238...
202
      } else {
238
      } else {
203
        setAvailability((Long)value);
239
        setAvailability((Long)value);
204
      }
240
      }
205
      break;
241
      break;
206
 
242
 
-
 
243
    case IS_OOS:
-
 
244
      if (value == null) {
-
 
245
        unsetIs_oos();
-
 
246
      } else {
-
 
247
        setIs_oos((Boolean)value);
-
 
248
      }
-
 
249
      break;
-
 
250
 
207
    }
251
    }
208
  }
252
  }
209
 
253
 
210
  public Object getFieldValue(_Fields field) {
254
  public Object getFieldValue(_Fields field) {
211
    switch (field) {
255
    switch (field) {
Line 213... Line 257...
213
      return Long.valueOf(getItem_id());
257
      return Long.valueOf(getItem_id());
214
 
258
 
215
    case AVAILABILITY:
259
    case AVAILABILITY:
216
      return Long.valueOf(getAvailability());
260
      return Long.valueOf(getAvailability());
217
 
261
 
-
 
262
    case IS_OOS:
-
 
263
      return Boolean.valueOf(isIs_oos());
-
 
264
 
218
    }
265
    }
219
    throw new IllegalStateException();
266
    throw new IllegalStateException();
220
  }
267
  }
221
 
268
 
222
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
269
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 228... Line 275...
228
    switch (field) {
275
    switch (field) {
229
    case ITEM_ID:
276
    case ITEM_ID:
230
      return isSetItem_id();
277
      return isSetItem_id();
231
    case AVAILABILITY:
278
    case AVAILABILITY:
232
      return isSetAvailability();
279
      return isSetAvailability();
-
 
280
    case IS_OOS:
-
 
281
      return isSetIs_oos();
233
    }
282
    }
234
    throw new IllegalStateException();
283
    throw new IllegalStateException();
235
  }
284
  }
236
 
285
 
237
  @Override
286
  @Override
Line 263... Line 312...
263
        return false;
312
        return false;
264
      if (this.availability != that.availability)
313
      if (this.availability != that.availability)
265
        return false;
314
        return false;
266
    }
315
    }
267
 
316
 
-
 
317
    boolean this_present_is_oos = true;
-
 
318
    boolean that_present_is_oos = true;
-
 
319
    if (this_present_is_oos || that_present_is_oos) {
-
 
320
      if (!(this_present_is_oos && that_present_is_oos))
-
 
321
        return false;
-
 
322
      if (this.is_oos != that.is_oos)
-
 
323
        return false;
-
 
324
    }
-
 
325
 
268
    return true;
326
    return true;
269
  }
327
  }
270
 
328
 
271
  @Override
329
  @Override
272
  public int hashCode() {
330
  public int hashCode() {
Line 299... Line 357...
299
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.availability, typedOther.availability);
357
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.availability, typedOther.availability);
300
      if (lastComparison != 0) {
358
      if (lastComparison != 0) {
301
        return lastComparison;
359
        return lastComparison;
302
      }
360
      }
303
    }
361
    }
-
 
362
    lastComparison = Boolean.valueOf(isSetIs_oos()).compareTo(typedOther.isSetIs_oos());
-
 
363
    if (lastComparison != 0) {
-
 
364
      return lastComparison;
-
 
365
    }
-
 
366
    if (isSetIs_oos()) {
-
 
367
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_oos, typedOther.is_oos);
-
 
368
      if (lastComparison != 0) {
-
 
369
        return lastComparison;
-
 
370
      }
-
 
371
    }
304
    return 0;
372
    return 0;
305
  }
373
  }
306
 
374
 
307
  public _Fields fieldForId(int fieldId) {
375
  public _Fields fieldForId(int fieldId) {
308
    return _Fields.findByThriftId(fieldId);
376
    return _Fields.findByThriftId(fieldId);
Line 332... Line 400...
332
            setAvailabilityIsSet(true);
400
            setAvailabilityIsSet(true);
333
          } else { 
401
          } else { 
334
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
402
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
335
          }
403
          }
336
          break;
404
          break;
-
 
405
        case 3: // IS_OOS
-
 
406
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
407
            this.is_oos = iprot.readBool();
-
 
408
            setIs_oosIsSet(true);
-
 
409
          } else { 
-
 
410
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
411
          }
-
 
412
          break;
337
        default:
413
        default:
338
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
414
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
339
      }
415
      }
340
      iprot.readFieldEnd();
416
      iprot.readFieldEnd();
341
    }
417
    }
Line 351... Line 427...
351
    oprot.writeI64(this.item_id);
427
    oprot.writeI64(this.item_id);
352
    oprot.writeFieldEnd();
428
    oprot.writeFieldEnd();
353
    oprot.writeFieldBegin(AVAILABILITY_FIELD_DESC);
429
    oprot.writeFieldBegin(AVAILABILITY_FIELD_DESC);
354
    oprot.writeI64(this.availability);
430
    oprot.writeI64(this.availability);
355
    oprot.writeFieldEnd();
431
    oprot.writeFieldEnd();
-
 
432
    oprot.writeFieldBegin(IS_OOS_FIELD_DESC);
-
 
433
    oprot.writeBool(this.is_oos);
-
 
434
    oprot.writeFieldEnd();
356
    oprot.writeFieldStop();
435
    oprot.writeFieldStop();
357
    oprot.writeStructEnd();
436
    oprot.writeStructEnd();
358
  }
437
  }
359
 
438
 
360
  @Override
439
  @Override
Line 367... Line 446...
367
    first = false;
446
    first = false;
368
    if (!first) sb.append(", ");
447
    if (!first) sb.append(", ");
369
    sb.append("availability:");
448
    sb.append("availability:");
370
    sb.append(this.availability);
449
    sb.append(this.availability);
371
    first = false;
450
    first = false;
-
 
451
    if (!first) sb.append(", ");
-
 
452
    sb.append("is_oos:");
-
 
453
    sb.append(this.is_oos);
-
 
454
    first = false;
372
    sb.append(")");
455
    sb.append(")");
373
    return sb.toString();
456
    return sb.toString();
374
  }
457
  }
375
 
458
 
376
  public void validate() throws org.apache.thrift.TException {
459
  public void validate() throws org.apache.thrift.TException {