// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: integration-tests/testsuite/src/test/resources/serdes/testmessage.proto

package io.apicurio.tests.protobuf;

/**
 * Protobuf type {@code io.apicurio.tests.protobuf.ProtobufTestMessage}
 */
public final class ProtobufTestMessage extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:io.apicurio.tests.protobuf.ProtobufTestMessage)
        ProtobufTestMessageOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ProtobufTestMessage.newBuilder() to construct.
  private ProtobufTestMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private ProtobufTestMessage() {
    s1_ = "";
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new ProtobufTestMessage();
  }

  @Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private ProtobufTestMessage(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new NullPointerException();
    }
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            Header.Builder subBuilder = null;
            if (header_ != null) {
              subBuilder = header_.toBuilder();
            }
            header_ = input.readMessage(Header.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(header_);
              header_ = subBuilder.buildPartial();
            }

            break;
          }
          case 17: {

            d1_ = input.readDouble();
            break;
          }
          case 34: {
            String s = input.readStringRequireUtf8();

            s1_ = s;
            break;
          }
          case 56: {

            i1_ = input.readInt32();
            break;
          }
          case 96: {

            bi1_ = input.readInt64();
            break;
          }
          case 178: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (stateTime_ != null) {
              subBuilder = stateTime_.toBuilder();
            }
            stateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(stateTime_);
              stateTime_ = subBuilder.buildPartial();
            }

            break;
          }
          case 242: {
            io.apicurio.tests.protobuf.Point.Builder subBuilder = null;
            if (point_ != null) {
              subBuilder = point_.toBuilder();
            }
            point_ = input.readMessage(io.apicurio.tests.protobuf.Point.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(point_);
              point_ = subBuilder.buildPartial();
            }

            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return Testmessage.internal_static_io_apicurio_tests_protobuf_ProtobufTestMessage_descriptor;
  }

  @Override
  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return Testmessage.internal_static_io_apicurio_tests_protobuf_ProtobufTestMessage_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            ProtobufTestMessage.class, Builder.class);
  }

  public static final int HEADER_FIELD_NUMBER = 1;
  private Header header_;
  /**
   * <code>.io.apicurio.tests.protobuf.Header header = 1;</code>
   * @return Whether the header field is set.
   */
  @Override
  public boolean hasHeader() {
    return header_ != null;
  }
  /**
   * <code>.io.apicurio.tests.protobuf.Header header = 1;</code>
   * @return The header.
   */
  @Override
  public Header getHeader() {
    return header_ == null ? Header.getDefaultInstance() : header_;
  }
  /**
   * <code>.io.apicurio.tests.protobuf.Header header = 1;</code>
   */
  @Override
  public io.apicurio.tests.protobuf.HeaderOrBuilder getHeaderOrBuilder() {
    return getHeader();
  }

  public static final int D1_FIELD_NUMBER = 2;
  private double d1_;
  /**
   * <code>double d1 = 2;</code>
   * @return The d1.
   */
  @Override
  public double getD1() {
    return d1_;
  }

  public static final int S1_FIELD_NUMBER = 4;
  private volatile Object s1_;
  /**
   * <code>string s1 = 4;</code>
   * @return The s1.
   */
  @Override
  public String getS1() {
    Object ref = s1_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      s1_ = s;
      return s;
    }
  }
  /**
   * <code>string s1 = 4;</code>
   * @return The bytes for s1.
   */
  @Override
  public com.google.protobuf.ByteString
      getS1Bytes() {
    Object ref = s1_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      s1_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int I1_FIELD_NUMBER = 7;
  private int i1_;
  /**
   * <code>int32 i1 = 7;</code>
   * @return The i1.
   */
  @Override
  public int getI1() {
    return i1_;
  }

  public static final int BI1_FIELD_NUMBER = 12;
  private long bi1_;
  /**
   * <code>int64 bi1 = 12;</code>
   * @return The bi1.
   */
  @Override
  public long getBi1() {
    return bi1_;
  }

  public static final int STATE_TIME_FIELD_NUMBER = 22;
  private com.google.protobuf.Timestamp stateTime_;
  /**
   * <code>.google.protobuf.Timestamp state_time = 22;</code>
   * @return Whether the stateTime field is set.
   */
  @Override
  public boolean hasStateTime() {
    return stateTime_ != null;
  }
  /**
   * <code>.google.protobuf.Timestamp state_time = 22;</code>
   * @return The stateTime.
   */
  @Override
  public com.google.protobuf.Timestamp getStateTime() {
    return stateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : stateTime_;
  }
  /**
   * <code>.google.protobuf.Timestamp state_time = 22;</code>
   */
  @Override
  public com.google.protobuf.TimestampOrBuilder getStateTimeOrBuilder() {
    return getStateTime();
  }

  public static final int POINT_FIELD_NUMBER = 30;
  private io.apicurio.tests.protobuf.Point point_;
  /**
   * <code>.io.apicurio.tests.protobuf.Point point = 30;</code>
   * @return Whether the point field is set.
   */
  @Override
  public boolean hasPoint() {
    return point_ != null;
  }
  /**
   * <code>.io.apicurio.tests.protobuf.Point point = 30;</code>
   * @return The point.
   */
  @Override
  public io.apicurio.tests.protobuf.Point getPoint() {
    return point_ == null ? io.apicurio.tests.protobuf.Point.getDefaultInstance() : point_;
  }
  /**
   * <code>.io.apicurio.tests.protobuf.Point point = 30;</code>
   */
  @Override
  public io.apicurio.tests.protobuf.PointOrBuilder getPointOrBuilder() {
    return getPoint();
  }

  private byte memoizedIsInitialized = -1;
  @Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (header_ != null) {
      output.writeMessage(1, getHeader());
    }
    if (d1_ != 0D) {
      output.writeDouble(2, d1_);
    }
    if (!getS1Bytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, s1_);
    }
    if (i1_ != 0) {
      output.writeInt32(7, i1_);
    }
    if (bi1_ != 0L) {
      output.writeInt64(12, bi1_);
    }
    if (stateTime_ != null) {
      output.writeMessage(22, getStateTime());
    }
    if (point_ != null) {
      output.writeMessage(30, getPoint());
    }
    unknownFields.writeTo(output);
  }

  @Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (header_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getHeader());
    }
    if (d1_ != 0D) {
      size += com.google.protobuf.CodedOutputStream
        .computeDoubleSize(2, d1_);
    }
    if (!getS1Bytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, s1_);
    }
    if (i1_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(7, i1_);
    }
    if (bi1_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(12, bi1_);
    }
    if (stateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(22, getStateTime());
    }
    if (point_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(30, getPoint());
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof ProtobufTestMessage)) {
      return super.equals(obj);
    }
    ProtobufTestMessage other = (ProtobufTestMessage) obj;

    if (hasHeader() != other.hasHeader()) return false;
    if (hasHeader()) {
      if (!getHeader()
          .equals(other.getHeader())) return false;
    }
    if (Double.doubleToLongBits(getD1())
        != Double.doubleToLongBits(
            other.getD1())) return false;
    if (!getS1()
        .equals(other.getS1())) return false;
    if (getI1()
        != other.getI1()) return false;
    if (getBi1()
        != other.getBi1()) return false;
    if (hasStateTime() != other.hasStateTime()) return false;
    if (hasStateTime()) {
      if (!getStateTime()
          .equals(other.getStateTime())) return false;
    }
    if (hasPoint() != other.hasPoint()) return false;
    if (hasPoint()) {
      if (!getPoint()
          .equals(other.getPoint())) return false;
    }
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasHeader()) {
      hash = (37 * hash) + HEADER_FIELD_NUMBER;
      hash = (53 * hash) + getHeader().hashCode();
    }
    hash = (37 * hash) + D1_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        Double.doubleToLongBits(getD1()));
    hash = (37 * hash) + S1_FIELD_NUMBER;
    hash = (53 * hash) + getS1().hashCode();
    hash = (37 * hash) + I1_FIELD_NUMBER;
    hash = (53 * hash) + getI1();
    hash = (37 * hash) + BI1_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getBi1());
    if (hasStateTime()) {
      hash = (37 * hash) + STATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getStateTime().hashCode();
    }
    if (hasPoint()) {
      hash = (37 * hash) + POINT_FIELD_NUMBER;
      hash = (53 * hash) + getPoint().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static ProtobufTestMessage parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static ProtobufTestMessage parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static ProtobufTestMessage parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static ProtobufTestMessage parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static ProtobufTestMessage parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static ProtobufTestMessage parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static ProtobufTestMessage parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static ProtobufTestMessage parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static ProtobufTestMessage parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static ProtobufTestMessage parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static ProtobufTestMessage parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static ProtobufTestMessage parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(ProtobufTestMessage prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code io.apicurio.tests.protobuf.ProtobufTestMessage}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:io.apicurio.tests.protobuf.ProtobufTestMessage)
      ProtobufTestMessageOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return Testmessage.internal_static_io_apicurio_tests_protobuf_ProtobufTestMessage_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return Testmessage.internal_static_io_apicurio_tests_protobuf_ProtobufTestMessage_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ProtobufTestMessage.class, Builder.class);
    }

    // Construct using io.apicurio.tests.protobuf.ProtobufTestMessage.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @Override
    public Builder clear() {
      super.clear();
      if (headerBuilder_ == null) {
        header_ = null;
      } else {
        header_ = null;
        headerBuilder_ = null;
      }
      d1_ = 0D;

      s1_ = "";

      i1_ = 0;

      bi1_ = 0L;

      if (stateTimeBuilder_ == null) {
        stateTime_ = null;
      } else {
        stateTime_ = null;
        stateTimeBuilder_ = null;
      }
      if (pointBuilder_ == null) {
        point_ = null;
      } else {
        point_ = null;
        pointBuilder_ = null;
      }
      return this;
    }

    @Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return Testmessage.internal_static_io_apicurio_tests_protobuf_ProtobufTestMessage_descriptor;
    }

    @Override
    public ProtobufTestMessage getDefaultInstanceForType() {
      return ProtobufTestMessage.getDefaultInstance();
    }

    @Override
    public ProtobufTestMessage build() {
      ProtobufTestMessage result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public ProtobufTestMessage buildPartial() {
      ProtobufTestMessage result = new ProtobufTestMessage(this);
      if (headerBuilder_ == null) {
        result.header_ = header_;
      } else {
        result.header_ = headerBuilder_.build();
      }
      result.d1_ = d1_;
      result.s1_ = s1_;
      result.i1_ = i1_;
      result.bi1_ = bi1_;
      if (stateTimeBuilder_ == null) {
        result.stateTime_ = stateTime_;
      } else {
        result.stateTime_ = stateTimeBuilder_.build();
      }
      if (pointBuilder_ == null) {
        result.point_ = point_;
      } else {
        result.point_ = pointBuilder_.build();
      }
      onBuilt();
      return result;
    }

    @Override
    public Builder clone() {
      return super.clone();
    }
    @Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.setField(field, value);
    }
    @Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.addRepeatedField(field, value);
    }
    @Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof ProtobufTestMessage) {
        return mergeFrom((ProtobufTestMessage)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(ProtobufTestMessage other) {
      if (other == ProtobufTestMessage.getDefaultInstance()) return this;
      if (other.hasHeader()) {
        mergeHeader(other.getHeader());
      }
      if (other.getD1() != 0D) {
        setD1(other.getD1());
      }
      if (!other.getS1().isEmpty()) {
        s1_ = other.s1_;
        onChanged();
      }
      if (other.getI1() != 0) {
        setI1(other.getI1());
      }
      if (other.getBi1() != 0L) {
        setBi1(other.getBi1());
      }
      if (other.hasStateTime()) {
        mergeStateTime(other.getStateTime());
      }
      if (other.hasPoint()) {
        mergePoint(other.getPoint());
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @Override
    public final boolean isInitialized() {
      return true;
    }

    @Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      ProtobufTestMessage parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (ProtobufTestMessage) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private Header header_;
    private com.google.protobuf.SingleFieldBuilderV3<
        Header, Header.Builder, io.apicurio.tests.protobuf.HeaderOrBuilder> headerBuilder_;
    /**
     * <code>.io.apicurio.tests.protobuf.Header header = 1;</code>
     * @return Whether the header field is set.
     */
    public boolean hasHeader() {
      return headerBuilder_ != null || header_ != null;
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Header header = 1;</code>
     * @return The header.
     */
    public Header getHeader() {
      if (headerBuilder_ == null) {
        return header_ == null ? Header.getDefaultInstance() : header_;
      } else {
        return headerBuilder_.getMessage();
      }
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Header header = 1;</code>
     */
    public Builder setHeader(Header value) {
      if (headerBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        header_ = value;
        onChanged();
      } else {
        headerBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Header header = 1;</code>
     */
    public Builder setHeader(
        Header.Builder builderForValue) {
      if (headerBuilder_ == null) {
        header_ = builderForValue.build();
        onChanged();
      } else {
        headerBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Header header = 1;</code>
     */
    public Builder mergeHeader(Header value) {
      if (headerBuilder_ == null) {
        if (header_ != null) {
          header_ =
            Header.newBuilder(header_).mergeFrom(value).buildPartial();
        } else {
          header_ = value;
        }
        onChanged();
      } else {
        headerBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Header header = 1;</code>
     */
    public Builder clearHeader() {
      if (headerBuilder_ == null) {
        header_ = null;
        onChanged();
      } else {
        header_ = null;
        headerBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Header header = 1;</code>
     */
    public Header.Builder getHeaderBuilder() {
      
      onChanged();
      return getHeaderFieldBuilder().getBuilder();
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Header header = 1;</code>
     */
    public io.apicurio.tests.protobuf.HeaderOrBuilder getHeaderOrBuilder() {
      if (headerBuilder_ != null) {
        return headerBuilder_.getMessageOrBuilder();
      } else {
        return header_ == null ?
            Header.getDefaultInstance() : header_;
      }
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Header header = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        Header, Header.Builder, io.apicurio.tests.protobuf.HeaderOrBuilder>
        getHeaderFieldBuilder() {
      if (headerBuilder_ == null) {
        headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            Header, Header.Builder, io.apicurio.tests.protobuf.HeaderOrBuilder>(
                getHeader(),
                getParentForChildren(),
                isClean());
        header_ = null;
      }
      return headerBuilder_;
    }

    private double d1_ ;
    /**
     * <code>double d1 = 2;</code>
     * @return The d1.
     */
    @Override
    public double getD1() {
      return d1_;
    }
    /**
     * <code>double d1 = 2;</code>
     * @param value The d1 to set.
     * @return This builder for chaining.
     */
    public Builder setD1(double value) {
      
      d1_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>double d1 = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearD1() {
      
      d1_ = 0D;
      onChanged();
      return this;
    }

    private Object s1_ = "";
    /**
     * <code>string s1 = 4;</code>
     * @return The s1.
     */
    public String getS1() {
      Object ref = s1_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        s1_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string s1 = 4;</code>
     * @return The bytes for s1.
     */
    public com.google.protobuf.ByteString
        getS1Bytes() {
      Object ref = s1_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        s1_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string s1 = 4;</code>
     * @param value The s1 to set.
     * @return This builder for chaining.
     */
    public Builder setS1(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      s1_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string s1 = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearS1() {
      
      s1_ = getDefaultInstance().getS1();
      onChanged();
      return this;
    }
    /**
     * <code>string s1 = 4;</code>
     * @param value The bytes for s1 to set.
     * @return This builder for chaining.
     */
    public Builder setS1Bytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      s1_ = value;
      onChanged();
      return this;
    }

    private int i1_ ;
    /**
     * <code>int32 i1 = 7;</code>
     * @return The i1.
     */
    @Override
    public int getI1() {
      return i1_;
    }
    /**
     * <code>int32 i1 = 7;</code>
     * @param value The i1 to set.
     * @return This builder for chaining.
     */
    public Builder setI1(int value) {
      
      i1_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 i1 = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearI1() {
      
      i1_ = 0;
      onChanged();
      return this;
    }

    private long bi1_ ;
    /**
     * <code>int64 bi1 = 12;</code>
     * @return The bi1.
     */
    @Override
    public long getBi1() {
      return bi1_;
    }
    /**
     * <code>int64 bi1 = 12;</code>
     * @param value The bi1 to set.
     * @return This builder for chaining.
     */
    public Builder setBi1(long value) {
      
      bi1_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int64 bi1 = 12;</code>
     * @return This builder for chaining.
     */
    public Builder clearBi1() {
      
      bi1_ = 0L;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp stateTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> stateTimeBuilder_;
    /**
     * <code>.google.protobuf.Timestamp state_time = 22;</code>
     * @return Whether the stateTime field is set.
     */
    public boolean hasStateTime() {
      return stateTimeBuilder_ != null || stateTime_ != null;
    }
    /**
     * <code>.google.protobuf.Timestamp state_time = 22;</code>
     * @return The stateTime.
     */
    public com.google.protobuf.Timestamp getStateTime() {
      if (stateTimeBuilder_ == null) {
        return stateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : stateTime_;
      } else {
        return stateTimeBuilder_.getMessage();
      }
    }
    /**
     * <code>.google.protobuf.Timestamp state_time = 22;</code>
     */
    public Builder setStateTime(com.google.protobuf.Timestamp value) {
      if (stateTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        stateTime_ = value;
        onChanged();
      } else {
        stateTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.google.protobuf.Timestamp state_time = 22;</code>
     */
    public Builder setStateTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      if (stateTimeBuilder_ == null) {
        stateTime_ = builderForValue.build();
        onChanged();
      } else {
        stateTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.google.protobuf.Timestamp state_time = 22;</code>
     */
    public Builder mergeStateTime(com.google.protobuf.Timestamp value) {
      if (stateTimeBuilder_ == null) {
        if (stateTime_ != null) {
          stateTime_ =
            com.google.protobuf.Timestamp.newBuilder(stateTime_).mergeFrom(value).buildPartial();
        } else {
          stateTime_ = value;
        }
        onChanged();
      } else {
        stateTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.google.protobuf.Timestamp state_time = 22;</code>
     */
    public Builder clearStateTime() {
      if (stateTimeBuilder_ == null) {
        stateTime_ = null;
        onChanged();
      } else {
        stateTime_ = null;
        stateTimeBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.google.protobuf.Timestamp state_time = 22;</code>
     */
    public com.google.protobuf.Timestamp.Builder getStateTimeBuilder() {
      
      onChanged();
      return getStateTimeFieldBuilder().getBuilder();
    }
    /**
     * <code>.google.protobuf.Timestamp state_time = 22;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getStateTimeOrBuilder() {
      if (stateTimeBuilder_ != null) {
        return stateTimeBuilder_.getMessageOrBuilder();
      } else {
        return stateTime_ == null ?
            com.google.protobuf.Timestamp.getDefaultInstance() : stateTime_;
      }
    }
    /**
     * <code>.google.protobuf.Timestamp state_time = 22;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 
        getStateTimeFieldBuilder() {
      if (stateTimeBuilder_ == null) {
        stateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                getStateTime(),
                getParentForChildren(),
                isClean());
        stateTime_ = null;
      }
      return stateTimeBuilder_;
    }

    private io.apicurio.tests.protobuf.Point point_;
    private com.google.protobuf.SingleFieldBuilderV3<
        io.apicurio.tests.protobuf.Point, io.apicurio.tests.protobuf.Point.Builder, io.apicurio.tests.protobuf.PointOrBuilder> pointBuilder_;
    /**
     * <code>.io.apicurio.tests.protobuf.Point point = 30;</code>
     * @return Whether the point field is set.
     */
    public boolean hasPoint() {
      return pointBuilder_ != null || point_ != null;
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Point point = 30;</code>
     * @return The point.
     */
    public io.apicurio.tests.protobuf.Point getPoint() {
      if (pointBuilder_ == null) {
        return point_ == null ? io.apicurio.tests.protobuf.Point.getDefaultInstance() : point_;
      } else {
        return pointBuilder_.getMessage();
      }
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Point point = 30;</code>
     */
    public Builder setPoint(io.apicurio.tests.protobuf.Point value) {
      if (pointBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        point_ = value;
        onChanged();
      } else {
        pointBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Point point = 30;</code>
     */
    public Builder setPoint(
        io.apicurio.tests.protobuf.Point.Builder builderForValue) {
      if (pointBuilder_ == null) {
        point_ = builderForValue.build();
        onChanged();
      } else {
        pointBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Point point = 30;</code>
     */
    public Builder mergePoint(io.apicurio.tests.protobuf.Point value) {
      if (pointBuilder_ == null) {
        if (point_ != null) {
          point_ =
            io.apicurio.tests.protobuf.Point.newBuilder(point_).mergeFrom(value).buildPartial();
        } else {
          point_ = value;
        }
        onChanged();
      } else {
        pointBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Point point = 30;</code>
     */
    public Builder clearPoint() {
      if (pointBuilder_ == null) {
        point_ = null;
        onChanged();
      } else {
        point_ = null;
        pointBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Point point = 30;</code>
     */
    public io.apicurio.tests.protobuf.Point.Builder getPointBuilder() {
      
      onChanged();
      return getPointFieldBuilder().getBuilder();
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Point point = 30;</code>
     */
    public io.apicurio.tests.protobuf.PointOrBuilder getPointOrBuilder() {
      if (pointBuilder_ != null) {
        return pointBuilder_.getMessageOrBuilder();
      } else {
        return point_ == null ?
            io.apicurio.tests.protobuf.Point.getDefaultInstance() : point_;
      }
    }
    /**
     * <code>.io.apicurio.tests.protobuf.Point point = 30;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.apicurio.tests.protobuf.Point, io.apicurio.tests.protobuf.Point.Builder, io.apicurio.tests.protobuf.PointOrBuilder> 
        getPointFieldBuilder() {
      if (pointBuilder_ == null) {
        pointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.apicurio.tests.protobuf.Point, io.apicurio.tests.protobuf.Point.Builder, io.apicurio.tests.protobuf.PointOrBuilder>(
                getPoint(),
                getParentForChildren(),
                isClean());
        point_ = null;
      }
      return pointBuilder_;
    }
    @Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:io.apicurio.tests.protobuf.ProtobufTestMessage)
  }

  // @@protoc_insertion_point(class_scope:io.apicurio.tests.protobuf.ProtobufTestMessage)
  private static final ProtobufTestMessage DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new ProtobufTestMessage();
  }

  public static ProtobufTestMessage getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ProtobufTestMessage>
      PARSER = new com.google.protobuf.AbstractParser<ProtobufTestMessage>() {
    @Override
    public ProtobufTestMessage parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new ProtobufTestMessage(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<ProtobufTestMessage> parser() {
    return PARSER;
  }

  @Override
  public com.google.protobuf.Parser<ProtobufTestMessage> getParserForType() {
    return PARSER;
  }

  @Override
  public ProtobufTestMessage getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

