/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/dataflow/v1beta3/messages.proto

package com.google.dataflow.v1beta3;

/**
 *
 *
 * <pre>
 * A rich message format, including a human readable string, a key for
 * identifying the message, and structured data associated with the message for
 * programmatic consumption.
 * </pre>
 *
 * Protobuf type {@code google.dataflow.v1beta3.StructuredMessage}
 */
public final class StructuredMessage extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.dataflow.v1beta3.StructuredMessage)
    StructuredMessageOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use StructuredMessage.newBuilder() to construct.
  private StructuredMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private StructuredMessage() {
    messageText_ = "";
    messageKey_ = "";
    parameters_ = java.util.Collections.emptyList();
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.dataflow.v1beta3.MessagesProto
        .internal_static_google_dataflow_v1beta3_StructuredMessage_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.dataflow.v1beta3.MessagesProto
        .internal_static_google_dataflow_v1beta3_StructuredMessage_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.dataflow.v1beta3.StructuredMessage.class,
            com.google.dataflow.v1beta3.StructuredMessage.Builder.class);
  }

  public interface ParameterOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.dataflow.v1beta3.StructuredMessage.Parameter)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Key or name for this parameter.
     * </pre>
     *
     * <code>string key = 1;</code>
     *
     * @return The key.
     */
    java.lang.String getKey();
    /**
     *
     *
     * <pre>
     * Key or name for this parameter.
     * </pre>
     *
     * <code>string key = 1;</code>
     *
     * @return The bytes for key.
     */
    com.google.protobuf.ByteString getKeyBytes();

    /**
     *
     *
     * <pre>
     * Value for this parameter.
     * </pre>
     *
     * <code>.google.protobuf.Value value = 2;</code>
     *
     * @return Whether the value field is set.
     */
    boolean hasValue();
    /**
     *
     *
     * <pre>
     * Value for this parameter.
     * </pre>
     *
     * <code>.google.protobuf.Value value = 2;</code>
     *
     * @return The value.
     */
    com.google.protobuf.Value getValue();
    /**
     *
     *
     * <pre>
     * Value for this parameter.
     * </pre>
     *
     * <code>.google.protobuf.Value value = 2;</code>
     */
    com.google.protobuf.ValueOrBuilder getValueOrBuilder();
  }
  /**
   *
   *
   * <pre>
   * Structured data associated with this message.
   * </pre>
   *
   * Protobuf type {@code google.dataflow.v1beta3.StructuredMessage.Parameter}
   */
  public static final class Parameter extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.dataflow.v1beta3.StructuredMessage.Parameter)
      ParameterOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use Parameter.newBuilder() to construct.
    private Parameter(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private Parameter() {
      key_ = "";
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
      return this.unknownFields;
    }

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.dataflow.v1beta3.MessagesProto
          .internal_static_google_dataflow_v1beta3_StructuredMessage_Parameter_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.dataflow.v1beta3.MessagesProto
          .internal_static_google_dataflow_v1beta3_StructuredMessage_Parameter_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.dataflow.v1beta3.StructuredMessage.Parameter.class,
              com.google.dataflow.v1beta3.StructuredMessage.Parameter.Builder.class);
    }

    public static final int KEY_FIELD_NUMBER = 1;
    private volatile java.lang.Object key_;
    /**
     *
     *
     * <pre>
     * Key or name for this parameter.
     * </pre>
     *
     * <code>string key = 1;</code>
     *
     * @return The key.
     */
    @java.lang.Override
    public java.lang.String getKey() {
      java.lang.Object ref = key_;
      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();
        key_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Key or name for this parameter.
     * </pre>
     *
     * <code>string key = 1;</code>
     *
     * @return The bytes for key.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getKeyBytes() {
      java.lang.Object ref = key_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        key_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int VALUE_FIELD_NUMBER = 2;
    private com.google.protobuf.Value value_;
    /**
     *
     *
     * <pre>
     * Value for this parameter.
     * </pre>
     *
     * <code>.google.protobuf.Value value = 2;</code>
     *
     * @return Whether the value field is set.
     */
    @java.lang.Override
    public boolean hasValue() {
      return value_ != null;
    }
    /**
     *
     *
     * <pre>
     * Value for this parameter.
     * </pre>
     *
     * <code>.google.protobuf.Value value = 2;</code>
     *
     * @return The value.
     */
    @java.lang.Override
    public com.google.protobuf.Value getValue() {
      return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_;
    }
    /**
     *
     *
     * <pre>
     * Value for this parameter.
     * </pre>
     *
     * <code>.google.protobuf.Value value = 2;</code>
     */
    @java.lang.Override
    public com.google.protobuf.ValueOrBuilder getValueOrBuilder() {
      return getValue();
    }

    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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
      }
      if (value_ != null) {
        output.writeMessage(2, getValue());
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
      }
      if (value_ != null) {
        size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getValue());
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
        return true;
      }
      if (!(obj instanceof com.google.dataflow.v1beta3.StructuredMessage.Parameter)) {
        return super.equals(obj);
      }
      com.google.dataflow.v1beta3.StructuredMessage.Parameter other =
          (com.google.dataflow.v1beta3.StructuredMessage.Parameter) obj;

      if (!getKey().equals(other.getKey())) return false;
      if (hasValue() != other.hasValue()) return false;
      if (hasValue()) {
        if (!getValue().equals(other.getValue())) return false;
      }
      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + KEY_FIELD_NUMBER;
      hash = (53 * hash) + getKey().hashCode();
      if (hasValue()) {
        hash = (37 * hash) + VALUE_FIELD_NUMBER;
        hash = (53 * hash) + getValue().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.dataflow.v1beta3.StructuredMessage.Parameter parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.dataflow.v1beta3.StructuredMessage.Parameter parseFrom(
        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.dataflow.v1beta3.StructuredMessage.Parameter parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.dataflow.v1beta3.StructuredMessage.Parameter parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.dataflow.v1beta3.StructuredMessage.Parameter parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.dataflow.v1beta3.StructuredMessage.Parameter parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.dataflow.v1beta3.StructuredMessage.Parameter parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.dataflow.v1beta3.StructuredMessage.Parameter 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 com.google.dataflow.v1beta3.StructuredMessage.Parameter parseDelimitedFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.dataflow.v1beta3.StructuredMessage.Parameter 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 com.google.dataflow.v1beta3.StructuredMessage.Parameter parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.dataflow.v1beta3.StructuredMessage.Parameter 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(
        com.google.dataflow.v1beta3.StructuredMessage.Parameter 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;
    }
    /**
     *
     *
     * <pre>
     * Structured data associated with this message.
     * </pre>
     *
     * Protobuf type {@code google.dataflow.v1beta3.StructuredMessage.Parameter}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.dataflow.v1beta3.StructuredMessage.Parameter)
        com.google.dataflow.v1beta3.StructuredMessage.ParameterOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.dataflow.v1beta3.MessagesProto
            .internal_static_google_dataflow_v1beta3_StructuredMessage_Parameter_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.dataflow.v1beta3.MessagesProto
            .internal_static_google_dataflow_v1beta3_StructuredMessage_Parameter_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.dataflow.v1beta3.StructuredMessage.Parameter.class,
                com.google.dataflow.v1beta3.StructuredMessage.Parameter.Builder.class);
      }

      // Construct using com.google.dataflow.v1beta3.StructuredMessage.Parameter.newBuilder()
      private Builder() {}

      private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
      }

      @java.lang.Override
      public Builder clear() {
        super.clear();
        key_ = "";

        if (valueBuilder_ == null) {
          value_ = null;
        } else {
          value_ = null;
          valueBuilder_ = null;
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.dataflow.v1beta3.MessagesProto
            .internal_static_google_dataflow_v1beta3_StructuredMessage_Parameter_descriptor;
      }

      @java.lang.Override
      public com.google.dataflow.v1beta3.StructuredMessage.Parameter getDefaultInstanceForType() {
        return com.google.dataflow.v1beta3.StructuredMessage.Parameter.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.dataflow.v1beta3.StructuredMessage.Parameter build() {
        com.google.dataflow.v1beta3.StructuredMessage.Parameter result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.dataflow.v1beta3.StructuredMessage.Parameter buildPartial() {
        com.google.dataflow.v1beta3.StructuredMessage.Parameter result =
            new com.google.dataflow.v1beta3.StructuredMessage.Parameter(this);
        result.key_ = key_;
        if (valueBuilder_ == null) {
          result.value_ = value_;
        } else {
          result.value_ = valueBuilder_.build();
        }
        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 com.google.dataflow.v1beta3.StructuredMessage.Parameter) {
          return mergeFrom((com.google.dataflow.v1beta3.StructuredMessage.Parameter) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.dataflow.v1beta3.StructuredMessage.Parameter other) {
        if (other == com.google.dataflow.v1beta3.StructuredMessage.Parameter.getDefaultInstance())
          return this;
        if (!other.getKey().isEmpty()) {
          key_ = other.key_;
          onChanged();
        }
        if (other.hasValue()) {
          mergeValue(other.getValue());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        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 {
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 10:
                {
                  key_ = input.readStringRequireUtf8();

                  break;
                } // case 10
              case 18:
                {
                  input.readMessage(getValueFieldBuilder().getBuilder(), extensionRegistry);

                  break;
                } // case 18
              default:
                {
                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                    done = true; // was an endgroup tag
                  }
                  break;
                } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }

      private java.lang.Object key_ = "";
      /**
       *
       *
       * <pre>
       * Key or name for this parameter.
       * </pre>
       *
       * <code>string key = 1;</code>
       *
       * @return The key.
       */
      public java.lang.String getKey() {
        java.lang.Object ref = key_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          key_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Key or name for this parameter.
       * </pre>
       *
       * <code>string key = 1;</code>
       *
       * @return The bytes for key.
       */
      public com.google.protobuf.ByteString getKeyBytes() {
        java.lang.Object ref = key_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          key_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Key or name for this parameter.
       * </pre>
       *
       * <code>string key = 1;</code>
       *
       * @param value The key to set.
       * @return This builder for chaining.
       */
      public Builder setKey(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }

        key_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Key or name for this parameter.
       * </pre>
       *
       * <code>string key = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearKey() {

        key_ = getDefaultInstance().getKey();
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Key or name for this parameter.
       * </pre>
       *
       * <code>string key = 1;</code>
       *
       * @param value The bytes for key to set.
       * @return This builder for chaining.
       */
      public Builder setKeyBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);

        key_ = value;
        onChanged();
        return this;
      }

      private com.google.protobuf.Value value_;
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Value,
              com.google.protobuf.Value.Builder,
              com.google.protobuf.ValueOrBuilder>
          valueBuilder_;
      /**
       *
       *
       * <pre>
       * Value for this parameter.
       * </pre>
       *
       * <code>.google.protobuf.Value value = 2;</code>
       *
       * @return Whether the value field is set.
       */
      public boolean hasValue() {
        return valueBuilder_ != null || value_ != null;
      }
      /**
       *
       *
       * <pre>
       * Value for this parameter.
       * </pre>
       *
       * <code>.google.protobuf.Value value = 2;</code>
       *
       * @return The value.
       */
      public com.google.protobuf.Value getValue() {
        if (valueBuilder_ == null) {
          return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_;
        } else {
          return valueBuilder_.getMessage();
        }
      }
      /**
       *
       *
       * <pre>
       * Value for this parameter.
       * </pre>
       *
       * <code>.google.protobuf.Value value = 2;</code>
       */
      public Builder setValue(com.google.protobuf.Value value) {
        if (valueBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          value_ = value;
          onChanged();
        } else {
          valueBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       *
       *
       * <pre>
       * Value for this parameter.
       * </pre>
       *
       * <code>.google.protobuf.Value value = 2;</code>
       */
      public Builder setValue(com.google.protobuf.Value.Builder builderForValue) {
        if (valueBuilder_ == null) {
          value_ = builderForValue.build();
          onChanged();
        } else {
          valueBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       *
       *
       * <pre>
       * Value for this parameter.
       * </pre>
       *
       * <code>.google.protobuf.Value value = 2;</code>
       */
      public Builder mergeValue(com.google.protobuf.Value value) {
        if (valueBuilder_ == null) {
          if (value_ != null) {
            value_ = com.google.protobuf.Value.newBuilder(value_).mergeFrom(value).buildPartial();
          } else {
            value_ = value;
          }
          onChanged();
        } else {
          valueBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       *
       *
       * <pre>
       * Value for this parameter.
       * </pre>
       *
       * <code>.google.protobuf.Value value = 2;</code>
       */
      public Builder clearValue() {
        if (valueBuilder_ == null) {
          value_ = null;
          onChanged();
        } else {
          value_ = null;
          valueBuilder_ = null;
        }

        return this;
      }
      /**
       *
       *
       * <pre>
       * Value for this parameter.
       * </pre>
       *
       * <code>.google.protobuf.Value value = 2;</code>
       */
      public com.google.protobuf.Value.Builder getValueBuilder() {

        onChanged();
        return getValueFieldBuilder().getBuilder();
      }
      /**
       *
       *
       * <pre>
       * Value for this parameter.
       * </pre>
       *
       * <code>.google.protobuf.Value value = 2;</code>
       */
      public com.google.protobuf.ValueOrBuilder getValueOrBuilder() {
        if (valueBuilder_ != null) {
          return valueBuilder_.getMessageOrBuilder();
        } else {
          return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_;
        }
      }
      /**
       *
       *
       * <pre>
       * Value for this parameter.
       * </pre>
       *
       * <code>.google.protobuf.Value value = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Value,
              com.google.protobuf.Value.Builder,
              com.google.protobuf.ValueOrBuilder>
          getValueFieldBuilder() {
        if (valueBuilder_ == null) {
          valueBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.protobuf.Value,
                  com.google.protobuf.Value.Builder,
                  com.google.protobuf.ValueOrBuilder>(
                  getValue(), getParentForChildren(), isClean());
          value_ = null;
        }
        return valueBuilder_;
      }

      @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:google.dataflow.v1beta3.StructuredMessage.Parameter)
    }

    // @@protoc_insertion_point(class_scope:google.dataflow.v1beta3.StructuredMessage.Parameter)
    private static final com.google.dataflow.v1beta3.StructuredMessage.Parameter DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.dataflow.v1beta3.StructuredMessage.Parameter();
    }

    public static com.google.dataflow.v1beta3.StructuredMessage.Parameter getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<Parameter> PARSER =
        new com.google.protobuf.AbstractParser<Parameter>() {
          @java.lang.Override
          public Parameter parsePartialFrom(
              com.google.protobuf.CodedInputStream input,
              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws com.google.protobuf.InvalidProtocolBufferException {
            Builder builder = newBuilder();
            try {
              builder.mergeFrom(input, extensionRegistry);
            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
              throw e.setUnfinishedMessage(builder.buildPartial());
            } catch (com.google.protobuf.UninitializedMessageException e) {
              throw e.asInvalidProtocolBufferException()
                  .setUnfinishedMessage(builder.buildPartial());
            } catch (java.io.IOException e) {
              throw new com.google.protobuf.InvalidProtocolBufferException(e)
                  .setUnfinishedMessage(builder.buildPartial());
            }
            return builder.buildPartial();
          }
        };

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

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

    @java.lang.Override
    public com.google.dataflow.v1beta3.StructuredMessage.Parameter getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public static final int MESSAGE_TEXT_FIELD_NUMBER = 1;
  private volatile java.lang.Object messageText_;
  /**
   *
   *
   * <pre>
   * Human-readable version of message.
   * </pre>
   *
   * <code>string message_text = 1;</code>
   *
   * @return The messageText.
   */
  @java.lang.Override
  public java.lang.String getMessageText() {
    java.lang.Object ref = messageText_;
    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();
      messageText_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Human-readable version of message.
   * </pre>
   *
   * <code>string message_text = 1;</code>
   *
   * @return The bytes for messageText.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getMessageTextBytes() {
    java.lang.Object ref = messageText_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      messageText_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MESSAGE_KEY_FIELD_NUMBER = 2;
  private volatile java.lang.Object messageKey_;
  /**
   *
   *
   * <pre>
   * Identifier for this message type.  Used by external systems to
   * internationalize or personalize message.
   * </pre>
   *
   * <code>string message_key = 2;</code>
   *
   * @return The messageKey.
   */
  @java.lang.Override
  public java.lang.String getMessageKey() {
    java.lang.Object ref = messageKey_;
    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();
      messageKey_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Identifier for this message type.  Used by external systems to
   * internationalize or personalize message.
   * </pre>
   *
   * <code>string message_key = 2;</code>
   *
   * @return The bytes for messageKey.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getMessageKeyBytes() {
    java.lang.Object ref = messageKey_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      messageKey_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PARAMETERS_FIELD_NUMBER = 3;
  private java.util.List<com.google.dataflow.v1beta3.StructuredMessage.Parameter> parameters_;
  /**
   *
   *
   * <pre>
   * The structured data associated with this message.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.dataflow.v1beta3.StructuredMessage.Parameter>
      getParametersList() {
    return parameters_;
  }
  /**
   *
   *
   * <pre>
   * The structured data associated with this message.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.dataflow.v1beta3.StructuredMessage.ParameterOrBuilder>
      getParametersOrBuilderList() {
    return parameters_;
  }
  /**
   *
   *
   * <pre>
   * The structured data associated with this message.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
   */
  @java.lang.Override
  public int getParametersCount() {
    return parameters_.size();
  }
  /**
   *
   *
   * <pre>
   * The structured data associated with this message.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.StructuredMessage.Parameter getParameters(int index) {
    return parameters_.get(index);
  }
  /**
   *
   *
   * <pre>
   * The structured data associated with this message.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.StructuredMessage.ParameterOrBuilder getParametersOrBuilder(
      int index) {
    return parameters_.get(index);
  }

  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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(messageText_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, messageText_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(messageKey_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, messageKey_);
    }
    for (int i = 0; i < parameters_.size(); i++) {
      output.writeMessage(3, parameters_.get(i));
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(messageText_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, messageText_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(messageKey_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, messageKey_);
    }
    for (int i = 0; i < parameters_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, parameters_.get(i));
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.dataflow.v1beta3.StructuredMessage)) {
      return super.equals(obj);
    }
    com.google.dataflow.v1beta3.StructuredMessage other =
        (com.google.dataflow.v1beta3.StructuredMessage) obj;

    if (!getMessageText().equals(other.getMessageText())) return false;
    if (!getMessageKey().equals(other.getMessageKey())) return false;
    if (!getParametersList().equals(other.getParametersList())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + MESSAGE_TEXT_FIELD_NUMBER;
    hash = (53 * hash) + getMessageText().hashCode();
    hash = (37 * hash) + MESSAGE_KEY_FIELD_NUMBER;
    hash = (53 * hash) + getMessageKey().hashCode();
    if (getParametersCount() > 0) {
      hash = (37 * hash) + PARAMETERS_FIELD_NUMBER;
      hash = (53 * hash) + getParametersList().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.dataflow.v1beta3.StructuredMessage parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.dataflow.v1beta3.StructuredMessage parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.dataflow.v1beta3.StructuredMessage parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.dataflow.v1beta3.StructuredMessage parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.dataflow.v1beta3.StructuredMessage parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.dataflow.v1beta3.StructuredMessage parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.dataflow.v1beta3.StructuredMessage parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.dataflow.v1beta3.StructuredMessage 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 com.google.dataflow.v1beta3.StructuredMessage parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.dataflow.v1beta3.StructuredMessage 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 com.google.dataflow.v1beta3.StructuredMessage parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.dataflow.v1beta3.StructuredMessage 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(com.google.dataflow.v1beta3.StructuredMessage 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;
  }
  /**
   *
   *
   * <pre>
   * A rich message format, including a human readable string, a key for
   * identifying the message, and structured data associated with the message for
   * programmatic consumption.
   * </pre>
   *
   * Protobuf type {@code google.dataflow.v1beta3.StructuredMessage}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.dataflow.v1beta3.StructuredMessage)
      com.google.dataflow.v1beta3.StructuredMessageOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.dataflow.v1beta3.MessagesProto
          .internal_static_google_dataflow_v1beta3_StructuredMessage_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.dataflow.v1beta3.MessagesProto
          .internal_static_google_dataflow_v1beta3_StructuredMessage_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.dataflow.v1beta3.StructuredMessage.class,
              com.google.dataflow.v1beta3.StructuredMessage.Builder.class);
    }

    // Construct using com.google.dataflow.v1beta3.StructuredMessage.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      messageText_ = "";

      messageKey_ = "";

      if (parametersBuilder_ == null) {
        parameters_ = java.util.Collections.emptyList();
      } else {
        parameters_ = null;
        parametersBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.dataflow.v1beta3.MessagesProto
          .internal_static_google_dataflow_v1beta3_StructuredMessage_descriptor;
    }

    @java.lang.Override
    public com.google.dataflow.v1beta3.StructuredMessage getDefaultInstanceForType() {
      return com.google.dataflow.v1beta3.StructuredMessage.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.dataflow.v1beta3.StructuredMessage build() {
      com.google.dataflow.v1beta3.StructuredMessage result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.dataflow.v1beta3.StructuredMessage buildPartial() {
      com.google.dataflow.v1beta3.StructuredMessage result =
          new com.google.dataflow.v1beta3.StructuredMessage(this);
      int from_bitField0_ = bitField0_;
      result.messageText_ = messageText_;
      result.messageKey_ = messageKey_;
      if (parametersBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          parameters_ = java.util.Collections.unmodifiableList(parameters_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.parameters_ = parameters_;
      } else {
        result.parameters_ = parametersBuilder_.build();
      }
      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 com.google.dataflow.v1beta3.StructuredMessage) {
        return mergeFrom((com.google.dataflow.v1beta3.StructuredMessage) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.dataflow.v1beta3.StructuredMessage other) {
      if (other == com.google.dataflow.v1beta3.StructuredMessage.getDefaultInstance()) return this;
      if (!other.getMessageText().isEmpty()) {
        messageText_ = other.messageText_;
        onChanged();
      }
      if (!other.getMessageKey().isEmpty()) {
        messageKey_ = other.messageKey_;
        onChanged();
      }
      if (parametersBuilder_ == null) {
        if (!other.parameters_.isEmpty()) {
          if (parameters_.isEmpty()) {
            parameters_ = other.parameters_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureParametersIsMutable();
            parameters_.addAll(other.parameters_);
          }
          onChanged();
        }
      } else {
        if (!other.parameters_.isEmpty()) {
          if (parametersBuilder_.isEmpty()) {
            parametersBuilder_.dispose();
            parametersBuilder_ = null;
            parameters_ = other.parameters_;
            bitField0_ = (bitField0_ & ~0x00000001);
            parametersBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getParametersFieldBuilder()
                    : null;
          } else {
            parametersBuilder_.addAllMessages(other.parameters_);
          }
        }
      }
      this.mergeUnknownFields(other.getUnknownFields());
      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 {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                messageText_ = input.readStringRequireUtf8();

                break;
              } // case 10
            case 18:
              {
                messageKey_ = input.readStringRequireUtf8();

                break;
              } // case 18
            case 26:
              {
                com.google.dataflow.v1beta3.StructuredMessage.Parameter m =
                    input.readMessage(
                        com.google.dataflow.v1beta3.StructuredMessage.Parameter.parser(),
                        extensionRegistry);
                if (parametersBuilder_ == null) {
                  ensureParametersIsMutable();
                  parameters_.add(m);
                } else {
                  parametersBuilder_.addMessage(m);
                }
                break;
              } // case 26
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.lang.Object messageText_ = "";
    /**
     *
     *
     * <pre>
     * Human-readable version of message.
     * </pre>
     *
     * <code>string message_text = 1;</code>
     *
     * @return The messageText.
     */
    public java.lang.String getMessageText() {
      java.lang.Object ref = messageText_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        messageText_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Human-readable version of message.
     * </pre>
     *
     * <code>string message_text = 1;</code>
     *
     * @return The bytes for messageText.
     */
    public com.google.protobuf.ByteString getMessageTextBytes() {
      java.lang.Object ref = messageText_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        messageText_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Human-readable version of message.
     * </pre>
     *
     * <code>string message_text = 1;</code>
     *
     * @param value The messageText to set.
     * @return This builder for chaining.
     */
    public Builder setMessageText(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      messageText_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Human-readable version of message.
     * </pre>
     *
     * <code>string message_text = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearMessageText() {

      messageText_ = getDefaultInstance().getMessageText();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Human-readable version of message.
     * </pre>
     *
     * <code>string message_text = 1;</code>
     *
     * @param value The bytes for messageText to set.
     * @return This builder for chaining.
     */
    public Builder setMessageTextBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      messageText_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object messageKey_ = "";
    /**
     *
     *
     * <pre>
     * Identifier for this message type.  Used by external systems to
     * internationalize or personalize message.
     * </pre>
     *
     * <code>string message_key = 2;</code>
     *
     * @return The messageKey.
     */
    public java.lang.String getMessageKey() {
      java.lang.Object ref = messageKey_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        messageKey_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Identifier for this message type.  Used by external systems to
     * internationalize or personalize message.
     * </pre>
     *
     * <code>string message_key = 2;</code>
     *
     * @return The bytes for messageKey.
     */
    public com.google.protobuf.ByteString getMessageKeyBytes() {
      java.lang.Object ref = messageKey_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        messageKey_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Identifier for this message type.  Used by external systems to
     * internationalize or personalize message.
     * </pre>
     *
     * <code>string message_key = 2;</code>
     *
     * @param value The messageKey to set.
     * @return This builder for chaining.
     */
    public Builder setMessageKey(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      messageKey_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Identifier for this message type.  Used by external systems to
     * internationalize or personalize message.
     * </pre>
     *
     * <code>string message_key = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearMessageKey() {

      messageKey_ = getDefaultInstance().getMessageKey();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Identifier for this message type.  Used by external systems to
     * internationalize or personalize message.
     * </pre>
     *
     * <code>string message_key = 2;</code>
     *
     * @param value The bytes for messageKey to set.
     * @return This builder for chaining.
     */
    public Builder setMessageKeyBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      messageKey_ = value;
      onChanged();
      return this;
    }

    private java.util.List<com.google.dataflow.v1beta3.StructuredMessage.Parameter> parameters_ =
        java.util.Collections.emptyList();

    private void ensureParametersIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        parameters_ =
            new java.util.ArrayList<com.google.dataflow.v1beta3.StructuredMessage.Parameter>(
                parameters_);
        bitField0_ |= 0x00000001;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.StructuredMessage.Parameter,
            com.google.dataflow.v1beta3.StructuredMessage.Parameter.Builder,
            com.google.dataflow.v1beta3.StructuredMessage.ParameterOrBuilder>
        parametersBuilder_;

    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.StructuredMessage.Parameter>
        getParametersList() {
      if (parametersBuilder_ == null) {
        return java.util.Collections.unmodifiableList(parameters_);
      } else {
        return parametersBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public int getParametersCount() {
      if (parametersBuilder_ == null) {
        return parameters_.size();
      } else {
        return parametersBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public com.google.dataflow.v1beta3.StructuredMessage.Parameter getParameters(int index) {
      if (parametersBuilder_ == null) {
        return parameters_.get(index);
      } else {
        return parametersBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public Builder setParameters(
        int index, com.google.dataflow.v1beta3.StructuredMessage.Parameter value) {
      if (parametersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureParametersIsMutable();
        parameters_.set(index, value);
        onChanged();
      } else {
        parametersBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public Builder setParameters(
        int index,
        com.google.dataflow.v1beta3.StructuredMessage.Parameter.Builder builderForValue) {
      if (parametersBuilder_ == null) {
        ensureParametersIsMutable();
        parameters_.set(index, builderForValue.build());
        onChanged();
      } else {
        parametersBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public Builder addParameters(com.google.dataflow.v1beta3.StructuredMessage.Parameter value) {
      if (parametersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureParametersIsMutable();
        parameters_.add(value);
        onChanged();
      } else {
        parametersBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public Builder addParameters(
        int index, com.google.dataflow.v1beta3.StructuredMessage.Parameter value) {
      if (parametersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureParametersIsMutable();
        parameters_.add(index, value);
        onChanged();
      } else {
        parametersBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public Builder addParameters(
        com.google.dataflow.v1beta3.StructuredMessage.Parameter.Builder builderForValue) {
      if (parametersBuilder_ == null) {
        ensureParametersIsMutable();
        parameters_.add(builderForValue.build());
        onChanged();
      } else {
        parametersBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public Builder addParameters(
        int index,
        com.google.dataflow.v1beta3.StructuredMessage.Parameter.Builder builderForValue) {
      if (parametersBuilder_ == null) {
        ensureParametersIsMutable();
        parameters_.add(index, builderForValue.build());
        onChanged();
      } else {
        parametersBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public Builder addAllParameters(
        java.lang.Iterable<? extends com.google.dataflow.v1beta3.StructuredMessage.Parameter>
            values) {
      if (parametersBuilder_ == null) {
        ensureParametersIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_);
        onChanged();
      } else {
        parametersBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public Builder clearParameters() {
      if (parametersBuilder_ == null) {
        parameters_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        parametersBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public Builder removeParameters(int index) {
      if (parametersBuilder_ == null) {
        ensureParametersIsMutable();
        parameters_.remove(index);
        onChanged();
      } else {
        parametersBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public com.google.dataflow.v1beta3.StructuredMessage.Parameter.Builder getParametersBuilder(
        int index) {
      return getParametersFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public com.google.dataflow.v1beta3.StructuredMessage.ParameterOrBuilder getParametersOrBuilder(
        int index) {
      if (parametersBuilder_ == null) {
        return parameters_.get(index);
      } else {
        return parametersBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public java.util.List<
            ? extends com.google.dataflow.v1beta3.StructuredMessage.ParameterOrBuilder>
        getParametersOrBuilderList() {
      if (parametersBuilder_ != null) {
        return parametersBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(parameters_);
      }
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public com.google.dataflow.v1beta3.StructuredMessage.Parameter.Builder addParametersBuilder() {
      return getParametersFieldBuilder()
          .addBuilder(com.google.dataflow.v1beta3.StructuredMessage.Parameter.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public com.google.dataflow.v1beta3.StructuredMessage.Parameter.Builder addParametersBuilder(
        int index) {
      return getParametersFieldBuilder()
          .addBuilder(
              index, com.google.dataflow.v1beta3.StructuredMessage.Parameter.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The structured data associated with this message.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StructuredMessage.Parameter parameters = 3;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.StructuredMessage.Parameter.Builder>
        getParametersBuilderList() {
      return getParametersFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.StructuredMessage.Parameter,
            com.google.dataflow.v1beta3.StructuredMessage.Parameter.Builder,
            com.google.dataflow.v1beta3.StructuredMessage.ParameterOrBuilder>
        getParametersFieldBuilder() {
      if (parametersBuilder_ == null) {
        parametersBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.dataflow.v1beta3.StructuredMessage.Parameter,
                com.google.dataflow.v1beta3.StructuredMessage.Parameter.Builder,
                com.google.dataflow.v1beta3.StructuredMessage.ParameterOrBuilder>(
                parameters_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
        parameters_ = null;
      }
      return parametersBuilder_;
    }

    @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:google.dataflow.v1beta3.StructuredMessage)
  }

  // @@protoc_insertion_point(class_scope:google.dataflow.v1beta3.StructuredMessage)
  private static final com.google.dataflow.v1beta3.StructuredMessage DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.dataflow.v1beta3.StructuredMessage();
  }

  public static com.google.dataflow.v1beta3.StructuredMessage getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<StructuredMessage> PARSER =
      new com.google.protobuf.AbstractParser<StructuredMessage>() {
        @java.lang.Override
        public StructuredMessage parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

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

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

  @java.lang.Override
  public com.google.dataflow.v1beta3.StructuredMessage getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
