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 UserComment 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\":\"UserComment\",\"namespace\":\"org.gel.models.report.avro\",\"fields\":[{\"name\":\"comment\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Comment text\"},{\"name\":\"user\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"User\",\"fields\":[{\"name\":\"userid\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Azure Active Directory immutable user OID\"},{\"name\":\"email\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"User email address\"},{\"name\":\"username\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Username\"},{\"name\":\"role\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"groups\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}]}],\"doc\":\"User who created comment\"},{\"name\":\"timestamp\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Date and time comment was created (ISO 8601 datetime with seconds and timezone e.g. 2020-11-23T15:52:36+00:00)\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** Comment text */
private java.lang.String comment;
/** User who created comment */
private org.gel.models.report.avro.User user;
/** Date and time comment was created (ISO 8601 datetime with seconds and timezone e.g. 2020-11-23T15:52:36+00:00) */
private java.lang.String timestamp;
/**
* 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 UserComment() {}
/**
* All-args constructor.
*/
public UserComment(java.lang.String comment, org.gel.models.report.avro.User user, java.lang.String timestamp) {
this.comment = comment;
this.user = user;
this.timestamp = timestamp;
}
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 comment;
case 1: return user;
case 2: return timestamp;
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: comment = (java.lang.String)value$; break;
case 1: user = (org.gel.models.report.avro.User)value$; break;
case 2: timestamp = (java.lang.String)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'comment' field.
* Comment text */
public java.lang.String getComment() {
return comment;
}
/**
* Sets the value of the 'comment' field.
* Comment text * @param value the value to set.
*/
public void setComment(java.lang.String value) {
this.comment = value;
}
/**
* Gets the value of the 'user' field.
* User who created comment */
public org.gel.models.report.avro.User getUser() {
return user;
}
/**
* Sets the value of the 'user' field.
* User who created comment * @param value the value to set.
*/
public void setUser(org.gel.models.report.avro.User value) {
this.user = value;
}
/**
* Gets the value of the 'timestamp' field.
* Date and time comment was created (ISO 8601 datetime with seconds and timezone e.g. 2020-11-23T15:52:36+00:00) */
public java.lang.String getTimestamp() {
return timestamp;
}
/**
* Sets the value of the 'timestamp' field.
* Date and time comment was created (ISO 8601 datetime with seconds and timezone e.g. 2020-11-23T15:52:36+00:00) * @param value the value to set.
*/
public void setTimestamp(java.lang.String value) {
this.timestamp = value;
}
/** Creates a new UserComment RecordBuilder */
public static org.gel.models.report.avro.UserComment.Builder newBuilder() {
return new org.gel.models.report.avro.UserComment.Builder();
}
/** Creates a new UserComment RecordBuilder by copying an existing Builder */
public static org.gel.models.report.avro.UserComment.Builder newBuilder(org.gel.models.report.avro.UserComment.Builder other) {
return new org.gel.models.report.avro.UserComment.Builder(other);
}
/** Creates a new UserComment RecordBuilder by copying an existing UserComment instance */
public static org.gel.models.report.avro.UserComment.Builder newBuilder(org.gel.models.report.avro.UserComment other) {
return new org.gel.models.report.avro.UserComment.Builder(other);
}
/**
* RecordBuilder for UserComment instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String comment;
private org.gel.models.report.avro.User user;
private java.lang.String timestamp;
/** Creates a new Builder */
private Builder() {
super(org.gel.models.report.avro.UserComment.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.gel.models.report.avro.UserComment.Builder other) {
super(other);
if (isValidValue(fields()[0], other.comment)) {
this.comment = data().deepCopy(fields()[0].schema(), other.comment);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.user)) {
this.user = data().deepCopy(fields()[1].schema(), other.user);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.timestamp)) {
this.timestamp = data().deepCopy(fields()[2].schema(), other.timestamp);
fieldSetFlags()[2] = true;
}
}
/** Creates a Builder by copying an existing UserComment instance */
private Builder(org.gel.models.report.avro.UserComment other) {
super(org.gel.models.report.avro.UserComment.SCHEMA$);
if (isValidValue(fields()[0], other.comment)) {
this.comment = data().deepCopy(fields()[0].schema(), other.comment);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.user)) {
this.user = data().deepCopy(fields()[1].schema(), other.user);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.timestamp)) {
this.timestamp = data().deepCopy(fields()[2].schema(), other.timestamp);
fieldSetFlags()[2] = true;
}
}
/** Gets the value of the 'comment' field */
public java.lang.String getComment() {
return comment;
}
/** Sets the value of the 'comment' field */
public org.gel.models.report.avro.UserComment.Builder setComment(java.lang.String value) {
validate(fields()[0], value);
this.comment = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'comment' field has been set */
public boolean hasComment() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'comment' field */
public org.gel.models.report.avro.UserComment.Builder clearComment() {
comment = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'user' field */
public org.gel.models.report.avro.User getUser() {
return user;
}
/** Sets the value of the 'user' field */
public org.gel.models.report.avro.UserComment.Builder setUser(org.gel.models.report.avro.User value) {
validate(fields()[1], value);
this.user = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'user' field has been set */
public boolean hasUser() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'user' field */
public org.gel.models.report.avro.UserComment.Builder clearUser() {
user = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'timestamp' field */
public java.lang.String getTimestamp() {
return timestamp;
}
/** Sets the value of the 'timestamp' field */
public org.gel.models.report.avro.UserComment.Builder setTimestamp(java.lang.String value) {
validate(fields()[2], value);
this.timestamp = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'timestamp' field has been set */
public boolean hasTimestamp() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'timestamp' field */
public org.gel.models.report.avro.UserComment.Builder clearTimestamp() {
timestamp = null;
fieldSetFlags()[2] = false;
return this;
}
@Override
public UserComment build() {
try {
UserComment record = new UserComment();
record.comment = fieldSetFlags()[0] ? this.comment : (java.lang.String) defaultValue(fields()[0]);
record.user = fieldSetFlags()[1] ? this.user : (org.gel.models.report.avro.User) defaultValue(fields()[1]);
record.timestamp = fieldSetFlags()[2] ? this.timestamp : (java.lang.String) defaultValue(fields()[2]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}