/** Creates a Builder by copying an existing Builder */ private Builder(org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder other) { super(other); if (isValidValue(fields()[0], other.key)) { this.key = data().deepCopy(fields()[0].schema(), other.key); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.id)) { this.id = data().deepCopy(fields()[1].schema(), other.id); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.description)) { this.description = data().deepCopy(fields()[2].schema(), other.description); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.number)) { this.number = data().deepCopy(fields()[3].schema(), other.number); fieldSetFlags()[3] = true; } if (isValidValue(fields()[4], other.type)) { this.type = data().deepCopy(fields()[4].schema(), other.type); fieldSetFlags()[4] = true; } if (isValidValue(fields()[5], other.genericFields)) { this.genericFields = data().deepCopy(fields()[5].schema(), other.genericFields); fieldSetFlags()[5] = true; } }
/** Creates a Builder by copying an existing VariantFileHeaderComplexLine instance */ private Builder(org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine other) { super(org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.SCHEMA$); if (isValidValue(fields()[0], other.key)) { this.key = data().deepCopy(fields()[0].schema(), other.key); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.id)) { this.id = data().deepCopy(fields()[1].schema(), other.id); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.description)) { this.description = data().deepCopy(fields()[2].schema(), other.description); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.number)) { this.number = data().deepCopy(fields()[3].schema(), other.number); fieldSetFlags()[3] = true; } if (isValidValue(fields()[4], other.type)) { this.type = data().deepCopy(fields()[4].schema(), other.type); fieldSetFlags()[4] = true; } if (isValidValue(fields()[5], other.genericFields)) { this.genericFields = data().deepCopy(fields()[5].schema(), other.genericFields); fieldSetFlags()[5] = true; } }
@Override public VariantFileHeaderComplexLine build() { try { VariantFileHeaderComplexLine record = new VariantFileHeaderComplexLine(); record.key = fieldSetFlags()[0] ? this.key : (java.lang.String) defaultValue(fields()[0]); record.id = fieldSetFlags()[1] ? this.id : (java.lang.String) defaultValue(fields()[1]); record.description = fieldSetFlags()[2] ? this.description : (java.lang.String) defaultValue(fields()[2]); record.number = fieldSetFlags()[3] ? this.number : (java.lang.String) defaultValue(fields()[3]); record.type = fieldSetFlags()[4] ? this.type : (java.lang.String) defaultValue(fields()[4]); record.genericFields = fieldSetFlags()[5] ? this.genericFields : (java.util.Map<java.lang.String,java.lang.String>) defaultValue(fields()[5]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** Sets the value of the 'key' field */ public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder setKey(java.lang.String value) { validate(fields()[0], value); this.key = value; fieldSetFlags()[0] = true; return this; }
/** Sets the value of the 'genericFields' field */ public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder setGenericFields(java.util.Map<java.lang.String,java.lang.String> value) { validate(fields()[5], value); this.genericFields = value; fieldSetFlags()[5] = true; return this; }
/** Sets the value of the 'type' field */ public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder setType(java.lang.String value) { validate(fields()[4], value); this.type = value; fieldSetFlags()[4] = true; return this; }
/** Sets the value of the 'description' field */ public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder setDescription(java.lang.String value) { validate(fields()[2], value); this.description = value; fieldSetFlags()[2] = true; return this; }
/** Sets the value of the 'id' field */ public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder setId(java.lang.String value) { validate(fields()[1], value); this.id = value; fieldSetFlags()[1] = true; return this; }
/** Sets the value of the 'number' field */ public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder setNumber(java.lang.String value) { validate(fields()[3], value); this.number = value; fieldSetFlags()[3] = true; return this; }