Subversion Repositories SmartDukaan

Rev

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

Rev 1395 Rev 1422
Line 32... Line 32...
32
     */
32
     */
33
    public void closeSession() throws TException;
33
    public void closeSession() throws TException;
34
 
34
 
35
    public void saveUserEmailForSending(String emailTo, String emailFrom, String subject, String body, String source, String emailType) throws HelperServiceException, TException;
35
    public void saveUserEmailForSending(String emailTo, String emailFrom, String subject, String body, String source, String emailType) throws HelperServiceException, TException;
36
 
36
 
-
 
37
    public List<UserEmail> getEmailsToBeSent(String emailType) throws HelperServiceException, TException;
-
 
38
 
-
 
39
    public void markEmailAsSent(long emailId) throws HelperServiceException, TException;
-
 
40
 
37
    public void sendMail(Mail mail) throws HelperServiceException, TException;
41
    public void sendMail(Mail mail) throws HelperServiceException, TException;
38
 
42
 
39
    public void sendText(TextMessage message) throws HelperServiceException, TException;
43
    public void sendText(TextMessage message) throws HelperServiceException, TException;
40
 
44
 
41
    public void addMessage(Message message) throws HelperServiceException, TException;
45
    public void addMessage(Message message) throws HelperServiceException, TException;
Line 165... Line 169...
165
        throw result.se;
169
        throw result.se;
166
      }
170
      }
167
      return;
171
      return;
168
    }
172
    }
169
 
173
 
-
 
174
    public List<UserEmail> getEmailsToBeSent(String emailType) throws HelperServiceException, TException
-
 
175
    {
-
 
176
      send_getEmailsToBeSent(emailType);
-
 
177
      return recv_getEmailsToBeSent();
-
 
178
    }
-
 
179
 
-
 
180
    public void send_getEmailsToBeSent(String emailType) throws TException
-
 
181
    {
-
 
182
      oprot_.writeMessageBegin(new TMessage("getEmailsToBeSent", TMessageType.CALL, seqid_));
-
 
183
      getEmailsToBeSent_args args = new getEmailsToBeSent_args();
-
 
184
      args.emailType = emailType;
-
 
185
      args.write(oprot_);
-
 
186
      oprot_.writeMessageEnd();
-
 
187
      oprot_.getTransport().flush();
-
 
188
    }
-
 
189
 
-
 
190
    public List<UserEmail> recv_getEmailsToBeSent() throws HelperServiceException, TException
-
 
191
    {
-
 
192
      TMessage msg = iprot_.readMessageBegin();
-
 
193
      if (msg.type == TMessageType.EXCEPTION) {
-
 
194
        TApplicationException x = TApplicationException.read(iprot_);
-
 
195
        iprot_.readMessageEnd();
-
 
196
        throw x;
-
 
197
      }
-
 
198
      getEmailsToBeSent_result result = new getEmailsToBeSent_result();
-
 
199
      result.read(iprot_);
-
 
200
      iprot_.readMessageEnd();
-
 
201
      if (result.isSetSuccess()) {
-
 
202
        return result.success;
-
 
203
      }
-
 
204
      if (result.se != null) {
-
 
205
        throw result.se;
-
 
206
      }
-
 
207
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getEmailsToBeSent failed: unknown result");
-
 
208
    }
-
 
209
 
-
 
210
    public void markEmailAsSent(long emailId) throws HelperServiceException, TException
-
 
211
    {
-
 
212
      send_markEmailAsSent(emailId);
-
 
213
      recv_markEmailAsSent();
-
 
214
    }
-
 
215
 
-
 
216
    public void send_markEmailAsSent(long emailId) throws TException
-
 
217
    {
-
 
218
      oprot_.writeMessageBegin(new TMessage("markEmailAsSent", TMessageType.CALL, seqid_));
-
 
219
      markEmailAsSent_args args = new markEmailAsSent_args();
-
 
220
      args.emailId = emailId;
-
 
221
      args.write(oprot_);
-
 
222
      oprot_.writeMessageEnd();
-
 
223
      oprot_.getTransport().flush();
-
 
224
    }
-
 
225
 
-
 
226
    public void recv_markEmailAsSent() throws HelperServiceException, TException
-
 
227
    {
-
 
228
      TMessage msg = iprot_.readMessageBegin();
-
 
229
      if (msg.type == TMessageType.EXCEPTION) {
-
 
230
        TApplicationException x = TApplicationException.read(iprot_);
-
 
231
        iprot_.readMessageEnd();
-
 
232
        throw x;
-
 
233
      }
-
 
234
      markEmailAsSent_result result = new markEmailAsSent_result();
-
 
235
      result.read(iprot_);
-
 
236
      iprot_.readMessageEnd();
-
 
237
      if (result.se != null) {
-
 
238
        throw result.se;
-
 
239
      }
-
 
240
      return;
-
 
241
    }
-
 
242
 
170
    public void sendMail(Mail mail) throws HelperServiceException, TException
243
    public void sendMail(Mail mail) throws HelperServiceException, TException
171
    {
244
    {
172
      send_sendMail(mail);
245
      send_sendMail(mail);
173
      recv_sendMail();
246
      recv_sendMail();
174
    }
247
    }
Line 565... Line 638...
565
    public Processor(Iface iface)
638
    public Processor(Iface iface)
566
    {
639
    {
567
      iface_ = iface;
640
      iface_ = iface;
568
      processMap_.put("closeSession", new closeSession());
641
      processMap_.put("closeSession", new closeSession());
569
      processMap_.put("saveUserEmailForSending", new saveUserEmailForSending());
642
      processMap_.put("saveUserEmailForSending", new saveUserEmailForSending());
-
 
643
      processMap_.put("getEmailsToBeSent", new getEmailsToBeSent());
-
 
644
      processMap_.put("markEmailAsSent", new markEmailAsSent());
570
      processMap_.put("sendMail", new sendMail());
645
      processMap_.put("sendMail", new sendMail());
571
      processMap_.put("sendText", new sendText());
646
      processMap_.put("sendText", new sendText());
572
      processMap_.put("addMessage", new addMessage());
647
      processMap_.put("addMessage", new addMessage());
573
      processMap_.put("updateMessage", new updateMessage());
648
      processMap_.put("updateMessage", new updateMessage());
574
      processMap_.put("getMessage", new getMessage());
649
      processMap_.put("getMessage", new getMessage());
Line 647... Line 722...
647
        oprot.getTransport().flush();
722
        oprot.getTransport().flush();
648
      }
723
      }
649
 
724
 
650
    }
725
    }
651
 
726
 
-
 
727
    private class getEmailsToBeSent implements ProcessFunction {
-
 
728
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
729
      {
-
 
730
        getEmailsToBeSent_args args = new getEmailsToBeSent_args();
-
 
731
        args.read(iprot);
-
 
732
        iprot.readMessageEnd();
-
 
733
        getEmailsToBeSent_result result = new getEmailsToBeSent_result();
-
 
734
        try {
-
 
735
          result.success = iface_.getEmailsToBeSent(args.emailType);
-
 
736
        } catch (HelperServiceException se) {
-
 
737
          result.se = se;
-
 
738
        } catch (Throwable th) {
-
 
739
          LOGGER.error("Internal error processing getEmailsToBeSent", th);
-
 
740
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getEmailsToBeSent");
-
 
741
          oprot.writeMessageBegin(new TMessage("getEmailsToBeSent", TMessageType.EXCEPTION, seqid));
-
 
742
          x.write(oprot);
-
 
743
          oprot.writeMessageEnd();
-
 
744
          oprot.getTransport().flush();
-
 
745
          return;
-
 
746
        }
-
 
747
        oprot.writeMessageBegin(new TMessage("getEmailsToBeSent", TMessageType.REPLY, seqid));
-
 
748
        result.write(oprot);
-
 
749
        oprot.writeMessageEnd();
-
 
750
        oprot.getTransport().flush();
-
 
751
      }
-
 
752
 
-
 
753
    }
-
 
754
 
-
 
755
    private class markEmailAsSent implements ProcessFunction {
-
 
756
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
757
      {
-
 
758
        markEmailAsSent_args args = new markEmailAsSent_args();
-
 
759
        args.read(iprot);
-
 
760
        iprot.readMessageEnd();
-
 
761
        markEmailAsSent_result result = new markEmailAsSent_result();
-
 
762
        try {
-
 
763
          iface_.markEmailAsSent(args.emailId);
-
 
764
        } catch (HelperServiceException se) {
-
 
765
          result.se = se;
-
 
766
        } catch (Throwable th) {
-
 
767
          LOGGER.error("Internal error processing markEmailAsSent", th);
-
 
768
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markEmailAsSent");
-
 
769
          oprot.writeMessageBegin(new TMessage("markEmailAsSent", TMessageType.EXCEPTION, seqid));
-
 
770
          x.write(oprot);
-
 
771
          oprot.writeMessageEnd();
-
 
772
          oprot.getTransport().flush();
-
 
773
          return;
-
 
774
        }
-
 
775
        oprot.writeMessageBegin(new TMessage("markEmailAsSent", TMessageType.REPLY, seqid));
-
 
776
        result.write(oprot);
-
 
777
        oprot.writeMessageEnd();
-
 
778
        oprot.getTransport().flush();
-
 
779
      }
-
 
780
 
-
 
781
    }
-
 
782
 
652
    private class sendMail implements ProcessFunction {
783
    private class sendMail implements ProcessFunction {
653
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
784
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
654
      {
785
      {
655
        sendMail_args args = new sendMail_args();
786
        sendMail_args args = new sendMail_args();
656
        args.read(iprot);
787
        args.read(iprot);
Line 2324... Line 2455...
2324
      // check for required fields
2455
      // check for required fields
2325
    }
2456
    }
2326
 
2457
 
2327
  }
2458
  }
2328
 
2459
 
-
 
2460
  public static class getEmailsToBeSent_args implements TBase<getEmailsToBeSent_args._Fields>, java.io.Serializable, Cloneable, Comparable<getEmailsToBeSent_args>   {
-
 
2461
    private static final TStruct STRUCT_DESC = new TStruct("getEmailsToBeSent_args");
-
 
2462
 
-
 
2463
    private static final TField EMAIL_TYPE_FIELD_DESC = new TField("emailType", TType.STRING, (short)1);
-
 
2464
 
-
 
2465
    private String emailType;
-
 
2466
 
-
 
2467
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
2468
    public enum _Fields implements TFieldIdEnum {
-
 
2469
      EMAIL_TYPE((short)1, "emailType");
-
 
2470
 
-
 
2471
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
2472
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
2473
 
-
 
2474
      static {
-
 
2475
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
2476
          byId.put((int)field._thriftId, field);
-
 
2477
          byName.put(field.getFieldName(), field);
-
 
2478
        }
-
 
2479
      }
-
 
2480
 
-
 
2481
      /**
-
 
2482
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
2483
       */
-
 
2484
      public static _Fields findByThriftId(int fieldId) {
-
 
2485
        return byId.get(fieldId);
-
 
2486
      }
-
 
2487
 
-
 
2488
      /**
-
 
2489
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
2490
       * if it is not found.
-
 
2491
       */
-
 
2492
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
2493
        _Fields fields = findByThriftId(fieldId);
-
 
2494
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
2495
        return fields;
-
 
2496
      }
-
 
2497
 
-
 
2498
      /**
-
 
2499
       * Find the _Fields constant that matches name, or null if its not found.
-
 
2500
       */
-
 
2501
      public static _Fields findByName(String name) {
-
 
2502
        return byName.get(name);
-
 
2503
      }
-
 
2504
 
-
 
2505
      private final short _thriftId;
-
 
2506
      private final String _fieldName;
-
 
2507
 
-
 
2508
      _Fields(short thriftId, String fieldName) {
-
 
2509
        _thriftId = thriftId;
-
 
2510
        _fieldName = fieldName;
-
 
2511
      }
-
 
2512
 
-
 
2513
      public short getThriftFieldId() {
-
 
2514
        return _thriftId;
-
 
2515
      }
-
 
2516
 
-
 
2517
      public String getFieldName() {
-
 
2518
        return _fieldName;
-
 
2519
      }
-
 
2520
    }
-
 
2521
 
-
 
2522
    // isset id assignments
-
 
2523
 
-
 
2524
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
2525
      put(_Fields.EMAIL_TYPE, new FieldMetaData("emailType", TFieldRequirementType.DEFAULT, 
-
 
2526
          new FieldValueMetaData(TType.STRING)));
-
 
2527
    }});
-
 
2528
 
-
 
2529
    static {
-
 
2530
      FieldMetaData.addStructMetaDataMap(getEmailsToBeSent_args.class, metaDataMap);
-
 
2531
    }
-
 
2532
 
-
 
2533
    public getEmailsToBeSent_args() {
-
 
2534
    }
-
 
2535
 
-
 
2536
    public getEmailsToBeSent_args(
-
 
2537
      String emailType)
-
 
2538
    {
-
 
2539
      this();
-
 
2540
      this.emailType = emailType;
-
 
2541
    }
-
 
2542
 
-
 
2543
    /**
-
 
2544
     * Performs a deep copy on <i>other</i>.
-
 
2545
     */
-
 
2546
    public getEmailsToBeSent_args(getEmailsToBeSent_args other) {
-
 
2547
      if (other.isSetEmailType()) {
-
 
2548
        this.emailType = other.emailType;
-
 
2549
      }
-
 
2550
    }
-
 
2551
 
-
 
2552
    public getEmailsToBeSent_args deepCopy() {
-
 
2553
      return new getEmailsToBeSent_args(this);
-
 
2554
    }
-
 
2555
 
-
 
2556
    @Deprecated
-
 
2557
    public getEmailsToBeSent_args clone() {
-
 
2558
      return new getEmailsToBeSent_args(this);
-
 
2559
    }
-
 
2560
 
-
 
2561
    public String getEmailType() {
-
 
2562
      return this.emailType;
-
 
2563
    }
-
 
2564
 
-
 
2565
    public getEmailsToBeSent_args setEmailType(String emailType) {
-
 
2566
      this.emailType = emailType;
-
 
2567
      return this;
-
 
2568
    }
-
 
2569
 
-
 
2570
    public void unsetEmailType() {
-
 
2571
      this.emailType = null;
-
 
2572
    }
-
 
2573
 
-
 
2574
    /** Returns true if field emailType is set (has been asigned a value) and false otherwise */
-
 
2575
    public boolean isSetEmailType() {
-
 
2576
      return this.emailType != null;
-
 
2577
    }
-
 
2578
 
-
 
2579
    public void setEmailTypeIsSet(boolean value) {
-
 
2580
      if (!value) {
-
 
2581
        this.emailType = null;
-
 
2582
      }
-
 
2583
    }
-
 
2584
 
-
 
2585
    public void setFieldValue(_Fields field, Object value) {
-
 
2586
      switch (field) {
-
 
2587
      case EMAIL_TYPE:
-
 
2588
        if (value == null) {
-
 
2589
          unsetEmailType();
-
 
2590
        } else {
-
 
2591
          setEmailType((String)value);
-
 
2592
        }
-
 
2593
        break;
-
 
2594
 
-
 
2595
      }
-
 
2596
    }
-
 
2597
 
-
 
2598
    public void setFieldValue(int fieldID, Object value) {
-
 
2599
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
2600
    }
-
 
