/** Creates a Builder by copying an existing Breakend instance */ private Builder(org.opencb.biodata.models.variant.avro.Breakend other) { super(org.opencb.biodata.models.variant.avro.Breakend.SCHEMA$); if (isValidValue(fields()[0], other.mate)) { this.mate = data().deepCopy(fields()[0].schema(), other.mate); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.orientation)) { this.orientation = data().deepCopy(fields()[1].schema(), other.orientation); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.insSeq)) { this.insSeq = data().deepCopy(fields()[2].schema(), other.insSeq); fieldSetFlags()[2] = true; } }
/** Creates a Builder by copying an existing Builder */ private Builder(org.opencb.biodata.models.variant.avro.Breakend.Builder other) { super(other); if (isValidValue(fields()[0], other.mate)) { this.mate = data().deepCopy(fields()[0].schema(), other.mate); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.orientation)) { this.orientation = data().deepCopy(fields()[1].schema(), other.orientation); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.insSeq)) { this.insSeq = data().deepCopy(fields()[2].schema(), other.insSeq); fieldSetFlags()[2] = true; } }
@Override public Breakend build() { try { Breakend record = new Breakend(); record.mate = fieldSetFlags()[0] ? this.mate : (org.opencb.biodata.models.variant.avro.BreakendMate) defaultValue(fields()[0]); record.orientation = fieldSetFlags()[1] ? this.orientation : (org.opencb.biodata.models.variant.avro.BreakendOrientation) defaultValue(fields()[1]); record.insSeq = fieldSetFlags()[2] ? this.insSeq : (java.lang.String) defaultValue(fields()[2]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** Sets the value of the 'insSeq' field */ public org.opencb.biodata.models.variant.avro.Breakend.Builder setInsSeq(java.lang.String value) { validate(fields()[2], value); this.insSeq = value; fieldSetFlags()[2] = true; return this; }
/** Sets the value of the 'mate' field */ public org.opencb.biodata.models.variant.avro.Breakend.Builder setMate(org.opencb.biodata.models.variant.avro.BreakendMate value) { validate(fields()[0], value); this.mate = value; fieldSetFlags()[0] = true; return this; }
/** Sets the value of the 'orientation' field */ public org.opencb.biodata.models.variant.avro.Breakend.Builder setOrientation(org.opencb.biodata.models.variant.avro.BreakendOrientation value) { validate(fields()[1], value); this.orientation = value; fieldSetFlags()[1] = true; return this; }