if (isValidValue(fields()[0], other.therapeuticContext)) { this.therapeuticContext = data().deepCopy(fields()[0].schema(), other.therapeuticContext); fieldSetFlags()[0] = true; if (isValidValue(fields()[1], other.pathway)) { this.pathway = data().deepCopy(fields()[1].schema(), other.pathway); fieldSetFlags()[1] = true; if (isValidValue(fields()[2], other.effect)) { this.effect = data().deepCopy(fields()[2].schema(), other.effect); fieldSetFlags()[2] = true; if (isValidValue(fields()[3], other.association)) { this.association = data().deepCopy(fields()[3].schema(), other.association); fieldSetFlags()[3] = true; if (isValidValue(fields()[4], other.status)) { this.status = data().deepCopy(fields()[4].schema(), other.status); fieldSetFlags()[4] = true; if (isValidValue(fields()[5], other.evidence)) { this.evidence = data().deepCopy(fields()[5].schema(), other.evidence); fieldSetFlags()[5] = true; if (isValidValue(fields()[6], other.bibliography)) { this.bibliography = data().deepCopy(fields()[6].schema(), other.bibliography); fieldSetFlags()[6] = true;
if (isValidValue(fields()[0], other.therapeuticContext)) { this.therapeuticContext = data().deepCopy(fields()[0].schema(), other.therapeuticContext); fieldSetFlags()[0] = true; if (isValidValue(fields()[1], other.pathway)) { this.pathway = data().deepCopy(fields()[1].schema(), other.pathway); fieldSetFlags()[1] = true; if (isValidValue(fields()[2], other.effect)) { this.effect = data().deepCopy(fields()[2].schema(), other.effect); fieldSetFlags()[2] = true; if (isValidValue(fields()[3], other.association)) { this.association = data().deepCopy(fields()[3].schema(), other.association); fieldSetFlags()[3] = true; if (isValidValue(fields()[4], other.status)) { this.status = data().deepCopy(fields()[4].schema(), other.status); fieldSetFlags()[4] = true; if (isValidValue(fields()[5], other.evidence)) { this.evidence = data().deepCopy(fields()[5].schema(), other.evidence); fieldSetFlags()[5] = true; if (isValidValue(fields()[6], other.bibliography)) { this.bibliography = data().deepCopy(fields()[6].schema(), other.bibliography); fieldSetFlags()[6] = true;
@Override public Drug build() { try { Drug record = new Drug(); record.therapeuticContext = fieldSetFlags()[0] ? this.therapeuticContext : (java.lang.String) defaultValue(fields()[0]); record.pathway = fieldSetFlags()[1] ? this.pathway : (java.lang.String) defaultValue(fields()[1]); record.effect = fieldSetFlags()[2] ? this.effect : (java.lang.String) defaultValue(fields()[2]); record.association = fieldSetFlags()[3] ? this.association : (java.lang.String) defaultValue(fields()[3]); record.status = fieldSetFlags()[4] ? this.status : (java.lang.String) defaultValue(fields()[4]); record.evidence = fieldSetFlags()[5] ? this.evidence : (java.lang.String) defaultValue(fields()[5]); record.bibliography = fieldSetFlags()[6] ? this.bibliography : (java.util.List<java.lang.String>) defaultValue(fields()[6]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** Sets the value of the 'evidence' field */ public org.opencb.biodata.models.variant.avro.Drug.Builder setEvidence(java.lang.String value) { validate(fields()[5], value); this.evidence = value; fieldSetFlags()[5] = true; return this; }
/** Sets the value of the 'effect' field */ public org.opencb.biodata.models.variant.avro.Drug.Builder setEffect(java.lang.String value) { validate(fields()[2], value); this.effect = value; fieldSetFlags()[2] = true; return this; }
/** Sets the value of the 'status' field */ public org.opencb.biodata.models.variant.avro.Drug.Builder setStatus(java.lang.String value) { validate(fields()[4], value); this.status = value; fieldSetFlags()[4] = true; return this; }
/** Sets the value of the 'association' field */ public org.opencb.biodata.models.variant.avro.Drug.Builder setAssociation(java.lang.String value) { validate(fields()[3], value); this.association = value; fieldSetFlags()[3] = true; return this; }
/** Sets the value of the 'therapeuticContext' field */ public org.opencb.biodata.models.variant.avro.Drug.Builder setTherapeuticContext(java.lang.String value) { validate(fields()[0], value); this.therapeuticContext = value; fieldSetFlags()[0] = true; return this; }
/** Sets the value of the 'pathway' field */ public org.opencb.biodata.models.variant.avro.Drug.Builder setPathway(java.lang.String value) { validate(fields()[1], value); this.pathway = value; fieldSetFlags()[1] = true; return this; }
/** Sets the value of the 'bibliography' field */ public org.opencb.biodata.models.variant.avro.Drug.Builder setBibliography(java.util.List<java.lang.String> value) { validate(fields()[6], value); this.bibliography = value; fieldSetFlags()[6] = true; return this; }