2601
 
-
 
2602
    public Object getFieldValue(_Fields field) {
-
 
2603
      switch (field) {
-
 
2604
      case EMAIL_TYPE:
-
 
2605
        return getEmailType();
-
 
2606
 
-
 
2607
      }
-
 
2608
      throw new IllegalStateException();
-
 
2609
    }
-
 
2610
 
-
 
2611
    public Object getFieldValue(int fieldId) {
-
 
2612
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
2613
    }
-
 
2614
 
-
 
2615
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
2616
    public boolean isSet(_Fields field) {
-
 
2617
      switch (field) {
-
 
2618
      case EMAIL_TYPE:
-
 
2619
        return isSetEmailType();
-
 
2620
      }
-
 
2621
      throw new IllegalStateException();
-
 
2622
    }
-
 
2623
 
-
 
2624
    public boolean isSet(int fieldID) {
-
 
2625
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
2626
    }
-
 
2627
 
-
 
2628
    @Override
-
 
2629
    public boolean equals(Object that) {
-
 
2630
      if (that == null)
-
 
2631
        return false;
-
 
2632
      if (that instanceof getEmailsToBeSent_args)
-
 
2633
        return this.equals((getEmailsToBeSent_args)that);
-
 
2634
      return false;
-
 
2635
    }
-
 
2636
 
-
 
2637
    public boolean equals(getEmailsToBeSent_args that) {
-
 
2638
      if (that == null)
-
 
2639
        return false;
-
 
2640
 
-
 
2641
      boolean this_present_emailType = true && this.isSetEmailType();
-
 
2642
      boolean that_present_emailType = true && that.isSetEmailType();
-
 
2643
      if (this_present_emailType || that_present_emailType) {
-
 
2644
        if (!(this_present_emailType && that_present_emailType))
-
 
2645
          return false;
-
 
2646
        if (!this.emailType.equals(that.emailType))
-
 
2647
          return false;
-
 
2648
      }
-
 
2649
 
-
 
2650
      return true;
-
 
2651
    }
-
 
2652
 
-
 
2653
    @Override
-
 
2654
    public int hashCode() {
-
 
2655
      return 0;
-
 
2656
    }
-
 
2657
 
-
 
2658
    public int compareTo(getEmailsToBeSent_args other) {
-
 
2659
      if (!getClass().equals(other.getClass())) {
-
 
2660
        return getClass().getName().compareTo(other.getClass().getName());
-
 
2661
      }
-
 
2662
 
-
 
2663
      int lastComparison = 0;
-
 
2664
      getEmailsToBeSent_args typedOther = (getEmailsToBeSent_args)other;
-
 
2665
 
-
 
2666
      lastComparison = Boolean.valueOf(isSetEmailType()).compareTo(isSetEmailType());
-
 
2667
      if (lastComparison != 0) {
-
 
2668
        return lastComparison;
-
 
2669
      }
-
 
2670
      lastComparison = TBaseHelper.compareTo(emailType, typedOther.emailType);
-
 
2671
      if (lastComparison != 0) {
-
 
2672
        return lastComparison;
-
 
2673
      }
-
 
2674
      return 0;
-
 
2675
    }
-
 
2676
 
-
 
2677
    public void read(TProtocol iprot) throws TException {
-
 
2678
      TField field;
-
 
2679
      iprot.readStructBegin();
-
 
2680
      while (true)
-
 
2681
      {
-
 
2682
        field = iprot.readFieldBegin();
-
 
2683
        if (field.type == TType.STOP) { 
-
 
2684
          break;
-
 
2685
        }
-
 
2686
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
2687
        if (fieldId == null) {
-
 
2688
          TProtocolUtil.skip(iprot, field.type);
-
 
2689
        } else {
-
 
2690
          switch (fieldId) {
-
 
2691
            case EMAIL_TYPE:
-
 
2692
              if (field.type == TType.STRING) {
-
 
2693
                this.emailType = iprot.readString();
-
 
2694
              } else { 
-
 
2695
                TProtocolUtil.skip(iprot, field.type);
-
 
2696
              }
-
 
2697
              break;
-
 
2698
          }
-
 
2699
          iprot.readFieldEnd();
-
 
2700
        }
-
 
2701
      }
-
 
2702
      iprot.readStructEnd();
-
 
2703
      validate();
-
 
2704
    }
-
 
2705
 
-
 
2706
    public void write(TProtocol oprot) throws TException {
-
 
2707
      validate();
-
 
2708
 
-
 
2709
      oprot.writeStructBegin(STRUCT_DESC);
-
 
2710
      if (this.emailType != null) {
-
 
2711
        oprot.writeFieldBegin(EMAIL_TYPE_FIELD_DESC);
-
 
2712
        oprot.writeString(this.emailType);
-
 
2713
        oprot.writeFieldEnd();
-
 
2714
      }
-
 
2715
      oprot.writeFieldStop();
-
 
2716
      oprot.writeStructEnd();
-
 
2717
    }
-
 
2718
 
-
 
2719
    @Override
-
 
2720
    public String toString() {
-
 
2721
      StringBuilder sb = new StringBuilder("getEmailsToBeSent_args(");
-
 
2722
      boolean first = true;
-
 
2723
 
-
 
2724
      sb.append("emailType:");
-
 
2725
      if (this.emailType == null) {
-
 
2726
        sb.append("null");
-
 
2727
      } else {
-
 
2728
        sb.append(this.emailType);
-
 
2729
      }
-
 
2730
      first = false;
-
 
2731
      sb.append(")");
-
 
2732
      return sb.toString();
-
 
2733
    }
-
 
2734
 
-
 
2735
    public void validate() throws TException {
-
 
2736
      // check for required fields
-
 
2737
    }
-
 
2738
 
-
 
2739
  }
-
 
2740
 
-
 
2741
  public static class getEmailsToBeSent_result implements TBase<getEmailsToBeSent_result._Fields>, java.io.Serializable, Cloneable, Comparable<getEmailsToBeSent_result>   {
-
 
2742
    private static final TStruct STRUCT_DESC = new TStruct("getEmailsToBeSent_result");
-
 
2743
 
-
 
2744
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
-
 
2745
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
-
 
2746
 
-
 
2747
    private List<UserEmail> success;
-
 
2748
    private HelperServiceException se;
-
 
2749
 
-
 
2750
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
2751
    public enum _Fields implements TFieldIdEnum {
-
 
2752
      SUCCESS((short)0, "success"),
-
 
2753
      SE((short)1, "se");
-
 
2754
 
-
 
2755
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
2756
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
2757
 
-
 
2758
      static {
-
 
2759
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
2760
          byId.put((int)field._thriftId, field);
-
 
2761
          byName.put(field.getFieldName(), field);
-
 
2762
        }
-
 
2763
      }
-
 
2764
 
-
 
2765
      /**
-
 
2766
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
2767
       */
-
 
2768
      public static _Fields findByThriftId(int fieldId) {
-
 
2769
        return byId.get(fieldId);
-
 
2770
      }
-
 
2771
 
-
 
2772
      /**
-
 
2773
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
2774
       * if it is not found.
-
 
2775
       */
-
 
2776
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
2777
        _Fields fields = findByThriftId(fieldId);
-
 
2778
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
2779
        return fields;
-
 
2780
      }
-
 
2781
 
-
 
2782
      /**
-
 
2783
       * Find the _Fields constant that matches name, or null if its not found.
-
 
2784
       */
-
 
2785
      public static _Fields findByName(String name) {
-
 
2786
        return byName.get(name);
-
 
2787
      }
-
 
2788
 
-
 
2789
      private final short _thriftId;
-
 
2790
      private final String _fieldName;
-
 
2791
 
-
 
2792
      _Fields(short thriftId, String fieldName) {
-
 
2793
        _thriftId = thriftId;
-
 
2794
        _fieldName = fieldName;
-
 
2795
      }
-
 
2796
 
-
 
2797
      public short getThriftFieldId() {
-
 
2798
        return _thriftId;
-
 
2799
      }
-
 
2800
 
-
 
2801
      public String getFieldName() {
-
 
2802
        return _fieldName;
-
 
2803
      }
-
 
2804
    }
-
 
2805
 
-
 
2806
    // isset id assignments
-
 
2807
 
-
 
2808
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
2809
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
2810
          new ListMetaData(TType.LIST, 
-
 
2811
              new StructMetaData(TType.STRUCT, UserEmail.class))));
-
 
2812
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
-
 
2813
          new FieldValueMetaData(TType.STRUCT)));
-
 
2814
    }});
-
 
2815
 
-
 
2816
    static {
-
 
2817
      FieldMetaData.addStructMetaDataMap(getEmailsToBeSent_result.class, metaDataMap);
-
 
2818
    }
-
 
2819
 
-
 
2820
    public getEmailsToBeSent_result() {
-
 
2821
    }
-
 
2822
 
-
 
2823
    public getEmailsToBeSent_result(
-
 
2824
      List<UserEmail> success,
-
 
2825
      HelperServiceException se)
-
 
2826
    {
-
 
2827
      this();
-
 
2828
      this.success = success;
-
 
2829
      this.se = se;
-
 
2830
    }
-
 
2831
 
-
 
2832
    /**
-
 
2833
     * Performs a deep copy on <i>other</i>.
-
 
2834
     */
-
 
2835
    public getEmailsToBeSent_result(getEmailsToBeSent_result other) {
-
 
2836
      if (other.isSetSuccess()) {
-
 
2837
        List<UserEmail> __this__success = new ArrayList<UserEmail>();
-
 
2838
        for (UserEmail other_element : other.success) {
-
 
2839
          __this__success.add(new UserEmail(other_element));
-
 
2840
        }
-
 
2841
        this.success = __this__success;
-
 
2842
      }
-
 
2843
      if (other.isSetSe()) {
-
 
2844
        this.se = new HelperServiceException(other.se);
-
 
2845
      }
-
 
2846
    }
-
 
2847
 
-
 
2848
    public getEmailsToBeSent_result deepCopy() {
-
 
2849
      return new getEmailsToBeSent_result(this);
-
 
2850
    }
-
 
2851
 
-
 
2852
    @Deprecated
-
 
2853
    public getEmailsToBeSent_result clone() {
-
 
2854
      return new getEmailsToBeSent_result(this);
-
 
2855
    }
-
 
2856
 
-
 
2857
    public int getSuccessSize() {
-
 
2858
      return (this.success == null) ? 0 : this.success.size();
-
 
2859
    }
-
 
2860
 
-
 
2861
    public java.util.Iterator<UserEmail> getSuccessIterator() {
-
 
2862
      return (this.success == null) ? null : this.success.iterator();
-
 
2863
    }
-
 
2864
 
-
 
2865
    public void addToSuccess(UserEmail elem) {
-
 
2866
      if (this.success == null) {
-
 
2867
        this.success = new ArrayList<UserEmail>();
-
 
2868
      }
-
 
2869
      this.success.add(elem);
-
 
2870
    }
-
 
2871
 
-
 
2872
    public List<UserEmail> getSuccess() {
-
 
2873
      return this.success;
-
 
2874
    }
-
 
2875
 
-
 
2876
    public getEmailsToBeSent_result setSuccess(List<UserEmail> success) {
-
 
2877
      this.success = success;
-
 
2878
      return this;
-
 
2879
    }
-
 
2880
 
-
 
2881
    public void unsetSuccess() {
-
 
2882
      this.success = null;
-
 
2883
    }
-
 
2884
 
-
 
2885
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
2886
    public boolean isSetSuccess() {
-
 
2887
      return this.success != null;
-
 
2888
    }
-
 
2889
 
-
 
2890
    public void setSuccessIsSet(boolean value) {
-
 
2891
      if (!value) {
-
 
2892
        this.success = null;
-
 
2893
      }
-
 
2894
    }
-
 
2895
 
-
 
2896
    public HelperServiceException getSe() {
-
 
2897
      return this.se;
-
 
2898
    }
-
 
2899
 
-
 
2900
    public getEmailsToBeSent_result setSe(HelperServiceException se) {
-
 
2901
      this.se = se;
-
 
2902
      return this;
-
 
2903
    }
-
 
2904
 
-
 
2905
    public void unsetSe() {
-
 
2906
      this.se = null;
-
 
2907
    }
-
 
2908
 
-
 
2909
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
-
 
2910
    public boolean isSetSe() {
-
 
2911
      return this.se != null;
-
 
2912
    }
-
 
2913
 
-
 
2914
    public void setSeIsSet(boolean value) {
-
 
2915
      if (!value) {
-
 
2916
        this.se = null;
-
 
2917
      }
-
 
2918
    }
-
 
2919
 
-
 
2920
    public void setFieldValue(_Fields field, Object value) {
-
 
2921
      switch (field) {
-
 
2922
      case SUCCESS:
-
 
2923
        if (value == null) {
-
 
2924
          unsetSuccess();
-
 
2925
        } else {
-
 
2926
          setSuccess((List<UserEmail>)value);
-
 
2927
        }
-
 
2928
        break;
-
 
2929
 
-
 
2930
      case SE:
-
 
2931
        if (value == null) {
-
 
2932
          unsetSe();
-
 
2933
        } else {
-
 
2934
          setSe((HelperServiceException)value);
-
 
2935
        }
-
 
2936
        break;
-
 
2937
 
-
 
2938
      }
-
 
2939
    }
-
 
2940
 
-
 
2941
    public void setFieldValue(int fieldID, Object value) {
-
 
2942
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
2943
    }
-
 
2944
 
-
 
2945
    public Object getFieldValue(_Fields field) {
-
 
2946
      switch (field) {
-
 
2947
      case SUCCESS:
-
 
2948
        return getSuccess();
-
 
2949
 
-
 
2950
      case SE:
-
 
2951
        return getSe();
-
 
2952
 
-
 
2953
      }
-
 
2954
      throw new IllegalStateException();
-
 
2955
    }
-
 
2956
 
-
 
2957
    public Object getFieldValue(int fieldId) {
-
 
2958
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
2959
    }
-
 
2960
 
-
 
2961
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
2962
    public boolean isSet(_Fields field) {
-
 
2963
      switch (field) {
-
 
2964
      case SUCCESS:
-
 
2965
        return isSetSuccess();
-
 
2966
      case SE:
-
 
2967
        return isSetSe();
-
 
2968
      }
-
 
2969
      throw new IllegalStateException();
-
 
2970
    }
-
 
2971
 
-
 
2972
    public boolean isSet(int fieldID) {
-
 
2973
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
2974
    }
-
 
2975
 
-
 
2976
    @Override
-
 
2977
    public boolean equals(Object that) {
-
 
2978
      if (that == null)
-
 
2979
        return false;
-
 
2980
      if (that instanceof getEmailsToBeSent_result)
-
 
2981
        return this.equals((getEmailsToBeSent_result)that);
-
 
2982
      return false;
-
 
2983
    }
-
 
2984
 
-
 
2985
    public boolean equals(getEmailsToBeSent_result that) {
-
 
2986
      if (that == null)
-
 
2987
        return false;
-
 
2988
 
-
 
2989
      boolean this_present_success = true && this.isSetSuccess();
-
 
2990
      boolean that_present_success = true && that.isSetSuccess();
-
 
2991
      if (this_present_success || that_present_success) {
-
 
2992
        if (!(this_present_success && that_present_success))
-
 
2993
          return false;
-
 
2994
        if (!this.success.equals(that.success))
-
 
2995
          return false;
-
 
2996
      }
-
 
2997
 
-
 
2998
      boolean this_present_se = true && this.isSetSe();
-
 
2999
      boolean that_present_se = true && that.isSetSe();
-
 
3000
      if (this_present_se || that_present_se) {
-
 
3001
        if (!(this_present_se && that_present_se))
-
 
3002
          return false;
-
 
3003
        if (!this.se.equals(that.se))
-
 
3004
          return false;
-
 
3005
      }
-
 
3006
 
-
 
3007
      return true;
-
 
3008
    }
-
 
3009
 
-
 
3010
    @Override
-
 
3011
    public int hashCode() {
-
 
3012
      return 0;
-
 
3013
    }
-
 
3014
 
-
 
3015
    public int compareTo(getEmailsToBeSent_result other) {
-
 
3016
      if (!getClass().equals(other.getClass())) {
-
 
3017
        return getClass().getName().compareTo(other.getClass().getName());
-
 
3018
      }
-
 
3019
 
-
 
3020
      int lastComparison = 0;
-
 
3021
      getEmailsToBeSent_result typedOther = (getEmailsToBeSent_result)other;
-
 
3022
 
-
 
3023
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
3024
      if (lastComparison != 0) {
-
 
3025
        return lastComparison;
-
 
3026
      }
-
 
3027
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
3028
      if (lastComparison != 0) {
-
 
3029
        return lastComparison;
-
 
3030
      }
-
 
3031
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
-
 
3032
      if (lastComparison != 0) {
-
 
3033
        return lastComparison;
-
 
3034
      }
-
 
3035
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
-
 
3036
      if (lastComparison != 0) {
-
 
3037
        return lastComparison;
-
 
3038
      }
-
 
3039
      return 0;
-
 
3040
    }
-
 
3041
 
-
 
3042
    public void read(TProtocol iprot) throws TException {
-
 
3043
      TField field;
-
 
3044
      iprot.readStructBegin();
-
 
3045
      while (true)
-
 
3046
      {
-
 
3047
        field = iprot.readFieldBegin();
-
 
3048
        if (field.type == TType.STOP) { 
-
 
3049
          break;
-
 
3050
        }
-
 
3051
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
3052
        if (fieldId == null) {
-
 
3053
          TProtocolUtil.skip(iprot, field.type);
-
 
3054
        } else {
-
 
3055
          switch (fieldId) {
-
 
3056
            case SUCCESS:
-
 
3057
              if (field.type == TType.LIST) {
-
 
3058
                {
-
 
3059
                  TList _list8 = iprot.readListBegin();
-
 
3060
                  this.success = new ArrayList<UserEmail>(_list8.size);
-
 
3061
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
-
 
3062
                  {
-
 
3063
                    UserEmail _elem10;
-
 
3064
                    _elem10 = new UserEmail();
-
 
3065
                    _elem10.read(iprot);
-
 
3066
                    this.success.add(_elem10);
-
 
3067
                  }
-
 
3068
                  iprot.readListEnd();
-
 
3069
                }
-
 
3070
              } else { 
-
 
3071
                TProtocolUtil.skip(iprot, field.type);
-
 
3072
              }
-
 
3073
              break;
-
 
3074
            case SE:
-
 
3075
              if (field.type == TType.STRUCT) {
-
 
3076
                this.se = new HelperServiceException();
-
 
3077
                this.se.read(iprot);
-
 
3078
              } else { 
-
 
3079
                TProtocolUtil.skip(iprot, field.type);
-
 
3080
              }
-
 
3081
              break;
-
 
3082
          }
-
 
3083
          iprot.readFieldEnd();
-
 
3084
        }
-
 
3085
      }
-
 
3086
      iprot.readStructEnd();
-
 
3087
      validate();
-
 
3088
    }
-
 
3089
 
-
 
3090
    public void write(TProtocol oprot) throws TException {
-
 
3091
      oprot.writeStructBegin(STRUCT_DESC);
-
 
3092
 
-
 
3093
      if (this.isSetSuccess()) {
-
 
3094
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
3095
        {
-
 
3096
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
-
 
3097
          for (UserEmail _iter11 : this.success)
-
 
3098
          {
-
 
3099
            _iter11.write(oprot);
-
 
3100
          }
-
 
3101
          oprot.writeListEnd();
-
 
3102
        }
-
 
3103
        oprot.writeFieldEnd();
-
 
3104
      } else if (this.isSetSe()) {
-
 
3105
        oprot.writeFieldBegin(SE_FIELD_DESC);
-
 
3106
        this.se.write(oprot);
-
 
3107
        oprot.writeFieldEnd();
-
 
3108
      }
-
 
3109
      oprot.writeFieldStop();
-
 
3110
      oprot.writeStructEnd();
-
 
3111
    }
-
 
3112
 
-
 
3113
    @Override
-
 
3114
    public String toString() {
-
 
3115
      StringBuilder sb = new StringBuilder("getEmailsToBeSent_result(");
-
 
3116
      boolean first = true;
-
 
3117
 
-
 
3118
      sb.append("success:");
-
 
3119
      if (this.success == null) {
-
 
3120
        sb.append("null");
-
 
3121
      } else {
-
 
3122
        sb.append(this.success);
-
 
3123
      }
-
 
3124
      first = false;
-
 
3125
      if (!first) sb.append(", ");
-
 
3126
      sb.append("se:");
-
 
3127
      if (this.se == null) {
-
 
3128
        sb.append("null");
-
 
3129
      } else {
-
 
3130
        sb.append(this.se);
-
 
3131
      }
-
 
3132
      first = false;
-
 
3133
      sb.append(")");
-
 
3134
      return sb.toString();
-
 
3135
    }
-
 
3136
 
-
 
3137
    public void validate() throws TException {
-
 
3138
      // check for required fields
-
 
3139
    }
-
 
3140
 
-
 
3141
  }
-
 
3142
 
-
 
3143
  public static class markEmailAsSent_args implements TBase<markEmailAsSent_args._Fields>, java.io.Serializable, Cloneable, Comparable<markEmailAsSent_args>   {
-
 
3144
    private static final TStruct STRUCT_DESC = new TStruct("markEmailAsSent_args");
-
 
3145
 
-
 
3146
    private static final TField EMAIL_ID_FIELD_DESC = new TField("emailId", TType.I64, (short)1);
-
 
3147
 
-
 
3148
    private long emailId;
-
 
3149
 
-
 
3150
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
3151
    public enum _Fields implements TFieldIdEnum {
-
 
3152
      EMAIL_ID((short)1, "emailId");
-
 
3153
 
-
 
3154
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
3155
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
3156
 
-
 
3157
      static {
-
 
3158
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
3159
          byId.put((int)field._thriftId, field);
-
 
3160
          byName.put(field.getFieldName(), field);
-
 
3161
        }
-
 
3162
      }
-
 
3163
 
-
 
3164
      /**
-
 
3165
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
3166
       */
-
 
3167
      public static _Fields findByThriftId(int fieldId) {
-
 
3168
        return byId.get(fieldId);
-
 
3169
      }
-
 
3170
 
-
 
3171
      /**
-
 
3172
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
3173
       * if it is not found.
-
 
3174
       */
-
 
3175
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
3176
        _Fields fields = findByThriftId(fieldId);
-
 
3177
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
3178
        return fields;
-
 
3179
      }
-
 
3180
 
-
 
3181
      /**
-
 
3182
       * Find the _Fields constant that matches name, or null if its not found.
-
 
3183
       */
-
 
3184
      public static _Fields findByName(String name) {
-
 
3185
        return byName.get(name);
-
 
3186
      }
-
 
3187
 
-
 
3188
      private final short _thriftId;
-
 
3189
      private final String _fieldName;
-
 
3190
 
-
 
3191
      _Fields(short thriftId, String fieldName) {
-
 
3192
        _thriftId = thriftId;
-
 
3193
        _fieldName = fieldName;
-
 
3194
      }
-
 
3195
 
-
 
3196
      public short getThriftFieldId() {
-
 
3197
        return _thriftId;
-
 
3198
      }
-
 
3199
 
-
 
3200
      public String getFieldName() {
-
 
3201
        return _fieldName;
-
 
3202
      }
-
 
3203
    }
-
 
3204
 
-
 
3205
    // isset id assignments
-
 
3206
    private static final int __EMAILID_ISSET_ID = 0;
-
 
3207
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
3208
 
-
 
3209
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
3210
      put(_Fields.EMAIL_ID, new FieldMetaData("emailId", TFieldRequirementType.DEFAULT, 
-
 
3211
          new FieldValueMetaData(TType.I64)));
-
 
3212
    }});
-
 
3213
 
-
 
3214
    static {
-
 
3215
      FieldMetaData.addStructMetaDataMap(markEmailAsSent_args.class, metaDataMap);
-
 
3216
    }
-
 
3217
 
-
 
3218
    public markEmailAsSent_args() {
-
 
3219
    }
-
 
3220
 
-
 
3221
    public markEmailAsSent_args(
-
 
3222
      long emailId)
-
 
3223
    {
-
 
3224
      this();
-
 
3225
      this.emailId = emailId;
-
 
3226
      setEmailIdIsSet(true);
-
 
3227
    }
-
 
3228
 
-
 
3229
    /**
-
 
3230
     * Performs a deep copy on <i>other</i>.
-
 
3231
     */
-
 
3232
    public markEmailAsSent_args(markEmailAsSent_args other) {
-
 
3233
      __isset_bit_vector.clear();
-
 
3234
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
3235
      this.emailId = other.emailId;
-
 
3236
    }
-
 
3237
 
-
 
3238
    public markEmailAsSent_args deepCopy() {
-
 
3239
      return new markEmailAsSent_args(this);
-
 
3240
    }
-
 
3241
 
-
 
3242
    @Deprecated
-
 
3243
    public markEmailAsSent_args clone() {
-
 
3244
      return new markEmailAsSent_args(this);
-
 
3245
    }
-
 
3246
 
-
 
3247
    public long getEmailId() {
-
 
3248
      return this.emailId;
-
 
3249
    }
-
 
3250
 
-
 
3251
    public markEmailAsSent_args setEmailId(long emailId) {
-
 
3252
      this.emailId = emailId;
-
 
3253
      setEmailIdIsSet(true);
-
 
3254
      return this;
-
 
3255
    }
-
 
3256
 
-
 
3257
    public void unsetEmailId() {
-
 
3258
      __isset_bit_vector.clear(__EMAILID_ISSET_ID);
-
 
3259
    }
-
 
3260
 
-
 
3261
    /** Returns true if field emailId is set (has been asigned a value) and false otherwise */
-
 
3262
    public boolean isSetEmailId() {
-
 
3263
      return __isset_bit_vector.get(__EMAILID_ISSET_ID);
-
 
3264
    }
-
 
3265
 
-
 
3266
    public void setEmailIdIsSet(boolean value) {
-
 
3267
      __isset_bit_vector.set(__EMAILID_ISSET_ID, value);
-
 
3268
    }
-
 
3269
 
-
 
3270
    public void setFieldValue(_Fields field, Object value) {
-
 
3271
      switch (field) {
-
 
3272
      case EMAIL_ID:
-
 
3273
        if (value == null) {
-
 
3274
          unsetEmailId();
-
 
3275
        } else {
-
 
3276
          setEmailId((Long)value);
-
 
3277
        }
-
 
3278
        break;
-
 
3279
 
-
 
3280
      }
-
 
3281
    }
-
 
3282
 
-
 
3283
    public void setFieldValue(int fieldID, Object value) {
-
 
3284
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
3285
    }
-
 
3286
 
-
 
3287
    public Object getFieldValue(_Fields field) {
-
 
3288
      switch (field) {
-
 
3289
      case EMAIL_ID:
-
 
3290
        return new Long(getEmailId());
-
 
3291
 
-
 
3292
      }
-
 
3293
      throw new IllegalStateException();
-
 
3294
    }
-
 
3295
 
-
 
3296
    public Object getFieldValue(int fieldId) {
-
 
3297
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
3298
    }
-
 
3299
 
-
 
3300
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
3301
    public boolean isSet(_Fields field) {
-
 
3302
      switch (field) {
-
 
3303
      case EMAIL_ID:
-
 
3304
        return isSetEmailId();
-
 
3305
      }
-
 
3306
      throw new IllegalStateException();
-
 
3307
    }
-
 
3308
 
-
 
3309
    public boolean isSet(int fieldID) {
-
 
3310
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
3311
    }
-
 
3312
 
-
 
3313
    @Override
-
 
3314
    public boolean equals(Object that) {
-
 
3315
      if (that == null)
-
 
3316
        return false;
-
 
3317
      if (that instanceof markEmailAsSent_args)
-
 
3318
        return this.equals((markEmailAsSent_args)that);
-
 
3319
      return false;
-
 
3320
    }
-
 
3321
 
-
 
3322
    public boolean equals(markEmailAsSent_args that) {
-
 
3323
      if (that == null)
-
 
3324
        return false;
-
 
3325
 
-
 
3326
      boolean this_present_emailId = true;
-
 
3327
      boolean that_present_emailId = true;
-
 
3328
      if (this_present_emailId || that_present_emailId) {
-
 
3329
        if (!(this_present_emailId && that_present_emailId))
-
 
3330
          return false;
-
 
3331
        if (this.emailId != that.emailId)
-
 
3332
          return false;
-
 
3333
      }
-
 
3334
 
-
 
3335
      return true;
-
 
3336
    }
-
 
3337
 
-
 
3338
    @Override
-
 
3339
    public int hashCode() {
-
 
3340
      return 0;
-
 
3341
    }
-
 
3342
 
-
 
3343
    public int compareTo(markEmailAsSent_args other) {
-
 
3344
      if (!getClass().equals(other.getClass())) {
-
 
3345
        return getClass().getName().compareTo(other.getClass().getName());
-
 
3346
      }
-
 
3347
 
-
 
3348
      int lastComparison = 0;
-
 
3349
      markEmailAsSent_args typedOther = (markEmailAsSent_args)other;
-
 
3350
 
-
 
3351
      lastComparison = Boolean.valueOf(isSetEmailId()).compareTo(isSetEmailId());
-
 
3352
      if (lastComparison != 0) {
-
 
3353
        return lastComparison;
-
 
3354
      }
-
 
3355
      lastComparison = TBaseHelper.compareTo(emailId, typedOther.emailId);
-
 
3356
      if (lastComparison != 0) {
-
 
3357
        return lastComparison;
-
 
3358
      }
-
 
3359
      return 0;
-
 
3360
    }
-
 
3361
 
-
 
3362
    public void read(TProtocol iprot) throws TException {
-
 
3363
      TField field;
-
 
3364
      iprot.readStructBegin();
-
 
3365
      while (true)
-
 
3366
      {
-
 
3367
        field = iprot.readFieldBegin();
-
 
3368
        if (field.type == TType.STOP) { 
-
 
3369
          break;
-
 
3370
        }
-
 
3371
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
3372
        if (fieldId == null) {
-
 
3373
          TProtocolUtil.skip(iprot, field.type);
-
 
3374
        } else {
-
 
3375
          switch (fieldId) {
-
 
3376
            case EMAIL_ID:
-
 
3377
              if (field.type == TType.I64) {
-
 
3378
                this.emailId = iprot.readI64();
-
 
3379
                setEmailIdIsSet(true);
-
 
3380
              } else { 
-
 
3381
                TProtocolUtil.skip(iprot, field.type);
-
 
3382
              }
-
 
3383
              break;
-
 
3384
          }
-
 
3385
          iprot.readFieldEnd();
-
 
3386
        }
-
 
3387
      }
-
 
3388
      iprot.readStructEnd();
-
 
3389
      validate();
-
 
3390
    }
-
 
3391
 
-
 
3392
    public void write(TProtocol oprot) throws TException {
-
 
3393
      validate();
-
 
3394
 
-
 
3395
      oprot.writeStructBegin(STRUCT_DESC);
-
 
3396
      oprot.writeFieldBegin(EMAIL_ID_FIELD_DESC);
-
 
3397
      oprot.writeI64(this.emailId);
-
 
3398
      oprot.writeFieldEnd();
-
 
3399
      oprot.writeFieldStop();
-
 
3400
      oprot.writeStructEnd();
-
 
3401
    }
-
 
3402
 
-
 
3403
    @Override
-
 
3404
    public String toString() {
-
 
3405
      StringBuilder sb = new StringBuilder("markEmailAsSent_args(");
-
 
3406
      boolean first = true;
-
 
3407
 
-
 
3408
      sb.append("emailId:");
-
 
3409
      sb.append(this.emailId);
-
 
3410
      first = false;
-
 
3411
      sb.append(")");
-
 
3412
      return sb.toString();
-
 
3413
    }
-
 
3414
 
-
 
3415
    public void validate() throws TException {
-
 
3416
      // check for required fields
-
 
3417
    }
-
 
3418
 
-
 
3419
  }
-
 
3420
 
-
 
3421
  public static class markEmailAsSent_result implements TBase<markEmailAsSent_result._Fields>, java.io.Serializable, Cloneable, Comparable<markEmailAsSent_result>   {
-
 
3422
    private static final TStruct STRUCT_DESC = new TStruct("markEmailAsSent_result");
-
 
3423
 
-
 
3424
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
-
 
3425
 
-
 
3426
    private HelperServiceException se;
-
 
3427
 
-
 
3428
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
3429
    public enum _Fields implements TFieldIdEnum {
-
 
3430
      SE((short)1, "se");
-
 
3431
 
-
 
3432
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
3433
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
3434
 
-
 
3435
      static {
-
 
3436
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
3437
          byId.put((int)field._thriftId, field);
-
 
3438
          byName.put(field.getFieldName(), field);
-
 
3439
        }
-
 
3440
      }
-
 
3441
 
-
 
3442
      /**
-
 
3443
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
3444
       */
-
 
3445
      public static _Fields findByThriftId(int fieldId) {
-
 
3446
        return byId.get(fieldId);
-
 
3447
      }
-
 
3448
 
-
 
3449
      /**
-
 
3450
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
3451
       * if it is not found.
-
 
3452
       */
-
 
3453
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
3454
        _Fields fields = findByThriftId(fieldId);
-
 
3455
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
3456
        return fields;
-
 
3457
      }
-
 
3458
 
-
 
3459
      /**
-
 
3460
       * Find the _Fields constant that matches name, or null if its not found.
-
 
3461
       */
-
 
3462
      public static _Fields findByName(String name) {
-
 
3463
        return byName.get(name);
-
 
3464
      }
-
 
3465
 
-
 
3466
      private final short _thriftId;
-
 
3467
      private final String _fieldName;
-
 
3468
 
-
 
3469
      _Fields(short thriftId, String fieldName) {
-
 
3470
        _thriftId = thriftId;
-
 
3471
        _fieldName = fieldName;
-
 
3472
      }
-
 
3473
 
-
 
3474
      public short getThriftFieldId() {
-
 
3475
        return _thriftId;
-
 
3476
      }
-
 
3477
 
-
 
3478
      public String getFieldName() {
-
 
3479
        return _fieldName;
-
 
3480
      }
-
 
3481
    }
-
 
3482
 
-
 
3483
    // isset id assignments
-
 
3484
 
-
 
3485
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
3486
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
-
 
3487
          new FieldValueMetaData(TType.STRUCT)));
-
 
3488
    }});
-
 
3489
 
-
 
3490
    static {
-
 
3491
      FieldMetaData.addStructMetaDataMap(markEmailAsSent_result.class, metaDataMap);
-
 
3492
    }
-
 
3493
 
-
 
3494
    public markEmailAsSent_result() {
-
 
3495
    }
-
 
3496
 
-
 
3497
    public markEmailAsSent_result(
-
 
3498
      HelperServiceException se)
-
 
3499
    {
-
 
3500
      this();
-
 
3501
      this.se = se;
-
 
3502
    }
-
 
3503
 
-
 
3504
    /**
-
 
3505
     * Performs a deep copy on <i>other</i>.
-
 
3506
     */
-
 
3507
    public markEmailAsSent_result(markEmailAsSent_result other) {
-
 
3508
      if (other.isSetSe()) {
-
 
3509
        this.se = new HelperServiceException(other.se);
-
 
3510
      }
-
 
3511
    }
-
 
3512
 
-
 
3513
    public markEmailAsSent_result deepCopy() {
-
 
3514
      return new markEmailAsSent_result(this);
-
 
3515
    }
-
 
3516
 
-
 
3517
    @Deprecated
-
 
3518
    public markEmailAsSent_result clone() {
-
 
3519
      return new markEmailAsSent_result(this);
-
 
3520
    }
-
 
3521
 
-
 
3522
    public HelperServiceException getSe() {
-
 
3523
      return this.se;
-
 
3524
    }
-
 
3525
 
-
 
3526
    public markEmailAsSent_result setSe(HelperServiceException se) {
-
 
3527
      this.se = se;
-
 
3528
      return this;
-
 
3529
    }
-
 
3530
 
-
 
3531
    public void unsetSe() {
-
 
3532
      this.se = null;
-
 
3533
    }
-
 
3534
 
-
 
3535
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
-
 
3536
    public boolean isSetSe() {
-
 
3537
      return this.se != null;
-
 
3538
    }
-
 
3539
 
-
 
3540
    public void setSeIsSet(boolean value) {
-
 
3541
      if (!value) {
-
 
3542
        this.se = null;
-
 
3543
      }
-
 
3544
    }
-
 
3545
 
-
 
3546
    public void setFieldValue(_Fields field, Object value) {
-
 
3547
      switch (field) {
-
 
3548
      case SE:
-
 
3549
        if (value == null) {
-
 
3550
          unsetSe();
-
 
3551
        } else {
-
 
3552
          setSe((HelperServiceException)value);
-
 
3553
        }
-
 
3554
        break;
-
 
3555
 
-
 
3556
      }
-
 
3557
    }
-
 
3558
 
-
 
3559
    public void setFieldValue(int fieldID, Object value) {
-
 
3560
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
3561
    }
-
 
3562
 
-
 
3563
    public Object getFieldValue(_Fields field) {
-
 
3564
      switch (field) {
-
 
3565
      case SE:
-
 
3566
        return getSe();
-
 
3567
 
-
 
3568
      }
-
 
3569
      throw new IllegalStateException();
-
 
3570
    }
-
 
3571
 
-
 
3572
    public Object getFieldValue(int fieldId) {
-
 
3573
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
3574
    }
-
 
3575
 
-
 
3576
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
3577
    public boolean isSet(_Fields field) {
-
 
3578
      switch (field) {
-
 
3579
      case SE:
-
 
3580
        return isSetSe();
-
 
3581
      }
-
 
3582
      throw new IllegalStateException();
-
 
3583
    }
-
 
3584
 
-
 
3585
    public boolean isSet(int fieldID) {
-
 
3586
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
3587
    }
-
 
3588
 
-
 
3589
    @Override
-
 
3590
    public boolean equals(Object that) {
-
 
3591
      if (that == null)
-
 
3592
        return false;
-
 
3593
      if (that instanceof markEmailAsSent_result)
-
 
3594
        return this.equals((markEmailAsSent_result)that);
-
 
3595
      return false;
-
 
3596
    }
-
 
3597
 
-
 
3598
    public boolean equals(markEmailAsSent_result that) {
-
 
3599
      if (that == null)
-
 
3600
        return false;
-
 
3601
 
-
 
3602
      boolean this_present_se = true && this.isSetSe();
-
 
3603
      boolean that_present_se = true && that.isSetSe();
-
 
3604
      if (this_present_se || that_present_se) {
-
 
3605
        if (!(this_present_se && that_present_se))
-
 
3606
          return false;
-
 
3607
        if (!this.se.equals(that.se))
-
 
3608
          return false;
-
 
3609
      }
-
 
3610
 
-
 
3611
      return true;
-
 
3612
    }
-
 
3613
 
-
 
3614
    @Override
-
 
3615
    public int hashCode() {
-
 
3616
      return 0;
-
 
3617
    }
-
 
3618
 
-
 
3619
    public int compareTo(markEmailAsSent_result other) {
-
 
3620
      if (!getClass().equals(other.getClass())) {
-
 
3621
        return getClass().getName().compareTo(other.getClass().getName());
-
 
3622
      }
-
 
3623
 
-
 
3624
      int lastComparison = 0;
-
 
3625
      markEmailAsSent_result typedOther = (markEmailAsSent_result)other;
-
 
3626
 
-
 
3627
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
-
 
3628
      if (lastComparison != 0) {
-
 
3629
        return lastComparison;
-
 
3630
      }
-
 
3631
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
-
 
3632
      if (lastComparison != 0) {
-
 
3633
        return lastComparison;
-
 
3634
      }
-
 
3635
      return 0;
-
 
3636
    }
-
 
3637
 
-
 
3638
    public void read(TProtocol iprot) throws TException {
-
 
3639
      TField field;
-
 
3640
      iprot.readStructBegin();
-
 
3641
      while (true)
-
 
3642
      {
-
 
3643
        field = iprot.readFieldBegin();
-
 
3644
        if (field.type == TType.STOP) { 
-
 
3645
          break;
-
 
3646
        }
-
 
3647
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
3648
        if (fieldId == null) {
-
 
3649
          TProtocolUtil.skip(iprot, field.type);
-
 
3650
        } else {
-
 
3651
          switch (fieldId) {
-
 
3652
            case SE:
-
 
3653
              if (field.type == TType.STRUCT) {
-
 
3654
                this.se = new HelperServiceException();
-
 
3655
                this.se.read(iprot);
-
 
3656
              } else { 
-
 
3657
                TProtocolUtil.skip(iprot, field.type);
-
 
3658
              }
-
 
3659
              break;
-
 
3660
          }
-
 
3661
          iprot.readFieldEnd();
-
 
3662
        }
-
 
3663
      }
-
 
3664
      iprot.readStructEnd();
-
 
3665
      validate();
-
 
3666
    }
-
 
3667
 
-
 
3668
    public void write(TProtocol oprot) throws TException {
-
 
3669
      oprot.writeStructBegin(STRUCT_DESC);
-
 
3670
 
-
 
3671
      if (this.isSetSe()) {
-
 
3672
        oprot.writeFieldBegin(SE_FIELD_DESC);
-
 
3673
        this.se.write(oprot);
-
 
3674
        oprot.writeFieldEnd();
-
 
3675
      }
-
 
3676
      oprot.writeFieldStop();
-
 
3677
      oprot.writeStructEnd();
-
 
3678
    }
-
 
3679
 
-
 
3680
    @Override
-
 
3681
    public String toString() {
-
 
3682
      StringBuilder sb = new StringBuilder("markEmailAsSent_result(");
-
 
3683
      boolean first = true;
-
 
3684
 
-
 
3685
      sb.append("se:");
-
 
3686
      if (this.se == null) {
-
 
3687
        sb.append("null");
-
 
3688
      } else {
-
 
3689
        sb.append(this.se);
-
 
3690
      }
-
 
3691
      first = false;
-
 
3692
      sb.append(")");
-
 
3693
      return sb.toString();
-
 
3694
    }
-
 
3695
 
-
 
3696
    public void validate() throws TException {
-
 
3697
      // check for required fields
-
 
3698
    }
-
 
3699
 
-
 
3700
  }
-
 
3701
 
2329
  public static class sendMail_args implements TBase<sendMail_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendMail_args>   {
3702
  public static class sendMail_args implements TBase<sendMail_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendMail_args>   {
2330
    private static final TStruct STRUCT_DESC = new TStruct("sendMail_args");
3703
    private static final TStruct STRUCT_DESC = new TStruct("sendMail_args");
2331
 
3704
 
2332
    private static final TField MAIL_FIELD_DESC = new TField("mail", TType.STRUCT, (short)1);
3705
    private static final TField MAIL_FIELD_DESC = new TField("mail", TType.STRUCT, (short)1);
2333
 
3706
 
Line 5605... Line 6978...
5605
              }
6978
              }
5606
              break;
6979
              break;
5607
            case PARAMS:
6980
            case PARAMS:
5608
              if (field.type == TType.MAP) {
6981
              if (field.type == TType.MAP) {
5609
                {
6982
                {
5610
                  TMap _map8 = iprot.readMapBegin();
6983
                  TMap _map12 = iprot.readMapBegin();
5611
                  this.params = new HashMap<String,String>(2*_map8.size);
6984
                  this.params = new HashMap<String,String>(2*_map12.size);
5612
                  for (int _i9 = 0; _i9 < _map8.size; ++_i9)
6985
                  for (int _i13 = 0; _i13 < _map12.size; ++_i13)
5613
                  {
6986
                  {
5614
                    String _key10;
6987
                    String _key14;
5615
                    String _val11;
6988
                    String _val15;
5616
                    _key10 = iprot.readString();
6989
                    _key14 = iprot.readString();
5617
                    _val11 = iprot.readString();
6990
                    _val15 = iprot.readString();
5618
                    this.params.put(_key10, _val11);
6991
                    this.params.put(_key14, _val15);
5619
                  }
6992
                  }
5620
                  iprot.readMapEnd();
6993
                  iprot.readMapEnd();
5621
                }
6994
                }
5622
              } else { 
6995
              } else { 
5623
                TProtocolUtil.skip(iprot, field.type);
6996
                TProtocolUtil.skip(iprot, field.type);
Line 5640... Line 7013...
5640
      oprot.writeFieldEnd();
7013
      oprot.writeFieldEnd();
5641
      if (this.params != null) {
7014
      if (this.params != null) {
5642
        oprot.writeFieldBegin(PARAMS_FIELD_DESC);
7015
        oprot.writeFieldBegin(PARAMS_FIELD_DESC);
5643
        {
7016
        {
5644
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.params.size()));
7017
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.params.size()));
5645
          for (Map.Entry<String, String> _iter12 : this.params.entrySet())
7018
          for (Map.Entry<String, String> _iter16 : this.params.entrySet())
5646
          {
7019
          {
5647
            oprot.writeString(_iter12.getKey());
7020
            oprot.writeString(_iter16.getKey());
5648
            oprot.writeString(_iter12.getValue());
7021
            oprot.writeString(_iter16.getValue());
5649
          }
7022
          }
5650
          oprot.writeMapEnd();
7023
          oprot.writeMapEnd();
5651
        }
7024
        }
5652
        oprot.writeFieldEnd();
7025
        oprot.writeFieldEnd();
5653
      }
7026
      }