Subversion Repositories SmartDukaan

Rev

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

Rev 1611 Rev 1891
Line 82... Line 82...
82
     * @param username
82
     * @param username
83
     * @param password
83
     * @param password
84
     */
84
     */
85
    public StatisticsUser authenticateStatisticsUser(String username, String password) throws HelperServiceException, TException;
85
    public StatisticsUser authenticateStatisticsUser(String username, String password) throws HelperServiceException, TException;
86
 
86
 
-
 
87
    /**
-
 
88
     * Returns the ReportUser struct associated with the given username and password if they match.
-
 
89
     * Throws an exception otherwise.
-
 
90
     * 
-
 
91
     * @param username
-
 
92
     * @param password
-
 
93
     */
-
 
94
    public ReportUser authenticateReportUser(String username, String password) throws HelperServiceException, TException;
-
 
95
 
-
 
96
    /**
-
 
97
     * Returns list of reports which are configured for the given role.
-
 
98
     * 
-
 
99
     * @param role
-
 
100
     */
-
 
101
    public List<Report> getReports(long role) throws TException;
-
 
102
 
87
  }
103
  }
88
 
104
 
89
  public static class Client implements Iface {
105
  public static class Client implements Iface {
90
    public Client(TProtocol prot)
106
    public Client(TProtocol prot)
91
    {
107
    {
Line 676... Line 692...
676
        throw result.hse;
692
        throw result.hse;
677
      }
693
      }
678
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateStatisticsUser failed: unknown result");
694
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateStatisticsUser failed: unknown result");
679
    }
695
    }
680
 
696
 
-
 
697
    public ReportUser authenticateReportUser(String username, String password) throws HelperServiceException, TException
-
 
698
    {
-
 
699
      send_authenticateReportUser(username, password);
-
 
700
      return recv_authenticateReportUser();
-
 
701
    }
-
 
702
 
-
 
703
    public void send_authenticateReportUser(String username, String password) throws TException
-
 
704
    {
-
 
705
      oprot_.writeMessageBegin(new TMessage("authenticateReportUser", TMessageType.CALL, seqid_));
-
 
706
      authenticateReportUser_args args = new authenticateReportUser_args();
-
 
707
      args.username = username;
-
 
708
      args.password = password;
-
 
709
      args.write(oprot_);
-
 
710
      oprot_.writeMessageEnd();
-
 
711
      oprot_.getTransport().flush();
-
 
712
    }
-
 
713
 
-
 
714
    public ReportUser recv_authenticateReportUser() throws HelperServiceException, TException
-
 
715
    {
-
 
716
      TMessage msg = iprot_.readMessageBegin();
-
 
717
      if (msg.type == TMessageType.EXCEPTION) {
-
 
718
        TApplicationException x = TApplicationException.read(iprot_);
-
 
719
        iprot_.readMessageEnd();
-
 
720
        throw x;
-
 
721
      }
-
 
722
      authenticateReportUser_result result = new authenticateReportUser_result();
-
 
723
      result.read(iprot_);
-
 
724
      iprot_.readMessageEnd();
-
 
725
      if (result.isSetSuccess()) {
-
 
726
        return result.success;
-
 
727
      }
-
 
728
      if (result.hse != null) {
-
 
729
        throw result.hse;
-
 
730
      }
-
 
731
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateReportUser failed: unknown result");
-
 
732
    }
-
 
733
 
-
 
734
    public List<Report> getReports(long role) throws TException
-
 
735
    {
-
 
736
      send_getReports(role);
-
 
737
      return recv_getReports();
-
 
738
    }
-
 
739
 
-
 
740
    public void send_getReports(long role) throws TException
-
 
741
    {
-
 
742
      oprot_.writeMessageBegin(new TMessage("getReports", TMessageType.CALL, seqid_));
-
 
743
      getReports_args args = new getReports_args();
-
 
744
      args.role = role;
-
 
745
      args.write(oprot_);
-
 
746
      oprot_.writeMessageEnd();
-
 
747
      oprot_.getTransport().flush();
-
 
748
    }
-
 
749
 
-
 
750
    public List<Report> recv_getReports() throws TException
-
 
751
    {
-
 
752
      TMessage msg = iprot_.readMessageBegin();
-
 
753
      if (msg.type == TMessageType.EXCEPTION) {
-
 
754
        TApplicationException x = TApplicationException.read(iprot_);
-
 
755
        iprot_.readMessageEnd();
-
 
756
        throw x;
-
 
757
      }
-
 
758
      getReports_result result = new getReports_result();
-
 
759
      result.read(iprot_);
-
 
760
      iprot_.readMessageEnd();
-
 
761
      if (result.isSetSuccess()) {
-
 
762
        return result.success;
-
 
763
      }
-
 
764
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReports failed: unknown result");
-
 
765
    }
-
 
766
 
681
  }
767
  }
682
  public static class Processor implements TProcessor {
768
  public static class Processor implements TProcessor {
683
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
769
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
684
    public Processor(Iface iface)
770
    public Processor(Iface iface)
685
    {
771
    {
Line 698... Line 784...
698
      processMap_.put("deleteUser", new deleteUser());
784
      processMap_.put("deleteUser", new deleteUser());
699
      processMap_.put("authenticateUser", new authenticateUser());
785
      processMap_.put("authenticateUser", new authenticateUser());
700
      processMap_.put("updatePassword", new updatePassword());
786
      processMap_.put("updatePassword", new updatePassword());
701
      processMap_.put("authenticateLogisticsUser", new authenticateLogisticsUser());
787
      processMap_.put("authenticateLogisticsUser", new authenticateLogisticsUser());
702
      processMap_.put("authenticateStatisticsUser", new authenticateStatisticsUser());
788
      processMap_.put("authenticateStatisticsUser", new authenticateStatisticsUser());
-
 
789
      processMap_.put("authenticateReportUser", new authenticateReportUser());
-
 
790
      processMap_.put("getReports", new getReports());
703
    }
791
    }
704
 
792
 
705
    protected static interface ProcessFunction {
793
    protected static interface ProcessFunction {
706
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
794
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
707
    }
795
    }
Line 1165... Line 1253...
1165
        oprot.getTransport().flush();
1253
        oprot.getTransport().flush();
1166
      }
1254
      }
1167
 
1255
 
1168
    }
1256
    }
1169
 
1257
 
-
 
1258
    private class authenticateReportUser implements ProcessFunction {
-
 
1259
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
1260
      {
-
 
1261
        authenticateReportUser_args args = new authenticateReportUser_args();
-
 
1262
        args.read(iprot);
-
 
1263
        iprot.readMessageEnd();
-
 
1264
        authenticateReportUser_result result = new authenticateReportUser_result();
-
 
1265
        try {
-
 
1266
          result.success = iface_.authenticateReportUser(args.username, args.password);
-
 
1267
        } catch (HelperServiceException hse) {
-
 
1268
          result.hse = hse;
-
 
1269
        } catch (Throwable th) {
-
 
1270
          LOGGER.error("Internal error processing authenticateReportUser", th);
-
 
1271
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateReportUser");
-
 
1272
          oprot.writeMessageBegin(new TMessage("authenticateReportUser", TMessageType.EXCEPTION, seqid));
-
 
1273
          x.write(oprot);
-
 
1274
          oprot.writeMessageEnd();
-
 
1275
          oprot.getTransport().flush();
-
 
1276
          return;
-
 
1277
        }
-
 
1278
        oprot.writeMessageBegin(new TMessage("authenticateReportUser", TMessageType.REPLY, seqid));
-
 
1279
        result.write(oprot);
-
 
1280
        oprot.writeMessageEnd();
-
 
1281
        oprot.getTransport().flush();
-
 
1282
      }
-
 
1283
 
-
 
1284
    }
