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

com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing Maven / Gradle / Ivy

There is a newer version: 4.1.2
Show newest version
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package com.cerner.beadledom.resteasy.fauxservice.fauxmodels;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class PointlessThing 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\":\"PointlessThing\",\"namespace\":\"com.cerner.beadledom.resteasy.fauxservice.fauxmodels\",\"fields\":[{\"name\":\"text\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"When you gaze long into an abyss, the abyss also gazes into you.\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** When you gaze long into an abyss, the abyss also gazes into you. */
  @Deprecated public java.lang.String text;

  /**
   * Default constructor.  Note that this does not initialize fields
   * to their default values from the schema.  If that is desired then
   * one should use {@link \#newBuilder()}. 
   */
  public PointlessThing() {}

  /**
   * All-args constructor.
   */
  public PointlessThing(java.lang.String text) {
    this.text = text;
  }

  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 text;
    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: text = (java.lang.String)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'text' field.
   * When you gaze long into an abyss, the abyss also gazes into you.   */
  public java.lang.String getText() {
    return text;
  }

  /**
   * Sets the value of the 'text' field.
   * When you gaze long into an abyss, the abyss also gazes into you.   * @param value the value to set.
   */
  public void setText(java.lang.String value) {
    this.text = value;
  }

  /** Creates a new PointlessThing RecordBuilder */
  public static com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing.Builder newBuilder() {
    return new com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing.Builder();
  }
  
  /** Creates a new PointlessThing RecordBuilder by copying an existing Builder */
  public static com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing.Builder newBuilder(com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing.Builder other) {
    return new com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing.Builder(other);
  }
  
  /** Creates a new PointlessThing RecordBuilder by copying an existing PointlessThing instance */
  public static com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing.Builder newBuilder(com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing other) {
    return new com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing.Builder(other);
  }
  
  /**
   * RecordBuilder for PointlessThing instances.
   */
  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
    implements org.apache.avro.data.RecordBuilder {

    private java.lang.String text;

    /** Creates a new Builder */
    private Builder() {
      super(com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.text)) {
        this.text = data().deepCopy(fields()[0].schema(), other.text);
        fieldSetFlags()[0] = true;
      }
    }
    
    /** Creates a Builder by copying an existing PointlessThing instance */
    private Builder(com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing other) {
            super(com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing.SCHEMA$);
      if (isValidValue(fields()[0], other.text)) {
        this.text = data().deepCopy(fields()[0].schema(), other.text);
        fieldSetFlags()[0] = true;
      }
    }

    /** Gets the value of the 'text' field */
    public java.lang.String getText() {
      return text;
    }
    
    /** Sets the value of the 'text' field */
    public com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing.Builder setText(java.lang.String value) {
      validate(fields()[0], value);
      this.text = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'text' field has been set */
    public boolean hasText() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'text' field */
    public com.cerner.beadledom.resteasy.fauxservice.fauxmodels.PointlessThing.Builder clearText() {
      text = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    @Override
    public PointlessThing build() {
      try {
        PointlessThing record = new PointlessThing();
        record.text = fieldSetFlags()[0] ? this.text : (java.lang.String) defaultValue(fields()[0]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy