示例#1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, FrontendRequest struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetType()) {
     optionals.set(0);
   }
   if (struct.isSetStartBuild()) {
     optionals.set(1);
   }
   if (struct.isSetBuildStatus()) {
     optionals.set(2);
   }
   oprot.writeBitSet(optionals, 3);
   if (struct.isSetType()) {
     oprot.writeI32(struct.type.getValue());
   }
   if (struct.isSetStartBuild()) {
     struct.startBuild.write(oprot);
   }
   if (struct.isSetBuildStatus()) {
     struct.buildStatus.write(oprot);
   }
 }
示例#2
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, FrontendRequest struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.type != null) {
        if (struct.isSetType()) {
          oprot.writeFieldBegin(TYPE_FIELD_DESC);
          oprot.writeI32(struct.type.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.startBuild != null) {
        if (struct.isSetStartBuild()) {
          oprot.writeFieldBegin(START_BUILD_FIELD_DESC);
          struct.startBuild.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.buildStatus != null) {
        if (struct.isSetBuildStatus()) {
          oprot.writeFieldBegin(BUILD_STATUS_FIELD_DESC);
          struct.buildStatus.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
示例#3
0
  public boolean equals(FrontendRequest that) {
    if (that == null) return false;

    boolean this_present_type = true && this.isSetType();
    boolean that_present_type = true && that.isSetType();
    if (this_present_type || that_present_type) {
      if (!(this_present_type && that_present_type)) return false;
      if (!this.type.equals(that.type)) return false;
    }

    boolean this_present_startBuild = true && this.isSetStartBuild();
    boolean that_present_startBuild = true && that.isSetStartBuild();
    if (this_present_startBuild || that_present_startBuild) {
      if (!(this_present_startBuild && that_present_startBuild)) return false;
      if (!this.startBuild.equals(that.startBuild)) return false;
    }

    boolean this_present_buildStatus = true && this.isSetBuildStatus();
    boolean that_present_buildStatus = true && that.isSetBuildStatus();
    if (this_present_buildStatus || that_present_buildStatus) {
      if (!(this_present_buildStatus && that_present_buildStatus)) return false;
      if (!this.buildStatus.equals(that.buildStatus)) return false;
    }

    return true;
  }
示例#4
0
 /** Performs a deep copy on <i>other</i>. */
 public FrontendRequest(FrontendRequest other) {
   if (other.isSetType()) {
     this.type = other.type;
   }
   if (other.isSetStartBuild()) {
     this.startBuild = new StartBuildRequest(other.startBuild);
   }
   if (other.isSetBuildStatus()) {
     this.buildStatus = new BuildStatusRequest(other.buildStatus);
   }
 }
示例#5
0
  @Override
  public int compareTo(FrontendRequest other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetStartBuild()).compareTo(other.isSetStartBuild());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStartBuild()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startBuild, other.startBuild);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetBuildStatus()).compareTo(other.isSetBuildStatus());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBuildStatus()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.buildStatus, other.buildStatus);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }