Esempio n. 1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, SubmitOptions struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   oprot.writeI32(struct.initial_status.getValue());
   BitSet optionals = new BitSet();
   if (struct.is_set_creds()) {
     optionals.set(0);
   }
   oprot.writeBitSet(optionals, 1);
   if (struct.is_set_creds()) {
     struct.creds.write(oprot);
   }
 }
Esempio n. 2
0
  @Override
  public int compareTo(SubmitOptions other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison =
        Boolean.valueOf(is_set_initial_status()).compareTo(other.is_set_initial_status());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_initial_status()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.initial_status, other.initial_status);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(is_set_creds()).compareTo(other.is_set_creds());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_creds()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, other.creds);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Esempio n. 3
0
 /** Performs a deep copy on <i>other</i>. */
 public SubmitOptions(SubmitOptions other) {
   if (other.is_set_initial_status()) {
     this.initial_status = other.initial_status;
   }
   if (other.is_set_creds()) {
     this.creds = new Credentials(other.creds);
   }
 }
Esempio n. 4
0
  public boolean equals(SubmitOptions that) {
    if (that == null) return false;

    boolean this_present_initial_status = true && this.is_set_initial_status();
    boolean that_present_initial_status = true && that.is_set_initial_status();
    if (this_present_initial_status || that_present_initial_status) {
      if (!(this_present_initial_status && that_present_initial_status)) return false;
      if (!this.initial_status.equals(that.initial_status)) return false;
    }

    boolean this_present_creds = true && this.is_set_creds();
    boolean that_present_creds = true && that.is_set_creds();
    if (this_present_creds || that_present_creds) {
      if (!(this_present_creds && that_present_creds)) return false;
      if (!this.creds.equals(that.creds)) return false;
    }

    return true;
  }
Esempio n. 5
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, SubmitOptions struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.initial_status != null) {
        oprot.writeFieldBegin(INITIAL_STATUS_FIELD_DESC);
        oprot.writeI32(struct.initial_status.getValue());
        oprot.writeFieldEnd();
      }
      if (struct.creds != null) {
        if (struct.is_set_creds()) {
          oprot.writeFieldBegin(CREDS_FIELD_DESC);
          struct.creds.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }