![JAR search and dependency download from the Maven repository](/logo.png)
org.apache.reef.webserver.AvroDriverInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of reef-webserver Show documentation
Show all versions of reef-webserver Show documentation
HTTP Server component to implement a REST API for the Driver or Evaluators.
The newest version!
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.apache.reef.webserver;
import org.apache.avro.specific.SpecificData;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class AvroDriverInfo extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
private static final long serialVersionUID = -3493120951479724575L;
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"AvroDriverInfo\",\"namespace\":\"org.apache.reef.webserver\",\"fields\":[{\"name\":\"remoteId\",\"type\":\"string\"},{\"name\":\"startTime\",\"type\":\"string\"},{\"name\":\"services\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"AvroReefServiceInfo\",\"fields\":[{\"name\":\"serviceName\",\"type\":\"string\"},{\"name\":\"serviceInfo\",\"type\":\"string\"}]}}}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
@Deprecated public java.lang.CharSequence remoteId;
@Deprecated public java.lang.CharSequence startTime;
@Deprecated public java.util.List services;
/**
* 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 AvroDriverInfo() {}
/**
* All-args constructor.
* @param remoteId The new value for remoteId
* @param startTime The new value for startTime
* @param services The new value for services
*/
public AvroDriverInfo(java.lang.CharSequence remoteId, java.lang.CharSequence startTime, java.util.List services) {
this.remoteId = remoteId;
this.startTime = startTime;
this.services = services;
}
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 remoteId;
case 1: return startTime;
case 2: return services;
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: remoteId = (java.lang.CharSequence)value$; break;
case 1: startTime = (java.lang.CharSequence)value$; break;
case 2: services = (java.util.List)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'remoteId' field.
* @return The value of the 'remoteId' field.
*/
public java.lang.CharSequence getRemoteId() {
return remoteId;
}
/**
* Sets the value of the 'remoteId' field.
* @param value the value to set.
*/
public void setRemoteId(java.lang.CharSequence value) {
this.remoteId = value;
}
/**
* Gets the value of the 'startTime' field.
* @return The value of the 'startTime' field.
*/
public java.lang.CharSequence getStartTime() {
return startTime;
}
/**
* Sets the value of the 'startTime' field.
* @param value the value to set.
*/
public void setStartTime(java.lang.CharSequence value) {
this.startTime = value;
}
/**
* Gets the value of the 'services' field.
* @return The value of the 'services' field.
*/
public java.util.List getServices() {
return services;
}
/**
* Sets the value of the 'services' field.
* @param value the value to set.
*/
public void setServices(java.util.List value) {
this.services = value;
}
/**
* Creates a new AvroDriverInfo RecordBuilder.
* @return A new AvroDriverInfo RecordBuilder
*/
public static org.apache.reef.webserver.AvroDriverInfo.Builder newBuilder() {
return new org.apache.reef.webserver.AvroDriverInfo.Builder();
}
/**
* Creates a new AvroDriverInfo RecordBuilder by copying an existing Builder.
* @param other The existing builder to copy.
* @return A new AvroDriverInfo RecordBuilder
*/
public static org.apache.reef.webserver.AvroDriverInfo.Builder newBuilder(org.apache.reef.webserver.AvroDriverInfo.Builder other) {
return new org.apache.reef.webserver.AvroDriverInfo.Builder(other);
}
/**
* Creates a new AvroDriverInfo RecordBuilder by copying an existing AvroDriverInfo instance.
* @param other The existing instance to copy.
* @return A new AvroDriverInfo RecordBuilder
*/
public static org.apache.reef.webserver.AvroDriverInfo.Builder newBuilder(org.apache.reef.webserver.AvroDriverInfo other) {
return new org.apache.reef.webserver.AvroDriverInfo.Builder(other);
}
/**
* RecordBuilder for AvroDriverInfo instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.CharSequence remoteId;
private java.lang.CharSequence startTime;
private java.util.List services;
/** Creates a new Builder */
private Builder() {
super(SCHEMA$);
}
/**
* Creates a Builder by copying an existing Builder.
* @param other The existing Builder to copy.
*/
private Builder(org.apache.reef.webserver.AvroDriverInfo.Builder other) {
super(other);
if (isValidValue(fields()[0], other.remoteId)) {
this.remoteId = data().deepCopy(fields()[0].schema(), other.remoteId);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.startTime)) {
this.startTime = data().deepCopy(fields()[1].schema(), other.startTime);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.services)) {
this.services = data().deepCopy(fields()[2].schema(), other.services);
fieldSetFlags()[2] = true;
}
}
/**
* Creates a Builder by copying an existing AvroDriverInfo instance
* @param other The existing instance to copy.
*/
private Builder(org.apache.reef.webserver.AvroDriverInfo other) {
super(SCHEMA$);
if (isValidValue(fields()[0], other.remoteId)) {
this.remoteId = data().deepCopy(fields()[0].schema(), other.remoteId);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.startTime)) {
this.startTime = data().deepCopy(fields()[1].schema(), other.startTime);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.services)) {
this.services = data().deepCopy(fields()[2].schema(), other.services);
fieldSetFlags()[2] = true;
}
}
/**
* Gets the value of the 'remoteId' field.
* @return The value.
*/
public java.lang.CharSequence getRemoteId() {
return remoteId;
}
/**
* Sets the value of the 'remoteId' field.
* @param value The value of 'remoteId'.
* @return This builder.
*/
public org.apache.reef.webserver.AvroDriverInfo.Builder setRemoteId(java.lang.CharSequence value) {
validate(fields()[0], value);
this.remoteId = value;
fieldSetFlags()[0] = true;
return this;
}
/**
* Checks whether the 'remoteId' field has been set.
* @return True if the 'remoteId' field has been set, false otherwise.
*/
public boolean hasRemoteId() {
return fieldSetFlags()[0];
}
/**
* Clears the value of the 'remoteId' field.
* @return This builder.
*/
public org.apache.reef.webserver.AvroDriverInfo.Builder clearRemoteId() {
remoteId = null;
fieldSetFlags()[0] = false;
return this;
}
/**
* Gets the value of the 'startTime' field.
* @return The value.
*/
public java.lang.CharSequence getStartTime() {
return startTime;
}
/**
* Sets the value of the 'startTime' field.
* @param value The value of 'startTime'.
* @return This builder.
*/
public org.apache.reef.webserver.AvroDriverInfo.Builder setStartTime(java.lang.CharSequence value) {
validate(fields()[1], value);
this.startTime = value;
fieldSetFlags()[1] = true;
return this;
}
/**
* Checks whether the 'startTime' field has been set.
* @return True if the 'startTime' field has been set, false otherwise.
*/
public boolean hasStartTime() {
return fieldSetFlags()[1];
}
/**
* Clears the value of the 'startTime' field.
* @return This builder.
*/
public org.apache.reef.webserver.AvroDriverInfo.Builder clearStartTime() {
startTime = null;
fieldSetFlags()[1] = false;
return this;
}
/**
* Gets the value of the 'services' field.
* @return The value.
*/
public java.util.List getServices() {
return services;
}
/**
* Sets the value of the 'services' field.
* @param value The value of 'services'.
* @return This builder.
*/
public org.apache.reef.webserver.AvroDriverInfo.Builder setServices(java.util.List value) {
validate(fields()[2], value);
this.services = value;
fieldSetFlags()[2] = true;
return this;
}
/**
* Checks whether the 'services' field has been set.
* @return True if the 'services' field has been set, false otherwise.
*/
public boolean hasServices() {
return fieldSetFlags()[2];
}
/**
* Clears the value of the 'services' field.
* @return This builder.
*/
public org.apache.reef.webserver.AvroDriverInfo.Builder clearServices() {
services = null;
fieldSetFlags()[2] = false;
return this;
}
@Override
public AvroDriverInfo build() {
try {
AvroDriverInfo record = new AvroDriverInfo();
record.remoteId = fieldSetFlags()[0] ? this.remoteId : (java.lang.CharSequence) defaultValue(fields()[0]);
record.startTime = fieldSetFlags()[1] ? this.startTime : (java.lang.CharSequence) defaultValue(fields()[1]);
record.services = fieldSetFlags()[2] ? this.services : (java.util.List) defaultValue(fields()[2]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
private static final org.apache.avro.io.DatumWriter
WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);
@Override public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException {
WRITER$.write(this, SpecificData.getEncoder(out));
}
private static final org.apache.avro.io.DatumReader
READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);
@Override public void readExternal(java.io.ObjectInput in)
throws java.io.IOException {
READER$.read(this, SpecificData.getDecoder(in));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy