org.gel.models.participant.avro.GmsConsentStatus Maven / Gradle / Ivy
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.gel.models.participant.avro;
@SuppressWarnings("all")
/** Consent Status for GMS */
@org.apache.avro.specific.AvroGenerated
public class GmsConsentStatus extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"GmsConsentStatus\",\"namespace\":\"org.gel.models.participant.avro\",\"doc\":\"Consent Status for GMS\",\"fields\":[{\"name\":\"programmeConsent\",\"type\":{\"type\":\"enum\",\"name\":\"GenericConsent\",\"doc\":\"clinicalEthnicities supersedes Ancestries in GMS\",\"symbols\":[\"yes\",\"no\",\"undefined\",\"not_applicable\"]},\"doc\":\"Is this individual consented to the programme? It could simply be a family member that is not consented\\n but for whom affection status is known\"},{\"name\":\"primaryFindingConsent\",\"type\":\"GenericConsent\",\"doc\":\"Consent for feedback of primary findings?\\n RD: Primary Findings\\n Cancer: PrimaryFindings is somatic + pertinent germline findings\"},{\"name\":\"researchConsent\",\"type\":\"GenericConsent\",\"doc\":\"Research Consent\"},{\"name\":\"healthRelatedFindingConsent\",\"type\":\"GenericConsent\",\"doc\":\"Consent for secondary health related findings?\"},{\"name\":\"carrierStatusConsent\",\"type\":\"GenericConsent\",\"doc\":\"Consent for carrier status check?\"},{\"name\":\"pharmacogenomicsFindingConsent\",\"type\":\"GenericConsent\",\"doc\":\"Consent for pharmacogenomics consent as secondary findings?\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** Is this individual consented to the programme? It could simply be a family member that is not consented
but for whom affection status is known */
private org.gel.models.participant.avro.GenericConsent programmeConsent;
/** Consent for feedback of primary findings?
RD: Primary Findings
Cancer: PrimaryFindings is somatic + pertinent germline findings */
private org.gel.models.participant.avro.GenericConsent primaryFindingConsent;
/** Research Consent */
private org.gel.models.participant.avro.GenericConsent researchConsent;
/** Consent for secondary health related findings? */
private org.gel.models.participant.avro.GenericConsent healthRelatedFindingConsent;
/** Consent for carrier status check? */
private org.gel.models.participant.avro.GenericConsent carrierStatusConsent;
/** Consent for pharmacogenomics consent as secondary findings? */
private org.gel.models.participant.avro.GenericConsent pharmacogenomicsFindingConsent;
/**
* Default constructor. Note that this does not initialize fields
* to their default values from the schema. If that is desired then
* one should use newBuilder()
.
*/
public GmsConsentStatus() {}
/**
* All-args constructor.
*/
public GmsConsentStatus(org.gel.models.participant.avro.GenericConsent programmeConsent, org.gel.models.participant.avro.GenericConsent primaryFindingConsent, org.gel.models.participant.avro.GenericConsent researchConsent, org.gel.models.participant.avro.GenericConsent healthRelatedFindingConsent, org.gel.models.participant.avro.GenericConsent carrierStatusConsent, org.gel.models.participant.avro.GenericConsent pharmacogenomicsFindingConsent) {
this.programmeConsent = programmeConsent;
this.primaryFindingConsent = primaryFindingConsent;
this.researchConsent = researchConsent;
this.healthRelatedFindingConsent = healthRelatedFindingConsent;
this.carrierStatusConsent = carrierStatusConsent;
this.pharmacogenomicsFindingConsent = pharmacogenomicsFindingConsent;
}
public org.apache.avro.Schema getSchema() { return SCHEMA$; }
// Used by DatumWriter. Applications should not call.
public java.lang.Object get(int field$) {
switch (field$) {
case 0: return programmeConsent;
case 1: return primaryFindingConsent;
case 2: return researchConsent;
case 3: return healthRelatedFindingConsent;
case 4: return carrierStatusConsent;
case 5: return pharmacogenomicsFindingConsent;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
// Used by DatumReader. Applications should not call.
@SuppressWarnings(value="unchecked")
public void put(int field$, java.lang.Object value$) {
switch (field$) {
case 0: programmeConsent = (org.gel.models.participant.avro.GenericConsent)value$; break;
case 1: primaryFindingConsent = (org.gel.models.participant.avro.GenericConsent)value$; break;
case 2: researchConsent = (org.gel.models.participant.avro.GenericConsent)value$; break;
case 3: healthRelatedFindingConsent = (org.gel.models.participant.avro.GenericConsent)value$; break;
case 4: carrierStatusConsent = (org.gel.models.participant.avro.GenericConsent)value$; break;
case 5: pharmacogenomicsFindingConsent = (org.gel.models.participant.avro.GenericConsent)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'programmeConsent' field.
* Is this individual consented to the programme? It could simply be a family member that is not consented
but for whom affection status is known */
public org.gel.models.participant.avro.GenericConsent getProgrammeConsent() {
return programmeConsent;
}
/**
* Sets the value of the 'programmeConsent' field.
* Is this individual consented to the programme? It could simply be a family member that is not consented
but for whom affection status is known * @param value the value to set.
*/
public void setProgrammeConsent(org.gel.models.participant.avro.GenericConsent value) {
this.programmeConsent = value;
}
/**
* Gets the value of the 'primaryFindingConsent' field.
* Consent for feedback of primary findings?
RD: Primary Findings
Cancer: PrimaryFindings is somatic + pertinent germline findings */
public org.gel.models.participant.avro.GenericConsent getPrimaryFindingConsent() {
return primaryFindingConsent;
}
/**
* Sets the value of the 'primaryFindingConsent' field.
* Consent for feedback of primary findings?
RD: Primary Findings
Cancer: PrimaryFindings is somatic + pertinent germline findings * @param value the value to set.
*/
public void setPrimaryFindingConsent(org.gel.models.participant.avro.GenericConsent value) {
this.primaryFindingConsent = value;
}
/**
* Gets the value of the 'researchConsent' field.
* Research Consent */
public org.gel.models.participant.avro.GenericConsent getResearchConsent() {
return researchConsent;
}
/**
* Sets the value of the 'researchConsent' field.
* Research Consent * @param value the value to set.
*/
public void setResearchConsent(org.gel.models.participant.avro.GenericConsent value) {
this.researchConsent = value;
}
/**
* Gets the value of the 'healthRelatedFindingConsent' field.
* Consent for secondary health related findings? */
public org.gel.models.participant.avro.GenericConsent getHealthRelatedFindingConsent() {
return healthRelatedFindingConsent;
}
/**
* Sets the value of the 'healthRelatedFindingConsent' field.
* Consent for secondary health related findings? * @param value the value to set.
*/
public void setHealthRelatedFindingConsent(org.gel.models.participant.avro.GenericConsent value) {
this.healthRelatedFindingConsent = value;
}
/**
* Gets the value of the 'carrierStatusConsent' field.
* Consent for carrier status check? */
public org.gel.models.participant.avro.GenericConsent getCarrierStatusConsent() {
return carrierStatusConsent;
}
/**
* Sets the value of the 'carrierStatusConsent' field.
* Consent for carrier status check? * @param value the value to set.
*/
public void setCarrierStatusConsent(org.gel.models.participant.avro.GenericConsent value) {
this.carrierStatusConsent = value;
}
/**
* Gets the value of the 'pharmacogenomicsFindingConsent' field.
* Consent for pharmacogenomics consent as secondary findings? */
public org.gel.models.participant.avro.GenericConsent getPharmacogenomicsFindingConsent() {
return pharmacogenomicsFindingConsent;
}
/**
* Sets the value of the 'pharmacogenomicsFindingConsent' field.
* Consent for pharmacogenomics consent as secondary findings? * @param value the value to set.
*/
public void setPharmacogenomicsFindingConsent(org.gel.models.participant.avro.GenericConsent value) {
this.pharmacogenomicsFindingConsent = value;
}
/** Creates a new GmsConsentStatus RecordBuilder */
public static org.gel.models.participant.avro.GmsConsentStatus.Builder newBuilder() {
return new org.gel.models.participant.avro.GmsConsentStatus.Builder();
}
/** Creates a new GmsConsentStatus RecordBuilder by copying an existing Builder */
public static org.gel.models.participant.avro.GmsConsentStatus.Builder newBuilder(org.gel.models.participant.avro.GmsConsentStatus.Builder other) {
return new org.gel.models.participant.avro.GmsConsentStatus.Builder(other);
}
/** Creates a new GmsConsentStatus RecordBuilder by copying an existing GmsConsentStatus instance */
public static org.gel.models.participant.avro.GmsConsentStatus.Builder newBuilder(org.gel.models.participant.avro.GmsConsentStatus other) {
return new org.gel.models.participant.avro.GmsConsentStatus.Builder(other);
}
/**
* RecordBuilder for GmsConsentStatus instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private org.gel.models.participant.avro.GenericConsent programmeConsent;
private org.gel.models.participant.avro.GenericConsent primaryFindingConsent;
private org.gel.models.participant.avro.GenericConsent researchConsent;
private org.gel.models.participant.avro.GenericConsent healthRelatedFindingConsent;
private org.gel.models.participant.avro.GenericConsent carrierStatusConsent;
private org.gel.models.participant.avro.GenericConsent pharmacogenomicsFindingConsent;
/** Creates a new Builder */
private Builder() {
super(org.gel.models.participant.avro.GmsConsentStatus.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.gel.models.participant.avro.GmsConsentStatus.Builder other) {
super(other);
if (isValidValue(fields()[0], other.programmeConsent)) {
this.programmeConsent = data().deepCopy(fields()[0].schema(), other.programmeConsent);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.primaryFindingConsent)) {
this.primaryFindingConsent = data().deepCopy(fields()[1].schema(), other.primaryFindingConsent);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.researchConsent)) {
this.researchConsent = data().deepCopy(fields()[2].schema(), other.researchConsent);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.healthRelatedFindingConsent)) {
this.healthRelatedFindingConsent = data().deepCopy(fields()[3].schema(), other.healthRelatedFindingConsent);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.carrierStatusConsent)) {
this.carrierStatusConsent = data().deepCopy(fields()[4].schema(), other.carrierStatusConsent);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.pharmacogenomicsFindingConsent)) {
this.pharmacogenomicsFindingConsent = data().deepCopy(fields()[5].schema(), other.pharmacogenomicsFindingConsent);
fieldSetFlags()[5] = true;
}
}
/** Creates a Builder by copying an existing GmsConsentStatus instance */
private Builder(org.gel.models.participant.avro.GmsConsentStatus other) {
super(org.gel.models.participant.avro.GmsConsentStatus.SCHEMA$);
if (isValidValue(fields()[0], other.programmeConsent)) {
this.programmeConsent = data().deepCopy(fields()[0].schema(), other.programmeConsent);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.primaryFindingConsent)) {
this.primaryFindingConsent = data().deepCopy(fields()[1].schema(), other.primaryFindingConsent);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.researchConsent)) {
this.researchConsent = data().deepCopy(fields()[2].schema(), other.researchConsent);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.healthRelatedFindingConsent)) {
this.healthRelatedFindingConsent = data().deepCopy(fields()[3].schema(), other.healthRelatedFindingConsent);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.carrierStatusConsent)) {
this.carrierStatusConsent = data().deepCopy(fields()[4].schema(), other.carrierStatusConsent);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.pharmacogenomicsFindingConsent)) {
this.pharmacogenomicsFindingConsent = data().deepCopy(fields()[5].schema(), other.pharmacogenomicsFindingConsent);
fieldSetFlags()[5] = true;
}
}
/** Gets the value of the 'programmeConsent' field */
public org.gel.models.participant.avro.GenericConsent getProgrammeConsent() {
return programmeConsent;
}
/** Sets the value of the 'programmeConsent' field */
public org.gel.models.participant.avro.GmsConsentStatus.Builder setProgrammeConsent(org.gel.models.participant.avro.GenericConsent value) {
validate(fields()[0], value);
this.programmeConsent = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'programmeConsent' field has been set */
public boolean hasProgrammeConsent() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'programmeConsent' field */
public org.gel.models.participant.avro.GmsConsentStatus.Builder clearProgrammeConsent() {
programmeConsent = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'primaryFindingConsent' field */
public org.gel.models.participant.avro.GenericConsent getPrimaryFindingConsent() {
return primaryFindingConsent;
}
/** Sets the value of the 'primaryFindingConsent' field */
public org.gel.models.participant.avro.GmsConsentStatus.Builder setPrimaryFindingConsent(org.gel.models.participant.avro.GenericConsent value) {
validate(fields()[1], value);
this.primaryFindingConsent = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'primaryFindingConsent' field has been set */
public boolean hasPrimaryFindingConsent() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'primaryFindingConsent' field */
public org.gel.models.participant.avro.GmsConsentStatus.Builder clearPrimaryFindingConsent() {
primaryFindingConsent = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'researchConsent' field */
public org.gel.models.participant.avro.GenericConsent getResearchConsent() {
return researchConsent;
}
/** Sets the value of the 'researchConsent' field */
public org.gel.models.participant.avro.GmsConsentStatus.Builder setResearchConsent(org.gel.models.participant.avro.GenericConsent value) {
validate(fields()[2], value);
this.researchConsent = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'researchConsent' field has been set */
public boolean hasResearchConsent() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'researchConsent' field */
public org.gel.models.participant.avro.GmsConsentStatus.Builder clearResearchConsent() {
researchConsent = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'healthRelatedFindingConsent' field */
public org.gel.models.participant.avro.GenericConsent getHealthRelatedFindingConsent() {
return healthRelatedFindingConsent;
}
/** Sets the value of the 'healthRelatedFindingConsent' field */
public org.gel.models.participant.avro.GmsConsentStatus.Builder setHealthRelatedFindingConsent(org.gel.models.participant.avro.GenericConsent value) {
validate(fields()[3], value);
this.healthRelatedFindingConsent = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'healthRelatedFindingConsent' field has been set */
public boolean hasHealthRelatedFindingConsent() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'healthRelatedFindingConsent' field */
public org.gel.models.participant.avro.GmsConsentStatus.Builder clearHealthRelatedFindingConsent() {
healthRelatedFindingConsent = null;
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'carrierStatusConsent' field */
public org.gel.models.participant.avro.GenericConsent getCarrierStatusConsent() {
return carrierStatusConsent;
}
/** Sets the value of the 'carrierStatusConsent' field */
public org.gel.models.participant.avro.GmsConsentStatus.Builder setCarrierStatusConsent(org.gel.models.participant.avro.GenericConsent value) {
validate(fields()[4], value);
this.carrierStatusConsent = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'carrierStatusConsent' field has been set */
public boolean hasCarrierStatusConsent() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'carrierStatusConsent' field */
public org.gel.models.participant.avro.GmsConsentStatus.Builder clearCarrierStatusConsent() {
carrierStatusConsent = null;
fieldSetFlags()[4] = false;
return this;
}
/** Gets the value of the 'pharmacogenomicsFindingConsent' field */
public org.gel.models.participant.avro.GenericConsent getPharmacogenomicsFindingConsent() {
return pharmacogenomicsFindingConsent;
}
/** Sets the value of the 'pharmacogenomicsFindingConsent' field */
public org.gel.models.participant.avro.GmsConsentStatus.Builder setPharmacogenomicsFindingConsent(org.gel.models.participant.avro.GenericConsent value) {
validate(fields()[5], value);
this.pharmacogenomicsFindingConsent = value;
fieldSetFlags()[5] = true;
return this;
}
/** Checks whether the 'pharmacogenomicsFindingConsent' field has been set */
public boolean hasPharmacogenomicsFindingConsent() {
return fieldSetFlags()[5];
}
/** Clears the value of the 'pharmacogenomicsFindingConsent' field */
public org.gel.models.participant.avro.GmsConsentStatus.Builder clearPharmacogenomicsFindingConsent() {
pharmacogenomicsFindingConsent = null;
fieldSetFlags()[5] = false;
return this;
}
@Override
public GmsConsentStatus build() {
try {
GmsConsentStatus record = new GmsConsentStatus();
record.programmeConsent = fieldSetFlags()[0] ? this.programmeConsent : (org.gel.models.participant.avro.GenericConsent) defaultValue(fields()[0]);
record.primaryFindingConsent = fieldSetFlags()[1] ? this.primaryFindingConsent : (org.gel.models.participant.avro.GenericConsent) defaultValue(fields()[1]);
record.researchConsent = fieldSetFlags()[2] ? this.researchConsent : (org.gel.models.participant.avro.GenericConsent) defaultValue(fields()[2]);
record.healthRelatedFindingConsent = fieldSetFlags()[3] ? this.healthRelatedFindingConsent : (org.gel.models.participant.avro.GenericConsent) defaultValue(fields()[3]);
record.carrierStatusConsent = fieldSetFlags()[4] ? this.carrierStatusConsent : (org.gel.models.participant.avro.GenericConsent) defaultValue(fields()[4]);
record.pharmacogenomicsFindingConsent = fieldSetFlags()[5] ? this.pharmacogenomicsFindingConsent : (org.gel.models.participant.avro.GenericConsent) defaultValue(fields()[5]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy