Subversion Repositories SmartDukaan

Rev

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

Rev 1013 Rev 1177
Line 69... Line 69...
69
 
69
 
70
    public long getDefaultAddressId(long userId) throws UserContextException, TException;
70
    public long getDefaultAddressId(long userId) throws UserContextException, TException;
71
 
71
 
72
    public String getDefaultPincode(long userId) throws UserContextException, TException;
72
    public String getDefaultPincode(long userId) throws UserContextException, TException;
73
 
73
 
-
 
74
    public boolean saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws UserCommunicationException, TException;
-
 
75
 
74
    public long createCart(long userId) throws ShoppingCartException, TException;
76
    public long createCart(long userId) throws ShoppingCartException, TException;
75
 
77
 
76
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
78
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
77
 
79
 
78
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
80
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
Line 868... Line 870...
868
        throw result.ucx;
870
        throw result.ucx;
869
      }
871
      }
870
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultPincode failed: unknown result");
872
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultPincode failed: unknown result");
871
    }
873
    }
872
 
874
 
-
 
875
    public boolean saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws UserCommunicationException, TException
-
 
876
    {
-
 
877
      send_saveUserCommunication(userId, replyTo, communicationType, orderId, airwaybillNo, productName, subject, message);
-
 
878
      return recv_saveUserCommunication();
-
 
879
    }
-
 
880
 
-
 
881
    public void send_saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws TException
-
 
882
    {
-
 
883
      oprot_.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.CALL, seqid_));
-
 
884
      saveUserCommunication_args args = new saveUserCommunication_args();
-
 
885
      args.userId = userId;
-
 
886
      args.replyTo = replyTo;
-
 
887
      args.communicationType = communicationType;
-
 
888
      args.orderId = orderId;
-
 
889
      args.airwaybillNo = airwaybillNo;
-
 
890
      args.productName = productName;
-
 
891
      args.subject = subject;
-
 
892
      args.message = message;
-
 
893
      args.write(oprot_);
-
 
894
      oprot_.writeMessageEnd();
-
 
895
      oprot_.getTransport().flush();
-
 
896
    }
-
 
897
 
-
 
898
    public boolean recv_saveUserCommunication() throws UserCommunicationException, TException
-
 
899
    {
-
 
900
      TMessage msg = iprot_.readMessageBegin();
-
 
901
      if (msg.type == TMessageType.EXCEPTION) {
-
 
902
        TApplicationException x = TApplicationException.read(iprot_);
-
 
903
        iprot_.readMessageEnd();
-
 
904
        throw x;
-
 
905
      }
-
 
906
      saveUserCommunication_result result = new saveUserCommunication_result();
-
 
907
      result.read(iprot_);
-
 
908
      iprot_.readMessageEnd();
-
 
909
      if (result.isSetSuccess()) {
-
 
910
        return result.success;
-
 
911
      }
-
 
912
      if (result.ucx != null) {
-
 
913
        throw result.ucx;
-
 
914
      }
-
 
915
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "saveUserCommunication failed: unknown result");
-
 
916
    }
-
 
917
 
873
    public long createCart(long userId) throws ShoppingCartException, TException
918
    public long createCart(long userId) throws ShoppingCartException, TException
874
    {
919
    {
875
      send_createCart(userId);
920
      send_createCart(userId);
876
      return recv_createCart();
921
      return recv_createCart();
877
    }
922
    }
Line 1700... Line 1745...
1700
      processMap_.put("updatePassword", new updatePassword());
1745
      processMap_.put("updatePassword", new updatePassword());
1701
      processMap_.put("forgotPassword", new forgotPassword());
1746
      processMap_.put("forgotPassword", new forgotPassword());
1702
      processMap_.put("getAllAddressesForUser", new getAllAddressesForUser());
1747
      processMap_.put("getAllAddressesForUser", new getAllAddressesForUser());
1703
      processMap_.put("getDefaultAddressId", new getDefaultAddressId());
1748
      processMap_.put("getDefaultAddressId", new getDefaultAddressId());
1704
      processMap_.put("getDefaultPincode", new getDefaultPincode());
1749
      processMap_.put("getDefaultPincode", new getDefaultPincode());
-
 
1750
      processMap_.put("saveUserCommunication", new saveUserCommunication());
1705
      processMap_.put("createCart", new createCart());
1751
      processMap_.put("createCart", new createCart());
1706
      processMap_.put("getCurrentCart", new getCurrentCart());
1752
      processMap_.put("getCurrentCart", new getCurrentCart());
1707
      processMap_.put("getCart", new getCart());
1753
      processMap_.put("getCart", new getCart());
1708
      processMap_.put("getCartsForUser", new getCartsForUser());
1754
      processMap_.put("getCartsForUser", new getCartsForUser());
1709
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1755
      processMap_.put("getCartsByStatus", new getCartsByStatus());
Line 2280... Line 2326...
2280
        oprot.getTransport().flush();
2326
        oprot.getTransport().flush();
2281
      }
2327
      }
2282
 
2328
 
2283
    }
2329
    }
2284
 
2330
 
-
 
2331
    private class saveUserCommunication implements ProcessFunction {
-
 
2332
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
2333
      {
-
 
2334
        saveUserCommunication_args args = new saveUserCommunication_args();
-
 
2335
        args.read(iprot);
-
 
2336
        iprot.readMessageEnd();
-
 
2337
        saveUserCommunication_result result = new saveUserCommunication_result();
-
 
2338
        try {
-
 
2339
          result.success = iface_.saveUserCommunication(args.userId, args.replyTo, args.communicationType, args.orderId, args.airwaybillNo, args.productName, args.subject, args.message);
-
 
2340
          result.setSuccessIsSet(true);
-
 
2341
        } catch (UserCommunicationException ucx) {
-
 
2342
          result.ucx = ucx;
-
 
2343
        } catch (Throwable th) {
-
 
2344
          LOGGER.error("Internal error processing saveUserCommunication", th);
-
 
2345
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing saveUserCommunication");
-
 
2346
          oprot.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.EXCEPTION, seqid));
-
 
2347
          x.write(oprot);
-
 
2348
          oprot.writeMessageEnd();
-
 
2349
          oprot.getTransport().flush();
-
 
2350
          return;
-
 
2351
        }
-
 
2352
        oprot.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.REPLY, seqid));
-
 
2353
        result.write(oprot);
-
 
2354
        oprot.writeMessageEnd();
-
 
2355
        oprot.getTransport().flush();
-
 
2356
      }
-
 
2357
 
-
 
2358
    }
-
 
2359
 
2285
    private class createCart implements ProcessFunction {
2360
    private class createCart implements ProcessFunction {
2286
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2361
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2287
      {
2362
      {
2288
        createCart_args args = new createCart_args();
2363
        createCart_args args = new createCart_args();
2289
        args.read(iprot);
2364
        args.read(iprot);
Line 15684... Line 15759...
15684
      first = false;
15759
      first = false;
15685
      if (!first) sb.append(", ");
15760
      if (!first) sb.append(", ");
15686
      sb.append("ucx:");
15761
      sb.append("ucx:");
15687
      if (this.ucx == null) {
15762
      if (this.ucx == null) {
15688
        sb.append("null");
15763
        sb.append("null");
-
 
15764
      } else {
-
 
15765
        sb.append(this.ucx);
-
 
15766
      }
-
 
15767
      first = false;
-
 
15768
      sb.append(")");
-
 
15769
      return sb.toString();
-
 
15770
    }
-
 
15771
 
-
 
15772
    public void validate() throws TException {
-
 
15773
      // check for required fields
-
 
15774
    }
-
 
15775
 
-
 
15776
  }
-
 
15777
 
-
 
15778
  public static class saveUserCommunication_args implements TBase<saveUserCommunication_args._Fields>, java.io.Serializable, Cloneable, Comparable<saveUserCommunication_args>   {
-
 
15779
    private static final TStruct STRUCT_DESC = new TStruct("saveUserCommunication_args");
-
 
15780
 
-
 
15781
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
-
 
15782
    private static final TField REPLY_TO_FIELD_DESC = new TField("replyTo", TType.STRING, (short)2);
-
 
15783
    private static final TField COMMUNICATION_TYPE_FIELD_DESC = new TField("communicationType", TType.I64, (short)3);
-
 
15784
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)4);
-
 
15785
    private static final TField AIRWAYBILL_NO_FIELD_DESC = new TField("airwaybillNo", TType.STRING, (short)5);
-
 
15786
    private static final TField PRODUCT_NAME_FIELD_DESC = new TField("productName", TType.STRING, (short)6);
-
 
15787
    private static final TField SUBJECT_FIELD_DESC = new TField("subject", TType.STRING, (short)7);
-
 
15788
    private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)8);
-
 
15789
 
-
 
15790
    private long userId;
-
 
15791
    private String replyTo;
-
 
15792
    private long communicationType;
-
 
15793
    private long orderId;
-
 
15794
    private String airwaybillNo;
-
 
15795
    private String productName;
-
 
15796
    private String subject;
-
 
15797
    private String message;
-
 
15798
 
-
 
15799
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
15800
    public enum _Fields implements TFieldIdEnum {
-
 
15801
      USER_ID((short)1, "userId"),
-
 
15802
      REPLY_TO((short)2, "replyTo"),
-
 
15803
      COMMUNICATION_TYPE((short)3, "communicationType"),
-
 
15804
      ORDER_ID((short)4, "orderId"),
-
 
15805
      AIRWAYBILL_NO((short)5, "airwaybillNo"),
-
 
15806
      PRODUCT_NAME((short)6, "productName"),
-
 
15807
      SUBJECT((short)7, "subject"),
-
 
15808
      MESSAGE((short)8, "message");
-
 
15809
 
-
 
15810
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
15811
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
15812
 
-
 
15813
      static {
-
 
15814
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
15815
          byId.put((int)field._thriftId, field);
-
 
15816
          byName.put(field.getFieldName(), field);
-
 
15817
        }
-
 
15818
      }
-
 
15819
 
-
 
15820
      /**
-
 
15821
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
15822
       */
-
 
15823
      public static _Fields findByThriftId(int fieldId) {
-
 
15824
        return byId.get(fieldId);
-
 
15825
      }
-
 
15826
 
-
 
15827
      /**
-
 
15828
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
15829
       * if it is not found.
-
 
15830
       */
-
 
15831
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
15832
        _Fields fields = findByThriftId(fieldId);
-
 
15833
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
15834
        return fields;
-
 
15835
      }
-
 
15836
 
-
 
15837
      /**
-
 
15838
       * Find the _Fields constant that matches name, or null if its not found.
-
 
15839
       */
-
 
15840
      public static _Fields findByName(String name) {
-
 
15841
        return byName.get(name);
-
 
15842
      }
-
 
15843
 
-
 
15844
      private final short _thriftId;
-
 
15845
      private final String _fieldName;
-
 
15846
 
-
 
15847
      _Fields(short thriftId, String fieldName) {
-
 
15848
        _thriftId = thriftId;
-
 
15849
        _fieldName = fieldName;
-
 
15850
      }
-
 
15851
 
-
 
15852
      public short getThriftFieldId() {
-
 
15853
        return _thriftId;
-
 
15854
      }
-
 
15855
 
-
 
15856
      public String getFieldName() {
-
 
15857
        return _fieldName;
-
 
15858
      }
-
 
15859
    }
-
 
15860
 
-
 
15861
    // isset id assignments
-
 
15862
    private static final int __USERID_ISSET_ID = 0;
-
 
15863
    private static final int __COMMUNICATIONTYPE_ISSET_ID = 1;
-
 
15864
    private static final int __ORDERID_ISSET_ID = 2;
-
 
15865
    private BitSet __isset_bit_vector = new BitSet(3);
-
 
15866
 
-
 
15867
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
15868
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
-
 
15869
          new FieldValueMetaData(TType.I64)));
-
 
15870
      put(_Fields.REPLY_TO, new FieldMetaData("replyTo", TFieldRequirementType.DEFAULT, 
-
 
15871
          new FieldValueMetaData(TType.STRING)));
-
 
15872
      put(_Fields.COMMUNICATION_TYPE, new FieldMetaData("communicationType", TFieldRequirementType.DEFAULT, 
-
 
15873
          new FieldValueMetaData(TType.I64)));
-
 
15874
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
-
 
15875
          new FieldValueMetaData(TType.I64)));
-
 
15876
      put(_Fields.AIRWAYBILL_NO, new FieldMetaData("airwaybillNo", TFieldRequirementType.DEFAULT, 
-
 
15877
          new FieldValueMetaData(TType.STRING)));
-
 
15878
      put(_Fields.PRODUCT_NAME, new FieldMetaData("productName", TFieldRequirementType.DEFAULT, 
-
 
15879
          new FieldValueMetaData(TType.STRING)));
-
 
15880
      put(_Fields.SUBJECT, new FieldMetaData("subject", TFieldRequirementType.DEFAULT, 
-
 
15881
          new FieldValueMetaData(TType.STRING)));
-
 
15882
      put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
-
 
15883
          new FieldValueMetaData(TType.STRING)));
-
 
15884
    }});
-
 
15885
 
-
 
15886
    static {
-
 
15887
      FieldMetaData.addStructMetaDataMap(saveUserCommunication_args.class, metaDataMap);
-
 
15888
    }
-
 
15889
 
-
 
15890
    public saveUserCommunication_args() {
-
 
15891
    }
-
 
15892
 
-
 
15893
    public saveUserCommunication_args(
-
 
15894
      long userId,
-
 
15895
      String replyTo,
-
 
15896
      long communicationType,
-
 
15897
      long orderId,
-
 
15898
      String airwaybillNo,
-
 
15899
      String productName,
-
 
15900
      String subject,
-
 
15901
      String message)
-
 
15902
    {
-
 
15903
      this();
-
 
15904
      this.userId = userId;
-
 
15905
      setUserIdIsSet(true);
-
 
15906
      this.replyTo = replyTo;
-
 
15907
      this.communicationType = communicationType;
-
 
15908
      setCommunicationTypeIsSet(true);
-
 
15909
      this.orderId = orderId;
-
 
15910
      setOrderIdIsSet(true);
-
 
15911
      this.airwaybillNo = airwaybillNo;
-
 
15912
      this.productName = productName;
-
 
15913
      this.subject = subject;
-
 
15914
      this.message = message;
-
 
15915
    }
-
 
15916
 
-
 
15917
    /**
-
 
15918
     * Performs a deep copy on <i>other</i>.
-
 
15919
     */
-
 
15920
    public saveUserCommunication_args(saveUserCommunication_args other) {
-
 
15921
      __isset_bit_vector.clear();
-
 
15922
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
15923
      this.userId = other.userId;
-
 
15924
      if (other.isSetReplyTo()) {
-
 
15925
        this.replyTo = other.replyTo;
-
 
15926
      }
-
 
15927
      this.communicationType = other.communicationType;
-
 
15928
      this.orderId = other.orderId;
-
 
15929
      if (other.isSetAirwaybillNo()) {
-
 
15930
        this.airwaybillNo = other.airwaybillNo;
-
 
15931
      }
-
 
15932
      if (other.isSetProductName()) {
-
 
15933
        this.productName = other.productName;
-
 
15934
      }
-
 
15935
      if (other.isSetSubject()) {
-
 
15936
        this.subject = other.subject;
-
 
15937
      }
-
 
15938
      if (other.isSetMessage()) {
-
 
15939
        this.message = other.message;
-
 
15940
      }
-
 
15941
    }
-
 
15942
 
-
 
15943
    public saveUserCommunication_args deepCopy() {
-
 
15944
      return new saveUserCommunication_args(this);
-
 
15945
    }
-
 
15946
 
-
 
15947
    @Deprecated
-
 
15948
    public saveUserCommunication_args clone() {
-
 
15949
      return new saveUserCommunication_args(this);
-
 
15950
    }
-
 
15951
 
-
 
15952
    public long getUserId() {
-
 
15953
      return this.userId;
-
 
15954
    }
-
 
15955
 
-
 
15956
    public saveUserCommunication_args setUserId(long userId) {
-
 
15957
      this.userId = userId;
-
 
15958
      setUserIdIsSet(true);
-
 
15959
      return this;
-
 
15960
    }
-
 
15961
 
-
 
15962
    public void unsetUserId() {
-
 
15963
      __isset_bit_vector.clear(__USERID_ISSET_ID);
-
 
15964
    }
-
 
15965
 
-
 
15966
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
-
 
15967
    public boolean isSetUserId() {
-
 
15968
      return __isset_bit_vector.get(__USERID_ISSET_ID);
-
 
15969
    }
-
 
15970
 
-
 
15971
    public void setUserIdIsSet(boolean value) {
-
 
15972
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
-
 
15973
    }
-
 
15974
 
-
 
15975
    public String getReplyTo() {
-
 
15976
      return this.replyTo;
-
 
15977
    }
-
 
15978
 
-
 
15979
    public saveUserCommunication_args setReplyTo(String replyTo) {
-
 
15980
      this.replyTo = replyTo;
-
 
15981
      return this;
-
 
15982
    }
-
 
15983
 
-
 
15984
    public void unsetReplyTo() {
-
 
15985
      this.replyTo = null;
-
 
15986
    }
-
 
15987
 
-
 
15988
    /** Returns true if field replyTo is set (has been asigned a value) and false otherwise */
-
 
15989
    public boolean isSetReplyTo() {
-
 
15990
      return this.replyTo != null;
-
 
15991
    }
-
 
15992
 
-
 
15993
    public void setReplyToIsSet(boolean value) {
-
 
15994
      if (!value) {
-
 
15995
        this.replyTo = null;
-
 
15996
      }
-
 
15997
    }
-
 
15998
 
-
 
15999
    public long getCommunicationType() {
-
 
16000
      return this.communicationType;
-
 
16001
    }
-
 
16002
 
-
 
16003
    public saveUserCommunication_args setCommunicationType(long communicationType) {
-
 
16004
      this.communicationType = communicationType;
-
 
16005
      setCommunicationTypeIsSet(true);
-
 
16006
      return this;
-
 
16007
    }
-
 
16008
 
-
 
16009
    public void unsetCommunicationType() {
-
 
16010
      __isset_bit_vector.clear(__COMMUNICATIONTYPE_ISSET_ID);
-
 
16011
    }
-
 
16012
 
-
 
16013
    /** Returns true if field communicationType is set (has been asigned a value) and false otherwise */
-
 
16014
    public boolean isSetCommunicationType() {
-
 
16015
      return __isset_bit_vector.get(__COMMUNICATIONTYPE_ISSET_ID);
-
 
16016
    }
-
 
16017
 
-
 
16018
    public void setCommunicationTypeIsSet(boolean value) {
-
 
16019
      __isset_bit_vector.set(__COMMUNICATIONTYPE_ISSET_ID, value);
-
 
16020
    }
-
 
16021
 
-
 
16022
    public long getOrderId() {
-
 
16023
      return this.orderId;
-
 
16024
    }
-
 
16025
 
-
 
16026
    public saveUserCommunication_args setOrderId(long orderId) {
-
 
16027
      this.orderId = orderId;
-
 
16028
      setOrderIdIsSet(true);
-
 
16029
      return this;
-
 
16030
    }
-
 
16031
 
-
 
16032
    public void unsetOrderId() {
-
 
16033
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
-
 
16034
    }
-
 
16035
 
-
 
16036
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
-
 
16037
    public boolean isSetOrderId() {
-
 
16038
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
-
 
16039
    }
-
 
16040
 
-
 
16041
    public void setOrderIdIsSet(boolean value) {
-
 
16042
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
-
 
16043
    }
-
 
16044
 
-
 
16045
    public String getAirwaybillNo() {
-
 
16046
      return this.airwaybillNo;
-
 
16047
    }
-
 
16048
 
-
 
16049
    public saveUserCommunication_args setAirwaybillNo(String airwaybillNo) {
-
 
16050
      this.airwaybillNo = airwaybillNo;
-
 
16051
      return this;
-
 
16052
    }
-
 
16053
 
-
 
16054
    public void unsetAirwaybillNo() {
-
 
16055
      this.airwaybillNo = null;
-
 
16056
    }
-
 
16057
 
-
 
16058
    /** Returns true if field airwaybillNo is set (has been asigned a value) and false otherwise */
-
 
16059
    public boolean isSetAirwaybillNo() {
-
 
16060
      return this.airwaybillNo != null;
-
 
16061
    }
-
 
16062
 
-
 
16063
    public void setAirwaybillNoIsSet(boolean value) {
-
 
16064
      if (!value) {
-
 
16065
        this.airwaybillNo = null;
-
 
16066
      }
-
 
16067
    }
-
 
16068
 
-
 
16069
    public String getProductName() {
-
 
16070
      return this.productName;
-
 
16071
    }
-
 
16072
 
-
 
16073
    public saveUserCommunication_args setProductName(String productName) {
-
 
16074
      this.productName = productName;
-
 
16075
      return this;
-
 
16076
    }
-
 
16077
 
-
 
16078
    public void unsetProductName() {
-
 
16079
      this.productName = null;
-
 
16080
    }
-
 
16081
 
-
 
16082
    /** Returns true if field productName is set (has been asigned a value) and false otherwise */
-
 
16083
    public boolean isSetProductName() {
-
 
16084
      return this.productName != null;
-
 
16085
    }
-
 
16086
 
-
 
16087
    public void setProductNameIsSet(boolean value) {
-
 
16088
      if (!value) {
-
 
16089
        this.productName = null;
-
 
16090
      }
-
 
16091
    }
-
 
16092
 
-
 
16093
    public String getSubject() {
-
 
16094
      return this.subject;
-
 
16095
    }
-
 
16096
 
-
 
16097
    public saveUserCommunication_args setSubject(String subject) {
-
 
16098
      this.subject = subject;
-
 
16099
      return this;
-
 
16100
    }
-
 
16101
 
-
 
16102
    public void unsetSubject() {
-
 
16103
      this.subject = null;
-
 
16104
    }
-
 
16105
 
-
 
16106
    /** Returns true if field subject is set (has been asigned a value) and false otherwise */
-
 
16107
    public boolean isSetSubject() {
-
 
16108
      return this.subject != null;
-
 
16109
    }
-
 
16110
 
-
 
16111
    public void setSubjectIsSet(boolean value) {
-
 
16112
      if (!value) {
-
 
16113
        this.subject = null;
-
 
16114
      }
-
 
16115
    }
-
 
16116
 
-
 
16117
    public String getMessage() {
-
 
16118
      return this.message;
-
 
16119
    }
-
 
16120
 
-
 
16121
    public saveUserCommunication_args setMessage(String message) {
-
 
16122
      this.message = message;
-
 
16123
      return this;
-
 
16124
    }
-
 
16125
 
-
 
16126
    public void unsetMessage() {
-
 
16127
      this.message = null;
-
 
16128
    }
-
 
16129
 
-
 
16130
    /** Returns true if field message is set (has been asigned a value) and false otherwise */
-
 
16131
    public boolean isSetMessage() {
-
 
16132
      return this.message != null;
-
 
16133
    }
-
 
16134
 
-
 
16135
    public void setMessageIsSet(boolean value) {
-
 
16136
      if (!value) {
-
 
16137
        this.message = null;
-
 
16138
      }
-
 
16139
    }
-
 
16140
 
-
 
16141
    public void setFieldValue(_Fields field, Object value) {
-
 
16142
      switch (field) {
-
 
16143
      case USER_ID:
-
 
16144
        if (value == null) {
-
 
16145
          unsetUserId();
-
 
16146
        } else {
-
 
16147
          setUserId((Long)value);
-
 
16148
        }
-
 
16149
        break;
-
 
16150
 
-
 
16151
      case REPLY_TO:
-
 
16152
        if (value == null) {
-
 
16153
          unsetReplyTo();
-
 
16154
        } else {
-
 
16155
          setReplyTo((String)value);
-
 
16156
        }
-
 
16157
        break;
-
 
16158
 
-
 
16159
      case COMMUNICATION_TYPE:
-
 
16160
        if (value == null) {
-
 
16161
          unsetCommunicationType();
-
 
16162
        } else {
-
 
16163
          setCommunicationType((Long)value);
-
 
16164
        }
-
 
16165
        break;
-
 
16166
 
-
 
16167
      case ORDER_ID:
-
 
16168
        if (value == null) {
-
 
16169
          unsetOrderId();
-
 
16170
        } else {
-
 
16171
          setOrderId((Long)value);
-
 
16172
        }
-
 
16173
        break;
-
 
16174
 
-
 
16175
      case AIRWAYBILL_NO:
-
 
16176
        if (value == null) {
-
 
16177
          unsetAirwaybillNo();
-
 
16178
        } else {
-
 
16179
          setAirwaybillNo((String)value);
-
 
16180
        }
-
 
16181
        break;
-
 
16182
 
-
 
16183
      case PRODUCT_NAME:
-
 
16184
        if (value == null) {
-
 
16185
          unsetProductName();
-
 
16186
        } else {
-
 
16187
          setProductName((String)value);
-
 
16188
        }
-
 
16189
        break;
-
 
16190
 
-
 
16191
      case SUBJECT:
-
 
16192
        if (value == null) {
-
 
16193
          unsetSubject();
-
 
16194
        } else {
-
 
16195
          setSubject((String)value);
-
 
16196
        }
-
 
16197
        break;
-
 
16198
 
-
 
16199
      case MESSAGE:
-
 
16200
        if (value == null) {
-
 
16201
          unsetMessage();
-
 
16202
        } else {
-
 
16203
          setMessage((String)value);
-
 
16204
        }
-
 
16205
        break;
-
 
16206
 
-
 
16207
      }
-
 
16208
    }
-
 
16209
 
-
 
16210
    public void setFieldValue(int fieldID, Object value) {
-
 
16211
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
16212
    }
-
 
16213
 
-
 
16214
    public Object getFieldValue(_Fields field) {
-
 
16215
      switch (field) {
-
 
16216
      case USER_ID:
-
 
16217
        return new Long(getUserId());
-
 
16218
 
-
 
16219
      case REPLY_TO:
-
 
16220
        return getReplyTo();
-
 
16221
 
-
 
16222
      case COMMUNICATION_TYPE:
-
 
16223
        return new Long(getCommunicationType());
-
 
16224
 
-
 
16225
      case ORDER_ID:
-
 
16226
        return new Long(getOrderId());
-
 
16227
 
-
 
16228
      case AIRWAYBILL_NO:
-
 
16229
        return getAirwaybillNo();
-
 
16230
 
-
 
16231
      case PRODUCT_NAME:
-
 
16232
        return getProductName();
-
 
16233
 
-
 
16234
      case SUBJECT:
-
 
16235
        return getSubject();
-
 
16236
 
-
 
16237
      case MESSAGE:
-
 
16238
        return getMessage();
-
 
16239
 
-
 
16240
      }
-
 
16241
      throw new IllegalStateException();
-
 
16242
    }
-
 
16243
 
-
 
16244
    public Object getFieldValue(int fieldId) {
-
 
16245
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
16246
    }
-
 
16247
 
-
 
16248
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
16249
    public boolean isSet(_Fields field) {
-
 
16250
      switch (field) {
-
 
16251
      case USER_ID:
-
 
16252
        return isSetUserId();
-
 
16253
      case REPLY_TO:
-
 
16254
        return isSetReplyTo();
-
 
16255
      case COMMUNICATION_TYPE:
-
 
16256
        return isSetCommunicationType();
-
 
16257
      case ORDER_ID:
-
 
16258
        return isSetOrderId();
-
 
16259
      case AIRWAYBILL_NO:
-
 
16260
        return isSetAirwaybillNo();
-
 
16261
      case PRODUCT_NAME:
-
 
16262
        return isSetProductName();
-
 
16263
      case SUBJECT:
-
 
16264
        return isSetSubject();
-
 
16265
      case MESSAGE:
-
 
16266
        return isSetMessage();
-
 
16267
      }
-
 
16268
      throw new IllegalStateException();
-
 
16269
    }
-
 
16270
 
-
 
16271
    public boolean isSet(int fieldID) {
-
 
16272
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
16273
    }
-
 
16274
 
-
 
16275
    @Override
-
 
16276
    public boolean equals(Object that) {
-
 
16277
      if (that == null)
-
 
16278
        return false;
-
 
16279
      if (that instanceof saveUserCommunication_args)
-
 
16280
        return this.equals((saveUserCommunication_args)that);
-
 
16281
      return false;
-
 
16282
    }
-
 
16283
 
-
 
16284
    public boolean equals(saveUserCommunication_args that) {
-
 
16285
      if (that == null)
-
 
16286
        return false;
-
 
16287
 
-
 
16288
      boolean this_present_userId = true;
-
 
16289
      boolean that_present_userId = true;
-
 
16290
      if (this_present_userId || that_present_userId) {
-
 
16291
        if (!(this_present_userId && that_present_userId))
-
 
16292
          return false;
-
 
16293
        if (this.userId != that.userId)
-
 
16294
          return false;
-
 
16295
      }
-
 
16296
 
-
 
16297
      boolean this_present_replyTo = true && this.isSetReplyTo();
-
 
16298
      boolean that_present_replyTo = true && that.isSetReplyTo();
-
 
16299
      if (this_present_replyTo || that_present_replyTo) {
-
 
16300
        if (!(this_present_replyTo && that_present_replyTo))
-
 
16301
          return false;
-
 
16302
        if (!this.replyTo.equals(that.replyTo))
-
 
16303
          return false;
-
 
16304
      }
-
 
16305
 
-
 
16306
      boolean this_present_communicationType = true;
-
 
16307
      boolean that_present_communicationType = true;
-
 
16308
      if (this_present_communicationType || that_present_communicationType) {
-
 
16309
        if (!(this_present_communicationType && that_present_communicationType))
-
 
16310
          return false;
-
 
16311
        if (this.communicationType != that.communicationType)
-
 
16312
          return false;
-
 
16313
      }
-
 
16314
 
-
 
16315
      boolean this_present_orderId = true;
-
 
16316
      boolean that_present_orderId = true;
-
 
16317
      if (this_present_orderId || that_present_orderId) {
-
 
16318
        if (!(this_present_orderId && that_present_orderId))
-
 
16319
          return false;
-
 
16320
        if (this.orderId != that.orderId)
-
 
16321
          return false;
-
 
16322
      }
-
 
16323
 
-
 
16324
      boolean this_present_airwaybillNo = true && this.isSetAirwaybillNo();
-
 
16325
      boolean that_present_airwaybillNo = true && that.isSetAirwaybillNo();
-
 
16326
      if (this_present_airwaybillNo || that_present_airwaybillNo) {
-
 
16327
        if (!(this_present_airwaybillNo && that_present_airwaybillNo))
-
 
16328
          return false;
-
 
16329
        if (!this.airwaybillNo.equals(that.airwaybillNo))
-
 
16330
          return false;
-
 
16331
      }
-
 
16332
 
-
 
16333
      boolean this_present_productName = true && this.isSetProductName();
-
 
16334
      boolean that_present_productName = true && that.isSetProductName();
-
 
16335
      if (this_present_productName || that_present_productName) {
-
 
16336
        if (!(this_present_productName && that_present_productName))
-
 
16337
          return false;
-
 
16338
        if (!this.productName.equals(that.productName))
-
 
16339
          return false;
-
 
16340
      }
-
 
16341
 
-
 
16342
      boolean this_present_subject = true && this.isSetSubject();
-
 
16343
      boolean that_present_subject = true && that.isSetSubject();
-
 
16344
      if (this_present_subject || that_present_subject) {
-
 
16345
        if (!(this_present_subject && that_present_subject))
-
 
16346
          return false;
-
 
16347
        if (!this.subject.equals(that.subject))
-
 
16348
          return false;
-
 
16349
      }
-
 
16350
 
-
 
16351
      boolean this_present_message = true && this.isSetMessage();
-
 
16352
      boolean that_present_message = true && that.isSetMessage();
-
 
16353
      if (this_present_message || that_present_message) {
-
 
16354
        if (!(this_present_message && that_present_message))
-
 
16355
          return false;
-
 
16356
        if (!this.message.equals(that.message))
-
 
16357
          return false;
-
 
16358
      }
-
 
16359
 
-
 
16360
      return true;
-
 
16361
    }
-
 
16362
 
-
 
16363
    @Override
-
 
16364
    public int hashCode() {
-
 
16365
      return 0;
-
 
16366
    }
-
 
16367
 
-
 
16368
    public int compareTo(saveUserCommunication_args other) {
-
 
16369
      if (!getClass().equals(other.getClass())) {
-
 
16370
        return getClass().getName().compareTo(other.getClass().getName());
-
 
16371
      }
-
 
16372
 
-
 
16373
      int lastComparison = 0;
-
 
16374
      saveUserCommunication_args typedOther = (saveUserCommunication_args)other;
-
 
16375
 
-
 
16376
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
-
 
16377
      if (lastComparison != 0) {
-
 
16378
        return lastComparison;
-
 
16379
      }
-
 
16380
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
-
 
16381
      if (lastComparison != 0) {
-
 
16382
        return lastComparison;
-
 
16383
      }
-
 
16384
      lastComparison = Boolean.valueOf(isSetReplyTo()).compareTo(isSetReplyTo());
-
 
16385
      if (lastComparison != 0) {
-
 
16386
        return lastComparison;
-
 
16387
      }
-
 
16388
      lastComparison = TBaseHelper.compareTo(replyTo, typedOther.replyTo);
-
 
16389
      if (lastComparison != 0) {
-
 
16390
        return lastComparison;
-
 
16391
      }
-
 
16392
      lastComparison = Boolean.valueOf(isSetCommunicationType()).compareTo(isSetCommunicationType());
-
 
16393
      if (lastComparison != 0) {
-
 
16394
        return lastComparison;
-
 
16395
      }
-
 
16396
      lastComparison = TBaseHelper.compareTo(communicationType, typedOther.communicationType);
-
 
16397
      if (lastComparison != 0) {
-
 
16398
        return lastComparison;
-
 
16399
      }
-
 
16400
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
-
 
16401
      if (lastComparison != 0) {
-
 
16402
        return lastComparison;
-
 
16403
      }
-
 
16404
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
-
 
16405
      if (lastComparison != 0) {
-
 
16406
        return lastComparison;
-
 
16407
      }
-
 
16408
      lastComparison = Boolean.valueOf(isSetAirwaybillNo()).compareTo(isSetAirwaybillNo());
-
 
16409
      if (lastComparison != 0) {
-
 
16410
        return lastComparison;
-
 
16411
      }
-
 
16412
      lastComparison = TBaseHelper.compareTo(airwaybillNo, typedOther.airwaybillNo);
-
 
16413
      if (lastComparison != 0) {
-
 
16414
        return lastComparison;
-
 
16415
      }
-
 
16416
      lastComparison = Boolean.valueOf(isSetProductName()).compareTo(isSetProductName());
-
 
16417
      if (lastComparison != 0) {
-
 
16418
        return lastComparison;
-
 
16419
      }
-
 
16420
      lastComparison = TBaseHelper.compareTo(productName, typedOther.productName);
-
 
16421
      if (lastComparison != 0) {
-
 
16422
        return lastComparison;
-
 
16423
      }
-
 
16424
      lastComparison = Boolean.valueOf(isSetSubject()).compareTo(isSetSubject());
-
 
16425
      if (lastComparison != 0) {
-
 
16426
        return lastComparison;
-
 
16427
      }
-
 
16428
      lastComparison = TBaseHelper.compareTo(subject, typedOther.subject);
-
 
16429
      if (lastComparison != 0) {
-
 
16430
        return lastComparison;
-
 
16431
      }
-
 
16432
      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
-
 
16433
      if (lastComparison != 0) {
-
 
16434
        return lastComparison;
-
 
16435
      }
-
 
16436
      lastComparison = TBaseHelper.compareTo(message, typedOther.message);
-
 
16437
      if (lastComparison != 0) {
-
 
16438
        return lastComparison;
-
 
16439
      }
-
 
16440
      return 0;
-
 
16441
    }
-
 
16442
 
-
 
16443
    public void read(TProtocol iprot) throws TException {
-
 
16444
      TField field;
-
 
16445
      iprot.readStructBegin();
-
 
16446
      while (true)
-
 
16447
      {
-
 
16448
        field = iprot.readFieldBegin();
-
 
16449
        if (field.type == TType.STOP) { 
-
 
16450
          break;
-
 
16451
        }
-
 
16452
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
16453
        if (fieldId == null) {
-
 
16454
          TProtocolUtil.skip(iprot, field.type);
-
 
16455
        } else {
-
 
16456
          switch (fieldId) {
-
 
16457
            case USER_ID:
-
 
16458
              if (field.type == TType.I64) {
-
 
16459
                this.userId = iprot.readI64();
-
 
16460
                setUserIdIsSet(true);
-
 
16461
              } else { 
-
 
16462
                TProtocolUtil.skip(iprot, field.type);
-
 
16463
              }
-
 
16464
              break;
-
 
16465
            case REPLY_TO:
-
 
16466
              if (field.type == TType.STRING) {
-
 
16467
                this.replyTo = iprot.readString();
-
 
16468
              } else { 
-
 
16469
                TProtocolUtil.skip(iprot, field.type);
-
 
16470
              }
-
 
16471
              break;
-
 
16472
            case COMMUNICATION_TYPE:
-
 
16473
              if (field.type == TType.I64) {
-
 
16474
                this.communicationType = iprot.readI64();
-
 
16475
                setCommunicationTypeIsSet(true);
-
 
16476
              } else { 
-
 
16477
                TProtocolUtil.skip(iprot, field.type);
-
 
16478
              }
-
 
16479
              break;
-
 
16480
            case ORDER_ID:
-
 
16481
              if (field.type == TType.I64) {
-
 
16482
                this.orderId = iprot.readI64();
-
 
16483
                setOrderIdIsSet(true);
-
 
16484
              } else { 
-
 
16485
                TProtocolUtil.skip(iprot, field.type);
-
 
16486
              }
-
 
16487
              break;
-
 
16488
            case AIRWAYBILL_NO:
-
 
16489
              if (field.type == TType.STRING) {
-
 
16490
                this.airwaybillNo = iprot.readString();
-
 
16491
              } else { 
-
 
16492
                TProtocolUtil.skip(iprot, field.type);
-
 
16493
              }
-
 
16494
              break;
-
 
16495
            case PRODUCT_NAME:
-
 
16496
              if (field.type == TType.STRING) {
-
 
16497
                this.productName = iprot.readString();
-
 
16498
              } else { 
-
 
16499
                TProtocolUtil.skip(iprot, field.type);
-
 
16500
              }
-
 
16501
              break;
-
 
16502
            case SUBJECT:
-
 
16503
              if (field.type == TType.STRING) {
-
 
16504
                this.subject = iprot.readString();
-
 
16505
              } else { 
-
 
16506
                TProtocolUtil.skip(iprot, field.type);
-
 
16507
              }
-
 
16508
              break;
-
 
16509
            case MESSAGE:
-
 
16510
              if (field.type == TType.STRING) {
-
 
16511
                this.message = iprot.readString();
-
 
16512
              } else { 
-
 
16513
                TProtocolUtil.skip(iprot, field.type);
-
 
16514
              }
-
 
16515
              break;
-
 
16516
          }
-
 
16517
          iprot.readFieldEnd();
-
 
16518
        }
-
 
16519
      }
-
 
16520
      iprot.readStructEnd();
-
 
16521
      validate();
-
 
16522
    }
-
 
16523
 
-
 
16524
    public void write(TProtocol oprot) throws TException {
-
 
16525
      validate();
-
 
16526
 
-
 
16527
      oprot.writeStructBegin(STRUCT_DESC);
-
 
16528
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
-
 
16529
      oprot.writeI64(this.userId);
-
 
16530
      oprot.writeFieldEnd();
-
 
16531
      if (this.replyTo != null) {
-
 
16532
        oprot.writeFieldBegin(REPLY_TO_FIELD_DESC);
-
 
16533
        oprot.writeString(this.replyTo);
-
 
16534
        oprot.writeFieldEnd();
-
 
16535
      }
-
 
16536
      oprot.writeFieldBegin(COMMUNICATION_TYPE_FIELD_DESC);
-
 
16537
      oprot.writeI64(this.communicationType);
-
 
16538
      oprot.writeFieldEnd();
-
 
16539
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
-
 
16540
      oprot.writeI64(this.orderId);
-
 
16541
      oprot.writeFieldEnd();
-
 
16542
      if (this.airwaybillNo != null) {
-
 
16543
        oprot.writeFieldBegin(AIRWAYBILL_NO_FIELD_DESC);
-
 
16544
        oprot.writeString(this.airwaybillNo);
-
 
16545
        oprot.writeFieldEnd();
-
 
16546
      }
-
 
16547
      if (this.productName != null) {
-
 
16548
        oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
-
 
16549
        oprot.writeString(this.productName);
-
 
16550
        oprot.writeFieldEnd();
-
 
16551
      }
-
 
16552
      if (this.subject != null) {
-
 
16553
        oprot.writeFieldBegin(SUBJECT_FIELD_DESC);
-
 
16554
        oprot.writeString(this.subject);
-
 
16555
        oprot.writeFieldEnd();
-
 
16556
      }
-
 
16557
      if (this.message != null) {
-
 
16558
        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
-
 
16559
        oprot.writeString(this.message);
-
 
16560
        oprot.writeFieldEnd();
-
 
16561
      }
-
 
16562
      oprot.writeFieldStop();
-
 
16563
      oprot.writeStructEnd();
-
 
16564
    }
-
 
16565
 
-
 
16566
    @Override
-
 
16567
    public String toString() {
-
 
16568
      StringBuilder sb = new StringBuilder("saveUserCommunication_args(");
-
 
16569
      boolean first = true;
-
 
16570
 
-
 
16571
      sb.append("userId:");
-
 
16572
      sb.append(this.userId);
-
 
16573
      first = false;
-
 
16574
      if (!first) sb.append(", ");
-
 
16575
      sb.append("replyTo:");
-
 
16576
      if (this.replyTo == null) {
-
 
16577
        sb.append("null");
-
 
16578
      } else {
-
 
16579
        sb.append(this.replyTo);
-
 
16580
      }
-
 
16581
      first = false;
-
 
16582
      if (!first) sb.append(", ");
-
 
16583
      sb.append("communicationType:");
-
 
16584
      sb.append(this.communicationType);
-
 
16585
      first = false;
-
 
16586
      if (!first) sb.append(", ");
-
 
16587
      sb.append("orderId:");
-
 
16588
      sb.append(this.orderId);
-
 
16589
      first = false;
-
 
16590
      if (!first) sb.append(", ");
-
 
16591
      sb.append("airwaybillNo:");
-
 
16592
      if (this.airwaybillNo == null) {
-
 
16593
        sb.append("null");
-
 
16594
      } else {
-
 
16595
        sb.append(this.airwaybillNo);
-
 
16596
      }
-
 
16597
      first = false;
-
 
16598
      if (!first) sb.append(", ");
-
 
16599
      sb.append("productName:");
-
 
16600
      if (this.productName == null) {
-
 
16601
        sb.append("null");
-
 
16602
      } else {
-
 
16603
        sb.append(this.productName);
-
 
16604
      }
-
 
16605
      first = false;
-
 
16606
      if (!first) sb.append(", ");
-
 
16607
      sb.append("subject:");
-
 
16608
      if (this.subject == null) {
-
 
16609
        sb.append("null");
-
 
16610
      } else {
-
 
16611
        sb.append(this.subject);
-
 
16612
      }
-
 
16613
      first = false;
-
 
16614
      if (!first) sb.append(", ");
-
 
16615
      sb.append("message:");
-
 
16616
      if (this.message == null) {
-
 
16617
        sb.append("null");
-
 
16618
      } else {
-
 
16619
        sb.append(this.message);
-
 
16620
      }
-
 
16621
      first = false;
-
 
16622
      sb.append(")");
-
 
16623
      return sb.toString();
-
 
16624
    }
