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.apache.hudi.avro.model;
import org.apache.avro.generic.GenericArray;
import org.apache.avro.specific.SpecificData;
import org.apache.avro.util.Utf8;
import org.apache.avro.message.BinaryMessageEncoder;
import org.apache.avro.message.BinaryMessageDecoder;
import org.apache.avro.message.SchemaStore;
@org.apache.avro.specific.AvroGenerated
public class HoodieLSMTimelineInstant extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
private static final long serialVersionUID = 8423518351254036456L;
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"HoodieLSMTimelineInstant\",\"namespace\":\"org.apache.hudi.avro.model\",\"fields\":[{\"name\":\"instantTime\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"completionTime\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"action\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"metadata\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"plan\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"version\",\"type\":\"int\",\"default\":1}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private static SpecificData MODEL$ = new SpecificData();
private static final BinaryMessageEncoder ENCODER =
new BinaryMessageEncoder(MODEL$, SCHEMA$);
private static final BinaryMessageDecoder DECODER =
new BinaryMessageDecoder(MODEL$, SCHEMA$);
/**
* Return the BinaryMessageEncoder instance used by this class.
* @return the message encoder used by this class
*/
public static BinaryMessageEncoder getEncoder() {
return ENCODER;
}
/**
* Return the BinaryMessageDecoder instance used by this class.
* @return the message decoder used by this class
*/
public static BinaryMessageDecoder getDecoder() {
return DECODER;
}
/**
* Create a new BinaryMessageDecoder instance for this class that uses the specified {@link SchemaStore}.
* @param resolver a {@link SchemaStore} used to find schemas by fingerprint
* @return a BinaryMessageDecoder instance for this class backed by the given SchemaStore
*/
public static BinaryMessageDecoder createDecoder(SchemaStore resolver) {
return new BinaryMessageDecoder(MODEL$, SCHEMA$, resolver);
}
/**
* Serializes this HoodieLSMTimelineInstant to a ByteBuffer.
* @return a buffer holding the serialized data for this instance
* @throws java.io.IOException if this instance could not be serialized
*/
public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
return ENCODER.encode(this);
}
/**
* Deserializes a HoodieLSMTimelineInstant from a ByteBuffer.
* @param b a byte buffer holding serialized data for an instance of this class
* @return a HoodieLSMTimelineInstant instance decoded from the given buffer
* @throws java.io.IOException if the given bytes could not be deserialized into an instance of this class
*/
public static HoodieLSMTimelineInstant fromByteBuffer(
java.nio.ByteBuffer b) throws java.io.IOException {
return DECODER.decode(b);
}
private java.lang.String instantTime;
private java.lang.String completionTime;
private java.lang.String action;
private java.nio.ByteBuffer metadata;
private java.nio.ByteBuffer plan;
private int version;
/**
* 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 HoodieLSMTimelineInstant() {}
/**
* All-args constructor.
* @param instantTime The new value for instantTime
* @param completionTime The new value for completionTime
* @param action The new value for action
* @param metadata The new value for metadata
* @param plan The new value for plan
* @param version The new value for version
*/
public HoodieLSMTimelineInstant(java.lang.String instantTime, java.lang.String completionTime, java.lang.String action, java.nio.ByteBuffer metadata, java.nio.ByteBuffer plan, java.lang.Integer version) {
this.instantTime = instantTime;
this.completionTime = completionTime;
this.action = action;
this.metadata = metadata;
this.plan = plan;
this.version = version;
}
public org.apache.avro.specific.SpecificData getSpecificData() { return MODEL$; }
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 instantTime;
case 1: return completionTime;
case 2: return action;
case 3: return metadata;
case 4: return plan;
case 5: return version;
default: throw new IndexOutOfBoundsException("Invalid index: " + field$);
}
}
// Used by DatumReader. Applications should not call.
@SuppressWarnings(value="unchecked")
public void put(int field$, java.lang.Object value$) {
switch (field$) {
case 0: instantTime = value$ != null ? value$.toString() : null; break;
case 1: completionTime = value$ != null ? value$.toString() : null; break;
case 2: action = value$ != null ? value$.toString() : null; break;
case 3: metadata = (java.nio.ByteBuffer)value$; break;
case 4: plan = (java.nio.ByteBuffer)value$; break;
case 5: version = (java.lang.Integer)value$; break;
default: throw new IndexOutOfBoundsException("Invalid index: " + field$);
}
}
/**
* Gets the value of the 'instantTime' field.
* @return The value of the 'instantTime' field.
*/
public java.lang.String getInstantTime() {
return instantTime;
}
/**
* Sets the value of the 'instantTime' field.
* @param value the value to set.
*/
public void setInstantTime(java.lang.String value) {
this.instantTime = value;
}
/**
* Gets the value of the 'completionTime' field.
* @return The value of the 'completionTime' field.
*/
public java.lang.String getCompletionTime() {
return completionTime;
}
/**
* Sets the value of the 'completionTime' field.
* @param value the value to set.
*/
public void setCompletionTime(java.lang.String value) {
this.completionTime = value;
}
/**
* Gets the value of the 'action' field.
* @return The value of the 'action' field.
*/
public java.lang.String getAction() {
return action;
}
/**
* Sets the value of the 'action' field.
* @param value the value to set.
*/
public void setAction(java.lang.String value) {
this.action = value;
}
/**
* Gets the value of the 'metadata' field.
* @return The value of the 'metadata' field.
*/
public java.nio.ByteBuffer getMetadata() {
return metadata;
}
/**
* Sets the value of the 'metadata' field.
* @param value the value to set.
*/
public void setMetadata(java.nio.ByteBuffer value) {
this.metadata = value;
}
/**
* Gets the value of the 'plan' field.
* @return The value of the 'plan' field.
*/
public java.nio.ByteBuffer getPlan() {
return plan;
}
/**
* Sets the value of the 'plan' field.
* @param value the value to set.
*/
public void setPlan(java.nio.ByteBuffer value) {
this.plan = value;
}
/**
* Gets the value of the 'version' field.
* @return The value of the 'version' field.
*/
public int getVersion() {
return version;
}
/**
* Sets the value of the 'version' field.
* @param value the value to set.
*/
public void setVersion(int value) {
this.version = value;
}
/**
* Creates a new HoodieLSMTimelineInstant RecordBuilder.
* @return A new HoodieLSMTimelineInstant RecordBuilder
*/
public static org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder newBuilder() {
return new org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder();
}
/**
* Creates a new HoodieLSMTimelineInstant RecordBuilder by copying an existing Builder.
* @param other The existing builder to copy.
* @return A new HoodieLSMTimelineInstant RecordBuilder
*/
public static org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder newBuilder(org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder other) {
if (other == null) {
return new org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder();
} else {
return new org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder(other);
}
}
/**
* Creates a new HoodieLSMTimelineInstant RecordBuilder by copying an existing HoodieLSMTimelineInstant instance.
* @param other The existing instance to copy.
* @return A new HoodieLSMTimelineInstant RecordBuilder
*/
public static org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder newBuilder(org.apache.hudi.avro.model.HoodieLSMTimelineInstant other) {
if (other == null) {
return new org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder();
} else {
return new org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder(other);
}
}
/**
* RecordBuilder for HoodieLSMTimelineInstant instances.
*/
@org.apache.avro.specific.AvroGenerated
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String instantTime;
private java.lang.String completionTime;
private java.lang.String action;
private java.nio.ByteBuffer metadata;
private java.nio.ByteBuffer plan;
private int version;
/** 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.hudi.avro.model.HoodieLSMTimelineInstant.Builder other) {
super(other);
if (isValidValue(fields()[0], other.instantTime)) {
this.instantTime = data().deepCopy(fields()[0].schema(), other.instantTime);
fieldSetFlags()[0] = other.fieldSetFlags()[0];
}
if (isValidValue(fields()[1], other.completionTime)) {
this.completionTime = data().deepCopy(fields()[1].schema(), other.completionTime);
fieldSetFlags()[1] = other.fieldSetFlags()[1];
}
if (isValidValue(fields()[2], other.action)) {
this.action = data().deepCopy(fields()[2].schema(), other.action);
fieldSetFlags()[2] = other.fieldSetFlags()[2];
}
if (isValidValue(fields()[3], other.metadata)) {
this.metadata = data().deepCopy(fields()[3].schema(), other.metadata);
fieldSetFlags()[3] = other.fieldSetFlags()[3];
}
if (isValidValue(fields()[4], other.plan)) {
this.plan = data().deepCopy(fields()[4].schema(), other.plan);
fieldSetFlags()[4] = other.fieldSetFlags()[4];
}
if (isValidValue(fields()[5], other.version)) {
this.version = data().deepCopy(fields()[5].schema(), other.version);
fieldSetFlags()[5] = other.fieldSetFlags()[5];
}
}
/**
* Creates a Builder by copying an existing HoodieLSMTimelineInstant instance
* @param other The existing instance to copy.
*/
private Builder(org.apache.hudi.avro.model.HoodieLSMTimelineInstant other) {
super(SCHEMA$);
if (isValidValue(fields()[0], other.instantTime)) {
this.instantTime = data().deepCopy(fields()[0].schema(), other.instantTime);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.completionTime)) {
this.completionTime = data().deepCopy(fields()[1].schema(), other.completionTime);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.action)) {
this.action = data().deepCopy(fields()[2].schema(), other.action);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.metadata)) {
this.metadata = data().deepCopy(fields()[3].schema(), other.metadata);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.plan)) {
this.plan = data().deepCopy(fields()[4].schema(), other.plan);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.version)) {
this.version = data().deepCopy(fields()[5].schema(), other.version);
fieldSetFlags()[5] = true;
}
}
/**
* Gets the value of the 'instantTime' field.
* @return The value.
*/
public java.lang.String getInstantTime() {
return instantTime;
}
/**
* Sets the value of the 'instantTime' field.
* @param value The value of 'instantTime'.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder setInstantTime(java.lang.String value) {
validate(fields()[0], value);
this.instantTime = value;
fieldSetFlags()[0] = true;
return this;
}
/**
* Checks whether the 'instantTime' field has been set.
* @return True if the 'instantTime' field has been set, false otherwise.
*/
public boolean hasInstantTime() {
return fieldSetFlags()[0];
}
/**
* Clears the value of the 'instantTime' field.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder clearInstantTime() {
instantTime = null;
fieldSetFlags()[0] = false;
return this;
}
/**
* Gets the value of the 'completionTime' field.
* @return The value.
*/
public java.lang.String getCompletionTime() {
return completionTime;
}
/**
* Sets the value of the 'completionTime' field.
* @param value The value of 'completionTime'.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder setCompletionTime(java.lang.String value) {
validate(fields()[1], value);
this.completionTime = value;
fieldSetFlags()[1] = true;
return this;
}
/**
* Checks whether the 'completionTime' field has been set.
* @return True if the 'completionTime' field has been set, false otherwise.
*/
public boolean hasCompletionTime() {
return fieldSetFlags()[1];
}
/**
* Clears the value of the 'completionTime' field.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder clearCompletionTime() {
completionTime = null;
fieldSetFlags()[1] = false;
return this;
}
/**
* Gets the value of the 'action' field.
* @return The value.
*/
public java.lang.String getAction() {
return action;
}
/**
* Sets the value of the 'action' field.
* @param value The value of 'action'.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder setAction(java.lang.String value) {
validate(fields()[2], value);
this.action = value;
fieldSetFlags()[2] = true;
return this;
}
/**
* Checks whether the 'action' field has been set.
* @return True if the 'action' field has been set, false otherwise.
*/
public boolean hasAction() {
return fieldSetFlags()[2];
}
/**
* Clears the value of the 'action' field.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder clearAction() {
action = null;
fieldSetFlags()[2] = false;
return this;
}
/**
* Gets the value of the 'metadata' field.
* @return The value.
*/
public java.nio.ByteBuffer getMetadata() {
return metadata;
}
/**
* Sets the value of the 'metadata' field.
* @param value The value of 'metadata'.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder setMetadata(java.nio.ByteBuffer value) {
validate(fields()[3], value);
this.metadata = value;
fieldSetFlags()[3] = true;
return this;
}
/**
* Checks whether the 'metadata' field has been set.
* @return True if the 'metadata' field has been set, false otherwise.
*/
public boolean hasMetadata() {
return fieldSetFlags()[3];
}
/**
* Clears the value of the 'metadata' field.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder clearMetadata() {
metadata = null;
fieldSetFlags()[3] = false;
return this;
}
/**
* Gets the value of the 'plan' field.
* @return The value.
*/
public java.nio.ByteBuffer getPlan() {
return plan;
}
/**
* Sets the value of the 'plan' field.
* @param value The value of 'plan'.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder setPlan(java.nio.ByteBuffer value) {
validate(fields()[4], value);
this.plan = value;
fieldSetFlags()[4] = true;
return this;
}
/**
* Checks whether the 'plan' field has been set.
* @return True if the 'plan' field has been set, false otherwise.
*/
public boolean hasPlan() {
return fieldSetFlags()[4];
}
/**
* Clears the value of the 'plan' field.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder clearPlan() {
plan = null;
fieldSetFlags()[4] = false;
return this;
}
/**
* Gets the value of the 'version' field.
* @return The value.
*/
public int getVersion() {
return version;
}
/**
* Sets the value of the 'version' field.
* @param value The value of 'version'.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder setVersion(int value) {
validate(fields()[5], value);
this.version = value;
fieldSetFlags()[5] = true;
return this;
}
/**
* Checks whether the 'version' field has been set.
* @return True if the 'version' field has been set, false otherwise.
*/
public boolean hasVersion() {
return fieldSetFlags()[5];
}
/**
* Clears the value of the 'version' field.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieLSMTimelineInstant.Builder clearVersion() {
fieldSetFlags()[5] = false;
return this;
}
@Override
@SuppressWarnings("unchecked")
public HoodieLSMTimelineInstant build() {
try {
HoodieLSMTimelineInstant record = new HoodieLSMTimelineInstant();
record.instantTime = fieldSetFlags()[0] ? this.instantTime : (java.lang.String) defaultValue(fields()[0]);
record.completionTime = fieldSetFlags()[1] ? this.completionTime : (java.lang.String) defaultValue(fields()[1]);
record.action = fieldSetFlags()[2] ? this.action : (java.lang.String) defaultValue(fields()[2]);
record.metadata = fieldSetFlags()[3] ? this.metadata : (java.nio.ByteBuffer) defaultValue(fields()[3]);
record.plan = fieldSetFlags()[4] ? this.plan : (java.nio.ByteBuffer) defaultValue(fields()[4]);
record.version = fieldSetFlags()[5] ? this.version : (java.lang.Integer) defaultValue(fields()[5]);
return record;
} catch (org.apache.avro.AvroMissingFieldException e) {
throw e;
} catch (java.lang.Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
@SuppressWarnings("unchecked")
private static final org.apache.avro.io.DatumWriter
WRITER$ = (org.apache.avro.io.DatumWriter)MODEL$.createDatumWriter(SCHEMA$);
@Override public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException {
WRITER$.write(this, SpecificData.getEncoder(out));
}
@SuppressWarnings("unchecked")
private static final org.apache.avro.io.DatumReader
READER$ = (org.apache.avro.io.DatumReader)MODEL$.createDatumReader(SCHEMA$);
@Override public void readExternal(java.io.ObjectInput in)
throws java.io.IOException {
READER$.read(this, SpecificData.getDecoder(in));
}
@Override protected boolean hasCustomCoders() { return true; }
@Override public void customEncode(org.apache.avro.io.Encoder out)
throws java.io.IOException
{
if (this.instantTime == null) {
out.writeIndex(0);
out.writeNull();
} else {
out.writeIndex(1);
out.writeString(this.instantTime);
}
if (this.completionTime == null) {
out.writeIndex(0);
out.writeNull();
} else {
out.writeIndex(1);
out.writeString(this.completionTime);
}
if (this.action == null) {
out.writeIndex(0);
out.writeNull();
} else {
out.writeIndex(1);
out.writeString(this.action);
}
if (this.metadata == null) {
out.writeIndex(0);
out.writeNull();
} else {
out.writeIndex(1);
out.writeBytes(this.metadata);
}
if (this.plan == null) {
out.writeIndex(0);
out.writeNull();
} else {
out.writeIndex(1);
out.writeBytes(this.plan);
}
out.writeInt(this.version);
}
@Override public void customDecode(org.apache.avro.io.ResolvingDecoder in)
throws java.io.IOException
{
org.apache.avro.Schema.Field[] fieldOrder = in.readFieldOrderIfDiff();
if (fieldOrder == null) {
if (in.readIndex() != 1) {
in.readNull();
this.instantTime = null;
} else {
this.instantTime = in.readString();
}
if (in.readIndex() != 1) {
in.readNull();
this.completionTime = null;
} else {
this.completionTime = in.readString();
}
if (in.readIndex() != 1) {
in.readNull();
this.action = null;
} else {
this.action = in.readString();
}
if (in.readIndex() != 1) {
in.readNull();
this.metadata = null;
} else {
this.metadata = in.readBytes(this.metadata);
}
if (in.readIndex() != 1) {
in.readNull();
this.plan = null;
} else {
this.plan = in.readBytes(this.plan);
}
this.version = in.readInt();
} else {
for (int i = 0; i < 6; i++) {
switch (fieldOrder[i].pos()) {
case 0:
if (in.readIndex() != 1) {
in.readNull();
this.instantTime = null;
} else {
this.instantTime = in.readString();
}
break;
case 1:
if (in.readIndex() != 1) {
in.readNull();
this.completionTime = null;
} else {
this.completionTime = in.readString();
}
break;
case 2:
if (in.readIndex() != 1) {
in.readNull();
this.action = null;
} else {
this.action = in.readString();
}
break;
case 3:
if (in.readIndex() != 1) {
in.readNull();
this.metadata = null;
} else {
this.metadata = in.readBytes(this.metadata);
}
break;
case 4:
if (in.readIndex() != 1) {
in.readNull();
this.plan = null;
} else {
this.plan = in.readBytes(this.plan);
}
break;
case 5:
this.version = in.readInt();
break;
default:
throw new java.io.IOException("Corrupt ResolvingDecoder.");
}
}
}
}
}