Subversion Repositories SmartDukaan

Rev

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

Rev 1730 Rev 3044
Line 57... Line 57...
57
    /**
57
    /**
58
     * Same as above excpet that an airway bill number is also allocated and returned.
58
     * Same as above excpet that an airway bill number is also allocated and returned.
59
     * 
59
     * 
60
     * @param destination_pincode
60
     * @param destination_pincode
61
     * @param item_id
61
     * @param item_id
-
 
62
     * @param type
62
     */
63
     */
63
    public LogisticsInfo getLogisticsInfo(String destination_pincode, long item_id) throws LogisticsServiceException, TException;
64
    public LogisticsInfo getLogisticsInfo(String destination_pincode, long item_id, DeliveryType type) throws LogisticsServiceException, TException;
64
 
65
 
65
    /**
66
    /**
66
     * Returns an unused AWB number for the given provider.
67
     * Returns an unused AWB number for the given provider.
67
     * 
68
     * 
68
     * @param providerId
69
     * @param providerId
Line 268... Line 269...
268
        throw result.se;
269
        throw result.se;
269
      }
270
      }
270
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
271
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
271
    }
272
    }
272
 
273
 
273
    public LogisticsInfo getLogisticsInfo(String destination_pincode, long item_id) throws LogisticsServiceException, TException
274
    public LogisticsInfo getLogisticsInfo(String destination_pincode, long item_id, DeliveryType type) throws LogisticsServiceException, TException
274
    {
275
    {
275
      send_getLogisticsInfo(destination_pincode, item_id);
276
      send_getLogisticsInfo(destination_pincode, item_id, type);
276
      return recv_getLogisticsInfo();
277
      return recv_getLogisticsInfo();
277
    }
278
    }
278
 
279
 
279
    public void send_getLogisticsInfo(String destination_pincode, long item_id) throws TException
280
    public void send_getLogisticsInfo(String destination_pincode, long item_id, DeliveryType type) throws TException
280
    {
281
    {
281
      oprot_.writeMessageBegin(new TMessage("getLogisticsInfo", TMessageType.CALL, seqid_));
282
      oprot_.writeMessageBegin(new TMessage("getLogisticsInfo", TMessageType.CALL, seqid_));
282
      getLogisticsInfo_args args = new getLogisticsInfo_args();
283
      getLogisticsInfo_args args = new getLogisticsInfo_args();
283
      args.destination_pincode = destination_pincode;
284
      args.destination_pincode = destination_pincode;
284
      args.item_id = item_id;
285
      args.item_id = item_id;
-
 
286
      args.type = type;
285
      args.write(oprot_);
287
      args.write(oprot_);
286
      oprot_.writeMessageEnd();
288
      oprot_.writeMessageEnd();
287
      oprot_.getTransport().flush();
289
      oprot_.getTransport().flush();
288
    }
290
    }
289
 
291
 
Line 633... Line 635...
633
        getLogisticsInfo_args args = new getLogisticsInfo_args();
635
        getLogisticsInfo_args args = new getLogisticsInfo_args();
634
        args.read(iprot);
636
        args.read(iprot);
635
        iprot.readMessageEnd();
637
        iprot.readMessageEnd();
636
        getLogisticsInfo_result result = new getLogisticsInfo_result();
638
        getLogisticsInfo_result result = new getLogisticsInfo_result();
637
        try {
639
        try {
638
          result.success = iface_.getLogisticsInfo(args.destination_pincode, args.item_id);
640
          result.success = iface_.getLogisticsInfo(args.destination_pincode, args.item_id, args.type);
639
        } catch (LogisticsServiceException se) {
641
        } catch (LogisticsServiceException se) {
640
          result.se = se;
642
          result.se = se;
641
        } catch (Throwable th) {
643
        } catch (Throwable th) {
642
          LOGGER.error("Internal error processing getLogisticsInfo", th);
644
          LOGGER.error("Internal error processing getLogisticsInfo", th);
643
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLogisticsInfo");
645
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLogisticsInfo");
Line 1431... Line 1433...
1431
      // check for required fields
1433
      // check for required fields
1432
    }
1434
    }
1433
 
1435
 
1434
  }
1436
  }
1435
 
1437
 
1436
  public static class getProvider_result implements TBase<getProvider_result._Fields>, java.io.Serializable, Cloneable, Comparable<getProvider_result>   {
1438
  public static class getProvider_result implements TBase<getProvider_result._Fields>, java.io.Serializable, Cloneable   {
1437
    private static final TStruct STRUCT_DESC = new TStruct("getProvider_result");
1439
    private static final TStruct STRUCT_DESC = new TStruct("getProvider_result");
1438
 
1440
 
1439
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
1441
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
1440
    private static final TField LSE_FIELD_DESC = new TField("lse", TType.STRUCT, (short)1);
1442
    private static final TField LSE_FIELD_DESC = new TField("lse", TType.STRUCT, (short)1);
1441
 
1443
 
Line 1685... Line 1687...
1685
    @Override
1687
    @Override
1686
    public int hashCode() {
1688
    public int hashCode() {
1687
      return 0;
1689
      return 0;
1688
    }
1690
    }
1689
 
1691
 
1690
    public int compareTo(getProvider_result other) {
-
 
1691
      if (!getClass().equals(other.getClass())) {
-
 
1692
        return getClass().getName().compareTo(other.getClass().getName());
-
 
1693
      }
-
 
1694
 
-
 
1695
      int lastComparison = 0;
-
 
1696
      getProvider_result typedOther = (getProvider_result)other;
-
 
1697
 
-
 
1698
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
1699
      if (lastComparison != 0) {
-
 
1700
        return lastComparison;
-
 
1701
      }
-
 
1702
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
1703
      if (lastComparison != 0) {
-
 
1704
        return lastComparison;
-
 
1705
      }
-
 
1706
      lastComparison = Boolean.valueOf(isSetLse()).compareTo(isSetLse());
-
 
1707
      if (lastComparison != 0) {
-
 
1708
        return lastComparison;
-
 
1709
      }
-
 
1710
      lastComparison = TBaseHelper.compareTo(lse, typedOther.lse);
-
 
1711
      if (lastComparison != 0) {
-
 
1712
        return lastComparison;
-
 
1713
      }
-
 
1714
      return 0;
-
 
1715
    }
-
 
1716
 
-
 
1717
    public void read(TProtocol iprot) throws TException {
1692
    public void read(TProtocol iprot) throws TException {
1718
      TField field;
1693
      TField field;
1719
      iprot.readStructBegin();
1694
      iprot.readStructBegin();
1720
      while (true)
1695
      while (true)
1721
      {
1696
      {
Line 1987... Line 1962...
1987
      // check for required fields
1962
      // check for required fields
1988
    }
1963
    }
1989
 
1964
 
1990
  }
1965
  }
1991
 
1966
 
1992
  public static class getAllProviders_result implements TBase<getAllProviders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllProviders_result>   {
1967
  public static class getAllProviders_result implements TBase<getAllProviders_result._Fields>, java.io.Serializable, Cloneable   {
1993
    private static final TStruct STRUCT_DESC = new TStruct("getAllProviders_result");
1968
    private static final TStruct STRUCT_DESC = new TStruct("getAllProviders_result");
1994
 
1969
 
1995
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
1970
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
1996
    private static final TField LSE_FIELD_DESC = new TField("lse", TType.STRUCT, (short)1);
1971
    private static final TField LSE_FIELD_DESC = new TField("lse", TType.STRUCT, (short)1);
1997
 
1972
 
Line 2261... Line 2236...
2261
    @Override
2236
    @Override
2262
    public int hashCode() {
2237
    public int hashCode() {
2263
      return 0;
2238
      return 0;
2264
    }
2239
    }
2265
 
2240
 
2266
    public int compareTo(getAllProviders_result other) {
-
 
2267
      if (!getClass().equals(other.getClass())) {
-
 
2268
        return getClass().getName().compareTo(other.getClass().getName());
-
 
2269
      }
-
 
2270
 
-
 
2271
      int lastComparison = 0;
-
 
2272
      getAllProviders_result typedOther = (getAllProviders_result)other;
-
 
2273
 
-
 
2274
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
2275
      if (lastComparison != 0) {
-
 
2276
        return lastComparison;
-
 
2277
      }
-
 
2278
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
2279
      if (lastComparison != 0) {
-
 
2280
        return lastComparison;
-
 
2281
      }
-
 
2282
      lastComparison = Boolean.valueOf(isSetLse()).compareTo(isSetLse());
-
 
2283
      if (lastComparison != 0) {
-
 
2284
        return lastComparison;
-
 
2285
      }
-
 
2286
      lastComparison = TBaseHelper.compareTo(lse, typedOther.lse);
-
 
2287
      if (lastComparison != 0) {
-
 
2288
        return lastComparison;
-
 
2289
      }
-
 
2290
      return 0;
-
 
2291
    }
-
 
2292
 
-
 
2293
    public void read(TProtocol iprot) throws TException {
2241
    public void read(TProtocol iprot) throws TException {
2294
      TField field;
2242
      TField field;
2295
      iprot.readStructBegin();
2243
      iprot.readStructBegin();
2296
      while (true)
2244
      while (true)
2297
      {
2245
      {
Line 2305... Line 2253...
2305
        } else {
2253
        } else {
2306
          switch (fieldId) {
2254
          switch (fieldId) {
2307
            case SUCCESS:
2255
            case SUCCESS:
2308
              if (field.type == TType.LIST) {
2256
              if (field.type == TType.LIST) {
2309
                {
2257
                {
2310
                  TList _list0 = iprot.readListBegin();
2258
                  TList _list5 = iprot.readListBegin();
2311
                  this.success = new ArrayList<Provider>(_list0.size);
2259
                  this.success = new ArrayList<Provider>(_list5.size);
2312
                  for (int _i1 = 0; _i1 < _list0.size; ++_i1)
2260
                  for (int _i6 = 0; _i6 < _list5.size; ++_i6)
2313
                  {
2261
                  {
2314
                    Provider _elem2;
2262
                    Provider _elem7;
2315
                    _elem2 = new Provider();
2263
                    _elem7 = new Provider();
2316
                    _elem2.read(iprot);
2264
                    _elem7.read(iprot);
2317
                    this.success.add(_elem2);
2265
                    this.success.add(_elem7);
2318
                  }
2266
                  }
2319
                  iprot.readListEnd();
2267
                  iprot.readListEnd();
2320
                }
2268
                }
2321
              } else { 
2269
              } else { 
2322
                TProtocolUtil.skip(iprot, field.type);
2270
                TProtocolUtil.skip(iprot, field.type);
Line 2343... Line 2291...
2343
 
2291
 
2344
      if (this.isSetSuccess()) {
2292
      if (this.isSetSuccess()) {
2345
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2293
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2346
        {
2294
        {
2347
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
2295
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
2348
          for (Provider _iter3 : this.success)
2296
          for (Provider _iter8 : this.success)
2349
          {
2297
          {
2350
            _iter3.write(oprot);
2298
            _iter8.write(oprot);
2351
          }
2299
          }
2352
          oprot.writeListEnd();
2300
          oprot.writeListEnd();
2353
        }
2301
        }
2354
        oprot.writeFieldEnd();
2302
        oprot.writeFieldEnd();
2355
      } else if (this.isSetLse()) {
2303
      } else if (this.isSetLse()) {
Line 3121... Line 3069...
3121
  public static class getLogisticsInfo_args implements TBase<getLogisticsInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLogisticsInfo_args>   {
3069
  public static class getLogisticsInfo_args implements TBase<getLogisticsInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLogisticsInfo_args>   {
3122
    private static final TStruct STRUCT_DESC = new TStruct("getLogisticsInfo_args");
3070
    private static final TStruct STRUCT_DESC = new TStruct("getLogisticsInfo_args");
3123
 
3071
 
3124
    private static final TField DESTINATION_PINCODE_FIELD_DESC = new TField("destination_pincode", TType.STRING, (short)1);
3072
    private static final TField DESTINATION_PINCODE_FIELD_DESC = new TField("destination_pincode", TType.STRING, (short)1);
3125
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
3073
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
-
 
3074
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)3);
3126
 
3075
 
3127
    private String destination_pincode;
3076
    private String destination_pincode;
3128
    private long item_id;
3077
    private long item_id;
-
 
3078
    private DeliveryType type;
3129
 
3079
 
3130
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3080
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3131
    public enum _Fields implements TFieldIdEnum {
3081
    public enum _Fields implements TFieldIdEnum {
3132
      DESTINATION_PINCODE((short)1, "destination_pincode"),
3082
      DESTINATION_PINCODE((short)1, "destination_pincode"),
3133
      ITEM_ID((short)2, "item_id");
3083
      ITEM_ID((short)2, "item_id"),
-
 
3084
      /**
-
 
3085
       * 
-
 
3086
       * @see DeliveryType
-
 
3087
       */
-
 
3088
      TYPE((short)3, "type");
3134
 
3089
 
3135
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3090
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3136
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3091
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3137
 
3092
 
3138
      static {
3093
      static {
Line 3190... Line 3145...
3190
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3145
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3191
      put(_Fields.DESTINATION_PINCODE, new FieldMetaData("destination_pincode", TFieldRequirementType.DEFAULT, 
3146
      put(_Fields.DESTINATION_PINCODE, new FieldMetaData("destination_pincode", TFieldRequirementType.DEFAULT, 
3192
          new FieldValueMetaData(TType.STRING)));
3147
          new FieldValueMetaData(TType.STRING)));
3193
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
3148
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
3194
          new FieldValueMetaData(TType.I64)));
3149
          new FieldValueMetaData(TType.I64)));
-
 
3150
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
-
 
3151
          new EnumMetaData(TType.ENUM, DeliveryType.class)));
3195
    }});
3152
    }});
3196
 
3153
 
3197
    static {
3154
    static {
3198
      FieldMetaData.addStructMetaDataMap(getLogisticsInfo_args.class, metaDataMap);
3155
      FieldMetaData.addStructMetaDataMap(getLogisticsInfo_args.class, metaDataMap);
3199
    }
3156
    }
Line 3201... Line 3158...
3201
    public getLogisticsInfo_args() {
3158
    public getLogisticsInfo_args() {
3202
    }
3159
    }
3203
 
3160
 
3204
    public getLogisticsInfo_args(
3161
    public getLogisticsInfo_args(
3205
      String destination_pincode,
3162
      String destination_pincode,
3206
      long item_id)
3163
      long item_id,
-
 
3164
      DeliveryType type)
3207
    {
3165
    {
3208
      this();
3166
      this();
3209
      this.destination_pincode = destination_pincode;
3167
      this.destination_pincode = destination_pincode;
3210
      this.item_id = item_id;
3168
      this.item_id = item_id;
3211
      setItem_idIsSet(true);
3169
      setItem_idIsSet(true);
-
 
3170
      this.type = type;
3212
    }
3171
    }
3213
 
3172
 
3214
    /**
3173
    /**
3215
     * Performs a deep copy on <i>other</i>.
3174
     * Performs a deep copy on <i>other</i>.
3216
     */
3175
     */
Line 3219... Line 3178...
3219
      __isset_bit_vector.or(other.__isset_bit_vector);
3178
      __isset_bit_vector.or(other.__isset_bit_vector);
3220
      if (other.isSetDestination_pincode()) {
3179
      if (other.isSetDestination_pincode()) {
3221
        this.destination_pincode = other.destination_pincode;
3180
        this.destination_pincode = other.destination_pincode;
3222
      }
3181
      }
3223
      this.item_id = other.item_id;
3182
      this.item_id = other.item_id;
-
 
3183
      if (other.isSetType()) {
-
 
3184
        this.type = other.type;
-
 
3185
      }
3224
    }
3186
    }
3225
 
3187
 
3226
    public getLogisticsInfo_args deepCopy() {
3188
    public getLogisticsInfo_args deepCopy() {
3227
      return new getLogisticsInfo_args(this);
3189
      return new getLogisticsInfo_args(this);
3228
    }
3190
    }
Line 3277... Line 3239...
3277
 
3239
 
3278
    public void setItem_idIsSet(boolean value) {
3240
    public void setItem_idIsSet(boolean value) {
3279
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
3241
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
3280
    }
3242
    }
3281
 
3243
 
-
 
3244
    /**
-
 
3245
     * 
-
 
3246
     * @see DeliveryType
-
 
3247
     */
-
 
3248
    public DeliveryType getType() {
-
 
3249
      return this.type;
-
 
3250
    }
-
 
3251
 
-
 
3252
    /**
-
 
3253
     * 
-
 
3254
     * @see DeliveryType
-
 
3255
     */
-
 
3256
    public getLogisticsInfo_args setType(DeliveryType type) {
-
 
3257
      this.type = type;
-
 
3258
      return this;
-
 
3259
    }
-
 
3260
 
-
 
3261
    public void unsetType() {
-
 
3262
      this.type = null;
-
 
3263
    }
-
 
3264
 
-
 
3265
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
-
 
3266
    public boolean isSetType() {
-
 
3267
      return this.type != null;
-
 
3268
    }
-
 
3269
 
-
 
3270
    public void setTypeIsSet(boolean value) {
-
 
3271
      if (!value) {
-
 
3272
        this.type = null;
-
 
3273
      }
-
 
3274
    }
-
 
3275
 
3282
    public void setFieldValue(_Fields field, Object value) {
3276
    public void setFieldValue(_Fields field, Object value) {
3283
      switch (field) {
3277
      switch (field) {
3284
      case DESTINATION_PINCODE:
3278
      case DESTINATION_PINCODE:
3285
        if (value == null) {
3279
        if (value == null) {
3286
          unsetDestination_pincode();
3280
          unsetDestination_pincode();
Line 3295... Line 3289...
3295
        } else {
3289
        } else {
3296
          setItem_id((Long)value);
3290
          setItem_id((Long)value);
3297
        }
3291
        }
3298
        break;
3292
        break;
3299
 
3293
 
-
 
3294
      case TYPE:
-
 
3295
        if (value == null) {
-
 
3296
          unsetType();
-
 
3297
        } else {
-
 
3298
          setType((DeliveryType)value);
-
 
3299
        }
-
 
3300
        break;
-
 
3301
 
3300
      }
3302
      }
3301
    }
3303
    }
3302
 
3304
 
3303
    public void setFieldValue(int fieldID, Object value) {
3305
    public void setFieldValue(int fieldID, Object value) {
3304
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3306
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 3310... Line 3312...
3310
        return getDestination_pincode();
3312
        return getDestination_pincode();
3311
 
3313
 
3312
      case ITEM_ID:
3314
      case ITEM_ID:
3313
        return new Long(getItem_id());
3315
        return new Long(getItem_id());
3314
 
3316
 
-
 
3317
      case TYPE:
-
 
3318
        return getType();
-
 
3319
 
3315
      }
3320
      }
3316
      throw new IllegalStateException();
3321
      throw new IllegalStateException();
3317
    }
3322
    }
3318
 
3323
 
3319
    public Object getFieldValue(int fieldId) {
3324
    public Object getFieldValue(int fieldId) {
Line 3325... Line 3330...
3325
      switch (field) {
3330
      switch (field) {
3326
      case DESTINATION_PINCODE:
3331
      case DESTINATION_PINCODE:
3327
        return isSetDestination_pincode();
3332
        return isSetDestination_pincode();
3328
      case ITEM_ID:
3333
      case ITEM_ID:
3329
        return isSetItem_id();
3334
        return isSetItem_id();
-
 
3335
      case TYPE:
-
 
3336
        return isSetType();
3330
      }
3337
      }
3331
      throw new IllegalStateException();
3338
      throw new IllegalStateException();
3332
    }
3339
    }
3333
 
3340
 
3334
    public boolean isSet(int fieldID) {
3341
    public boolean isSet(int fieldID) {
Line 3364... Line 3371...
3364
          return false;
3371
          return false;
3365
        if (this.item_id != that.item_id)
3372
        if (this.item_id != that.item_id)
3366
          return false;
3373
          return false;
3367
      }
3374
      }
3368
 
3375
 
-
 
3376
      boolean this_present_type = true && this.isSetType();
-
 
3377
      boolean that_present_type = true && that.isSetType();
-
 
3378
      if (this_present_type || that_present_type) {
-
 
3379
        if (!(this_present_type && that_present_type))
-
 
3380
          return false;
-
 
3381
        if (!this.type.equals(that.type))
-
 
3382
          return false;
-
 
3383
      }
-
 
3384
 
3369
      return true;
3385
      return true;
3370
    }
3386
    }
3371
 
3387
 
3372
    @Override
3388
    @Override
3373
    public int hashCode() {
3389
    public int hashCode() {
Line 3396... Line 3412...
3396
      }
3412
      }
3397
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
3413
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
3398
      if (lastComparison != 0) {
3414
      if (lastComparison != 0) {
3399
        return lastComparison;
3415
        return lastComparison;
3400
      }
3416
      }
-
 
3417
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
-
 
3418
      if (lastComparison != 0) {
-
 
3419
        return lastComparison;
-
 
3420
      }
-
 
3421
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
-
 
3422
      if (lastComparison != 0) {
-
 
3423
        return lastComparison;
-
 
3424
      }
3401
      return 0;
3425
      return 0;
3402
    }
3426
    }
3403
 
3427
 
3404
    public void read(TProtocol iprot) throws TException {
3428
    public void read(TProtocol iprot) throws TException {
3405
      TField field;
3429
      TField field;
Line 3428... Line 3452...
3428
                setItem_idIsSet(true);
3452
                setItem_idIsSet(true);
3429
              } else { 
3453
              } else { 
3430
                TProtocolUtil.skip(iprot, field.type);
3454
                TProtocolUtil.skip(iprot, field.type);
3431
              }
3455
              }
3432
              break;
3456
              break;
-
 
3457
            case TYPE:
-
 
3458
              if (field.type == TType.I32) {
-
 
3459
                this.type = DeliveryType.findByValue(iprot.readI32());
-
 
3460
              } else { 
-
 
3461
                TProtocolUtil.skip(iprot, field.type);
-
 
3462
              }
-
 
3463
              break;
3433
          }
3464
          }
3434
          iprot.readFieldEnd();
3465
          iprot.readFieldEnd();
3435
        }
3466
        }
3436
      }
3467
      }
3437
      iprot.readStructEnd();
3468
      iprot.readStructEnd();
Line 3448... Line 3479...
3448
        oprot.writeFieldEnd();
3479
        oprot.writeFieldEnd();
3449
      }
3480
      }
3450
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
3481
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
3451
      oprot.writeI64(this.item_id);
3482
      oprot.writeI64(this.item_id);
3452
      oprot.writeFieldEnd();
3483
      oprot.writeFieldEnd();
-
 
3484
      if (this.type != null) {
-
 
3485
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
-
 
3486
        oprot.writeI32(this.type.getValue());
-
 
3487
        oprot.writeFieldEnd();
-
 
3488
      }
3453
      oprot.writeFieldStop();
3489
      oprot.writeFieldStop();
3454
      oprot.writeStructEnd();
3490
      oprot.writeStructEnd();
3455
    }
3491
    }
3456
 
3492
 
3457
    @Override
3493
    @Override
Line 3468... Line 3504...
3468
      first = false;
3504
      first = false;
3469
      if (!first) sb.append(", ");
3505
      if (!first) sb.append(", ");
3470
      sb.append("item_id:");
3506
      sb.append("item_id:");
3471
      sb.append(this.item_id);
3507
      sb.append(this.item_id);
3472
      first = false;
3508
      first = false;
-
 
3509
      if (!first) sb.append(", ");
-
 
3510
      sb.append("type:");
-
 
3511
      if (this.type == null) {
-
 
3512
        sb.append("null");
-
 
3513
      } else {
-
 
3514
        String type_name = type.name();
-
 
3515
        if (type_name != null) {
-
 
3516
          sb.append(type_name);
-
 
3517
          sb.append(" (");
-
 
3518
        }
-
 
3519
        sb.append(this.type);
-
 
3520
        if (type_name != null) {
-
 
3521
          sb.append(")");
-
 
3522
        }
-
 
3523
      }
-
 
3524
      first = false;
3473
      sb.append(")");
3525
      sb.append(")");
3474
      return sb.toString();
3526
      return sb.toString();
3475
    }
3527
    }
3476
 
3528
 
3477
    public void validate() throws TException {
3529
    public void validate() throws TException {
Line 5165... Line 5217...
5165
        } else {
5217
        } else {
5166
          switch (fieldId) {
5218
          switch (fieldId) {
5167
            case SUCCESS:
5219
            case SUCCESS:
5168
              if (field.type == TType.LIST) {
5220
              if (field.type == TType.LIST) {
5169
                {
5221
                {
5170
                  TList _list4 = iprot.readListBegin();
5222
                  TList _list9 = iprot.readListBegin();
5171
                  this.success = new ArrayList<AwbUpdate>(_list4.size);
5223
                  this.success = new ArrayList<AwbUpdate>(_list9.size);
5172
                  for (int _i5 = 0; _i5 < _list4.size; ++_i5)
5224
                  for (int _i10 = 0; _i10 < _list9.size; ++_i10)
5173
                  {
5225
                  {
5174
                    AwbUpdate _elem6;
5226
                    AwbUpdate _elem11;
5175
                    _elem6 = new AwbUpdate();
5227
                    _elem11 = new AwbUpdate();
5176
                    _elem6.read(iprot);
5228
                    _elem11.read(iprot);
5177
                    this.success.add(_elem6);
5229
                    this.success.add(_elem11);
5178
                  }
5230
                  }
5179
                  iprot.readListEnd();
5231
                  iprot.readListEnd();
5180
                }
5232
                }
5181
              } else { 
5233
              } else { 
5182
                TProtocolUtil.skip(iprot, field.type);
5234
                TProtocolUtil.skip(iprot, field.type);
Line 5203... Line 5255...
5203
 
5255
 
5204
      if (this.isSetSuccess()) {
5256
      if (this.isSetSuccess()) {
5205
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5257
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5206
        {
5258
        {
5207
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
5259
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
5208
          for (AwbUpdate _iter7 : this.success)
5260
          for (AwbUpdate _iter12 : this.success)
5209
          {
5261
          {
5210
            _iter7.write(oprot);
5262
            _iter12.write(oprot);
5211
          }
5263
          }
5212
          oprot.writeListEnd();
5264
          oprot.writeListEnd();
5213
        }
5265
        }
5214
        oprot.writeFieldEnd();
5266
        oprot.writeFieldEnd();
5215
      } else if (this.isSetSe()) {
5267
      } else if (this.isSetSe()) {
Line 7142... Line 7194...
7142
        } else {
7194
        } else {
7143
          switch (fieldId) {
7195
          switch (fieldId) {
7144
            case SUCCESS:
7196
            case SUCCESS:
7145
              if (field.type == TType.LIST) {
7197
              if (field.type == TType.LIST) {
7146
                {
7198
                {
7147
                  TList _list8 = iprot.readListBegin();
7199
                  TList _list13 = iprot.readListBegin();
7148
                  this.success = new ArrayList<Long>(_list8.size);
7200
                  this.success = new ArrayList<Long>(_list13.size);
7149
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
7201
                  for (int _i14 = 0; _i14 < _list13.size; ++_i14)
7150
                  {
7202
                  {
7151
                    long _elem10;
7203
                    long _elem15;
7152
                    _elem10 = iprot.readI64();
7204
                    _elem15 = iprot.readI64();
7153
                    this.success.add(_elem10);
7205
                    this.success.add(_elem15);
7154
                  }
7206
                  }
7155
                  iprot.readListEnd();
7207
                  iprot.readListEnd();
7156
                }
7208
                }
7157
              } else { 
7209
              } else { 
7158
                TProtocolUtil.skip(iprot, field.type);
7210
                TProtocolUtil.skip(iprot, field.type);
Line 7171... Line 7223...
7171
 
7223
 
7172
      if (this.isSetSuccess()) {
7224
      if (this.isSetSuccess()) {
7173
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7225
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7174
        {
7226
        {
7175
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
7227
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
7176
          for (long _iter11 : this.success)
7228
          for (long _iter16 : this.success)
7177
          {
7229
          {
7178
            oprot.writeI64(_iter11);
7230
            oprot.writeI64(_iter16);
7179
          }
7231
          }
7180
          oprot.writeListEnd();
7232
          oprot.writeListEnd();
7181
        }
7233
        }
7182
        oprot.writeFieldEnd();
7234
        oprot.writeFieldEnd();
7183
      }
7235
      }