org.dummy.avro.DummyStatus Maven / Gradle / Ivy
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.dummy.avro;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class DummyStatus 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\":\"DummyStatus\",\"namespace\":\"org.dummy.avro\",\"fields\":[{\"name\":\"status\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"created_at\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"user\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private java.lang.String status;
private java.lang.String created_at;
private java.lang.String user;
/**
* 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 DummyStatus() {}
/**
* All-args constructor.
*/
public DummyStatus(java.lang.String status, java.lang.String created_at, java.lang.String user) {
this.status = status;
this.created_at = created_at;
this.user = user;
}
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 status;
case 1: return created_at;
case 2: return user;
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: status = (java.lang.String)value$; break;
case 1: created_at = (java.lang.String)value$; break;
case 2: user = (java.lang.String)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'status' field.
*/
public java.lang.String getStatus() {
return status;
}
/**
* Sets the value of the 'status' field.
* @param value the value to set.
*/
public void setStatus(java.lang.String value) {
this.status = value;
}
/**
* Gets the value of the 'created_at' field.
*/
public java.lang.String getCreatedAt() {
return created_at;
}
/**
* Sets the value of the 'created_at' field.
* @param value the value to set.
*/
public void setCreatedAt(java.lang.String value) {
this.created_at = value;
}
/**
* Gets the value of the 'user' field.
*/
public java.lang.String getUser() {
return user;
}
/**
* Sets the value of the 'user' field.
* @param value the value to set.
*/
public void setUser(java.lang.String value) {
this.user = value;
}
/** Creates a new DummyStatus RecordBuilder */
public static org.dummy.avro.DummyStatus.Builder newBuilder() {
return new org.dummy.avro.DummyStatus.Builder();
}
/** Creates a new DummyStatus RecordBuilder by copying an existing Builder */
public static org.dummy.avro.DummyStatus.Builder newBuilder(org.dummy.avro.DummyStatus.Builder other) {
return new org.dummy.avro.DummyStatus.Builder(other);
}
/** Creates a new DummyStatus RecordBuilder by copying an existing DummyStatus instance */
public static org.dummy.avro.DummyStatus.Builder newBuilder(org.dummy.avro.DummyStatus other) {
return new org.dummy.avro.DummyStatus.Builder(other);
}
/**
* RecordBuilder for DummyStatus instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String status;
private java.lang.String created_at;
private java.lang.String user;
/** Creates a new Builder */
private Builder() {
super(org.dummy.avro.DummyStatus.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.dummy.avro.DummyStatus.Builder other) {
super(other);
if (isValidValue(fields()[0], other.status)) {
this.status = data().deepCopy(fields()[0].schema(), other.status);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.created_at)) {
this.created_at = data().deepCopy(fields()[1].schema(), other.created_at);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.user)) {
this.user = data().deepCopy(fields()[2].schema(), other.user);
fieldSetFlags()[2] = true;
}
}
/** Creates a Builder by copying an existing DummyStatus instance */
private Builder(org.dummy.avro.DummyStatus other) {
super(org.dummy.avro.DummyStatus.SCHEMA$);
if (isValidValue(fields()[0], other.status)) {
this.status = data().deepCopy(fields()[0].schema(), other.status);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.created_at)) {
this.created_at = data().deepCopy(fields()[1].schema(), other.created_at);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.user)) {
this.user = data().deepCopy(fields()[2].schema(), other.user);
fieldSetFlags()[2] = true;
}
}
/** Gets the value of the 'status' field */
public java.lang.String getStatus() {
return status;
}
/** Sets the value of the 'status' field */
public org.dummy.avro.DummyStatus.Builder setStatus(java.lang.String value) {
validate(fields()[0], value);
this.status = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'status' field has been set */
public boolean hasStatus() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'status' field */
public org.dummy.avro.DummyStatus.Builder clearStatus() {
status = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'created_at' field */
public java.lang.String getCreatedAt() {
return created_at;
}
/** Sets the value of the 'created_at' field */
public org.dummy.avro.DummyStatus.Builder setCreatedAt(java.lang.String value) {
validate(fields()[1], value);
this.created_at = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'created_at' field has been set */
public boolean hasCreatedAt() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'created_at' field */
public org.dummy.avro.DummyStatus.Builder clearCreatedAt() {
created_at = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'user' field */
public java.lang.String getUser() {
return user;
}
/** Sets the value of the 'user' field */
public org.dummy.avro.DummyStatus.Builder setUser(java.lang.String value) {
validate(fields()[2], value);
this.user = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'user' field has been set */
public boolean hasUser() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'user' field */
public org.dummy.avro.DummyStatus.Builder clearUser() {
user = null;
fieldSetFlags()[2] = false;
return this;
}
@Override
public DummyStatus build() {
try {
DummyStatus record = new DummyStatus();
record.status = fieldSetFlags()[0] ? this.status : (java.lang.String) defaultValue(fields()[0]);
record.created_at = fieldSetFlags()[1] ? this.created_at : (java.lang.String) defaultValue(fields()[1]);
record.user = fieldSetFlags()[2] ? this.user : (java.lang.String) defaultValue(fields()[2]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy