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 net.lightapi.portal.user;
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 UserCreatedEvent extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
private static final long serialVersionUID = -2801676580326874928L;
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"UserCreatedEvent\",\"namespace\":\"net.lightapi.portal.user\",\"fields\":[{\"name\":\"EventId\",\"type\":{\"type\":\"record\",\"name\":\"EventId\",\"namespace\":\"com.networknt.kafka.common\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"a unique identifier\"},{\"name\":\"nonce\",\"type\":\"long\",\"doc\":\"the number of the transactions for the user\"},{\"name\":\"derived\",\"type\":\"boolean\",\"doc\":\"indicate if the event is derived from event processor\",\"default\":false}]}},{\"name\":\"host\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"the host organization of the user\"},{\"name\":\"email\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"the email of the user\"},{\"name\":\"userId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"the unique user id\"},{\"name\":\"language\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"the preferred language of the user\"},{\"name\":\"password\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"the password of the user\"},{\"name\":\"value\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"user detail in JSON, include firstName, lastName, gender, birthday, postCode, address\",\"default\":null},{\"name\":\"taijiWallet\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"taiji blockchain address of the user\",\"default\":null},{\"name\":\"country\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"country of the user\",\"default\":null},{\"name\":\"province\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"province of the user\",\"default\":null},{\"name\":\"city\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"city of the user\",\"default\":null},{\"name\":\"verified\",\"type\":\"boolean\",\"doc\":\"If the email is verified\",\"default\":false},{\"name\":\"token\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"A UUID that is used for email verification\"},{\"name\":\"roles\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"a list of roles for the user\",\"default\":\"user\"},{\"name\":\"locked\",\"type\":\"boolean\",\"doc\":\"If the account is locked\",\"default\":false},{\"name\":\"timestamp\",\"type\":\"long\",\"doc\":\"time the event is recorded\",\"default\":0}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private static final 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 UserCreatedEvent 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 UserCreatedEvent from a ByteBuffer.
* @param b a byte buffer holding serialized data for an instance of this class
* @return a UserCreatedEvent 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 UserCreatedEvent fromByteBuffer(
java.nio.ByteBuffer b) throws java.io.IOException {
return DECODER.decode(b);
}
private com.networknt.kafka.common.EventId EventId;
/** the host organization of the user */
private java.lang.String host;
/** the email of the user */
private java.lang.String email;
/** the unique user id */
private java.lang.String userId;
/** the preferred language of the user */
private java.lang.String language;
/** the password of the user */
private java.lang.String password;
/** user detail in JSON, include firstName, lastName, gender, birthday, postCode, address */
private java.lang.String value;
/** taiji blockchain address of the user */
private java.lang.String taijiWallet;
/** country of the user */
private java.lang.String country;
/** province of the user */
private java.lang.String province;
/** city of the user */
private java.lang.String city;
/** If the email is verified */
private boolean verified;
/** A UUID that is used for email verification */
private java.lang.String token;
/** a list of roles for the user */
private java.lang.String roles;
/** If the account is locked */
private boolean locked;
/** time the event is recorded */
private long 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 UserCreatedEvent() {}
/**
* All-args constructor.
* @param EventId The new value for EventId
* @param host the host organization of the user
* @param email the email of the user
* @param userId the unique user id
* @param language the preferred language of the user
* @param password the password of the user
* @param value user detail in JSON, include firstName, lastName, gender, birthday, postCode, address
* @param taijiWallet taiji blockchain address of the user
* @param country country of the user
* @param province province of the user
* @param city city of the user
* @param verified If the email is verified
* @param token A UUID that is used for email verification
* @param roles a list of roles for the user
* @param locked If the account is locked
* @param timestamp time the event is recorded
*/
public UserCreatedEvent(com.networknt.kafka.common.EventId EventId, java.lang.String host, java.lang.String email, java.lang.String userId, java.lang.String language, java.lang.String password, java.lang.String value, java.lang.String taijiWallet, java.lang.String country, java.lang.String province, java.lang.String city, java.lang.Boolean verified, java.lang.String token, java.lang.String roles, java.lang.Boolean locked, java.lang.Long timestamp) {
this.EventId = EventId;
this.host = host;
this.email = email;
this.userId = userId;
this.language = language;
this.password = password;
this.value = value;
this.taijiWallet = taijiWallet;
this.country = country;
this.province = province;
this.city = city;
this.verified = verified;
this.token = token;
this.roles = roles;
this.locked = locked;
this.timestamp = timestamp;
}
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 EventId;
case 1: return host;
case 2: return email;
case 3: return userId;
case 4: return language;
case 5: return password;
case 6: return value;
case 7: return taijiWallet;
case 8: return country;
case 9: return province;
case 10: return city;
case 11: return verified;
case 12: return token;
case 13: return roles;
case 14: return locked;
case 15: return timestamp;
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: EventId = (com.networknt.kafka.common.EventId)value$; break;
case 1: host = value$ != null ? value$.toString() : null; break;
case 2: email = value$ != null ? value$.toString() : null; break;
case 3: userId = value$ != null ? value$.toString() : null; break;
case 4: language = value$ != null ? value$.toString() : null; break;
case 5: password = value$ != null ? value$.toString() : null; break;
case 6: value = value$ != null ? value$.toString() : null; break;
case 7: taijiWallet = value$ != null ? value$.toString() : null; break;
case 8: country = value$ != null ? value$.toString() : null; break;
case 9: province = value$ != null ? value$.toString() : null; break;
case 10: city = value$ != null ? value$.toString() : null; break;
case 11: verified = (java.lang.Boolean)value$; break;
case 12: token = value$ != null ? value$.toString() : null; break;
case 13: roles = value$ != null ? value$.toString() : null; break;
case 14: locked = (java.lang.Boolean)value$; break;
case 15: timestamp = (java.lang.Long)value$; break;
default: throw new IndexOutOfBoundsException("Invalid index: " + field$);
}
}
/**
* Gets the value of the 'EventId' field.
* @return The value of the 'EventId' field.
*/
public com.networknt.kafka.common.EventId getEventId() {
return EventId;
}
/**
* Sets the value of the 'EventId' field.
* @param value the value to set.
*/
public void setEventId(com.networknt.kafka.common.EventId value) {
this.EventId = value;
}
/**
* Gets the value of the 'host' field.
* @return the host organization of the user
*/
public java.lang.String getHost() {
return host;
}
/**
* Sets the value of the 'host' field.
* the host organization of the user
* @param value the value to set.
*/
public void setHost(java.lang.String value) {
this.host = value;
}
/**
* Gets the value of the 'email' field.
* @return the email of the user
*/
public java.lang.String getEmail() {
return email;
}
/**
* Sets the value of the 'email' field.
* the email of the user
* @param value the value to set.
*/
public void setEmail(java.lang.String value) {
this.email = value;
}
/**
* Gets the value of the 'userId' field.
* @return the unique user id
*/
public java.lang.String getUserId() {
return userId;
}
/**
* Sets the value of the 'userId' field.
* the unique user id
* @param value the value to set.
*/
public void setUserId(java.lang.String value) {
this.userId = value;
}
/**
* Gets the value of the 'language' field.
* @return the preferred language of the user
*/
public java.lang.String getLanguage() {
return language;
}
/**
* Sets the value of the 'language' field.
* the preferred language of the user
* @param value the value to set.
*/
public void setLanguage(java.lang.String value) {
this.language = value;
}
/**
* Gets the value of the 'password' field.
* @return the password of the user
*/
public java.lang.String getPassword() {
return password;
}
/**
* Sets the value of the 'password' field.
* the password of the user
* @param value the value to set.
*/
public void setPassword(java.lang.String value) {
this.password = value;
}
/**
* Gets the value of the 'value' field.
* @return user detail in JSON, include firstName, lastName, gender, birthday, postCode, address
*/
public java.lang.String getValue() {
return value;
}
/**
* Sets the value of the 'value' field.
* user detail in JSON, include firstName, lastName, gender, birthday, postCode, address
* @param value the value to set.
*/
public void setValue(java.lang.String value) {
this.value = value;
}
/**
* Gets the value of the 'taijiWallet' field.
* @return taiji blockchain address of the user
*/
public java.lang.String getTaijiWallet() {
return taijiWallet;
}
/**
* Sets the value of the 'taijiWallet' field.
* taiji blockchain address of the user
* @param value the value to set.
*/
public void setTaijiWallet(java.lang.String value) {
this.taijiWallet = value;
}
/**
* Gets the value of the 'country' field.
* @return country of the user
*/
public java.lang.String getCountry() {
return country;
}
/**
* Sets the value of the 'country' field.
* country of the user
* @param value the value to set.
*/
public void setCountry(java.lang.String value) {
this.country = value;
}
/**
* Gets the value of the 'province' field.
* @return province of the user
*/
public java.lang.String getProvince() {
return province;
}
/**
* Sets the value of the 'province' field.
* province of the user
* @param value the value to set.
*/
public void setProvince(java.lang.String value) {
this.province = value;
}
/**
* Gets the value of the 'city' field.
* @return city of the user
*/
public java.lang.String getCity() {
return city;
}
/**
* Sets the value of the 'city' field.
* city of the user
* @param value the value to set.
*/
public void setCity(java.lang.String value) {
this.city = value;
}
/**
* Gets the value of the 'verified' field.
* @return If the email is verified
*/
public boolean getVerified() {
return verified;
}
/**
* Sets the value of the 'verified' field.
* If the email is verified
* @param value the value to set.
*/
public void setVerified(boolean value) {
this.verified = value;
}
/**
* Gets the value of the 'token' field.
* @return A UUID that is used for email verification
*/
public java.lang.String getToken() {
return token;
}
/**
* Sets the value of the 'token' field.
* A UUID that is used for email verification
* @param value the value to set.
*/
public void setToken(java.lang.String value) {
this.token = value;
}
/**
* Gets the value of the 'roles' field.
* @return a list of roles for the user
*/
public java.lang.String getRoles() {
return roles;
}
/**
* Sets the value of the 'roles' field.
* a list of roles for the user
* @param value the value to set.
*/
public void setRoles(java.lang.String value) {
this.roles = value;
}
/**
* Gets the value of the 'locked' field.
* @return If the account is locked
*/
public boolean getLocked() {
return locked;
}
/**
* Sets the value of the 'locked' field.
* If the account is locked
* @param value the value to set.
*/
public void setLocked(boolean value) {
this.locked = value;
}
/**
* Gets the value of the 'timestamp' field.
* @return time the event is recorded
*/
public long getTimestamp() {
return timestamp;
}
/**
* Sets the value of the 'timestamp' field.
* time the event is recorded
* @param value the value to set.
*/
public void setTimestamp(long value) {
this.timestamp = value;
}
/**
* Creates a new UserCreatedEvent RecordBuilder.
* @return A new UserCreatedEvent RecordBuilder
*/
public static net.lightapi.portal.user.UserCreatedEvent.Builder newBuilder() {
return new net.lightapi.portal.user.UserCreatedEvent.Builder();
}
/**
* Creates a new UserCreatedEvent RecordBuilder by copying an existing Builder.
* @param other The existing builder to copy.
* @return A new UserCreatedEvent RecordBuilder
*/
public static net.lightapi.portal.user.UserCreatedEvent.Builder newBuilder(net.lightapi.portal.user.UserCreatedEvent.Builder other) {
if (other == null) {
return new net.lightapi.portal.user.UserCreatedEvent.Builder();
} else {
return new net.lightapi.portal.user.UserCreatedEvent.Builder(other);
}
}
/**
* Creates a new UserCreatedEvent RecordBuilder by copying an existing UserCreatedEvent instance.
* @param other The existing instance to copy.
* @return A new UserCreatedEvent RecordBuilder
*/
public static net.lightapi.portal.user.UserCreatedEvent.Builder newBuilder(net.lightapi.portal.user.UserCreatedEvent other) {
if (other == null) {
return new net.lightapi.portal.user.UserCreatedEvent.Builder();
} else {
return new net.lightapi.portal.user.UserCreatedEvent.Builder(other);
}
}
/**
* RecordBuilder for UserCreatedEvent instances.
*/
@org.apache.avro.specific.AvroGenerated
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private com.networknt.kafka.common.EventId EventId;
private com.networknt.kafka.common.EventId.Builder EventIdBuilder;
/** the host organization of the user */
private java.lang.String host;
/** the email of the user */
private java.lang.String email;
/** the unique user id */
private java.lang.String userId;
/** the preferred language of the user */
private java.lang.String language;
/** the password of the user */
private java.lang.String password;
/** user detail in JSON, include firstName, lastName, gender, birthday, postCode, address */
private java.lang.String value;
/** taiji blockchain address of the user */
private java.lang.String taijiWallet;
/** country of the user */
private java.lang.String country;
/** province of the user */
private java.lang.String province;
/** city of the user */
private java.lang.String city;
/** If the email is verified */
private boolean verified;
/** A UUID that is used for email verification */
private java.lang.String token;
/** a list of roles for the user */
private java.lang.String roles;
/** If the account is locked */
private boolean locked;
/** time the event is recorded */
private long timestamp;
/** Creates a new Builder */
private Builder() {
super(SCHEMA$, MODEL$);
}
/**
* Creates a Builder by copying an existing Builder.
* @param other The existing Builder to copy.
*/
private Builder(net.lightapi.portal.user.UserCreatedEvent.Builder other) {
super(other);
if (isValidValue(fields()[0], other.EventId)) {
this.EventId = data().deepCopy(fields()[0].schema(), other.EventId);
fieldSetFlags()[0] = other.fieldSetFlags()[0];
}
if (other.hasEventIdBuilder()) {
this.EventIdBuilder = com.networknt.kafka.common.EventId.newBuilder(other.getEventIdBuilder());
}
if (isValidValue(fields()[1], other.host)) {
this.host = data().deepCopy(fields()[1].schema(), other.host);
fieldSetFlags()[1] = other.fieldSetFlags()[1];
}
if (isValidValue(fields()[2], other.email)) {
this.email = data().deepCopy(fields()[2].schema(), other.email);
fieldSetFlags()[2] = other.fieldSetFlags()[2];
}
if (isValidValue(fields()[3], other.userId)) {
this.userId = data().deepCopy(fields()[3].schema(), other.userId);
fieldSetFlags()[3] = other.fieldSetFlags()[3];
}
if (isValidValue(fields()[4], other.language)) {
this.language = data().deepCopy(fields()[4].schema(), other.language);
fieldSetFlags()[4] = other.fieldSetFlags()[4];
}
if (isValidValue(fields()[5], other.password)) {
this.password = data().deepCopy(fields()[5].schema(), other.password);
fieldSetFlags()[5] = other.fieldSetFlags()[5];
}
if (isValidValue(fields()[6], other.value)) {
this.value = data().deepCopy(fields()[6].schema(), other.value);
fieldSetFlags()[6] = other.fieldSetFlags()[6];
}
if (isValidValue(fields()[7], other.taijiWallet)) {
this.taijiWallet = data().deepCopy(fields()[7].schema(), other.taijiWallet);
fieldSetFlags()[7] = other.fieldSetFlags()[7];
}
if (isValidValue(fields()[8], other.country)) {
this.country = data().deepCopy(fields()[8].schema(), other.country);
fieldSetFlags()[8] = other.fieldSetFlags()[8];
}
if (isValidValue(fields()[9], other.province)) {
this.province = data().deepCopy(fields()[9].schema(), other.province);
fieldSetFlags()[9] = other.fieldSetFlags()[9];
}
if (isValidValue(fields()[10], other.city)) {
this.city = data().deepCopy(fields()[10].schema(), other.city);
fieldSetFlags()[10] = other.fieldSetFlags()[10];
}
if (isValidValue(fields()[11], other.verified)) {
this.verified = data().deepCopy(fields()[11].schema(), other.verified);
fieldSetFlags()[11] = other.fieldSetFlags()[11];
}
if (isValidValue(fields()[12], other.token)) {
this.token = data().deepCopy(fields()[12].schema(), other.token);
fieldSetFlags()[12] = other.fieldSetFlags()[12];
}
if (isValidValue(fields()[13], other.roles)) {
this.roles = data().deepCopy(fields()[13].schema(), other.roles);
fieldSetFlags()[13] = other.fieldSetFlags()[13];
}
if (isValidValue(fields()[14], other.locked)) {
this.locked = data().deepCopy(fields()[14].schema(), other.locked);
fieldSetFlags()[14] = other.fieldSetFlags()[14];
}
if (isValidValue(fields()[15], other.timestamp)) {
this.timestamp = data().deepCopy(fields()[15].schema(), other.timestamp);
fieldSetFlags()[15] = other.fieldSetFlags()[15];
}
}
/**
* Creates a Builder by copying an existing UserCreatedEvent instance
* @param other The existing instance to copy.
*/
private Builder(net.lightapi.portal.user.UserCreatedEvent other) {
super(SCHEMA$, MODEL$);
if (isValidValue(fields()[0], other.EventId)) {
this.EventId = data().deepCopy(fields()[0].schema(), other.EventId);
fieldSetFlags()[0] = true;
}
this.EventIdBuilder = null;
if (isValidValue(fields()[1], other.host)) {
this.host = data().deepCopy(fields()[1].schema(), other.host);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.email)) {
this.email = data().deepCopy(fields()[2].schema(), other.email);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.userId)) {
this.userId = data().deepCopy(fields()[3].schema(), other.userId);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.language)) {
this.language = data().deepCopy(fields()[4].schema(), other.language);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.password)) {
this.password = data().deepCopy(fields()[5].schema(), other.password);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.value)) {
this.value = data().deepCopy(fields()[6].schema(), other.value);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.taijiWallet)) {
this.taijiWallet = data().deepCopy(fields()[7].schema(), other.taijiWallet);
fieldSetFlags()[7] = true;
}
if (isValidValue(fields()[8], other.country)) {
this.country = data().deepCopy(fields()[8].schema(), other.country);
fieldSetFlags()[8] = true;
}
if (isValidValue(fields()[9], other.province)) {
this.province = data().deepCopy(fields()[9].schema(), other.province);
fieldSetFlags()[9] = true;
}
if (isValidValue(fields()[10], other.city)) {
this.city = data().deepCopy(fields()[10].schema(), other.city);
fieldSetFlags()[10] = true;
}
if (isValidValue(fields()[11], other.verified)) {
this.verified = data().deepCopy(fields()[11].schema(), other.verified);
fieldSetFlags()[11] = true;
}
if (isValidValue(fields()[12], other.token)) {
this.token = data().deepCopy(fields()[12].schema(), other.token);
fieldSetFlags()[12] = true;
}
if (isValidValue(fields()[13], other.roles)) {
this.roles = data().deepCopy(fields()[13].schema(), other.roles);
fieldSetFlags()[13] = true;
}
if (isValidValue(fields()[14], other.locked)) {
this.locked = data().deepCopy(fields()[14].schema(), other.locked);
fieldSetFlags()[14] = true;
}
if (isValidValue(fields()[15], other.timestamp)) {
this.timestamp = data().deepCopy(fields()[15].schema(), other.timestamp);
fieldSetFlags()[15] = true;
}
}
/**
* Gets the value of the 'EventId' field.
* @return The value.
*/
public com.networknt.kafka.common.EventId getEventId() {
return EventId;
}
/**
* Sets the value of the 'EventId' field.
* @param value The value of 'EventId'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setEventId(com.networknt.kafka.common.EventId value) {
validate(fields()[0], value);
this.EventIdBuilder = null;
this.EventId = value;
fieldSetFlags()[0] = 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()[0];
}
/**
* Gets the Builder instance for the 'EventId' field and creates one if it doesn't exist yet.
* @return This builder.
*/
public com.networknt.kafka.common.EventId.Builder getEventIdBuilder() {
if (EventIdBuilder == null) {
if (hasEventId()) {
setEventIdBuilder(com.networknt.kafka.common.EventId.newBuilder(EventId));
} else {
setEventIdBuilder(com.networknt.kafka.common.EventId.newBuilder());
}
}
return EventIdBuilder;
}
/**
* Sets the Builder instance for the 'EventId' field
* @param value The builder instance that must be set.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setEventIdBuilder(com.networknt.kafka.common.EventId.Builder value) {
clearEventId();
EventIdBuilder = value;
return this;
}
/**
* Checks whether the 'EventId' field has an active Builder instance
* @return True if the 'EventId' field has an active Builder instance
*/
public boolean hasEventIdBuilder() {
return EventIdBuilder != null;
}
/**
* Clears the value of the 'EventId' field.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearEventId() {
EventId = null;
EventIdBuilder = null;
fieldSetFlags()[0] = false;
return this;
}
/**
* Gets the value of the 'host' field.
* the host organization of the user
* @return The value.
*/
public java.lang.String getHost() {
return host;
}
/**
* Sets the value of the 'host' field.
* the host organization of the user
* @param value The value of 'host'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setHost(java.lang.String value) {
validate(fields()[1], value);
this.host = value;
fieldSetFlags()[1] = true;
return this;
}
/**
* Checks whether the 'host' field has been set.
* the host organization of the user
* @return True if the 'host' field has been set, false otherwise.
*/
public boolean hasHost() {
return fieldSetFlags()[1];
}
/**
* Clears the value of the 'host' field.
* the host organization of the user
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearHost() {
host = null;
fieldSetFlags()[1] = false;
return this;
}
/**
* Gets the value of the 'email' field.
* the email of the user
* @return The value.
*/
public java.lang.String getEmail() {
return email;
}
/**
* Sets the value of the 'email' field.
* the email of the user
* @param value The value of 'email'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setEmail(java.lang.String value) {
validate(fields()[2], value);
this.email = value;
fieldSetFlags()[2] = true;
return this;
}
/**
* Checks whether the 'email' field has been set.
* the email of the user
* @return True if the 'email' field has been set, false otherwise.
*/
public boolean hasEmail() {
return fieldSetFlags()[2];
}
/**
* Clears the value of the 'email' field.
* the email of the user
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearEmail() {
email = null;
fieldSetFlags()[2] = false;
return this;
}
/**
* Gets the value of the 'userId' field.
* the unique user id
* @return The value.
*/
public java.lang.String getUserId() {
return userId;
}
/**
* Sets the value of the 'userId' field.
* the unique user id
* @param value The value of 'userId'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setUserId(java.lang.String value) {
validate(fields()[3], value);
this.userId = value;
fieldSetFlags()[3] = true;
return this;
}
/**
* Checks whether the 'userId' field has been set.
* the unique user id
* @return True if the 'userId' field has been set, false otherwise.
*/
public boolean hasUserId() {
return fieldSetFlags()[3];
}
/**
* Clears the value of the 'userId' field.
* the unique user id
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearUserId() {
userId = null;
fieldSetFlags()[3] = false;
return this;
}
/**
* Gets the value of the 'language' field.
* the preferred language of the user
* @return The value.
*/
public java.lang.String getLanguage() {
return language;
}
/**
* Sets the value of the 'language' field.
* the preferred language of the user
* @param value The value of 'language'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setLanguage(java.lang.String value) {
validate(fields()[4], value);
this.language = value;
fieldSetFlags()[4] = true;
return this;
}
/**
* Checks whether the 'language' field has been set.
* the preferred language of the user
* @return True if the 'language' field has been set, false otherwise.
*/
public boolean hasLanguage() {
return fieldSetFlags()[4];
}
/**
* Clears the value of the 'language' field.
* the preferred language of the user
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearLanguage() {
language = null;
fieldSetFlags()[4] = false;
return this;
}
/**
* Gets the value of the 'password' field.
* the password of the user
* @return The value.
*/
public java.lang.String getPassword() {
return password;
}
/**
* Sets the value of the 'password' field.
* the password of the user
* @param value The value of 'password'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setPassword(java.lang.String value) {
validate(fields()[5], value);
this.password = value;
fieldSetFlags()[5] = true;
return this;
}
/**
* Checks whether the 'password' field has been set.
* the password of the user
* @return True if the 'password' field has been set, false otherwise.
*/
public boolean hasPassword() {
return fieldSetFlags()[5];
}
/**
* Clears the value of the 'password' field.
* the password of the user
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearPassword() {
password = null;
fieldSetFlags()[5] = false;
return this;
}
/**
* Gets the value of the 'value' field.
* user detail in JSON, include firstName, lastName, gender, birthday, postCode, address
* @return The value.
*/
public java.lang.String getValue() {
return value;
}
/**
* Sets the value of the 'value' field.
* user detail in JSON, include firstName, lastName, gender, birthday, postCode, address
* @param value The value of 'value'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setValue(java.lang.String value) {
validate(fields()[6], value);
this.value = value;
fieldSetFlags()[6] = true;
return this;
}
/**
* Checks whether the 'value' field has been set.
* user detail in JSON, include firstName, lastName, gender, birthday, postCode, address
* @return True if the 'value' field has been set, false otherwise.
*/
public boolean hasValue() {
return fieldSetFlags()[6];
}
/**
* Clears the value of the 'value' field.
* user detail in JSON, include firstName, lastName, gender, birthday, postCode, address
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearValue() {
value = null;
fieldSetFlags()[6] = false;
return this;
}
/**
* Gets the value of the 'taijiWallet' field.
* taiji blockchain address of the user
* @return The value.
*/
public java.lang.String getTaijiWallet() {
return taijiWallet;
}
/**
* Sets the value of the 'taijiWallet' field.
* taiji blockchain address of the user
* @param value The value of 'taijiWallet'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setTaijiWallet(java.lang.String value) {
validate(fields()[7], value);
this.taijiWallet = value;
fieldSetFlags()[7] = true;
return this;
}
/**
* Checks whether the 'taijiWallet' field has been set.
* taiji blockchain address of the user
* @return True if the 'taijiWallet' field has been set, false otherwise.
*/
public boolean hasTaijiWallet() {
return fieldSetFlags()[7];
}
/**
* Clears the value of the 'taijiWallet' field.
* taiji blockchain address of the user
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearTaijiWallet() {
taijiWallet = null;
fieldSetFlags()[7] = false;
return this;
}
/**
* Gets the value of the 'country' field.
* country of the user
* @return The value.
*/
public java.lang.String getCountry() {
return country;
}
/**
* Sets the value of the 'country' field.
* country of the user
* @param value The value of 'country'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setCountry(java.lang.String value) {
validate(fields()[8], value);
this.country = value;
fieldSetFlags()[8] = true;
return this;
}
/**
* Checks whether the 'country' field has been set.
* country of the user
* @return True if the 'country' field has been set, false otherwise.
*/
public boolean hasCountry() {
return fieldSetFlags()[8];
}
/**
* Clears the value of the 'country' field.
* country of the user
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearCountry() {
country = null;
fieldSetFlags()[8] = false;
return this;
}
/**
* Gets the value of the 'province' field.
* province of the user
* @return The value.
*/
public java.lang.String getProvince() {
return province;
}
/**
* Sets the value of the 'province' field.
* province of the user
* @param value The value of 'province'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setProvince(java.lang.String value) {
validate(fields()[9], value);
this.province = value;
fieldSetFlags()[9] = true;
return this;
}
/**
* Checks whether the 'province' field has been set.
* province of the user
* @return True if the 'province' field has been set, false otherwise.
*/
public boolean hasProvince() {
return fieldSetFlags()[9];
}
/**
* Clears the value of the 'province' field.
* province of the user
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearProvince() {
province = null;
fieldSetFlags()[9] = false;
return this;
}
/**
* Gets the value of the 'city' field.
* city of the user
* @return The value.
*/
public java.lang.String getCity() {
return city;
}
/**
* Sets the value of the 'city' field.
* city of the user
* @param value The value of 'city'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setCity(java.lang.String value) {
validate(fields()[10], value);
this.city = value;
fieldSetFlags()[10] = true;
return this;
}
/**
* Checks whether the 'city' field has been set.
* city of the user
* @return True if the 'city' field has been set, false otherwise.
*/
public boolean hasCity() {
return fieldSetFlags()[10];
}
/**
* Clears the value of the 'city' field.
* city of the user
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearCity() {
city = null;
fieldSetFlags()[10] = false;
return this;
}
/**
* Gets the value of the 'verified' field.
* If the email is verified
* @return The value.
*/
public boolean getVerified() {
return verified;
}
/**
* Sets the value of the 'verified' field.
* If the email is verified
* @param value The value of 'verified'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setVerified(boolean value) {
validate(fields()[11], value);
this.verified = value;
fieldSetFlags()[11] = true;
return this;
}
/**
* Checks whether the 'verified' field has been set.
* If the email is verified
* @return True if the 'verified' field has been set, false otherwise.
*/
public boolean hasVerified() {
return fieldSetFlags()[11];
}
/**
* Clears the value of the 'verified' field.
* If the email is verified
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearVerified() {
fieldSetFlags()[11] = false;
return this;
}
/**
* Gets the value of the 'token' field.
* A UUID that is used for email verification
* @return The value.
*/
public java.lang.String getToken() {
return token;
}
/**
* Sets the value of the 'token' field.
* A UUID that is used for email verification
* @param value The value of 'token'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setToken(java.lang.String value) {
validate(fields()[12], value);
this.token = value;
fieldSetFlags()[12] = true;
return this;
}
/**
* Checks whether the 'token' field has been set.
* A UUID that is used for email verification
* @return True if the 'token' field has been set, false otherwise.
*/
public boolean hasToken() {
return fieldSetFlags()[12];
}
/**
* Clears the value of the 'token' field.
* A UUID that is used for email verification
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearToken() {
token = null;
fieldSetFlags()[12] = false;
return this;
}
/**
* Gets the value of the 'roles' field.
* a list of roles for the user
* @return The value.
*/
public java.lang.String getRoles() {
return roles;
}
/**
* Sets the value of the 'roles' field.
* a list of roles for the user
* @param value The value of 'roles'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setRoles(java.lang.String value) {
validate(fields()[13], value);
this.roles = value;
fieldSetFlags()[13] = true;
return this;
}
/**
* Checks whether the 'roles' field has been set.
* a list of roles for the user
* @return True if the 'roles' field has been set, false otherwise.
*/
public boolean hasRoles() {
return fieldSetFlags()[13];
}
/**
* Clears the value of the 'roles' field.
* a list of roles for the user
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearRoles() {
roles = null;
fieldSetFlags()[13] = false;
return this;
}
/**
* Gets the value of the 'locked' field.
* If the account is locked
* @return The value.
*/
public boolean getLocked() {
return locked;
}
/**
* Sets the value of the 'locked' field.
* If the account is locked
* @param value The value of 'locked'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setLocked(boolean value) {
validate(fields()[14], value);
this.locked = value;
fieldSetFlags()[14] = true;
return this;
}
/**
* Checks whether the 'locked' field has been set.
* If the account is locked
* @return True if the 'locked' field has been set, false otherwise.
*/
public boolean hasLocked() {
return fieldSetFlags()[14];
}
/**
* Clears the value of the 'locked' field.
* If the account is locked
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearLocked() {
fieldSetFlags()[14] = false;
return this;
}
/**
* Gets the value of the 'timestamp' field.
* time the event is recorded
* @return The value.
*/
public long getTimestamp() {
return timestamp;
}
/**
* Sets the value of the 'timestamp' field.
* time the event is recorded
* @param value The value of 'timestamp'.
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder setTimestamp(long value) {
validate(fields()[15], value);
this.timestamp = value;
fieldSetFlags()[15] = true;
return this;
}
/**
* Checks whether the 'timestamp' field has been set.
* time the event is recorded
* @return True if the 'timestamp' field has been set, false otherwise.
*/
public boolean hasTimestamp() {
return fieldSetFlags()[15];
}
/**
* Clears the value of the 'timestamp' field.
* time the event is recorded
* @return This builder.
*/
public net.lightapi.portal.user.UserCreatedEvent.Builder clearTimestamp() {
fieldSetFlags()[15] = false;
return this;
}
@Override
@SuppressWarnings("unchecked")
public UserCreatedEvent build() {
try {
UserCreatedEvent record = new UserCreatedEvent();
if (EventIdBuilder != null) {
try {
record.EventId = this.EventIdBuilder.build();
} catch (org.apache.avro.AvroMissingFieldException e) {
e.addParentField(record.getSchema().getField("EventId"));
throw e;
}
} else {
record.EventId = fieldSetFlags()[0] ? this.EventId : (com.networknt.kafka.common.EventId) defaultValue(fields()[0]);
}
record.host = fieldSetFlags()[1] ? this.host : (java.lang.String) defaultValue(fields()[1]);
record.email = fieldSetFlags()[2] ? this.email : (java.lang.String) defaultValue(fields()[2]);
record.userId = fieldSetFlags()[3] ? this.userId : (java.lang.String) defaultValue(fields()[3]);
record.language = fieldSetFlags()[4] ? this.language : (java.lang.String) defaultValue(fields()[4]);
record.password = fieldSetFlags()[5] ? this.password : (java.lang.String) defaultValue(fields()[5]);
record.value = fieldSetFlags()[6] ? this.value : (java.lang.String) defaultValue(fields()[6]);
record.taijiWallet = fieldSetFlags()[7] ? this.taijiWallet : (java.lang.String) defaultValue(fields()[7]);
record.country = fieldSetFlags()[8] ? this.country : (java.lang.String) defaultValue(fields()[8]);
record.province = fieldSetFlags()[9] ? this.province : (java.lang.String) defaultValue(fields()[9]);
record.city = fieldSetFlags()[10] ? this.city : (java.lang.String) defaultValue(fields()[10]);
record.verified = fieldSetFlags()[11] ? this.verified : (java.lang.Boolean) defaultValue(fields()[11]);
record.token = fieldSetFlags()[12] ? this.token : (java.lang.String) defaultValue(fields()[12]);
record.roles = fieldSetFlags()[13] ? this.roles : (java.lang.String) defaultValue(fields()[13]);
record.locked = fieldSetFlags()[14] ? this.locked : (java.lang.Boolean) defaultValue(fields()[14]);
record.timestamp = fieldSetFlags()[15] ? this.timestamp : (java.lang.Long) defaultValue(fields()[15]);
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
{
this.EventId.customEncode(out);
out.writeString(this.host);
out.writeString(this.email);
out.writeString(this.userId);
out.writeString(this.language);
out.writeString(this.password);
if (this.value == null) {
out.writeIndex(0);
out.writeNull();
} else {
out.writeIndex(1);
out.writeString(this.value);
}
if (this.taijiWallet == null) {
out.writeIndex(0);
out.writeNull();
} else {
out.writeIndex(1);
out.writeString(this.taijiWallet);
}
if (this.country == null) {
out.writeIndex(0);
out.writeNull();
} else {
out.writeIndex(1);
out.writeString(this.country);
}
if (this.province == null) {
out.writeIndex(0);
out.writeNull();
} else {
out.writeIndex(1);
out.writeString(this.province);
}
if (this.city == null) {
out.writeIndex(0);
out.writeNull();
} else {
out.writeIndex(1);
out.writeString(this.city);
}
out.writeBoolean(this.verified);
out.writeString(this.token);
out.writeString(this.roles);
out.writeBoolean(this.locked);
out.writeLong(this.timestamp);
}
@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 (this.EventId == null) {
this.EventId = new com.networknt.kafka.common.EventId();
}
this.EventId.customDecode(in);
this.host = in.readString();
this.email = in.readString();
this.userId = in.readString();
this.language = in.readString();
this.password = in.readString();
if (in.readIndex() != 1) {
in.readNull();
this.value = null;
} else {
this.value = in.readString();
}
if (in.readIndex() != 1) {
in.readNull();
this.taijiWallet = null;
} else {
this.taijiWallet = in.readString();
}
if (in.readIndex() != 1) {
in.readNull();
this.country = null;
} else {
this.country = in.readString();
}
if (in.readIndex() != 1) {
in.readNull();
this.province = null;
} else {
this.province = in.readString();
}
if (in.readIndex() != 1) {
in.readNull();
this.city = null;
} else {
this.city = in.readString();
}
this.verified = in.readBoolean();
this.token = in.readString();
this.roles = in.readString();
this.locked = in.readBoolean();
this.timestamp = in.readLong();
} else {
for (int i = 0; i < 16; i++) {
switch (fieldOrder[i].pos()) {
case 0:
if (this.EventId == null) {
this.EventId = new com.networknt.kafka.common.EventId();
}
this.EventId.customDecode(in);
break;
case 1:
this.host = in.readString();
break;
case 2:
this.email = in.readString();
break;
case 3:
this.userId = in.readString();
break;
case 4:
this.language = in.readString();
break;
case 5:
this.password = in.readString();
break;
case 6:
if (in.readIndex() != 1) {
in.readNull();
this.value = null;
} else {
this.value = in.readString();
}
break;
case 7:
if (in.readIndex() != 1) {
in.readNull();
this.taijiWallet = null;
} else {
this.taijiWallet = in.readString();
}
break;
case 8:
if (in.readIndex() != 1) {
in.readNull();
this.country = null;
} else {
this.country = in.readString();
}
break;
case 9:
if (in.readIndex() != 1) {
in.readNull();
this.province = null;
} else {
this.province = in.readString();
}
break;
case 10:
if (in.readIndex() != 1) {
in.readNull();
this.city = null;
} else {
this.city = in.readString();
}
break;
case 11:
this.verified = in.readBoolean();
break;
case 12:
this.token = in.readString();
break;
case 13:
this.roles = in.readString();
break;
case 14:
this.locked = in.readBoolean();
break;
case 15:
this.timestamp = in.readLong();
break;
default:
throw new java.io.IOException("Corrupt ResolvingDecoder.");
}
}
}
}
}