All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.lightapi.portal.market.ConfigCreatedEvent Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Avro
 *
 * DO NOT EDIT DIRECTLY
 */
package net.lightapi.portal.market;

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 ConfigCreatedEvent extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
  private static final long serialVersionUID = 5905175861129028706L;


  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ConfigCreatedEvent\",\"namespace\":\"net.lightapi.portal.market\",\"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\":\"configId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"configuration Id\"},{\"name\":\"configType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"configuration type D Deployment H Handler M Module\"},{\"name\":\"infraType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"infrastructure type: GN Generic LN Linux WD Windows KB Kubernetes OS Openshift AW AWS AZ Azure GC GCP\",\"default\":\"GN\"},{\"name\":\"classPath\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"class path\"},{\"name\":\"configDesc\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"configuration description\"},{\"name\":\"owner\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"user id\"},{\"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 ConfigCreatedEvent 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 ConfigCreatedEvent from a ByteBuffer.
   * @param b a byte buffer holding serialized data for an instance of this class
   * @return a ConfigCreatedEvent 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 ConfigCreatedEvent fromByteBuffer(
      java.nio.ByteBuffer b) throws java.io.IOException {
    return DECODER.decode(b);
  }

  private com.networknt.kafka.common.EventId EventId;
  /** configuration Id */
  private java.lang.String configId;
  /** configuration type D Deployment H Handler M Module */
  private java.lang.String configType;
  /** infrastructure type: GN Generic LN Linux WD Windows KB Kubernetes OS Openshift AW AWS AZ Azure GC GCP */
  private java.lang.String infraType;
  /** class path */
  private java.lang.String classPath;
  /** configuration description */
  private java.lang.String configDesc;
  /** user id */
  private java.lang.String owner;
  /** 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 ConfigCreatedEvent() {}

  /**
   * All-args constructor.
   * @param EventId The new value for EventId
   * @param configId configuration Id
   * @param configType configuration type D Deployment H Handler M Module
   * @param infraType infrastructure type: GN Generic LN Linux WD Windows KB Kubernetes OS Openshift AW AWS AZ Azure GC GCP
   * @param classPath class path
   * @param configDesc configuration description
   * @param owner user id
   * @param timestamp time the event is recorded
   */
  public ConfigCreatedEvent(com.networknt.kafka.common.EventId EventId, java.lang.String configId, java.lang.String configType, java.lang.String infraType, java.lang.String classPath, java.lang.String configDesc, java.lang.String owner, java.lang.Long timestamp) {
    this.EventId = EventId;
    this.configId = configId;
    this.configType = configType;
    this.infraType = infraType;
    this.classPath = classPath;
    this.configDesc = configDesc;
    this.owner = owner;
    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 configId;
    case 2: return configType;
    case 3: return infraType;
    case 4: return classPath;
    case 5: return configDesc;
    case 6: return owner;
    case 7: 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: configId = value$ != null ? value$.toString() : null; break;
    case 2: configType = value$ != null ? value$.toString() : null; break;
    case 3: infraType = value$ != null ? value$.toString() : null; break;
    case 4: classPath = value$ != null ? value$.toString() : null; break;
    case 5: configDesc = value$ != null ? value$.toString() : null; break;
    case 6: owner = value$ != null ? value$.toString() : null; break;
    case 7: 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 'configId' field.
   * @return configuration Id
   */
  public java.lang.String getConfigId() {
    return configId;
  }


  /**
   * Sets the value of the 'configId' field.
   * configuration Id
   * @param value the value to set.
   */
  public void setConfigId(java.lang.String value) {
    this.configId = value;
  }

  /**
   * Gets the value of the 'configType' field.
   * @return configuration type D Deployment H Handler M Module
   */
  public java.lang.String getConfigType() {
    return configType;
  }


  /**
   * Sets the value of the 'configType' field.
   * configuration type D Deployment H Handler M Module
   * @param value the value to set.
   */
  public void setConfigType(java.lang.String value) {
    this.configType = value;
  }

  /**
   * Gets the value of the 'infraType' field.
   * @return infrastructure type: GN Generic LN Linux WD Windows KB Kubernetes OS Openshift AW AWS AZ Azure GC GCP
   */
  public java.lang.String getInfraType() {
    return infraType;
  }


  /**
   * Sets the value of the 'infraType' field.
   * infrastructure type: GN Generic LN Linux WD Windows KB Kubernetes OS Openshift AW AWS AZ Azure GC GCP
   * @param value the value to set.
   */
  public void setInfraType(java.lang.String value) {
    this.infraType = value;
  }

  /**
   * Gets the value of the 'classPath' field.
   * @return class path
   */
  public java.lang.String getClassPath() {
    return classPath;
  }


  /**
   * Sets the value of the 'classPath' field.
   * class path
   * @param value the value to set.
   */
  public void setClassPath(java.lang.String value) {
    this.classPath = value;
  }

  /**
   * Gets the value of the 'configDesc' field.
   * @return configuration description
   */
  public java.lang.String getConfigDesc() {
    return configDesc;
  }


  /**
   * Sets the value of the 'configDesc' field.
   * configuration description
   * @param value the value to set.
   */
  public void setConfigDesc(java.lang.String value) {
    this.configDesc = value;
  }

  /**
   * Gets the value of the 'owner' field.
   * @return user id
   */
  public java.lang.String getOwner() {
    return owner;
  }


  /**
   * Sets the value of the 'owner' field.
   * user id
   * @param value the value to set.
   */
  public void setOwner(java.lang.String value) {
    this.owner = 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 ConfigCreatedEvent RecordBuilder.
   * @return A new ConfigCreatedEvent RecordBuilder
   */
  public static net.lightapi.portal.market.ConfigCreatedEvent.Builder newBuilder() {
    return new net.lightapi.portal.market.ConfigCreatedEvent.Builder();
  }

  /**
   * Creates a new ConfigCreatedEvent RecordBuilder by copying an existing Builder.
   * @param other The existing builder to copy.
   * @return A new ConfigCreatedEvent RecordBuilder
   */
  public static net.lightapi.portal.market.ConfigCreatedEvent.Builder newBuilder(net.lightapi.portal.market.ConfigCreatedEvent.Builder other) {
    if (other == null) {
      return new net.lightapi.portal.market.ConfigCreatedEvent.Builder();
    } else {
      return new net.lightapi.portal.market.ConfigCreatedEvent.Builder(other);
    }
  }

  /**
   * Creates a new ConfigCreatedEvent RecordBuilder by copying an existing ConfigCreatedEvent instance.
   * @param other The existing instance to copy.
   * @return A new ConfigCreatedEvent RecordBuilder
   */
  public static net.lightapi.portal.market.ConfigCreatedEvent.Builder newBuilder(net.lightapi.portal.market.ConfigCreatedEvent other) {
    if (other == null) {
      return new net.lightapi.portal.market.ConfigCreatedEvent.Builder();
    } else {
      return new net.lightapi.portal.market.ConfigCreatedEvent.Builder(other);
    }
  }

  /**
   * RecordBuilder for ConfigCreatedEvent 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;
    /** configuration Id */
    private java.lang.String configId;
    /** configuration type D Deployment H Handler M Module */
    private java.lang.String configType;
    /** infrastructure type: GN Generic LN Linux WD Windows KB Kubernetes OS Openshift AW AWS AZ Azure GC GCP */
    private java.lang.String infraType;
    /** class path */
    private java.lang.String classPath;
    /** configuration description */
    private java.lang.String configDesc;
    /** user id */
    private java.lang.String owner;
    /** 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.market.ConfigCreatedEvent.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.configId)) {
        this.configId = data().deepCopy(fields()[1].schema(), other.configId);
        fieldSetFlags()[1] = other.fieldSetFlags()[1];
      }
      if (isValidValue(fields()[2], other.configType)) {
        this.configType = data().deepCopy(fields()[2].schema(), other.configType);
        fieldSetFlags()[2] = other.fieldSetFlags()[2];
      }
      if (isValidValue(fields()[3], other.infraType)) {
        this.infraType = data().deepCopy(fields()[3].schema(), other.infraType);
        fieldSetFlags()[3] = other.fieldSetFlags()[3];
      }
      if (isValidValue(fields()[4], other.classPath)) {
        this.classPath = data().deepCopy(fields()[4].schema(), other.classPath);
        fieldSetFlags()[4] = other.fieldSetFlags()[4];
      }
      if (isValidValue(fields()[5], other.configDesc)) {
        this.configDesc = data().deepCopy(fields()[5].schema(), other.configDesc);
        fieldSetFlags()[5] = other.fieldSetFlags()[5];
      }
      if (isValidValue(fields()[6], other.owner)) {
        this.owner = data().deepCopy(fields()[6].schema(), other.owner);
        fieldSetFlags()[6] = other.fieldSetFlags()[6];
      }
      if (isValidValue(fields()[7], other.timestamp)) {
        this.timestamp = data().deepCopy(fields()[7].schema(), other.timestamp);
        fieldSetFlags()[7] = other.fieldSetFlags()[7];
      }
    }

    /**
     * Creates a Builder by copying an existing ConfigCreatedEvent instance
     * @param other The existing instance to copy.
     */
    private Builder(net.lightapi.portal.market.ConfigCreatedEvent 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.configId)) {
        this.configId = data().deepCopy(fields()[1].schema(), other.configId);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.configType)) {
        this.configType = data().deepCopy(fields()[2].schema(), other.configType);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.infraType)) {
        this.infraType = data().deepCopy(fields()[3].schema(), other.infraType);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.classPath)) {
        this.classPath = data().deepCopy(fields()[4].schema(), other.classPath);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.configDesc)) {
        this.configDesc = data().deepCopy(fields()[5].schema(), other.configDesc);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.owner)) {
        this.owner = data().deepCopy(fields()[6].schema(), other.owner);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.timestamp)) {
        this.timestamp = data().deepCopy(fields()[7].schema(), other.timestamp);
        fieldSetFlags()[7] = 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.market.ConfigCreatedEvent.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.market.ConfigCreatedEvent.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.market.ConfigCreatedEvent.Builder clearEventId() {
      EventId = null;
      EventIdBuilder = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /**
      * Gets the value of the 'configId' field.
      * configuration Id
      * @return The value.
      */
    public java.lang.String getConfigId() {
      return configId;
    }


    /**
      * Sets the value of the 'configId' field.
      * configuration Id
      * @param value The value of 'configId'.
      * @return This builder.
      */
    public net.lightapi.portal.market.ConfigCreatedEvent.Builder setConfigId(java.lang.String value) {
      validate(fields()[1], value);
      this.configId = value;
      fieldSetFlags()[1] = true;
      return this;
    }

    /**
      * Checks whether the 'configId' field has been set.
      * configuration Id
      * @return True if the 'configId' field has been set, false otherwise.
      */
    public boolean hasConfigId() {
      return fieldSetFlags()[1];
    }


    /**
      * Clears the value of the 'configId' field.
      * configuration Id
      * @return This builder.
      */
    public net.lightapi.portal.market.ConfigCreatedEvent.Builder clearConfigId() {
      configId = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /**
      * Gets the value of the 'configType' field.
      * configuration type D Deployment H Handler M Module
      * @return The value.
      */
    public java.lang.String getConfigType() {
      return configType;
    }


    /**
      * Sets the value of the 'configType' field.
      * configuration type D Deployment H Handler M Module
      * @param value The value of 'configType'.
      * @return This builder.
      */
    public net.lightapi.portal.market.ConfigCreatedEvent.Builder setConfigType(java.lang.String value) {
      validate(fields()[2], value);
      this.configType = value;
      fieldSetFlags()[2] = true;
      return this;
    }

    /**
      * Checks whether the 'configType' field has been set.
      * configuration type D Deployment H Handler M Module
      * @return True if the 'configType' field has been set, false otherwise.
      */
    public boolean hasConfigType() {
      return fieldSetFlags()[2];
    }


    /**
      * Clears the value of the 'configType' field.
      * configuration type D Deployment H Handler M Module
      * @return This builder.
      */
    public net.lightapi.portal.market.ConfigCreatedEvent.Builder clearConfigType() {
      configType = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /**
      * Gets the value of the 'infraType' field.
      * infrastructure type: GN Generic LN Linux WD Windows KB Kubernetes OS Openshift AW AWS AZ Azure GC GCP
      * @return The value.
      */
    public java.lang.String getInfraType() {
      return infraType;
    }


    /**
      * Sets the value of the 'infraType' field.
      * infrastructure type: GN Generic LN Linux WD Windows KB Kubernetes OS Openshift AW AWS AZ Azure GC GCP
      * @param value The value of 'infraType'.
      * @return This builder.
      */
    public net.lightapi.portal.market.ConfigCreatedEvent.Builder setInfraType(java.lang.String value) {
      validate(fields()[3], value);
      this.infraType = value;
      fieldSetFlags()[3] = true;
      return this;
    }

    /**
      * Checks whether the 'infraType' field has been set.
      * infrastructure type: GN Generic LN Linux WD Windows KB Kubernetes OS Openshift AW AWS AZ Azure GC GCP
      * @return True if the 'infraType' field has been set, false otherwise.
      */
    public boolean hasInfraType() {
      return fieldSetFlags()[3];
    }


    /**
      * Clears the value of the 'infraType' field.
      * infrastructure type: GN Generic LN Linux WD Windows KB Kubernetes OS Openshift AW AWS AZ Azure GC GCP
      * @return This builder.
      */
    public net.lightapi.portal.market.ConfigCreatedEvent.Builder clearInfraType() {
      infraType = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /**
      * Gets the value of the 'classPath' field.
      * class path
      * @return The value.
      */
    public java.lang.String getClassPath() {
      return classPath;
    }


    /**
      * Sets the value of the 'classPath' field.
      * class path
      * @param value The value of 'classPath'.
      * @return This builder.
      */
    public net.lightapi.portal.market.ConfigCreatedEvent.Builder setClassPath(java.lang.String value) {
      validate(fields()[4], value);
      this.classPath = value;
      fieldSetFlags()[4] = true;
      return this;
    }

    /**
      * Checks whether the 'classPath' field has been set.
      * class path
      * @return True if the 'classPath' field has been set, false otherwise.
      */
    public boolean hasClassPath() {
      return fieldSetFlags()[4];
    }


    /**
      * Clears the value of the 'classPath' field.
      * class path
      * @return This builder.
      */
    public net.lightapi.portal.market.ConfigCreatedEvent.Builder clearClassPath() {
      classPath = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /**
      * Gets the value of the 'configDesc' field.
      * configuration description
      * @return The value.
      */
    public java.lang.String getConfigDesc() {
      return configDesc;
    }


    /**
      * Sets the value of the 'configDesc' field.
      * configuration description
      * @param value The value of 'configDesc'.
      * @return This builder.
      */
    public net.lightapi.portal.market.ConfigCreatedEvent.Builder setConfigDesc(java.lang.String value) {
      validate(fields()[5], value);
      this.configDesc = value;
      fieldSetFlags()[5] = true;
      return this;
    }

    /**
      * Checks whether the 'configDesc' field has been set.
      * configuration description
      * @return True if the 'configDesc' field has been set, false otherwise.
      */
    public boolean hasConfigDesc() {
      return fieldSetFlags()[5];
    }


    /**
      * Clears the value of the 'configDesc' field.
      * configuration description
      * @return This builder.
      */
    public net.lightapi.portal.market.ConfigCreatedEvent.Builder clearConfigDesc() {
      configDesc = null;
      fieldSetFlags()[5] = false;
      return this;
    }

    /**
      * Gets the value of the 'owner' field.
      * user id
      * @return The value.
      */
    public java.lang.String getOwner() {
      return owner;
    }


    /**
      * Sets the value of the 'owner' field.
      * user id
      * @param value The value of 'owner'.
      * @return This builder.
      */
    public net.lightapi.portal.market.ConfigCreatedEvent.Builder setOwner(java.lang.String value) {
      validate(fields()[6], value);
      this.owner = value;
      fieldSetFlags()[6] = true;
      return this;
    }

    /**
      * Checks whether the 'owner' field has been set.
      * user id
      * @return True if the 'owner' field has been set, false otherwise.
      */
    public boolean hasOwner() {
      return fieldSetFlags()[6];
    }


    /**
      * Clears the value of the 'owner' field.
      * user id
      * @return This builder.
      */
    public net.lightapi.portal.market.ConfigCreatedEvent.Builder clearOwner() {
      owner = null;
      fieldSetFlags()[6] = 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.market.ConfigCreatedEvent.Builder setTimestamp(long value) {
      validate(fields()[7], value);
      this.timestamp = value;
      fieldSetFlags()[7] = 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()[7];
    }


    /**
      * Clears the value of the 'timestamp' field.
      * time the event is recorded
      * @return This builder.
      */
    public net.lightapi.portal.market.ConfigCreatedEvent.Builder clearTimestamp() {
      fieldSetFlags()[7] = false;
      return this;
    }

    @Override
    @SuppressWarnings("unchecked")
    public ConfigCreatedEvent build() {
      try {
        ConfigCreatedEvent record = new ConfigCreatedEvent();
        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.configId = fieldSetFlags()[1] ? this.configId : (java.lang.String) defaultValue(fields()[1]);
        record.configType = fieldSetFlags()[2] ? this.configType : (java.lang.String) defaultValue(fields()[2]);
        record.infraType = fieldSetFlags()[3] ? this.infraType : (java.lang.String) defaultValue(fields()[3]);
        record.classPath = fieldSetFlags()[4] ? this.classPath : (java.lang.String) defaultValue(fields()[4]);
        record.configDesc = fieldSetFlags()[5] ? this.configDesc : (java.lang.String) defaultValue(fields()[5]);
        record.owner = fieldSetFlags()[6] ? this.owner : (java.lang.String) defaultValue(fields()[6]);
        record.timestamp = fieldSetFlags()[7] ? this.timestamp : (java.lang.Long) defaultValue(fields()[7]);
        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.configId);

    out.writeString(this.configType);

    out.writeString(this.infraType);

    out.writeString(this.classPath);

    out.writeString(this.configDesc);

    out.writeString(this.owner);

    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.configId = in.readString();

      this.configType = in.readString();

      this.infraType = in.readString();

      this.classPath = in.readString();

      this.configDesc = in.readString();

      this.owner = in.readString();

      this.timestamp = in.readLong();

    } else {
      for (int i = 0; i < 8; 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.configId = in.readString();
          break;

        case 2:
          this.configType = in.readString();
          break;

        case 3:
          this.infraType = in.readString();
          break;

        case 4:
          this.classPath = in.readString();
          break;

        case 5:
          this.configDesc = in.readString();
          break;

        case 6:
          this.owner = in.readString();
          break;

        case 7:
          this.timestamp = in.readLong();
          break;

        default:
          throw new java.io.IOException("Corrupt ResolvingDecoder.");
        }
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy