// 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.Header}
 */
public final class Header extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:io.apicurio.tests.protobuf.Header)
    HeaderOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Header.newBuilder() to construct.
  private Header(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private Header() {
    source_ = "";
    destination_ = "";
    uuid_ = "";
    sourceUuids_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    messageTypeId_ = "";
    rawMessage_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new Header();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private Header(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    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: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (time_ != null) {
              subBuilder = time_.toBuilder();
            }
            time_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(time_);
              time_ = subBuilder.buildPartial();
            }

            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();

            source_ = s;
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();

            destination_ = s;
            break;
          }
          case 34: {
            java.lang.String s = input.readStringRequireUtf8();

            uuid_ = s;
            break;
          }
          case 42: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              sourceUuids_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000001;
            }
            sourceUuids_.add(s);
            break;
          }
          case 50: {
            java.lang.String s = input.readStringRequireUtf8();

            messageTypeId_ = s;
            break;
          }
          case 58: {
            java.lang.String s = input.readStringRequireUtf8();

            rawMessage_ = s;
            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 {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        sourceUuids_ = sourceUuids_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.apicurio.tests.protobuf.Testmessage.internal_static_io_apicurio_tests_protobuf_Header_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.apicurio.tests.protobuf.Testmessage.internal_static_io_apicurio_tests_protobuf_Header_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.apicurio.tests.protobuf.Header.class, io.apicurio.tests.protobuf.Header.Builder.class);
  }

  public static final int TIME_FIELD_NUMBER = 1;
  private com.google.protobuf.Timestamp time_;
  /**
   * <code>.google.protobuf.Timestamp time = 1;</code>
   * @return Whether the time field is set.
   */
  @java.lang.Override
  public boolean hasTime() {
    return time_ != null;
  }
  /**
   * <code>.google.protobuf.Timestamp time = 1;</code>
   * @return The time.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getTime() {
    return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_;
  }
  /**
   * <code>.google.protobuf.Timestamp time = 1;</code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() {
    return getTime();
  }

  public static final int SOURCE_FIELD_NUMBER = 2;
  private volatile java.lang.Object source_;
  /**
   * <code>string source = 2;</code>
   * @return The source.
   */
  @java.lang.Override
  public java.lang.String getSource() {
    java.lang.Object ref = source_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      source_ = s;
      return s;
    }
  }
  /**
   * <code>string source = 2;</code>
   * @return The bytes for source.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getSourceBytes() {
    java.lang.Object ref = source_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      source_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DESTINATION_FIELD_NUMBER = 3;
  private volatile java.lang.Object destination_;
  /**
   * <code>string destination = 3;</code>
   * @return The destination.
   */
  @java.lang.Override
  public java.lang.String getDestination() {
    java.lang.Object ref = destination_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      destination_ = s;
      return s;
    }
  }
  /**
   * <code>string destination = 3;</code>
   * @return The bytes for destination.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getDestinationBytes() {
    java.lang.Object ref = destination_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      destination_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int UUID_FIELD_NUMBER = 4;
  private volatile java.lang.Object uuid_;
  /**
   * <code>string uuid = 4;</code>
   * @return The uuid.
   */
  @java.lang.Override
  public java.lang.String getUuid() {
    java.lang.Object ref = uuid_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      uuid_ = s;
      return s;
    }
  }
  /**
   * <code>string uuid = 4;</code>
   * @return The bytes for uuid.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getUuidBytes() {
    java.lang.Object ref = uuid_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      uuid_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SOURCE_UUIDS_FIELD_NUMBER = 5;
  private com.google.protobuf.LazyStringList sourceUuids_;
  /**
   * <code>repeated string source_uuids = 5;</code>
   * @return A list containing the sourceUuids.
   */
  public com.google.protobuf.ProtocolStringList
      getSourceUuidsList() {
    return sourceUuids_;
  }
  /**
   * <code>repeated string source_uuids = 5;</code>
   * @return The count of sourceUuids.
   */
  public int getSourceUuidsCount() {
    return sourceUuids_.size();
  }
  /**
   * <code>repeated string source_uuids = 5;</code>
   * @param index The index of the element to return.
   * @return The sourceUuids at the given index.
   */
  public java.lang.String getSourceUuids(int index) {
    return sourceUuids_.get(index);
  }
  /**
   * <code>repeated string source_uuids = 5;</code>
   * @param index The index of the value to return.
   * @return The bytes of the sourceUuids at the given index.
   */
  public com.google.protobuf.ByteString
      getSourceUuidsBytes(int index) {
    return sourceUuids_.getByteString(index);
  }

  public static final int MESSAGE_TYPE_ID_FIELD_NUMBER = 6;
  private volatile java.lang.Object messageTypeId_;
  /**
   * <code>string message_type_id = 6;</code>
   * @return The messageTypeId.
   */
  @java.lang.Override
  public java.lang.String getMessageTypeId() {
    java.lang.Object ref = messageTypeId_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      messageTypeId_ = s;
      return s;
    }
  }
  /**
   * <code>string message_type_id = 6;</code>
   * @return The bytes for messageTypeId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getMessageTypeIdBytes() {
    java.lang.Object ref = messageTypeId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      messageTypeId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int RAW_MESSAGE_FIELD_NUMBER = 7;
  private volatile java.lang.Object rawMessage_;
  /**
   * <code>string raw_message = 7;</code>
   * @return The rawMessage.
   */
  @java.lang.Override
  public java.lang.String getRawMessage() {
    java.lang.Object ref = rawMessage_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      rawMessage_ = s;
      return s;
    }
  }
  /**
   * <code>string raw_message = 7;</code>
   * @return The bytes for rawMessage.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getRawMessageBytes() {
    java.lang.Object ref = rawMessage_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      rawMessage_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (time_ != null) {
      output.writeMessage(1, getTime());
    }
    if (!getSourceBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_);
    }
    if (!getDestinationBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, destination_);
    }
    if (!getUuidBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, uuid_);
    }
    for (int i = 0; i < sourceUuids_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, sourceUuids_.getRaw(i));
    }
    if (!getMessageTypeIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, messageTypeId_);
    }
    if (!getRawMessageBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, rawMessage_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (time_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getTime());
    }
    if (!getSourceBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_);
    }
    if (!getDestinationBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, destination_);
    }
    if (!getUuidBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, uuid_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < sourceUuids_.size(); i++) {
        dataSize += computeStringSizeNoTag(sourceUuids_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getSourceUuidsList().size();
    }
    if (!getMessageTypeIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, messageTypeId_);
    }
    if (!getRawMessageBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, rawMessage_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof io.apicurio.tests.protobuf.Header)) {
      return super.equals(obj);
    }
    io.apicurio.tests.protobuf.Header other = (io.apicurio.tests.protobuf.Header) obj;

    if (hasTime() != other.hasTime()) return false;
    if (hasTime()) {
      if (!getTime()
          .equals(other.getTime())) return false;
    }
    if (!getSource()
        .equals(other.getSource())) return false;
    if (!getDestination()
        .equals(other.getDestination())) return false;
    if (!getUuid()
        .equals(other.getUuid())) return false;
    if (!getSourceUuidsList()
        .equals(other.getSourceUuidsList())) return false;
    if (!getMessageTypeId()
        .equals(other.getMessageTypeId())) return false;
    if (!getRawMessage()
        .equals(other.getRawMessage())) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasTime()) {
      hash = (37 * hash) + TIME_FIELD_NUMBER;
      hash = (53 * hash) + getTime().hashCode();
    }
    hash = (37 * hash) + SOURCE_FIELD_NUMBER;
    hash = (53 * hash) + getSource().hashCode();
    hash = (37 * hash) + DESTINATION_FIELD_NUMBER;
    hash = (53 * hash) + getDestination().hashCode();
    hash = (37 * hash) + UUID_FIELD_NUMBER;
    hash = (53 * hash) + getUuid().hashCode();
    if (getSourceUuidsCount() > 0) {
      hash = (37 * hash) + SOURCE_UUIDS_FIELD_NUMBER;
      hash = (53 * hash) + getSourceUuidsList().hashCode();
    }
    hash = (37 * hash) + MESSAGE_TYPE_ID_FIELD_NUMBER;
    hash = (53 * hash) + getMessageTypeId().hashCode();
    hash = (37 * hash) + RAW_MESSAGE_FIELD_NUMBER;
    hash = (53 * hash) + getRawMessage().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static io.apicurio.tests.protobuf.Header parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.apicurio.tests.protobuf.Header parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.apicurio.tests.protobuf.Header parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.apicurio.tests.protobuf.Header parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.apicurio.tests.protobuf.Header parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.apicurio.tests.protobuf.Header parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.apicurio.tests.protobuf.Header parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.apicurio.tests.protobuf.Header 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 io.apicurio.tests.protobuf.Header parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static io.apicurio.tests.protobuf.Header 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 io.apicurio.tests.protobuf.Header parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.apicurio.tests.protobuf.Header parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(io.apicurio.tests.protobuf.Header prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

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

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.apicurio.tests.protobuf.Testmessage.internal_static_io_apicurio_tests_protobuf_Header_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.apicurio.tests.protobuf.Header.class, io.apicurio.tests.protobuf.Header.Builder.class);
    }

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

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (timeBuilder_ == null) {
        time_ = null;
      } else {
        time_ = null;
        timeBuilder_ = null;
      }
      source_ = "";

      destination_ = "";

      uuid_ = "";

      sourceUuids_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      messageTypeId_ = "";

      rawMessage_ = "";

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return io.apicurio.tests.protobuf.Testmessage.internal_static_io_apicurio_tests_protobuf_Header_descriptor;
    }

    @java.lang.Override
    public io.apicurio.tests.protobuf.Header getDefaultInstanceForType() {
      return io.apicurio.tests.protobuf.Header.getDefaultInstance();
    }

    @java.lang.Override
    public io.apicurio.tests.protobuf.Header build() {
      io.apicurio.tests.protobuf.Header result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public io.apicurio.tests.protobuf.Header buildPartial() {
      io.apicurio.tests.protobuf.Header result = new io.apicurio.tests.protobuf.Header(this);
      int from_bitField0_ = bitField0_;
      if (timeBuilder_ == null) {
        result.time_ = time_;
      } else {
        result.time_ = timeBuilder_.build();
      }
      result.source_ = source_;
      result.destination_ = destination_;
      result.uuid_ = uuid_;
      if (((bitField0_ & 0x00000001) != 0)) {
        sourceUuids_ = sourceUuids_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000001);
      }
      result.sourceUuids_ = sourceUuids_;
      result.messageTypeId_ = messageTypeId_;
      result.rawMessage_ = rawMessage_;
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(io.apicurio.tests.protobuf.Header other) {
      if (other == io.apicurio.tests.protobuf.Header.getDefaultInstance()) return this;
      if (other.hasTime()) {
        mergeTime(other.getTime());
      }
      if (!other.getSource().isEmpty()) {
        source_ = other.source_;
        onChanged();
      }
      if (!other.getDestination().isEmpty()) {
        destination_ = other.destination_;
        onChanged();
      }
      if (!other.getUuid().isEmpty()) {
        uuid_ = other.uuid_;
        onChanged();
      }
      if (!other.sourceUuids_.isEmpty()) {
        if (sourceUuids_.isEmpty()) {
          sourceUuids_ = other.sourceUuids_;
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          ensureSourceUuidsIsMutable();
          sourceUuids_.addAll(other.sourceUuids_);
        }
        onChanged();
      }
      if (!other.getMessageTypeId().isEmpty()) {
        messageTypeId_ = other.messageTypeId_;
        onChanged();
      }
      if (!other.getRawMessage().isEmpty()) {
        rawMessage_ = other.rawMessage_;
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

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

    private com.google.protobuf.Timestamp time_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timeBuilder_;
    /**
     * <code>.google.protobuf.Timestamp time = 1;</code>
     * @return Whether the time field is set.
     */
    public boolean hasTime() {
      return timeBuilder_ != null || time_ != null;
    }
    /**
     * <code>.google.protobuf.Timestamp time = 1;</code>
     * @return The time.
     */
    public com.google.protobuf.Timestamp getTime() {
      if (timeBuilder_ == null) {
        return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_;
      } else {
        return timeBuilder_.getMessage();
      }
    }
    /**
     * <code>.google.protobuf.Timestamp time = 1;</code>
     */
    public Builder setTime(com.google.protobuf.Timestamp value) {
      if (timeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        time_ = value;
        onChanged();
      } else {
        timeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.google.protobuf.Timestamp time = 1;</code>
     */
    public Builder setTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      if (timeBuilder_ == null) {
        time_ = builderForValue.build();
        onChanged();
      } else {
        timeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.google.protobuf.Timestamp time = 1;</code>
     */
    public Builder mergeTime(com.google.protobuf.Timestamp value) {
      if (timeBuilder_ == null) {
        if (time_ != null) {
          time_ =
            com.google.protobuf.Timestamp.newBuilder(time_).mergeFrom(value).buildPartial();
        } else {
          time_ = value;
        }
        onChanged();
      } else {
        timeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.google.protobuf.Timestamp time = 1;</code>
     */
    public Builder clearTime() {
      if (timeBuilder_ == null) {
        time_ = null;
        onChanged();
      } else {
        time_ = null;
        timeBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.google.protobuf.Timestamp time = 1;</code>
     */
    public com.google.protobuf.Timestamp.Builder getTimeBuilder() {
      
      onChanged();
      return getTimeFieldBuilder().getBuilder();
    }
    /**
     * <code>.google.protobuf.Timestamp time = 1;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() {
      if (timeBuilder_ != null) {
        return timeBuilder_.getMessageOrBuilder();
      } else {
        return time_ == null ?
            com.google.protobuf.Timestamp.getDefaultInstance() : time_;
      }
    }
    /**
     * <code>.google.protobuf.Timestamp time = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 
        getTimeFieldBuilder() {
      if (timeBuilder_ == null) {
        timeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                getTime(),
                getParentForChildren(),
                isClean());
        time_ = null;
      }
      return timeBuilder_;
    }

    private java.lang.Object source_ = "";
    /**
     * <code>string source = 2;</code>
     * @return The source.
     */
    public java.lang.String getSource() {
      java.lang.Object ref = source_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        source_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string source = 2;</code>
     * @return The bytes for source.
     */
    public com.google.protobuf.ByteString
        getSourceBytes() {
      java.lang.Object ref = source_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        source_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string source = 2;</code>
     * @param value The source to set.
     * @return This builder for chaining.
     */
    public Builder setSource(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      source_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string source = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearSource() {
      
      source_ = getDefaultInstance().getSource();
      onChanged();
      return this;
    }
    /**
     * <code>string source = 2;</code>
     * @param value The bytes for source to set.
     * @return This builder for chaining.
     */
    public Builder setSourceBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      source_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object destination_ = "";
    /**
     * <code>string destination = 3;</code>
     * @return The destination.
     */
    public java.lang.String getDestination() {
      java.lang.Object ref = destination_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        destination_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string destination = 3;</code>
     * @return The bytes for destination.
     */
    public com.google.protobuf.ByteString
        getDestinationBytes() {
      java.lang.Object ref = destination_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        destination_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string destination = 3;</code>
     * @param value The destination to set.
     * @return This builder for chaining.
     */
    public Builder setDestination(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      destination_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string destination = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearDestination() {
      
      destination_ = getDefaultInstance().getDestination();
      onChanged();
      return this;
    }
    /**
     * <code>string destination = 3;</code>
     * @param value The bytes for destination to set.
     * @return This builder for chaining.
     */
    public Builder setDestinationBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      destination_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object uuid_ = "";
    /**
     * <code>string uuid = 4;</code>
     * @return The uuid.
     */
    public java.lang.String getUuid() {
      java.lang.Object ref = uuid_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        uuid_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string uuid = 4;</code>
     * @return The bytes for uuid.
     */
    public com.google.protobuf.ByteString
        getUuidBytes() {
      java.lang.Object ref = uuid_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        uuid_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string uuid = 4;</code>
     * @param value The uuid to set.
     * @return This builder for chaining.
     */
    public Builder setUuid(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      uuid_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string uuid = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearUuid() {
      
      uuid_ = getDefaultInstance().getUuid();
      onChanged();
      return this;
    }
    /**
     * <code>string uuid = 4;</code>
     * @param value The bytes for uuid to set.
     * @return This builder for chaining.
     */
    public Builder setUuidBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      uuid_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList sourceUuids_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureSourceUuidsIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        sourceUuids_ = new com.google.protobuf.LazyStringArrayList(sourceUuids_);
        bitField0_ |= 0x00000001;
       }
    }
    /**
     * <code>repeated string source_uuids = 5;</code>
     * @return A list containing the sourceUuids.
     */
    public com.google.protobuf.ProtocolStringList
        getSourceUuidsList() {
      return sourceUuids_.getUnmodifiableView();
    }
    /**
     * <code>repeated string source_uuids = 5;</code>
     * @return The count of sourceUuids.
     */
    public int getSourceUuidsCount() {
      return sourceUuids_.size();
    }
    /**
     * <code>repeated string source_uuids = 5;</code>
     * @param index The index of the element to return.
     * @return The sourceUuids at the given index.
     */
    public java.lang.String getSourceUuids(int index) {
      return sourceUuids_.get(index);
    }
    /**
     * <code>repeated string source_uuids = 5;</code>
     * @param index The index of the value to return.
     * @return The bytes of the sourceUuids at the given index.
     */
    public com.google.protobuf.ByteString
        getSourceUuidsBytes(int index) {
      return sourceUuids_.getByteString(index);
    }
    /**
     * <code>repeated string source_uuids = 5;</code>
     * @param index The index to set the value at.
     * @param value The sourceUuids to set.
     * @return This builder for chaining.
     */
    public Builder setSourceUuids(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureSourceUuidsIsMutable();
      sourceUuids_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <code>repeated string source_uuids = 5;</code>
     * @param value The sourceUuids to add.
     * @return This builder for chaining.
     */
    public Builder addSourceUuids(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureSourceUuidsIsMutable();
      sourceUuids_.add(value);
      onChanged();
      return this;
    }
    /**
     * <code>repeated string source_uuids = 5;</code>
     * @param values The sourceUuids to add.
     * @return This builder for chaining.
     */
    public Builder addAllSourceUuids(
        java.lang.Iterable<java.lang.String> values) {
      ensureSourceUuidsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, sourceUuids_);
      onChanged();
      return this;
    }
    /**
     * <code>repeated string source_uuids = 5;</code>
     * @return This builder for chaining.
     */
    public Builder clearSourceUuids() {
      sourceUuids_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     * <code>repeated string source_uuids = 5;</code>
     * @param value The bytes of the sourceUuids to add.
     * @return This builder for chaining.
     */
    public Builder addSourceUuidsBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureSourceUuidsIsMutable();
      sourceUuids_.add(value);
      onChanged();
      return this;
    }

    private java.lang.Object messageTypeId_ = "";
    /**
     * <code>string message_type_id = 6;</code>
     * @return The messageTypeId.
     */
    public java.lang.String getMessageTypeId() {
      java.lang.Object ref = messageTypeId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        messageTypeId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string message_type_id = 6;</code>
     * @return The bytes for messageTypeId.
     */
    public com.google.protobuf.ByteString
        getMessageTypeIdBytes() {
      java.lang.Object ref = messageTypeId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        messageTypeId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string message_type_id = 6;</code>
     * @param value The messageTypeId to set.
     * @return This builder for chaining.
     */
    public Builder setMessageTypeId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      messageTypeId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string message_type_id = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearMessageTypeId() {
      
      messageTypeId_ = getDefaultInstance().getMessageTypeId();
      onChanged();
      return this;
    }
    /**
     * <code>string message_type_id = 6;</code>
     * @param value The bytes for messageTypeId to set.
     * @return This builder for chaining.
     */
    public Builder setMessageTypeIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      messageTypeId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object rawMessage_ = "";
    /**
     * <code>string raw_message = 7;</code>
     * @return The rawMessage.
     */
    public java.lang.String getRawMessage() {
      java.lang.Object ref = rawMessage_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        rawMessage_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string raw_message = 7;</code>
     * @return The bytes for rawMessage.
     */
    public com.google.protobuf.ByteString
        getRawMessageBytes() {
      java.lang.Object ref = rawMessage_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        rawMessage_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string raw_message = 7;</code>
     * @param value The rawMessage to set.
     * @return This builder for chaining.
     */
    public Builder setRawMessage(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      rawMessage_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string raw_message = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearRawMessage() {
      
      rawMessage_ = getDefaultInstance().getRawMessage();
      onChanged();
      return this;
    }
    /**
     * <code>string raw_message = 7;</code>
     * @param value The bytes for rawMessage to set.
     * @return This builder for chaining.
     */
    public Builder setRawMessageBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      rawMessage_ = value;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

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


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

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

  public static io.apicurio.tests.protobuf.Header getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public io.apicurio.tests.protobuf.Header getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