-
 
1285
 
-
 
1286
    private class getReports implements ProcessFunction {
-
 
1287
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
1288
      {
-
 
1289
        getReports_args args = new getReports_args();
-
 
1290
        args.read(iprot);
-
 
1291
        iprot.readMessageEnd();
-
 
1292
        getReports_result result = new getReports_result();
-
 
1293
        result.success = iface_.getReports(args.role);
-
 
1294
        oprot.writeMessageBegin(new TMessage("getReports", TMessageType.REPLY, seqid));
-
 
1295
        result.write(oprot);
-
 
1296
        oprot.writeMessageEnd();
-
 
1297
        oprot.getTransport().flush();
-
 
1298
      }
-
 
1299
 
-
 
1300
    }
-
 
1301
 
1170
  }
1302
  }
1171
 
1303
 
1172
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1304
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1173
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1305
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1174
 
1306
 
Line 11938... Line 12070...
11938
      }
12070
      }
11939
      first = false;
12071
      first = false;
11940
      sb.append(")");
12072
      sb.append(")");
11941
      return sb.toString();
12073
      return sb.toString();
11942
    }
12074
    }
-
 
12075
 
-
 
12076
    public void validate() throws TException {
-
 
12077
      // check for required fields
-
 
12078
    }
-
 
12079
 
-
 
12080
  }
-
 
12081
 
-
 
12082
  public static class authenticateReportUser_args implements TBase<authenticateReportUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateReportUser_args>   {
-
 
12083
    private static final TStruct STRUCT_DESC = new TStruct("authenticateReportUser_args");
-
 
12084
 
-
 
12085
    private static final TField USERNAME_FIELD_DESC = new TField("username", TType.STRING, (short)1);
-
 
12086
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
-
 
12087
 
-
 
12088
    private String username;
-
 
12089
    private String password;
-
 
12090
 
-
 
12091
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
12092
    public enum _Fields implements TFieldIdEnum {
-
 
12093
      USERNAME((short)1, "username"),
-
 
12094
      PASSWORD((short)2, "password");
-
 
12095
 
-
 
12096
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
12097
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
12098
 
-
 
12099
      static {
-
 
12100
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
12101
          byId.put((int)field._thriftId, field);
-
 
12102
          byName.put(field.getFieldName(), field);
-
 
12103
        }
-
 
12104
      }
-
 
12105
 
-
 
12106
      /**
-
 
12107
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
12108
       */
-
 
12109
      public static _Fields findByThriftId(int fieldId) {
-
 
12110
        return byId.get(fieldId);
-
 
12111
      }
-
 
12112
 
-
 
12113
      /**
-
 
12114
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
12115
       * if it is not found.
-
 
12116
       */
-
 
12117
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
12118
        _Fields fields = findByThriftId(fieldId);
-
 
12119
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
12120
        return fields;
-
 
12121
      }
-
 
12122
 
-
 
12123
      /**
-
 
12124
       * Find the _Fields constant that matches name, or null if its not found.
-
 
12125
       */
-
 
12126
      public static _Fields findByName(String name) {
-
 
12127
        return byName.get(name);
-
 
12128
      }
-
 
12129
 
-
 
12130
      private final short _thriftId;
-
 
12131
      private final String _fieldName;
-
 
12132
 
-
 
12133
      _Fields(short thriftId, String fieldName) {
-
 
12134
        _thriftId = thriftId;
-
 
12135
        _fieldName = fieldName;
-
 
12136
      }
-
 
12137
 
-
 
12138
      public short getThriftFieldId() {
-
 
12139
        return _thriftId;
-
 
12140
      }
-
 
12141
 
-
 
12142
      public String getFieldName() {
-
 
12143
        return _fieldName;
-
 
12144
      }
-
 
12145
    }
-
 
12146
 
-
 
12147
    // isset id assignments
-
 
12148
 
-
 
12149
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
12150
      put(_Fields.USERNAME, new FieldMetaData("username", TFieldRequirementType.DEFAULT, 
-
 
12151
          new FieldValueMetaData(TType.STRING)));
-
 
12152
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
-
 
12153
          new FieldValueMetaData(TType.STRING)));
-
 
12154
    }});
-
 
12155
 
-
 
12156
    static {
-
 
12157
      FieldMetaData.addStructMetaDataMap(authenticateReportUser_args.class, metaDataMap);
-
 
12158
    }
-
 
12159
 
-
 
12160
    public authenticateReportUser_args() {
-
 
12161
    }
-
 
12162
 
-
 
12163
    public authenticateReportUser_args(
-
 
12164
      String username,
-
 
12165
      String password)
-
 
12166
    {
-
 
12167
      this();
-
 
12168
      this.username = username;
-
 
12169
      this.password = password;
-
 
12170
    }
-
 
12171
 
-
 
12172
    /**
-
 
12173
     * Performs a deep copy on <i>other</i>.
-
 
12174
     */
-
 
12175
    public authenticateReportUser_args(authenticateReportUser_args other) {
-
 
12176
      if (other.isSetUsername()) {
-
 
12177
        this.username = other.username;
-
 
12178
      }
-
 
12179
      if (other.isSetPassword()) {
-
 
12180
        this.password = other.password;
-
 
12181
      }
-
 
12182
    }
-
 
12183
 
-
 
12184
    public authenticateReportUser_args deepCopy() {
-
 
12185
      return new authenticateReportUser_args(this);
-
 
12186
    }
-
 
12187
 
-
 
12188
    @Deprecated
-
 
12189
    public authenticateReportUser_args clone() {
-
 
12190
      return new authenticateReportUser_args(this);
-
 
12191
    }
-
 
12192
 
-
 
12193
    public String getUsername() {
-
 
12194
      return this.username;
-
 
12195
    }
-
 
12196
 
-
 
12197
    public authenticateReportUser_args setUsername(String username) {
-
 
12198
      this.username = username;
-
 
12199
      return this;
-
 
12200
    }
-
 
12201
 
-
 
12202
    public void unsetUsername() {
-
 
12203
      this.username = null;
-
 
12204
    }
-
 
12205
 
-
 
12206
    /** Returns true if field username is set (has been asigned a value) and false otherwise */
-
 
12207
    public boolean isSetUsername() {
-
 
12208
      return this.username != null;
-
 
12209
    }
-
 
12210
 
-
 
12211
    public void setUsernameIsSet(boolean value) {
-
 
12212
      if (!value) {
-
 
12213
        this.username = null;
-
 
12214
      }
-
 
12215
    }
-
 
12216
 
-
 
12217
    public String getPassword() {
-
 
12218
      return this.password;
-
 
12219
    }
-
 
12220
 
-
 
12221
    public authenticateReportUser_args setPassword(String password) {
-
 
12222
      this.password = password;
-
 
12223
      return this;
-
 
12224
    }
-
 
12225
 
-
 
12226
    public void unsetPassword() {
-
 
12227
      this.password = null;
-
 
12228
    }
-
 
12229
 
-
 
12230
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
-
 
12231
    public boolean isSetPassword() {
-
 
12232
      return this.password != null;
-
 
12233
    }
-
 
12234
 
-
 
12235
    public void setPasswordIsSet(boolean value) {
-
 
12236
      if (!value) {
-
 
12237
        this.password = null;
-
 
12238
      }
-
 
12239
    }
-
 
12240
 
-
 
12241
    public void setFieldValue(_Fields field, Object value) {
-
 
12242
      switch (field) {
-
 
12243
      case USERNAME:
-
 
12244
        if (value == null) {
-
 
12245
          unsetUsername();
-
 
12246
        } else {
-
 
12247
          setUsername((String)value);
-
 
12248
        }
-
 
12249
        break;
-
 
12250
 
-
 
12251
      case PASSWORD:
-
 
12252
        if (value == null) {
-
 
12253
          unsetPassword();
-
 
12254
        } else {
-
 
12255
          setPassword((String)value);
-
 
12256
        }
-
 
12257
        break;
-
 
12258
 
-
 
12259
      }
-
 
12260
    }
-
 
12261
 
-
 
12262
    public void setFieldValue(int fieldID, Object value) {
-
 
12263
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
12264
    }
-
 
12265
 
-
 
12266
    public Object getFieldValue(_Fields field) {
-
 
12267
      switch (field) {
-
 
12268
      case USERNAME:
-
 
12269
        return getUsername();
-
 
12270
 
-
 
12271
      case PASSWORD:
-
 
12272
        return getPassword();
-
 
12273
 
-
 
12274
      }
-
 
12275
      throw new IllegalStateException();
-
 
12276
    }
-
 
12277
 
-
 
12278
    public Object getFieldValue(int fieldId) {
-
 
12279
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
12280
    }
-
 
12281
 
-
 
12282
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
12283
    public boolean isSet(_Fields field) {
-
 
12284
      switch (field) {
-
 
12285
      case USERNAME:
-
 
12286
        return isSetUsername();
-
 
12287
      case PASSWORD:
-
 
12288
        return isSetPassword();
-
 
12289
      }
-
 
12290
      throw new IllegalStateException();
-
 
12291
    }
-
 
12292
 
-
 
12293
    public boolean isSet(int fieldID) {
-
 
12294
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
12295
    }
-
 
12296
 
-
 
12297
    @Override
-
 
12298
    public boolean equals(Object that) {
-
 
12299
      if (that == null)
-
 
12300
        return false;
-
 
12301
      if (that instanceof authenticateReportUser_args)
-
 
12302
        return this.equals((authenticateReportUser_args)that);
-
 
12303
      return false;
-
 
12304
    }
-
 
12305
 
-
 
12306
    public boolean equals(authenticateReportUser_args that) {
-
 
12307
      if (that == null)
-
 
12308
        return false;
-
 
12309
 
-
 
12310
      boolean this_present_username = true && this.isSetUsername();
-
 
12311
      boolean that_present_username = true && that.isSetUsername();
-
 
12312
      if (this_present_username || that_present_username) {
-
 
12313
        if (!(this_present_username && that_present_username))
-
 
12314
          return false;
-
 
12315
        if (!this.username.equals(that.username))
-
 
12316
          return false;
-
 
12317
      }
-
 
12318
 
-
 
12319
      boolean this_present_password = true && this.isSetPassword();
-
 
12320
      boolean that_present_password = true && that.isSetPassword();
-
 
12321
      if (this_present_password || that_present_password) {
-
 
12322
        if (!(this_present_password && that_present_password))
-
 
12323
          return false;
-
 
12324
        if (!this.password.equals(that.password))
-
 
12325
          return false;
-
 
12326
      }
-
 
12327
 
-
 
12328
      return true;
-
 
12329
    }
-
 
12330
 
-
 
12331
    @Override
-
 
12332
    public int hashCode() {
-
 
12333
      return 0;
-
 
12334
    }
-
 
12335
 
-
 
12336
    public int compareTo(authenticateReportUser_args other) {
-
 
12337
      if (!getClass().equals(other.getClass())) {
-
 
12338
        return getClass().getName().compareTo(other.getClass().getName());
-
 
12339
      }
-
 
12340
 
-
 
12341
      int lastComparison = 0;
-
 
12342
      authenticateReportUser_args typedOther = (authenticateReportUser_args)other;
-
 
12343
 
-
 
12344
      lastComparison = Boolean.valueOf(isSetUsername()).compareTo(isSetUsername());
-
 
12345
      if (lastComparison != 0) {
-
 
12346
        return lastComparison;
-
 
12347
      }
-
 
12348
      lastComparison = TBaseHelper.compareTo(username, typedOther.username);
-
 
12349
      if (lastComparison != 0) {
-
 
12350
        return lastComparison;
-
 
12351
      }
-
 
12352
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
-
 
12353
      if (lastComparison != 0) {
-
 
12354
        return lastComparison;
-
 
12355
      }
-
 
12356
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
-
 
12357
      if (lastComparison != 0) {
-
 
12358
        return lastComparison;
-
 
12359
      }
-
 
12360
      return 0;
-
 
12361
    }
-
 
12362
 
-
 
12363
    public void read(TProtocol iprot) throws TException {
-
 
12364
      TField field;
-
 
12365
      iprot.readStructBegin();
-
 
12366
      while (true)
-
 
12367
      {
-
 
12368
        field = iprot.readFieldBegin();
-
 
12369
        if (field.type == TType.STOP) { 
-
 
12370
          break;
-
 
12371
        }
-
 
12372
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
12373
        if (fieldId == null) {
-
 
12374
          TProtocolUtil.skip(iprot, field.type);
-
 
12375
        } else {
-
 
12376
          switch (fieldId) {
-
 
12377
            case USERNAME:
-
 
12378
              if (field.type == TType.STRING) {
-
 
12379
                this.username = iprot.readString();
-
 
12380
              } else { 
-
 
12381
                TProtocolUtil.skip(iprot, field.type);
-
 
12382
              }
-
 
12383
              break;
-
 
12384
            case PASSWORD:
-
 
12385
              if (field.type == TType.STRING) {
-
 
12386
                this.password = iprot.readString();
-
 
12387
              } else { 
-
 
12388
                TProtocolUtil.skip(iprot, field.type);
-
 
12389
              }
-
 
12390
              break;
-
 
12391
          }
-
 
12392
          iprot.readFieldEnd();
-
 
12393
        }
-
 
12394
      }
-
 
12395
      iprot.readStructEnd();
-
 
12396
      validate();
-
 
12397
    }
-
 
12398
 
-
 
12399
    public void write(TProtocol oprot) throws TException {
-
 
12400
      validate();
-
 
12401
 
-
 
12402
      oprot.writeStructBegin(STRUCT_DESC);
-
 
12403
      if (this.username != null) {
-
 
12404
        oprot.writeFieldBegin(USERNAME_FIELD_DESC);
-
 
12405
        oprot.writeString(this.username);
-
 
12406
        oprot.writeFieldEnd();
-
 
12407
      }
-
 
12408
      if (this.password != null) {
-
 
12409
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
-
 
12410
        oprot.writeString(this.password);
-
 
12411
        oprot.writeFieldEnd();
-
 
12412
      }
-
 
12413
      oprot.writeFieldStop();
-
 
12414
      oprot.writeStructEnd();
-
 
12415
    }
-
 
12416
 
-
 
12417
    @Override
-
 
12418
    public String toString() {
-
 
12419
      StringBuilder sb = new StringBuilder("authenticateReportUser_args(");
-
 
12420
      boolean first = true;
-
 
12421
 
-
 
12422
      sb.append("username:");
-
 
12423
      if (this.username == null) {
-
 
12424
        sb.append("null");
-
 
12425
      } else {
-
 
12426
        sb.append(this.username);
-
 
12427
      }
-
 
12428
      first = false;
-
 
12429
      if (!first) sb.append(", ");
-
 
12430
      sb.append("password:");
-
 
12431
      if (this.password == null) {
-
 
12432
        sb.append("null");
-
 
12433
      } else {
-
 
12434
        sb.append(this.password);
-
 
12435
      }
-
 
12436
      first = false;
-
 
12437
      sb.append(")");
-
 
12438
      return sb.toString();
-
 
12439
    }
-
 
12440
 
-
 
12441
    public void validate() throws TException {
-
 
12442
      // check for required fields
-
 
12443
    }
-
 
12444
 
-
 
12445
  }
-
 
12446
 
-
 
12447
  public static class authenticateReportUser_result implements TBase<authenticateReportUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateReportUser_result>   {
-
 
12448
    private static final TStruct STRUCT_DESC = new TStruct("authenticateReportUser_result");
-
 
12449
 
-
 
12450
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
-
 
12451
    private static final TField HSE_FIELD_DESC = new TField("hse", TType.STRUCT, (short)1);
-
 
12452
 
-
 
12453
    private ReportUser success;
-
 
12454
    private HelperServiceException hse;
-
 
12455
 
-
 
12456
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
12457
    public enum _Fields implements TFieldIdEnum {
-
 
12458
      SUCCESS((short)0, "success"),
-
 
12459
      HSE((short)1, "hse");
-
 
12460
 
-
 
12461
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
12462
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
12463
 
-
 
12464
      static {
-
 
12465
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
12466
          byId.put((int)field._thriftId, field);
-
 
12467
          byName.put(field.getFieldName(), field);
-
 
12468
        }
-
 
12469
      }
-
 
12470
 
-
 
12471
      /**
-
 
12472
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
12473
       */
-
 
12474
      public static _Fields findByThriftId(int fieldId) {
-
 
12475
        return byId.get(fieldId);
-
 
12476
      }
-
 
12477
 
-
 
12478
      /**
-
 
12479
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
12480
       * if it is not found.
-
 
12481
       */
-
 
12482
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
12483
        _Fields fields = findByThriftId(fieldId);
-
 
12484
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
12485
        return fields;
-
 
12486
      }
-
 
12487
 
-
 
12488
      /**
-
 
12489
       * Find the _Fields constant that matches name, or null if its not found.
-
 
12490
       */
-
 
12491
      public static _Fields findByName(String name) {
-
 
12492
        return byName.get(name);
-
 
12493
      }
-
 
12494
 
-
 
12495
      private final short _thriftId;
-
 
12496
      private final String _fieldName;
-
 
12497
 
-
 
12498
      _Fields(short thriftId, String fieldName) {
-
 
12499
        _thriftId = thriftId;
-
 
12500
        _fieldName = fieldName;
-
 
12501
      }
-
 
12502
 
-
 
12503
      public short getThriftFieldId() {
-
 
12504
        return _thriftId;
-
 
12505
      }
-
 
12506
 
-
 
12507
      public String getFieldName() {
-
 
12508
        return _fieldName;
-
 
12509
      }
-
 
12510
    }
-
 
12511
 
-
 
12512
    // isset id assignments
-
 
12513
 
-
 
12514
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
12515
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
12516
          new StructMetaData(TType.STRUCT, ReportUser.class)));
-
 
12517
      put(_Fields.HSE, new FieldMetaData("hse", TFieldRequirementType.DEFAULT, 
-
 
12518
          new FieldValueMetaData(TType.STRUCT)));
-
 
12519
    }});
-
 
12520
 
-
 
12521
    static {
-
 
12522
      FieldMetaData.addStructMetaDataMap(authenticateReportUser_result.class, metaDataMap);
-
 
12523
    }
-
 
12524
 
-
 
12525
    public authenticateReportUser_result() {
-
 
12526
    }
-
 
12527
 
-
 
12528
    public authenticateReportUser_result(
-
 
12529
      ReportUser success,
-
 
12530
      HelperServiceException hse)
-
 
12531
    {
-
 
12532
      this();
-
 
12533
      this.success = success;
-
 
12534
      this.hse = hse;
-
 
12535
    }
-
 
12536
 
-
 
12537
    /**
-
 
12538
     * Performs a deep copy on <i>other</i>.
-
 
12539
     */
-
 
12540
    public authenticateReportUser_result(authenticateReportUser_result other) {
-
 
12541
      if (other.isSetSuccess()) {
-
 
12542
        this.success = new ReportUser(other.success);
-
 
12543
      }
-
 
12544
      if (other.isSetHse()) {
-
 
12545
        this.hse = new HelperServiceException(other.hse);
-
 
12546
      }
-
 
12547
    }
-
 
12548
 
-
 
12549
    public authenticateReportUser_result deepCopy() {
-
 
12550
      return new authenticateReportUser_result(this);
-
 
12551
    }
-
 
12552
 
-
 
12553
    @Deprecated
-
 
12554
    public authenticateReportUser_result clone() {
-
 
12555
      return new authenticateReportUser_result(this);
-
 
12556
    }
-
 
12557
 
-
 
12558
    public ReportUser getSuccess() {
-
 
12559
      return this.success;
-
 
12560
    }
-
 
12561
 
-
 
12562
    public authenticateReportUser_result setSuccess(ReportUser success) {
-
 
12563
      this.success = success;
-
 
12564
      return this;
-
 
12565
    }
-
 
12566
 
-
 
12567
    public void unsetSuccess() {
-
 
12568
      this.success = null;
-
 
12569
    }
-
 
12570
 
-
 
12571
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
12572
    public boolean isSetSuccess() {
-
 
12573
      return this.success != null;
-
 
12574
    }
-
 
12575
 
-
 
12576
    public void setSuccessIsSet(boolean value) {
-
 
12577
      if (!value) {
-
 
12578
        this.success = null;
-
 
12579
      }
-
 
12580
    }
-
 
12581
 
-
 
12582
    public HelperServiceException getHse() {
-
 
12583
      return this.hse;
-
 
12584
    }
-
 
12585
 
-
 
12586
    public authenticateReportUser_result setHse(HelperServiceException hse) {
-
 
12587
      this.hse = hse;
-
 
12588
      return this;
-
 
12589
    }
-
 
12590
 
-
 
12591
    public void unsetHse() {
-
 
12592
      this.hse = null;
-
 
12593
    }
-
 
12594
 
-
 
12595
    /** Returns true if field hse is set (has been asigned a value) and false otherwise */
-
 
12596
    public boolean isSetHse() {
-
 
12597
      return this.hse != null;
-
 
12598
    }
-
 
12599
 
-
 
12600
    public void setHseIsSet(boolean value) {
-
 
12601
      if (!value) {
-
 
12602
        this.hse = null;
-
 
12603
      }
-
 
12604
    }
-
 
12605
 
-
 
12606
    public void setFieldValue(_Fields field, Object value) {
-
 
12607
      switch (field) {
-
 
12608
      case SUCCESS:
-
 
12609
        if (value == null) {
-
 
12610
          unsetSuccess();
-
 
12611
        } else {
-
 
12612
          setSuccess((ReportUser)value);
-
 
12613
        }
-
 
12614
        break;
-
 
12615
 
-
 
12616
      case HSE:
-
 
12617
        if (value == null) {
-
 
12618
          unsetHse();
-
 
12619
        } else {
-
 
12620
          setHse((HelperServiceException)value);
-
 
12621
        }
-
 
12622
        break;
-
 
12623
 
-
 
12624
      }
-
 
12625
    }
-
 
12626
 
-
 
12627
    public void setFieldValue(int fieldID, Object value) {
-
 
12628
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
12629
    }
-
 
12630
 
-
 
12631
    public Object getFieldValue(_Fields field) {
-
 
12632
      switch (field) {
-
 
12633
      case SUCCESS:
-
 
12634
        return getSuccess();
-
 
12635
 
-
 
12636
      case HSE:
-
 
12637
        return getHse();
-
 
12638
 
-
 
12639
      }
-
 
12640
      throw new IllegalStateException();
-
 
12641
    }
-
 
12642
 
-
 
12643
    public Object getFieldValue(int fieldId) {
-
 
12644
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
12645
    }
-
 
12646
 
-
 
12647
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
12648
    public boolean isSet(_Fields field) {
-
 
12649
      switch (field) {
-
 
12650
      case SUCCESS:
-
 
12651
        return isSetSuccess();
-
 
12652
      case HSE:
-
 
12653
        return isSetHse();
-
 
12654
      }
-
 
12655
      throw new IllegalStateException();
-
 
12656
    }
-
 
12657
 
-
 
12658
    public boolean isSet(int fieldID) {
-
 
12659
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
12660
    }
-
 
12661
 
-
 
12662
    @Override
-
 
12663
    public boolean equals(Object that) {
-
 
12664
      if (that == null)
-
 
12665
        return false;
-
 
12666
      if (that instanceof authenticateReportUser_result)
-
 
12667
        return this.equals((authenticateReportUser_result)that);
-
 
12668
      return false;
-
 
12669
    }
-
 
12670
 
-
 
12671
    public boolean equals(authenticateReportUser_result that) {
-
 
12672
      if (that == null)
-
 
12673
        return false;
-
 
12674
 
-
 
12675
      boolean this_present_success = true && this.isSetSuccess();
-
 
12676
      boolean that_present_success = true && that.isSetSuccess();
-
 
12677
      if (this_present_success || that_present_success) {
-
 
12678
        if (!(this_present_success && that_present_success))
-
 
12679
          return false;
-
 
12680
        if (!this.success.equals(that.success))
-
 
12681
          return false;
-
 
12682
      }
-
 
12683
 
-
 
12684
      boolean this_present_hse = true && this.isSetHse();
-
 
12685
      boolean that_present_hse = true && that.isSetHse();
-
 
12686
      if (this_present_hse || that_present_hse) {
-
 
12687
        if (!(this_present_hse && that_present_hse))
-
 
12688
          return false;
-
 
12689
        if (!this.hse.equals(that.hse))
-
 
12690
          return false;
-
 
12691
      }
-
 
12692
 
-
 
12693
      return true;
-
 
12694
    }
-
 
12695
 
-
 
12696
    @Override
-
 
12697
    public int hashCode() {
-
 
12698
      return 0;
-
 
12699
    }
-
 
12700
 
-
 
12701
    public int compareTo(authenticateReportUser_result other) {
-
 
12702
      if (!getClass().equals(other.getClass())) {
-
 
12703
        return getClass().getName().compareTo(other.getClass().getName());
-
 
12704
      }
-
 
12705
 
-
 
12706
      int lastComparison = 0;
-
 
12707
      authenticateReportUser_result typedOther = (authenticateReportUser_result)other;
-
 
12708
 
-
 
12709
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
12710
      if (lastComparison != 0) {
-
 
12711
        return lastComparison;
-
 
12712
      }
-
 
12713
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
12714
      if (lastComparison != 0) {
-
 
12715
        return lastComparison;
-
 
12716
      }
-
 
12717
      lastComparison = Boolean.valueOf(isSetHse()).compareTo(isSetHse());
-
 
12718
      if (lastComparison != 0) {
-
 
12719
        return lastComparison;
-
 
12720
      }
-
 
12721
      lastComparison = TBaseHelper.compareTo(hse, typedOther.hse);
-
 
12722
      if (lastComparison != 0) {
-
 
12723
        return lastComparison;
-
 
12724
      }
-
 
12725
      return 0;
-
 
12726
    }
-
 
12727
 
-
 
12728
    public void read(TProtocol iprot) throws TException {
-
 
12729
      TField field;
-
 
12730
      iprot.readStructBegin();
-
 
12731
      while (true)
-
 
12732
      {
-
 
12733
        field = iprot.readFieldBegin();
-
 
12734
        if (field.type == TType.STOP) { 
-
 
12735
          break;
-
 
12736
        }
-
 
12737
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
12738
        if (fieldId == null) {
-
 
12739
          TProtocolUtil.skip(iprot, field.type);
-
 
12740
        } else {
-
 
12741
          switch (fieldId) {
-
 
12742
            case SUCCESS:
-
 
12743
              if (field.type == TType.STRUCT) {
-
 
12744
                this.success = new ReportUser();
-
 
12745
                this.success.read(iprot);
-
 
12746
              } else { 
-
 
12747
                TProtocolUtil.skip(iprot, field.type);
-
 
12748
              }
-
 
12749
              break;
-
 
12750
            case HSE:
-
 
12751
              if (field.type == TType.STRUCT) {
-
 
12752
                this.hse = new HelperServiceException();
-
 
12753
                this.hse.read(iprot);
-
 
12754
              } else { 
-
 
12755
                TProtocolUtil.skip(iprot, field.type);
-
 
12756
              }
-
 
12757
              break;
-
 
12758
          }
-
 
12759
          iprot.readFieldEnd();
-
 
12760
        }
-
 
12761
      }
-
 
12762
      iprot.readStructEnd();
-
 
12763
      validate();
-
 
12764
    }
-
 
12765
 
-
 
12766
    public void write(TProtocol oprot) throws TException {
-
 
12767
      oprot.writeStructBegin(STRUCT_DESC);
-
 
12768
 
-
 
12769
      if (this.isSetSuccess()) {
-
 
12770
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
12771
        this.success.write(oprot);
-
 
12772
        oprot.writeFieldEnd();
-
 
12773
      } else if (this.isSetHse()) {
-
 
12774
        oprot.writeFieldBegin(HSE_FIELD_DESC);
-
 
12775
        this.hse.write(oprot);
-
 
12776
        oprot.writeFieldEnd();
-
 
12777
      }
-
 
12778
      oprot.writeFieldStop();
-
 
12779
      oprot.writeStructEnd();
-
 
12780
    }
-
 
12781
 
-
 
12782
    @Override
-
 
12783
    public String toString() {
-
 
12784
      StringBuilder sb = new StringBuilder("authenticateReportUser_result(");
-
 
12785
      boolean first = true;
-
 
12786
 
-
 
12787
      sb.append("success:");
-
 
12788
      if (this.success == null) {
-
 
12789
        sb.append("null");
-
 
12790
      } else {
-
 
12791
        sb.append(this.success);
-
 
12792
      }
-
 
12793
      first = false;
-
 
12794
      if (!first) sb.append(", ");
-
 
12795
      sb.append("hse:");
-
 
12796
      if (this.hse == null) {
-
 
12797
        sb.append("null");
-
 
12798
      } else {
-
 
12799
        sb.append(this.hse);
-
 
12800
      }
-
 
12801
      first = false;
-
 
12802
      sb.append(")");
-
 
12803
      return sb.toString();
-
 
12804
    }
-
 
12805
 
-
 
12806
    public void validate() throws TException {
-
 
12807
      // check for required fields
-
 
12808
    }
-
 
12809
 
-
 
12810
  }
-
 
12811
 
-
 
12812
  public static class getReports_args implements TBase<getReports_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReports_args>   {
-
 
12813
    private static final TStruct STRUCT_DESC = new TStruct("getReports_args");
-
 
12814
 
-
 
12815
    private static final TField ROLE_FIELD_DESC = new TField("role", TType.I64, (short)1);
-
 
12816
 
-
 
12817
    private long role;
-
 
12818
 
-
 
12819
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
12820
    public enum _Fields implements TFieldIdEnum {
-
 
12821
      ROLE((short)1, "role");
-
 
12822
 
-
 
12823
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
12824
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
12825
 
-
 
12826
      static {
-
 
12827
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
12828
          byId.put((int)field._thriftId, field);
-
 
12829
          byName.put(field.getFieldName(), field);
-
 
12830
        }
-
 
12831
      }
-
 
12832
 
-
 
12833
      /**
-
 
12834
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
12835
       */
-
 
12836
      public static _Fields findByThriftId(int fieldId) {
-
 
12837
        return byId.get(fieldId);
-
 
12838
      }
-
 
12839
 
-
 
12840
      /**
-
 
12841
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
12842
       * if it is not found.
-
 
12843
       */
-
 
12844
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
12845
        _Fields fields = findByThriftId(fieldId);
-
 
12846
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
12847
        return fields;
-
 
12848
      }
-
 
12849
 
-
 
12850
      /**
-
 
12851
       * Find the _Fields constant that matches name, or null if its not found.
-
 
12852
       */
-
 
12853
      public static _Fields findByName(String name) {
-
 
12854
        return byName.get(name);
-
 
12855
      }
-
 
12856
 
-
 
12857
      private final short _thriftId;
-
 
12858
      private final String _fieldName;
-
 
12859
 
-
 
12860
      _Fields(short thriftId, String fieldName) {
-
 
12861
        _thriftId = thriftId;
-
 
12862
        _fieldName = fieldName;
-
 
12863
      }
-
 
12864
 
-
 
12865
      public short getThriftFieldId() {
-
 
12866
        return _thriftId;
-
 
12867
      }
-
 
12868
 
-
 
12869
      public String getFieldName() {
-
 
12870
        return _fieldName;
-
 
12871
      }
-
 
12872
    }
-
 
12873
 
-
 
12874
    // isset id assignments
-
 
12875
    private static final int __ROLE_ISSET_ID = 0;
-
 
12876
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
12877
 
-
 
12878
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
12879
      put(_Fields.ROLE, new FieldMetaData("role", TFieldRequirementType.DEFAULT, 
-
 
12880
          new FieldValueMetaData(TType.I64)));
-
 
12881
    }});
-
 
12882
 
-
 
12883
    static {
-
 
12884
      FieldMetaData.addStructMetaDataMap(getReports_args.class, metaDataMap);
-
 
12885
    }
-
 
12886
 
-
 
12887
    public getReports_args() {
-
 
12888
    }
-
 
12889
 
-
 
12890
    public getReports_args(
-
 
12891
      long role)
-
 
12892
    {
-
 
12893
      this();
-
 
12894
      this.role = role;
-
 
12895
      setRoleIsSet(true);
-
 
12896
    }
-
 
12897
 
-
 
12898
    /**
-
 
12899
     * Performs a deep copy on <i>other</i>.
-
 
12900
     */
-
 
12901
    public getReports_args(getReports_args other) {
-
 
12902
      __isset_bit_vector.clear();
-
 
12903
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
12904
      this.role = other.role;
-
 
12905
    }
-
 
12906
 
-
 
12907
    public getReports_args deepCopy() {
-
 
12908
      return new getReports_args(this);
-
 
12909
    }
-
 
12910
 
-
 
12911
    @Deprecated
-
 
12912
    public getReports_args clone() {
-
 
12913
      return new getReports_args(this);
-
 
12914
    }
-
 
12915
 
-
 
12916
    public long getRole() {
-
 
12917
      return this.role;
-
 
12918
    }
-
 
12919
 
-
 
12920
    public getReports_args setRole(long role) {
-
 
12921
      this.role = role;
-
 
12922
      setRoleIsSet(true);
-
 
12923
      return this;
-
 
12924
    }
-
 
12925
 
-
 
12926
    public void unsetRole() {
-
 
12927
      __isset_bit_vector.clear(__ROLE_ISSET_ID);
-
 
12928
    }
-
 
12929
 
-
 
12930
    /** Returns true if field role is set (has been asigned a value) and false otherwise */
-
 
12931
    public boolean isSetRole() {
-
 
12932
      return __isset_bit_vector.get(__ROLE_ISSET_ID);
-
 
12933
    }
-
 
12934
 
-
 
12935
    public void setRoleIsSet(boolean value) {
-
 
12936
      __isset_bit_vector.set(__ROLE_ISSET_ID, value);
-
 
12937
    }
-
 
12938
 
-
 
12939
    public void setFieldValue(_Fields field, Object value) {
-
 
12940
      switch (field) {
-
 
12941
      case ROLE:
-
 
12942
        if (value == null) {
-
 
12943
          unsetRole();
-
 
12944
        } else {
-
 
12945
          setRole((Long)value);
-
 
12946
        }
-
 
12947
        break;
-
 
12948
 
-
 
12949
      }
-
 
12950
    }
-
 
12951
 
-
 
12952
    public void setFieldValue(int fieldID, Object value) {
-
 
12953
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
12954
    }
-
 
12955
 
-
 
12956
    public Object getFieldValue(_Fields field) {
-
 
12957
      switch (field) {
-
 
12958
      case ROLE:
-
 
12959
        return new Long(getRole());
-
 
12960
 
-
 
12961
      }
-
 
12962
      throw new IllegalStateException();
-
 
12963
    }
-
 
12964
 
-
 
12965
    public Object getFieldValue(int fieldId) {
-
 
12966
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
12967
    }
-
 
12968
 
-
 
12969
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
12970
    public boolean isSet(_Fields field) {
-
 
12971
      switch (field) {
-
 
12972
      case ROLE:
-
 
12973
        return isSetRole();
-
 
12974
      }
-
 
12975
      throw new IllegalStateException();
-
 
12976
    }
-
 
12977
 
-
 
12978
    public boolean isSet(int fieldID) {
-
 
12979
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
12980
    }
-
 
12981
 
-
 
12982
    @Override
-
 
12983
    public boolean equals(Object that) {
-
 
12984
      if (that == null)
-
 
12985
        return false;
-
 
12986
      if (that instanceof getReports_args)
-
 
12987
        return this.equals((getReports_args)that);
-
 
12988
      return false;
-
 
12989
    }
-
 
12990
 
-
 
12991
    public boolean equals(getReports_args that) {
-
 
12992
      if (that == null)
-
 
12993
        return false;
-
 
12994
 
-
 
12995
      boolean this_present_role = true;
-
 
12996
      boolean that_present_role = true;
-
 
12997
      if (this_present_role || that_present_role) {
-
 
12998
        if (!(this_present_role && that_present_role))
-
 
12999
          return false;
-
 
13000
        if (this.role != that.role)
-
 
13001
          return false;
-
 
13002
      }
-
 
13003
 
-
 
13004
      return true;
-
 
13005
    }
-
 
13006
 
-
 
13007
    @Override
-
 
13008
    public int hashCode() {
-
 
13009
      return 0;
-
 
13010
    }
-
 
13011
 
-
 
13012
    public int compareTo(getReports_args other) {
-
 
13013
      if (!getClass().equals(other.getClass())) {
-
 
13014
        return getClass().getName().compareTo(other.getClass().getName());
-
 
13015
      }
-
 
13016
 
-
 
13017
      int lastComparison = 0;
-
 
13018
      getReports_args typedOther = (getReports_args)other;
-
 
13019
 
-
 
13020
      lastComparison = Boolean.valueOf(isSetRole()).compareTo(isSetRole());
-
 
13021
      if (lastComparison != 0) {
-
 
13022
        return lastComparison;
-
 
13023
      }
-
 
13024
      lastComparison = TBaseHelper.compareTo(role, typedOther.role);
-
 
13025
      if (lastComparison != 0) {
-
 
13026
        return lastComparison;
-
 
13027
      }
-
 
13028
      return 0;
-
 
13029
    }
-
 
13030
 
-
 
13031
    public void read(TProtocol iprot) throws TException {
-
 
13032
      TField field;
-
 
13033
      iprot.readStructBegin();
-
 
13034
      while (true)
-
 
13035
      {
-
 
13036
        field = iprot.readFieldBegin();
-
 
13037
        if (field.type == TType.STOP) { 
-
 
13038
          break;
-
 
13039
        }
-
 
13040
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
13041
        if (fieldId == null) {
-
 
13042
          TProtocolUtil.skip(iprot, field.type);
-
 
13043
        } else {
-
 
13044
          switch (fieldId) {
-
 
13045
            case ROLE:
-
 
13046
              if (field.type == TType.I64) {
-
 
13047
                this.role = iprot.readI64();
-
 
13048
                setRoleIsSet(true);
-
 
13049
              } else { 
-
 
13050
                TProtocolUtil.skip(iprot, field.type);
-
 
13051
              }
-
 
13052
              break;
-
 
13053
          }
-
 
13054
          iprot.readFieldEnd();
-
 
13055
        }
-
 
13056
      }
-
 
13057
      iprot.readStructEnd();
-
 
13058
      validate();
-
 
13059
    }
-
 
13060
 
-
 
13061
    public void write(TProtocol oprot) throws TException {
-
 
13062
      validate();
-
 
13063
 
-
 
13064
      oprot.writeStructBegin(STRUCT_DESC);
-
 
13065
      oprot.writeFieldBegin(ROLE_FIELD_DESC);
-
 
13066
      oprot.writeI64(this.role);
-
 
13067
      oprot.writeFieldEnd();
-
 
13068
      oprot.writeFieldStop();
-
 
13069
      oprot.writeStructEnd();
-
 
13070
    }
-
 
13071
 
-
 
13072
    @Override
-
 
13073
    public String toString() {
-
 
13074
      StringBuilder sb = new StringBuilder("getReports_args(");
-
 
13075
      boolean first = true;
-
 
13076
 
-
 
13077
      sb.append("role:");
-
 
13078
      sb.append(this.role);
-
 
13079
      first = false;
-
 
13080
      sb.append(")");
-
 
13081
      return sb.toString();
-
 
13082
    }
-
 
13083
 
-
 
13084
    public void validate() throws TException {
-
 
13085
      // check for required fields
-
 
13086
    }
-
 
13087
 
-
 
13088
  }
-
 
13089
 
-
 
13090
  public static class getReports_result implements TBase<getReports_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReports_result>   {
-
 
13091
    private static final TStruct STRUCT_DESC = new TStruct("getReports_result");
-
 
13092
 
-
 
13093
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
-
 
13094
 
-
 
13095
    private List<Report> success;
-
 
13096
 
-
 
13097
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
13098
    public enum _Fields implements TFieldIdEnum {
-
 
13099
      SUCCESS((short)0, "success");
-
 
13100
 
-
 
13101
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
13102
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
13103
 
-
 
13104
      static {
-
 
13105
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
13106
          byId.put((int)field._thriftId, field);
-
 
13107
          byName.put(field.getFieldName(), field);
-
 
13108
        }
-
 
13109
      }
-
 
13110
 
-
 
13111
      /**
-
 
13112
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
13113
       */
-
 
13114
      public static _Fields findByThriftId(int fieldId) {
-
 
13115
        return byId.get(fieldId);
-
 
13116
      }
-
 
13117
 
-
 
13118
      /**
-
 
13119
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
13120
       * if it is not found.
-
 
13121
       */
-
 
13122
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
13123
        _Fields fields = findByThriftId(fieldId);
-
 
13124
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
13125
        return fields;
-
 
13126
      }
-
 
13127
 
-
 
13128
      /**
-
 
13129
       * Find the _Fields constant that matches name, or null if its not found.
-
 
13130
       */
-
 
13131
      public static _Fields findByName(String name) {
-
 
13132
        return byName.get(name);
-
 
13133
      }
-
 
13134
 
-
 
13135
      private final short _thriftId;
-
 
13136
      private final String _fieldName;
-
 
13137
 
-
 
13138
      _Fields(short thriftId, String fieldName) {
-
 
13139
        _thriftId = thriftId;
-
 
13140
        _fieldName = fieldName;
-
 
13141
      }
-
 
13142
 
-
 
13143
      public short getThriftFieldId() {
-
 
13144
        return _thriftId;
-
 
13145
      }
-
 
13146
 
-
 
13147
      public String getFieldName() {
-
 
13148
        return _fieldName;
-
 
13149
      }
-
 
13150
    }
-
 
13151
 
-
 
13152
    // isset id assignments
-
 
13153
 
-
 
13154
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
13155
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
13156
          new ListMetaData(TType.LIST, 
-
 
13157
              new StructMetaData(TType.STRUCT, Report.class))));
-
 
13158
    }});
-
 
13159
 
-
 
13160
    static {
-
 
13161
      FieldMetaData.addStructMetaDataMap(getReports_result.class, metaDataMap);
-
 
13162
    }
-
 
13163
 
-
 
13164
    public getReports_result() {
-
 
13165
    }
-
 
13166
 
-
 
13167
    public getReports_result(
-
 
13168
      List<Report> success)
-
 
13169
    {
-
 
13170
      this();
-
 
13171
      this.success = success;
-
 
13172
    }
-
 
13173
 
-
 
13174
    /**
-
 
13175
     * Performs a deep copy on <i>other</i>.
-
 
13176
     */
-
 
13177
    public getReports_result(getReports_result other) {
-
 
13178
      if (other.isSetSuccess()) {
-
 
13179
        List<Report> __this__success = new ArrayList<Report>();
-
 
13180
        for (Report other_element : other.success) {
-
 
13181
          __this__success.add(new Report(other_element));
-
 
13182
        }
-
 
13183
        this.success = __this__success;
-
 
13184
      }
-
 
13185
    }
-
 
13186
 
-
 
13187
    public getReports_result deepCopy() {
-
 
13188
      return new getReports_result(this);
-
 
13189
    }
-
 
13190
 
-
 
13191
    @Deprecated
-
 
13192
    public getReports_result clone() {
-
 
13193
      return new getReports_result(this);
-
 
13194
    }
-
 
13195
 
-
 
13196
    public int getSuccessSize() {
-
 
13197
      return (this.success == null) ? 0 : this.success.size();
-
 
13198
    }
-
 
13199
 
-
 
13200
    public java.util.Iterator<Report> getSuccessIterator() {
-
 
13201
      return (this.success == null) ? null : this.success.iterator();
-
 
13202
    }
-
 
13203
 
-
 
13204
    public void addToSuccess(Report elem) {
-
 
13205
      if (this.success == null) {
-
 
13206
        this.success = new ArrayList<Report>();
-
 
13207
      }
-
 
13208
      this.success.add(elem);
-
 
13209
    }
-
 
13210
 
-
 
13211
    public List<Report> getSuccess() {
-
 
13212
      return this.success;
-
 
13213
    }
-
 
13214
 
-
 
13215
    public getReports_result setSuccess(List<Report> success) {
-
 
13216
      this.success = success;
-
 
13217
      return this;
-
 
13218
    }
-
 
13219
 
-
 
13220
    public void unsetSuccess() {
-
 
13221
      this.success = null;
-
 
13222
    }
-
 
13223
 
-
 
13224
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
13225
    public boolean isSetSuccess() {
-
 
13226
      return this.success != null;
-
 
13227
    }
-
 
13228
 
-
 
13229
    public void setSuccessIsSet(boolean value) {
-
 
13230
      if (!value) {
-
 
13231
        this.success = null;
-
 
13232
      }
-
 
13233
    }
-
 
13234
 
-
 
13235
    public void setFieldValue(_Fields field, Object value) {
-
 
13236
      switch (field) {
-
 
13237
      case SUCCESS:
-
 
13238
        if (value == null) {
-
 
13239
          unsetSuccess();
-
 
13240
        } else {
-
 
13241
          setSuccess((List<Report>)value);
-
 
13242
        }
-
 
13243
        break;
-
 
13244
 
-
 
13245
      }
-
 
13246
    }
-
 
13247
 
-
 
13248
    public void setFieldValue(int fieldID, Object value) {
-
 
13249
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
13250
    }
-
 
13251
 
-
 
13252
    public Object getFieldValue(_Fields field) {
-
 
13253
      switch (field) {
-
 
13254
      case SUCCESS:
-
 
13255
        return getSuccess();
-
 
13256
 
-
 
13257
      }
-
 
13258
      throw new IllegalStateException();
-
 
13259
    }
-
 
13260
 
-
 
13261
    public Object getFieldValue(int fieldId) {
-
 
13262
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
13263
    }
-
 
13264
 
-
 
13265
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
13266
    public boolean isSet(_Fields field) {
-
 
13267
      switch (field) {
-
 
13268
      case SUCCESS:
-
 
13269
        return isSetSuccess();
-
 
13270
      }
-
 
13271
      throw new IllegalStateException();
-
 
13272
    }
-
 
13273
 
-
 
13274
    public boolean isSet(int fieldID) {
-
 
13275
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
13276
    }
-
 
13277
 
-
 
13278
    @Override
-
 
13279
    public boolean equals(Object that) {
-
 
13280
      if (that == null)
-
 
13281
        return false;
-
 
13282
      if (that instanceof getReports_result)
-
 
13283
        return this.equals((getReports_result)that);
-
 
13284
      return false;
-
 
13285
    }
-
 
13286
 
-
 
13287
    public boolean equals(getReports_result that) {
-
 
13288
      if (that == null)
-
 
13289
        return false;
-
 
13290
 
-
 
13291
      boolean this_present_success = true && this.isSetSuccess();
-
 
13292
      boolean that_present_success = true && that.isSetSuccess();
-
 
13293
      if (this_present_success || that_present_success) {
-
 
13294
        if (!(this_present_success && that_present_success))
-
 
13295
          return false;
-
 
13296
        if (!this.success.equals(that.success))
-
 
13297
          return false;
-
 
13298
      }
-
 
13299
 
-
 
13300
      return true;
-
 
13301
    }
-
 
13302
 
-
 
13303
    @Override
-
 
13304
    public int hashCode() {
-
 
13305
      return 0;
-
 
13306
    }
-
 
13307
 
-
 
13308
    public int compareTo(getReports_result other) {
-
 
13309
      if (!getClass().equals(other.getClass())) {
-
 
13310
        return getClass().getName().compareTo(other.getClass().getName());
-
 
13311
      }
-
 
13312
 
-
 
13313
      int lastComparison = 0;
-
 
13314
      getReports_result typedOther = (getReports_result)other;
-
 
13315
 
-
 
13316
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
13317
      if (lastComparison != 0) {
-
 
13318
        return lastComparison;
-
 
13319
      }
-
 
13320
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
13321
      if (lastComparison != 0) {
-
 
13322
        return lastComparison;
-
 
13323
      }
-
 
13324
      return 0;
-
 
13325
    }
-
 
13326
 
-
 
13327
    public void read(TProtocol iprot) throws TException {
-
 
13328
      TField field;
-
 
13329
      iprot.readStructBegin();
-
 
13330
      while (true)
-
 
13331
      {
-
 
13332
        field = iprot.readFieldBegin();
-
 
13333
        if (field.type == TType.STOP) { 
-
 
13334
          break;
-
 
13335
        }
-
 
13336
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
13337
        if (fieldId == null) {
-
 
13338
          TProtocolUtil.skip(iprot, field.type);
-
 
13339
        } else {
-
 
13340
          switch (fieldId) {
-
 
13341
            case SUCCESS:
-
 
13342
              if (field.type == TType.LIST) {
-
 
13343
                {
-
 
13344
                  TList _list17 = iprot.readListBegin();
-
 
13345
                  this.success = new ArrayList<Report>(_list17.size);
-
 
13346
                  for (int _i18 = 0; _i18 < _list17.size; ++_i18)
-
 
13347
                  {
-
 
13348
                    Report _elem19;
-
 
13349
                    _elem19 = new Report();
-
 
13350
                    _elem19.read(iprot);
-
 
13351
                    this.success.add(_elem19);
-
 
13352
                  }
-
 
13353
                  iprot.readListEnd();
-
 
13354
                }
-
 
13355
              } else { 
-
 
13356
                TProtocolUtil.skip(iprot, field.type);
-
 
13357
              }
-
 
13358
              break;
-
 
13359
          }
-
 
13360
          iprot.readFieldEnd();
-
 
13361
        }
-
 
13362
      }
-
 
13363
      iprot.readStructEnd();
-
 
13364
      validate();
-
 
13365
    }
-
 
13366
 
-
 
13367
    public void write(TProtocol oprot) throws TException {
-
 
13368
      oprot.writeStructBegin(STRUCT_DESC);
-
 
13369
 
-
 
13370
      if (this.isSetSuccess()) {
-
 
13371
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
13372
        {
-
 
13373
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
-
 
13374
          for (Report _iter20 : this.success)
-
 
13375
          {
-
 
13376
            _iter20.write(oprot);
-
 
13377
          }
-
 
13378
          oprot.writeListEnd();
-
 
13379
        }
-
 
13380
        oprot.writeFieldEnd();
-
 
13381
      }
-
 
13382
      oprot.writeFieldStop();
-
 
13383
      oprot.writeStructEnd();
-
 
13384
    }
-
 
13385
 
-
 
13386
    @Override
-
 
13387
    public String toString() {
-
 
13388
      StringBuilder sb = new StringBuilder("getReports_result(");
-
 
13389
      boolean first = true;
-
 
13390
 
-
 
13391
      sb.append("success:");
-
 
13392
      if (this.success == null) {
-
 
13393
        sb.append("null");
-
 
13394
      } else {
-
 
13395
        sb.append(this.success);
-
 
13396
      }
-
 
13397
      first = false;
-
 
13398
      sb.append(")");
-
 
13399
      return sb.toString();
-
 
13400
    }
11943
 
13401
 
11944
    public void validate() throws TException {
13402
    public void validate() throws TException {
11945
      // check for required fields
13403
      // check for required fields
11946
    }
13404
    }
11947
 
13405