-
 
16625
 
-
 
16626
    public void validate() throws TException {
-
 
16627
      // check for required fields
-
 
16628
    }
-
 
16629
 
-
 
16630
  }
-
 
16631
 
-
 
16632
  public static class saveUserCommunication_result implements TBase<saveUserCommunication_result._Fields>, java.io.Serializable, Cloneable, Comparable<saveUserCommunication_result>   {
-
 
16633
    private static final TStruct STRUCT_DESC = new TStruct("saveUserCommunication_result");
-
 
16634
 
-
 
16635
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
-
 
16636
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
-
 
16637
 
-
 
16638
    private boolean success;
-
 
16639
    private UserCommunicationException ucx;
-
 
16640
 
-
 
16641
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
16642
    public enum _Fields implements TFieldIdEnum {
-
 
16643
      SUCCESS((short)0, "success"),
-
 
16644
      UCX((short)1, "ucx");
-
 
16645
 
-
 
16646
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
16647
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
16648
 
-
 
16649
      static {
-
 
16650
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
16651
          byId.put((int)field._thriftId, field);
-
 
16652
          byName.put(field.getFieldName(), field);
-
 
16653
        }
-
 
16654
      }
-
 
16655
 
-
 
16656
      /**
-
 
16657
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
16658
       */
-
 
16659
      public static _Fields findByThriftId(int fieldId) {
-
 
16660
        return byId.get(fieldId);
-
 
16661
      }
-
 
16662
 
-
 
16663
      /**
-
 
16664
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
16665
       * if it is not found.
-
 
16666
       */
-
 
16667
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
16668
        _Fields fields = findByThriftId(fieldId);
-
 
16669
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
16670
        return fields;
-
 
16671
      }
-
 
16672
 
-
 
16673
      /**
-
 
16674
       * Find the _Fields constant that matches name, or null if its not found.
-
 
16675
       */
-
 
16676
      public static _Fields findByName(String name) {
-
 
16677
        return byName.get(name);
-
 
16678
      }
-
 
16679
 
-
 
16680
      private final short _thriftId;
-
 
16681
      private final String _fieldName;
-
 
16682
 
-
 
16683
      _Fields(short thriftId, String fieldName) {
-
 
16684
        _thriftId = thriftId;
-
 
16685
        _fieldName = fieldName;
-
 
16686
      }
-
 
16687
 
-
 
16688
      public short getThriftFieldId() {
-
 
16689
        return _thriftId;
-
 
16690
      }
-
 
16691
 
-
 
16692
      public String getFieldName() {
-
 
16693
        return _fieldName;
-
 
16694
      }
-
 
16695
    }
-
 
16696
 
-
 
16697
    // isset id assignments
-
 
16698
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
16699
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
16700
 
-
 
16701
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
16702
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
16703
          new FieldValueMetaData(TType.BOOL)));
-
 
16704
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
-
 
16705
          new FieldValueMetaData(TType.STRUCT)));
-
 
16706
    }});
-
 
16707
 
-
 
16708
    static {
-
 
16709
      FieldMetaData.addStructMetaDataMap(saveUserCommunication_result.class, metaDataMap);
-
 
16710
    }
-
 
16711
 
-
 
16712
    public saveUserCommunication_result() {
-
 
16713
    }
-
 
16714
 
-
 
16715
    public saveUserCommunication_result(
-
 
16716
      boolean success,
-
 
16717
      UserCommunicationException ucx)
-
 
16718
    {
-
 
16719
      this();
-
 
16720
      this.success = success;
-
 
16721
      setSuccessIsSet(true);
-
 
16722
      this.ucx = ucx;
-
 
16723
    }
-
 
16724
 
-
 
16725
    /**
-
 
16726
     * Performs a deep copy on <i>other</i>.
-
 
16727
     */
-
 
16728
    public saveUserCommunication_result(saveUserCommunication_result other) {
-
 
16729
      __isset_bit_vector.clear();
-
 
16730
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
16731
      this.success = other.success;
-
 
16732
      if (other.isSetUcx()) {
-
 
16733
        this.ucx = new UserCommunicationException(other.ucx);
-
 
16734
      }
-
 
16735
    }
-
 
16736
 
-
 
16737
    public saveUserCommunication_result deepCopy() {
-
 
16738
      return new saveUserCommunication_result(this);
-
 
16739
    }
-
 
16740
 
-
 
16741
    @Deprecated
-
 
16742
    public saveUserCommunication_result clone() {
-
 
16743
      return new saveUserCommunication_result(this);
-
 
16744
    }
-
 
16745
 
-
 
16746
    public boolean isSuccess() {
-
 
16747
      return this.success;
-
 
16748
    }
-
 
16749
 
-
 
16750
    public saveUserCommunication_result setSuccess(boolean success) {
-
 
16751
      this.success = success;
-
 
16752
      setSuccessIsSet(true);
-
 
16753
      return this;
-
 
16754
    }
-
 
16755
 
-
 
16756
    public void unsetSuccess() {
-
 
16757
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
16758
    }
-
 
16759
 
-
 
16760
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
16761
    public boolean isSetSuccess() {
-
 
16762
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
16763
    }
-
 
16764
 
-
 
16765
    public void setSuccessIsSet(boolean value) {
-
 
16766
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
16767
    }
-
 
16768
 
-
 
16769
    public UserCommunicationException getUcx() {
-
 
16770
      return this.ucx;
-
 
16771
    }
-
 
16772
 
-
 
16773
    public saveUserCommunication_result setUcx(UserCommunicationException ucx) {
-
 
16774
      this.ucx = ucx;
-
 
16775
      return this;
-
 
16776
    }
-
 
16777
 
-
 
16778
    public void unsetUcx() {
-
 
16779
      this.ucx = null;
-
 
16780
    }
-
 
16781
 
-
 
16782
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
-
 
16783
    public boolean isSetUcx() {
-
 
16784
      return this.ucx != null;
-
 
16785
    }
-
 
16786
 
-
 
16787
    public void setUcxIsSet(boolean value) {
-
 
16788
      if (!value) {
-
 
16789
        this.ucx = null;
-
 
16790
      }
-
 
16791
    }
-
 
16792
 
-
 
16793
    public void setFieldValue(_Fields field, Object value) {
-
 
16794
      switch (field) {
-
 
16795
      case SUCCESS:
-
 
16796
        if (value == null) {
-
 
16797
          unsetSuccess();
-
 
16798
        } else {
-
 
16799
          setSuccess((Boolean)value);
-
 
16800
        }
-
 
16801
        break;
-
 
16802
 
-
 
16803
      case UCX:
-
 
16804
        if (value == null) {
-
 
16805
          unsetUcx();
-
 
16806
        } else {
-
 
16807
          setUcx((UserCommunicationException)value);
-
 
16808
        }
-
 
16809
        break;
-
 
16810
 
-
 
16811
      }
-
 
16812
    }
-
 
16813
 
-
 
16814
    public void setFieldValue(int fieldID, Object value) {
-
 
16815
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
16816
    }
-
 
16817
 
-
 
16818
    public Object getFieldValue(_Fields field) {
-
 
16819
      switch (field) {
-
 
16820
      case SUCCESS:
-
 
16821
        return new Boolean(isSuccess());
-
 
16822
 
-
 
16823
      case UCX:
-
 
16824
        return getUcx();
-
 
16825
 
-
 
16826
      }
-
 
16827
      throw new IllegalStateException();
-
 
16828
    }
-
 
16829
 
-
 
16830
    public Object getFieldValue(int fieldId) {
-
 
16831
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
16832
    }
-
 
16833
 
-
 
16834
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
16835
    public boolean isSet(_Fields field) {
-
 
16836
      switch (field) {
-
 
16837
      case SUCCESS:
-
 
16838
        return isSetSuccess();
-
 
16839
      case UCX:
-
 
16840
        return isSetUcx();
-
 
16841
      }
-
 
16842
      throw new IllegalStateException();
-
 
16843
    }
-
 
16844
 
-
 
16845
    public boolean isSet(int fieldID) {
-
 
16846
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
16847
    }
-
 
16848
 
-
 
16849
    @Override
-
 
16850
    public boolean equals(Object that) {
-
 
16851
      if (that == null)
-
 
16852
        return false;
-
 
16853
      if (that instanceof saveUserCommunication_result)
-
 
16854
        return this.equals((saveUserCommunication_result)that);
-
 
16855
      return false;
-
 
16856
    }
-
 
16857
 
-
 
16858
    public boolean equals(saveUserCommunication_result that) {
-
 
16859
      if (that == null)
-
 
16860
        return false;
-
 
16861
 
-
 
16862
      boolean this_present_success = true;
-
 
16863
      boolean that_present_success = true;
-
 
16864
      if (this_present_success || that_present_success) {
-
 
16865
        if (!(this_present_success && that_present_success))
-
 
16866
          return false;
-
 
16867
        if (this.success != that.success)
-
 
16868
          return false;
-
 
16869
      }
-
 
16870
 
-
 
16871
      boolean this_present_ucx = true && this.isSetUcx();
-
 
16872
      boolean that_present_ucx = true && that.isSetUcx();
-
 
16873
      if (this_present_ucx || that_present_ucx) {
-
 
16874
        if (!(this_present_ucx && that_present_ucx))
-
 
16875
          return false;
-
 
16876
        if (!this.ucx.equals(that.ucx))
-
 
16877
          return false;
-
 
16878
      }
-
 
16879
 
-
 
16880
      return true;
-
 
16881
    }
-
 
16882
 
-
 
16883
    @Override
-
 
16884
    public int hashCode() {
-
 
16885
      return 0;
-
 
16886
    }
-
 
16887
 
-
 
16888
    public int compareTo(saveUserCommunication_result other) {
-
 
16889
      if (!getClass().equals(other.getClass())) {
-
 
16890
        return getClass().getName().compareTo(other.getClass().getName());
-
 
16891
      }
-
 
16892
 
-
 
16893
      int lastComparison = 0;
-
 
16894
      saveUserCommunication_result typedOther = (saveUserCommunication_result)other;
-
 
16895
 
-
 
16896
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
16897
      if (lastComparison != 0) {
-
 
16898
        return lastComparison;
-
 
16899
      }
-
 
16900
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
16901
      if (lastComparison != 0) {
-
 
16902
        return lastComparison;
-
 
16903
      }
-
 
16904
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
-
 
16905
      if (lastComparison != 0) {
-
 
16906
        return lastComparison;
-
 
16907
      }
-
 
16908
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
-
 
16909
      if (lastComparison != 0) {
-
 
16910
        return lastComparison;
-
 
16911
      }
-
 
16912
      return 0;
-
 
16913
    }
-
 
16914
 
-
 
16915
    public void read(TProtocol iprot) throws TException {
-
 
16916
      TField field;
-
 
16917
      iprot.readStructBegin();
-
 
16918
      while (true)
-
 
16919
      {
-
 
16920
        field = iprot.readFieldBegin();
-
 
16921
        if (field.type == TType.STOP) { 
-
 
16922
          break;
-
 
16923
        }
-
 
16924
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
16925
        if (fieldId == null) {
-
 
16926
          TProtocolUtil.skip(iprot, field.type);
-
 
16927
        } else {
-
 
16928
          switch (fieldId) {
-
 
16929
            case SUCCESS:
-
 
16930
              if (field.type == TType.BOOL) {
-
 
16931
                this.success = iprot.readBool();
-
 
16932
                setSuccessIsSet(true);
-
 
16933
              } else { 
-
 
16934
                TProtocolUtil.skip(iprot, field.type);
-
 
16935
              }
-
 
16936
              break;
-
 
16937
            case UCX:
-
 
16938
              if (field.type == TType.STRUCT) {
-
 
16939
                this.ucx = new UserCommunicationException();
-
 
16940
                this.ucx.read(iprot);
-
 
16941
              } else { 
-
 
16942
                TProtocolUtil.skip(iprot, field.type);
-
 
16943
              }
-
 
16944
              break;
-
 
16945
          }
-
 
16946
          iprot.readFieldEnd();
-
 
16947
        }
-
 
16948
      }
-
 
16949
      iprot.readStructEnd();
-
 
16950
      validate();
-
 
16951
    }
-
 
16952
 
-
 
16953
    public void write(TProtocol oprot) throws TException {
-
 
16954
      oprot.writeStructBegin(STRUCT_DESC);
-
 
16955
 
-
 
16956
      if (this.isSetSuccess()) {
-
 
16957
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
16958
        oprot.writeBool(this.success);
-
 
16959
        oprot.writeFieldEnd();
-
 
16960
      } else if (this.isSetUcx()) {
-
 
16961
        oprot.writeFieldBegin(UCX_FIELD_DESC);
-
 
16962
        this.ucx.write(oprot);
-
 
16963
        oprot.writeFieldEnd();
-
 
16964
      }
-
 
16965
      oprot.writeFieldStop();
-
 
16966
      oprot.writeStructEnd();
-
 
16967
    }
-
 
16968
 
-
 
16969
    @Override
-
 
16970
    public String toString() {
-
 
16971
      StringBuilder sb = new StringBuilder("saveUserCommunication_result(");
-
 
16972
      boolean first = true;
-
 
16973
 
-
 
16974
      sb.append("success:");
-
 
16975
      sb.append(this.success);
-
 
16976
      first = false;
-
 
16977
      if (!first) sb.append(", ");
-
 
16978
      sb.append("ucx:");
-
 
16979
      if (this.ucx == null) {
-
 
16980
        sb.append("null");
15689
      } else {
16981
      } else {
15690
        sb.append(this.ucx);
16982
        sb.append(this.ucx);
15691
      }
16983
      }
15692
      first = false;
16984
      first = false;
15693
      sb.append(")");
16985
      sb.append(")");