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 no.nav.brukernotifikasjon.schemas;
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 Done extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
private static final long serialVersionUID = -3152869144216169314L;
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"Done\",\"namespace\":\"no.nav.brukernotifikasjon.schemas\",\"fields\":[{\"name\":\"produsent\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"tidspunkt\",\"type\":\"long\",\"logicalType\":\"timestamp-millis\"},{\"name\":\"aktorId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"eventId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"dokumentId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}");
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 Done 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 Done from a ByteBuffer.
* @param b a byte buffer holding serialized data for an instance of this class
* @return a Done 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 Done fromByteBuffer(
java.nio.ByteBuffer b) throws java.io.IOException {
return DECODER.decode(b);
}
@Deprecated public java.lang.String produsent;
@Deprecated public long tidspunkt;
@Deprecated public java.lang.String aktorId;
@Deprecated public java.lang.String eventId;
@Deprecated public java.lang.String dokumentId;
/**
* 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 Done() {}
/**
* All-args constructor.
* @param produsent The new value for produsent
* @param tidspunkt The new value for tidspunkt
* @param aktorId The new value for aktorId
* @param eventId The new value for eventId
* @param dokumentId The new value for dokumentId
*/
public Done(java.lang.String produsent, java.lang.Long tidspunkt, java.lang.String aktorId, java.lang.String eventId, java.lang.String dokumentId) {
this.produsent = produsent;
this.tidspunkt = tidspunkt;
this.aktorId = aktorId;
this.eventId = eventId;
this.dokumentId = dokumentId;
}
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 produsent;
case 1: return tidspunkt;
case 2: return aktorId;
case 3: return eventId;
case 4: return dokumentId;
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: produsent = (java.lang.String)value$; break;
case 1: tidspunkt = (java.lang.Long)value$; break;
case 2: aktorId = (java.lang.String)value$; break;
case 3: eventId = (java.lang.String)value$; break;
case 4: dokumentId = (java.lang.String)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'produsent' field.
* @return The value of the 'produsent' field.
*/
public java.lang.String getProdusent() {
return produsent;
}
/**
* Gets the value of the 'tidspunkt' field.
* @return The value of the 'tidspunkt' field.
*/
public long getTidspunkt() {
return tidspunkt;
}
/**
* Gets the value of the 'aktorId' field.
* @return The value of the 'aktorId' field.
*/
public java.lang.String getAktorId() {
return aktorId;
}
/**
* Gets the value of the 'eventId' field.
* @return The value of the 'eventId' field.
*/
public java.lang.String getEventId() {
return eventId;
}
/**
* Gets the value of the 'dokumentId' field.
* @return The value of the 'dokumentId' field.
*/
public java.lang.String getDokumentId() {
return dokumentId;
}
/**
* Creates a new Done RecordBuilder.
* @return A new Done RecordBuilder
*/
public static no.nav.brukernotifikasjon.schemas.Done.Builder newBuilder() {
return new no.nav.brukernotifikasjon.schemas.Done.Builder();
}
/**
* Creates a new Done RecordBuilder by copying an existing Builder.
* @param other The existing builder to copy.
* @return A new Done RecordBuilder
*/
public static no.nav.brukernotifikasjon.schemas.Done.Builder newBuilder(no.nav.brukernotifikasjon.schemas.Done.Builder other) {
if (other == null) {
return new no.nav.brukernotifikasjon.schemas.Done.Builder();
} else {
return new no.nav.brukernotifikasjon.schemas.Done.Builder(other);
}
}
/**
* Creates a new Done RecordBuilder by copying an existing Done instance.
* @param other The existing instance to copy.
* @return A new Done RecordBuilder
*/
public static no.nav.brukernotifikasjon.schemas.Done.Builder newBuilder(no.nav.brukernotifikasjon.schemas.Done other) {
if (other == null) {
return new no.nav.brukernotifikasjon.schemas.Done.Builder();
} else {
return new no.nav.brukernotifikasjon.schemas.Done.Builder(other);
}
}
/**
* RecordBuilder for Done instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String produsent;
private long tidspunkt;
private java.lang.String aktorId;
private java.lang.String eventId;
private java.lang.String dokumentId;
/** 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(no.nav.brukernotifikasjon.schemas.Done.Builder other) {
super(other);
if (isValidValue(fields()[0], other.produsent)) {
this.produsent = data().deepCopy(fields()[0].schema(), other.produsent);
fieldSetFlags()[0] = other.fieldSetFlags()[0];
}
if (isValidValue(fields()[1], other.tidspunkt)) {
this.tidspunkt = data().deepCopy(fields()[1].schema(), other.tidspunkt);
fieldSetFlags()[1] = other.fieldSetFlags()[1];
}
if (isValidValue(fields()[2], other.aktorId)) {
this.aktorId = data().deepCopy(fields()[2].schema(), other.aktorId);
fieldSetFlags()[2] = other.fieldSetFlags()[2];
}
if (isValidValue(fields()[3], other.eventId)) {
this.eventId = data().deepCopy(fields()[3].schema(), other.eventId);
fieldSetFlags()[3] = other.fieldSetFlags()[3];
}
if (isValidValue(fields()[4], other.dokumentId)) {
this.dokumentId = data().deepCopy(fields()[4].schema(), other.dokumentId);
fieldSetFlags()[4] = other.fieldSetFlags()[4];
}
}
/**
* Creates a Builder by copying an existing Done instance
* @param other The existing instance to copy.
*/
private Builder(no.nav.brukernotifikasjon.schemas.Done other) {
super(SCHEMA$);
if (isValidValue(fields()[0], other.produsent)) {
this.produsent = data().deepCopy(fields()[0].schema(), other.produsent);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.tidspunkt)) {
this.tidspunkt = data().deepCopy(fields()[1].schema(), other.tidspunkt);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.aktorId)) {
this.aktorId = data().deepCopy(fields()[2].schema(), other.aktorId);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.eventId)) {
this.eventId = data().deepCopy(fields()[3].schema(), other.eventId);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.dokumentId)) {
this.dokumentId = data().deepCopy(fields()[4].schema(), other.dokumentId);
fieldSetFlags()[4] = true;
}
}
/**
* Gets the value of the 'produsent' field.
* @return The value.
*/
public java.lang.String getProdusent() {
return produsent;
}
/**
* Sets the value of the 'produsent' field.
* @param value The value of 'produsent'.
* @return This builder.
*/
public no.nav.brukernotifikasjon.schemas.Done.Builder setProdusent(java.lang.String value) {
validate(fields()[0], value);
this.produsent = value;
fieldSetFlags()[0] = true;
return this;
}
/**
* Checks whether the 'produsent' field has been set.
* @return True if the 'produsent' field has been set, false otherwise.
*/
public boolean hasProdusent() {
return fieldSetFlags()[0];
}
/**
* Clears the value of the 'produsent' field.
* @return This builder.
*/
public no.nav.brukernotifikasjon.schemas.Done.Builder clearProdusent() {
produsent = null;
fieldSetFlags()[0] = false;
return this;
}
/**
* Gets the value of the 'tidspunkt' field.
* @return The value.
*/
public long getTidspunkt() {
return tidspunkt;
}
/**
* Sets the value of the 'tidspunkt' field.
* @param value The value of 'tidspunkt'.
* @return This builder.
*/
public no.nav.brukernotifikasjon.schemas.Done.Builder setTidspunkt(long value) {
validate(fields()[1], value);
this.tidspunkt = value;
fieldSetFlags()[1] = true;
return this;
}
/**
* Checks whether the 'tidspunkt' field has been set.
* @return True if the 'tidspunkt' field has been set, false otherwise.
*/
public boolean hasTidspunkt() {
return fieldSetFlags()[1];
}
/**
* Clears the value of the 'tidspunkt' field.
* @return This builder.
*/
public no.nav.brukernotifikasjon.schemas.Done.Builder clearTidspunkt() {
fieldSetFlags()[1] = false;
return this;
}
/**
* Gets the value of the 'aktorId' field.
* @return The value.
*/
public java.lang.String getAktorId() {
return aktorId;
}
/**
* Sets the value of the 'aktorId' field.
* @param value The value of 'aktorId'.
* @return This builder.
*/
public no.nav.brukernotifikasjon.schemas.Done.Builder setAktorId(java.lang.String value) {
validate(fields()[2], value);
this.aktorId = value;
fieldSetFlags()[2] = true;
return this;
}
/**
* Checks whether the 'aktorId' field has been set.
* @return True if the 'aktorId' field has been set, false otherwise.
*/
public boolean hasAktorId() {
return fieldSetFlags()[2];
}
/**
* Clears the value of the 'aktorId' field.
* @return This builder.
*/
public no.nav.brukernotifikasjon.schemas.Done.Builder clearAktorId() {
aktorId = null;
fieldSetFlags()[2] = false;
return this;
}
/**
* Gets the value of the 'eventId' field.
* @return The value.
*/
public java.lang.String getEventId() {
return eventId;
}
/**
* Sets the value of the 'eventId' field.
* @param value The value of 'eventId'.
* @return This builder.
*/
public no.nav.brukernotifikasjon.schemas.Done.Builder setEventId(java.lang.String value) {
validate(fields()[3], value);
this.eventId = value;
fieldSetFlags()[3] = true;
return this;
}
/**
* Checks whether the 'eventId' field has been set.
* @return True if the 'eventId' field has been set, false otherwise.
*/
public boolean hasEventId() {
return fieldSetFlags()[3];
}
/**
* Clears the value of the 'eventId' field.
* @return This builder.
*/
public no.nav.brukernotifikasjon.schemas.Done.Builder clearEventId() {
eventId = null;
fieldSetFlags()[3] = false;
return this;
}
/**
* Gets the value of the 'dokumentId' field.
* @return The value.
*/
public java.lang.String getDokumentId() {
return dokumentId;
}
/**
* Sets the value of the 'dokumentId' field.
* @param value The value of 'dokumentId'.
* @return This builder.
*/
public no.nav.brukernotifikasjon.schemas.Done.Builder setDokumentId(java.lang.String value) {
validate(fields()[4], value);
this.dokumentId = value;
fieldSetFlags()[4] = true;
return this;
}
/**
* Checks whether the 'dokumentId' field has been set.
* @return True if the 'dokumentId' field has been set, false otherwise.
*/
public boolean hasDokumentId() {
return fieldSetFlags()[4];
}
/**
* Clears the value of the 'dokumentId' field.
* @return This builder.
*/
public no.nav.brukernotifikasjon.schemas.Done.Builder clearDokumentId() {
dokumentId = null;
fieldSetFlags()[4] = false;
return this;
}
@Override
@SuppressWarnings("unchecked")
public Done build() {
try {
Done record = new Done();
record.produsent = fieldSetFlags()[0] ? this.produsent : (java.lang.String) defaultValue(fields()[0]);
record.tidspunkt = fieldSetFlags()[1] ? this.tidspunkt : (java.lang.Long) defaultValue(fields()[1]);
record.aktorId = fieldSetFlags()[2] ? this.aktorId : (java.lang.String) defaultValue(fields()[2]);
record.eventId = fieldSetFlags()[3] ? this.eventId : (java.lang.String) defaultValue(fields()[3]);
record.dokumentId = fieldSetFlags()[4] ? this.dokumentId : (java.lang.String) defaultValue(fields()[4]);
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
{
out.writeString(this.produsent);
out.writeLong(this.tidspunkt);
out.writeString(this.aktorId);
out.writeString(this.eventId);
out.writeString(this.dokumentId);
}
@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) {
this.produsent = in.readString();
this.tidspunkt = in.readLong();
this.aktorId = in.readString();
this.eventId = in.readString();
this.dokumentId = in.readString();
} else {
for (int i = 0; i < 5; i++) {
switch (fieldOrder[i].pos()) {
case 0:
this.produsent = in.readString();
break;
case 1:
this.tidspunkt = in.readLong();
break;
case 2:
this.aktorId = in.readString();
break;
case 3:
this.eventId = in.readString();
break;
case 4:
this.dokumentId = in.readString();
break;
default:
throw new java.io.IOException("Corrupt ResolvingDecoder.");
}
}
}
}
}