Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.gel.models.report.avro;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class TrialLocation 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\":\"TrialLocation\",\"namespace\":\"org.gel.models.report.avro\",\"fields\":[{\"name\":\"name\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"city\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"country\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"zip\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private java.lang.String name;
private java.lang.String city;
private java.lang.String country;
private java.lang.String zip;
/**
* 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 TrialLocation() {}
/**
* All-args constructor.
*/
public TrialLocation(java.lang.String name, java.lang.String city, java.lang.String country, java.lang.String zip) {
this.name = name;
this.city = city;
this.country = country;
this.zip = zip;
}
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 name;
case 1: return city;
case 2: return country;
case 3: return zip;
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: name = (java.lang.String)value$; break;
case 1: city = (java.lang.String)value$; break;
case 2: country = (java.lang.String)value$; break;
case 3: zip = (java.lang.String)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'name' field.
*/
public java.lang.String getName() {
return name;
}
/**
* Sets the value of the 'name' field.
* @param value the value to set.
*/
public void setName(java.lang.String value) {
this.name = value;
}
/**
* Gets the value of the 'city' field.
*/
public java.lang.String getCity() {
return city;
}
/**
* Sets the value of the 'city' field.
* @param value the value to set.
*/
public void setCity(java.lang.String value) {
this.city = value;
}
/**
* Gets the value of the 'country' field.
*/
public java.lang.String getCountry() {
return country;
}
/**
* Sets the value of the 'country' field.
* @param value the value to set.
*/
public void setCountry(java.lang.String value) {
this.country = value;
}
/**
* Gets the value of the 'zip' field.
*/
public java.lang.String getZip() {
return zip;
}
/**
* Sets the value of the 'zip' field.
* @param value the value to set.
*/
public void setZip(java.lang.String value) {
this.zip = value;
}
/** Creates a new TrialLocation RecordBuilder */
public static org.gel.models.report.avro.TrialLocation.Builder newBuilder() {
return new org.gel.models.report.avro.TrialLocation.Builder();
}
/** Creates a new TrialLocation RecordBuilder by copying an existing Builder */
public static org.gel.models.report.avro.TrialLocation.Builder newBuilder(org.gel.models.report.avro.TrialLocation.Builder other) {
return new org.gel.models.report.avro.TrialLocation.Builder(other);
}
/** Creates a new TrialLocation RecordBuilder by copying an existing TrialLocation instance */
public static org.gel.models.report.avro.TrialLocation.Builder newBuilder(org.gel.models.report.avro.TrialLocation other) {
return new org.gel.models.report.avro.TrialLocation.Builder(other);
}
/**
* RecordBuilder for TrialLocation instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String name;
private java.lang.String city;
private java.lang.String country;
private java.lang.String zip;
/** Creates a new Builder */
private Builder() {
super(org.gel.models.report.avro.TrialLocation.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.gel.models.report.avro.TrialLocation.Builder other) {
super(other);
if (isValidValue(fields()[0], other.name)) {
this.name = data().deepCopy(fields()[0].schema(), other.name);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.city)) {
this.city = data().deepCopy(fields()[1].schema(), other.city);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.country)) {
this.country = data().deepCopy(fields()[2].schema(), other.country);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.zip)) {
this.zip = data().deepCopy(fields()[3].schema(), other.zip);
fieldSetFlags()[3] = true;
}
}
/** Creates a Builder by copying an existing TrialLocation instance */
private Builder(org.gel.models.report.avro.TrialLocation other) {
super(org.gel.models.report.avro.TrialLocation.SCHEMA$);
if (isValidValue(fields()[0], other.name)) {
this.name = data().deepCopy(fields()[0].schema(), other.name);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.city)) {
this.city = data().deepCopy(fields()[1].schema(), other.city);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.country)) {
this.country = data().deepCopy(fields()[2].schema(), other.country);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.zip)) {
this.zip = data().deepCopy(fields()[3].schema(), other.zip);
fieldSetFlags()[3] = true;
}
}
/** Gets the value of the 'name' field */
public java.lang.String getName() {
return name;
}
/** Sets the value of the 'name' field */
public org.gel.models.report.avro.TrialLocation.Builder setName(java.lang.String value) {
validate(fields()[0], value);
this.name = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'name' field has been set */
public boolean hasName() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'name' field */
public org.gel.models.report.avro.TrialLocation.Builder clearName() {
name = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'city' field */
public java.lang.String getCity() {
return city;
}
/** Sets the value of the 'city' field */
public org.gel.models.report.avro.TrialLocation.Builder setCity(java.lang.String value) {
validate(fields()[1], value);
this.city = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'city' field has been set */
public boolean hasCity() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'city' field */
public org.gel.models.report.avro.TrialLocation.Builder clearCity() {
city = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'country' field */
public java.lang.String getCountry() {
return country;
}
/** Sets the value of the 'country' field */
public org.gel.models.report.avro.TrialLocation.Builder setCountry(java.lang.String value) {
validate(fields()[2], value);
this.country = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'country' field has been set */
public boolean hasCountry() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'country' field */
public org.gel.models.report.avro.TrialLocation.Builder clearCountry() {
country = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'zip' field */
public java.lang.String getZip() {
return zip;
}
/** Sets the value of the 'zip' field */
public org.gel.models.report.avro.TrialLocation.Builder setZip(java.lang.String value) {
validate(fields()[3], value);
this.zip = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'zip' field has been set */
public boolean hasZip() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'zip' field */
public org.gel.models.report.avro.TrialLocation.Builder clearZip() {
zip = null;
fieldSetFlags()[3] = false;
return this;
}
@Override
public TrialLocation build() {
try {
TrialLocation record = new TrialLocation();
record.name = fieldSetFlags()[0] ? this.name : (java.lang.String) defaultValue(fields()[0]);
record.city = fieldSetFlags()[1] ? this.city : (java.lang.String) defaultValue(fields()[1]);
record.country = fieldSetFlags()[2] ? this.country : (java.lang.String) defaultValue(fields()[2]);
record.zip = fieldSetFlags()[3] ? this.zip : (java.lang.String) defaultValue(fields()[3]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}