/*
 * 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/templates.proto

package com.google.dataflow.v1beta3;

/**
 *
 *
 * <pre>
 * Metadata for a specific parameter.
 * </pre>
 *
 * Protobuf type {@code google.dataflow.v1beta3.ParameterMetadata}
 */
public final class ParameterMetadata extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.dataflow.v1beta3.ParameterMetadata)
    ParameterMetadataOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use ParameterMetadata.newBuilder() to construct.
  private ParameterMetadata(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private ParameterMetadata() {
    name_ = "";
    label_ = "";
    helpText_ = "";
    regexes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    paramType_ = 0;
  }

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

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

  private ParameterMetadata(
      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:
            {
              java.lang.String s = input.readStringRequireUtf8();

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

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

              helpText_ = s;
              break;
            }
          case 32:
            {
              isOptional_ = input.readBool();
              break;
            }
          case 42:
            {
              java.lang.String s = input.readStringRequireUtf8();
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                regexes_ = new com.google.protobuf.LazyStringArrayList();
                mutable_bitField0_ |= 0x00000001;
              }
              regexes_.add(s);
              break;
            }
          case 48:
            {
              int rawValue = input.readEnum();

              paramType_ = rawValue;
              break;
            }
          case 58:
            {
              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                customMetadata_ =
                    com.google.protobuf.MapField.newMapField(
                        CustomMetadataDefaultEntryHolder.defaultEntry);
                mutable_bitField0_ |= 0x00000002;
              }
              com.google.protobuf.MapEntry<java.lang.String, java.lang.String> customMetadata__ =
                  input.readMessage(
                      CustomMetadataDefaultEntryHolder.defaultEntry.getParserForType(),
                      extensionRegistry);
              customMetadata_
                  .getMutableMap()
                  .put(customMetadata__.getKey(), customMetadata__.getValue());
              break;
            }
          default:
            {
              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (com.google.protobuf.UninitializedMessageException e) {
      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        regexes_ = regexes_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

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

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(int number) {
    switch (number) {
      case 7:
        return internalGetCustomMetadata();
      default:
        throw new RuntimeException("Invalid map field number: " + number);
    }
  }

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

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   *
   *
   * <pre>
   * Required. The name of the parameter.
   * </pre>
   *
   * <code>string name = 1;</code>
   *
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    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();
      name_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Required. The name of the parameter.
   * </pre>
   *
   * <code>string name = 1;</code>
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int LABEL_FIELD_NUMBER = 2;
  private volatile java.lang.Object label_;
  /**
   *
   *
   * <pre>
   * Required. The label to display for the parameter.
   * </pre>
   *
   * <code>string label = 2;</code>
   *
   * @return The label.
   */
  @java.lang.Override
  public java.lang.String getLabel() {
    java.lang.Object ref = label_;
    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();
      label_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Required. The label to display for the parameter.
   * </pre>
   *
   * <code>string label = 2;</code>
   *
   * @return The bytes for label.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getLabelBytes() {
    java.lang.Object ref = label_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      label_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int HELP_TEXT_FIELD_NUMBER = 3;
  private volatile java.lang.Object helpText_;
  /**
   *
   *
   * <pre>
   * Required. The help text to display for the parameter.
   * </pre>
   *
   * <code>string help_text = 3;</code>
   *
   * @return The helpText.
   */
  @java.lang.Override
  public java.lang.String getHelpText() {
    java.lang.Object ref = helpText_;
    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();
      helpText_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Required. The help text to display for the parameter.
   * </pre>
   *
   * <code>string help_text = 3;</code>
   *
   * @return The bytes for helpText.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getHelpTextBytes() {
    java.lang.Object ref = helpText_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      helpText_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int IS_OPTIONAL_FIELD_NUMBER = 4;
  private boolean isOptional_;
  /**
   *
   *
   * <pre>
   * Optional. Whether the parameter is optional. Defaults to false.
   * </pre>
   *
   * <code>bool is_optional = 4;</code>
   *
   * @return The isOptional.
   */
  @java.lang.Override
  public boolean getIsOptional() {
    return isOptional_;
  }

  public static final int REGEXES_FIELD_NUMBER = 5;
  private com.google.protobuf.LazyStringList regexes_;
  /**
   *
   *
   * <pre>
   * Optional. Regexes that the parameter must match.
   * </pre>
   *
   * <code>repeated string regexes = 5;</code>
   *
   * @return A list containing the regexes.
   */
  public com.google.protobuf.ProtocolStringList getRegexesList() {
    return regexes_;
  }
  /**
   *
   *
   * <pre>
   * Optional. Regexes that the parameter must match.
   * </pre>
   *
   * <code>repeated string regexes = 5;</code>
   *
   * @return The count of regexes.
   */
  public int getRegexesCount() {
    return regexes_.size();
  }
  /**
   *
   *
   * <pre>
   * Optional. Regexes that the parameter must match.
   * </pre>
   *
   * <code>repeated string regexes = 5;</code>
   *
   * @param index The index of the element to return.
   * @return The regexes at the given index.
   */
  public java.lang.String getRegexes(int index) {
    return regexes_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Optional. Regexes that the parameter must match.
   * </pre>
   *
   * <code>repeated string regexes = 5;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the regexes at the given index.
   */
  public com.google.protobuf.ByteString getRegexesBytes(int index) {
    return regexes_.getByteString(index);
  }

  public static final int PARAM_TYPE_FIELD_NUMBER = 6;
  private int paramType_;
  /**
   *
   *
   * <pre>
   * Optional. The type of the parameter.
   * Used for selecting input picker.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.ParameterType param_type = 6;</code>
   *
   * @return The enum numeric value on the wire for paramType.
   */
  @java.lang.Override
  public int getParamTypeValue() {
    return paramType_;
  }
  /**
   *
   *
   * <pre>
   * Optional. The type of the parameter.
   * Used for selecting input picker.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.ParameterType param_type = 6;</code>
   *
   * @return The paramType.
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.ParameterType getParamType() {
    @SuppressWarnings("deprecation")
    com.google.dataflow.v1beta3.ParameterType result =
        com.google.dataflow.v1beta3.ParameterType.valueOf(paramType_);
    return result == null ? com.google.dataflow.v1beta3.ParameterType.UNRECOGNIZED : result;
  }

  public static final int CUSTOM_METADATA_FIELD_NUMBER = 7;

  private static final class CustomMetadataDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
        com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
            com.google.dataflow.v1beta3.TemplatesProto
                .internal_static_google_dataflow_v1beta3_ParameterMetadata_CustomMetadataEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  private com.google.protobuf.MapField<java.lang.String, java.lang.String> customMetadata_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String>
      internalGetCustomMetadata() {
    if (customMetadata_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          CustomMetadataDefaultEntryHolder.defaultEntry);
    }
    return customMetadata_;
  }

  public int getCustomMetadataCount() {
    return internalGetCustomMetadata().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Optional. Additional metadata for describing this parameter.
   * </pre>
   *
   * <code>map&lt;string, string&gt; custom_metadata = 7;</code>
   */
  @java.lang.Override
  public boolean containsCustomMetadata(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetCustomMetadata().getMap().containsKey(key);
  }
  /** Use {@link #getCustomMetadataMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getCustomMetadata() {
    return getCustomMetadataMap();
  }
  /**
   *
   *
   * <pre>
   * Optional. Additional metadata for describing this parameter.
   * </pre>
   *
   * <code>map&lt;string, string&gt; custom_metadata = 7;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getCustomMetadataMap() {
    return internalGetCustomMetadata().getMap();
  }
  /**
   *
   *
   * <pre>
   * Optional. Additional metadata for describing this parameter.
   * </pre>
   *
   * <code>map&lt;string, string&gt; custom_metadata = 7;</code>
   */
  @java.lang.Override
  public java.lang.String getCustomMetadataOrDefault(
      java.lang.String key, java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetCustomMetadata().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Optional. Additional metadata for describing this parameter.
   * </pre>
   *
   * <code>map&lt;string, string&gt; custom_metadata = 7;</code>
   */
  @java.lang.Override
  public java.lang.String getCustomMetadataOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetCustomMetadata().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  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(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, label_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(helpText_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, helpText_);
    }
    if (isOptional_ != false) {
      output.writeBool(4, isOptional_);
    }
    for (int i = 0; i < regexes_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, regexes_.getRaw(i));
    }
    if (paramType_ != com.google.dataflow.v1beta3.ParameterType.DEFAULT.getNumber()) {
      output.writeEnum(6, paramType_);
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetCustomMetadata(), CustomMetadataDefaultEntryHolder.defaultEntry, 7);
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, label_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(helpText_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, helpText_);
    }
    if (isOptional_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, isOptional_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < regexes_.size(); i++) {
        dataSize += computeStringSizeNoTag(regexes_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getRegexesList().size();
    }
    if (paramType_ != com.google.dataflow.v1beta3.ParameterType.DEFAULT.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, paramType_);
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetCustomMetadata().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> customMetadata__ =
          CustomMetadataDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, customMetadata__);
    }
    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 com.google.dataflow.v1beta3.ParameterMetadata)) {
      return super.equals(obj);
    }
    com.google.dataflow.v1beta3.ParameterMetadata other =
        (com.google.dataflow.v1beta3.ParameterMetadata) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getLabel().equals(other.getLabel())) return false;
    if (!getHelpText().equals(other.getHelpText())) return false;
    if (getIsOptional() != other.getIsOptional()) return false;
    if (!getRegexesList().equals(other.getRegexesList())) return false;
    if (paramType_ != other.paramType_) return false;
    if (!internalGetCustomMetadata().equals(other.internalGetCustomMetadata())) 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();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + LABEL_FIELD_NUMBER;
    hash = (53 * hash) + getLabel().hashCode();
    hash = (37 * hash) + HELP_TEXT_FIELD_NUMBER;
    hash = (53 * hash) + getHelpText().hashCode();
    hash = (37 * hash) + IS_OPTIONAL_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsOptional());
    if (getRegexesCount() > 0) {
      hash = (37 * hash) + REGEXES_FIELD_NUMBER;
      hash = (53 * hash) + getRegexesList().hashCode();
    }
    hash = (37 * hash) + PARAM_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + paramType_;
    if (!internalGetCustomMetadata().getMap().isEmpty()) {
      hash = (37 * hash) + CUSTOM_METADATA_FIELD_NUMBER;
      hash = (53 * hash) + internalGetCustomMetadata().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public static com.google.dataflow.v1beta3.ParameterMetadata 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.ParameterMetadata parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.dataflow.v1beta3.ParameterMetadata 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.ParameterMetadata parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

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

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

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

  public static com.google.dataflow.v1beta3.ParameterMetadata 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.ParameterMetadata 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>
   * Metadata for a specific parameter.
   * </pre>
   *
   * Protobuf type {@code google.dataflow.v1beta3.ParameterMetadata}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.dataflow.v1beta3.ParameterMetadata)
      com.google.dataflow.v1beta3.ParameterMetadataOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.dataflow.v1beta3.TemplatesProto
          .internal_static_google_dataflow_v1beta3_ParameterMetadata_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(int number) {
      switch (number) {
        case 7:
          return internalGetCustomMetadata();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
      switch (number) {
        case 7:
          return internalGetMutableCustomMetadata();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

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

    // Construct using com.google.dataflow.v1beta3.ParameterMetadata.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();
      name_ = "";

      label_ = "";

      helpText_ = "";

      isOptional_ = false;

      regexes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      paramType_ = 0;

      internalGetMutableCustomMetadata().clear();
      return this;
    }

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

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

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

    @java.lang.Override
    public com.google.dataflow.v1beta3.ParameterMetadata buildPartial() {
      com.google.dataflow.v1beta3.ParameterMetadata result =
          new com.google.dataflow.v1beta3.ParameterMetadata(this);
      int from_bitField0_ = bitField0_;
      result.name_ = name_;
      result.label_ = label_;
      result.helpText_ = helpText_;
      result.isOptional_ = isOptional_;
      if (((bitField0_ & 0x00000001) != 0)) {
        regexes_ = regexes_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000001);
      }
      result.regexes_ = regexes_;
      result.paramType_ = paramType_;
      result.customMetadata_ = internalGetCustomMetadata();
      result.customMetadata_.makeImmutable();
      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.ParameterMetadata) {
        return mergeFrom((com.google.dataflow.v1beta3.ParameterMetadata) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.dataflow.v1beta3.ParameterMetadata other) {
      if (other == com.google.dataflow.v1beta3.ParameterMetadata.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (!other.getLabel().isEmpty()) {
        label_ = other.label_;
        onChanged();
      }
      if (!other.getHelpText().isEmpty()) {
        helpText_ = other.helpText_;
        onChanged();
      }
      if (other.getIsOptional() != false) {
        setIsOptional(other.getIsOptional());
      }
      if (!other.regexes_.isEmpty()) {
        if (regexes_.isEmpty()) {
          regexes_ = other.regexes_;
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          ensureRegexesIsMutable();
          regexes_.addAll(other.regexes_);
        }
        onChanged();
      }
      if (other.paramType_ != 0) {
        setParamTypeValue(other.getParamTypeValue());
      }
      internalGetMutableCustomMetadata().mergeFrom(other.internalGetCustomMetadata());
      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 {
      com.google.dataflow.v1beta3.ParameterMetadata parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.dataflow.v1beta3.ParameterMetadata) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int bitField0_;

    private java.lang.Object name_ = "";
    /**
     *
     *
     * <pre>
     * Required. The name of the parameter.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The name of the parameter.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The name of the parameter.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      name_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The name of the parameter.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {

      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The name of the parameter.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object label_ = "";
    /**
     *
     *
     * <pre>
     * Required. The label to display for the parameter.
     * </pre>
     *
     * <code>string label = 2;</code>
     *
     * @return The label.
     */
    public java.lang.String getLabel() {
      java.lang.Object ref = label_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        label_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The label to display for the parameter.
     * </pre>
     *
     * <code>string label = 2;</code>
     *
     * @return The bytes for label.
     */
    public com.google.protobuf.ByteString getLabelBytes() {
      java.lang.Object ref = label_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        label_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The label to display for the parameter.
     * </pre>
     *
     * <code>string label = 2;</code>
     *
     * @param value The label to set.
     * @return This builder for chaining.
     */
    public Builder setLabel(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      label_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The label to display for the parameter.
     * </pre>
     *
     * <code>string label = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearLabel() {

      label_ = getDefaultInstance().getLabel();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The label to display for the parameter.
     * </pre>
     *
     * <code>string label = 2;</code>
     *
     * @param value The bytes for label to set.
     * @return This builder for chaining.
     */
    public Builder setLabelBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object helpText_ = "";
    /**
     *
     *
     * <pre>
     * Required. The help text to display for the parameter.
     * </pre>
     *
     * <code>string help_text = 3;</code>
     *
     * @return The helpText.
     */
    public java.lang.String getHelpText() {
      java.lang.Object ref = helpText_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        helpText_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The help text to display for the parameter.
     * </pre>
     *
     * <code>string help_text = 3;</code>
     *
     * @return The bytes for helpText.
     */
    public com.google.protobuf.ByteString getHelpTextBytes() {
      java.lang.Object ref = helpText_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        helpText_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The help text to display for the parameter.
     * </pre>
     *
     * <code>string help_text = 3;</code>
     *
     * @param value The helpText to set.
     * @return This builder for chaining.
     */
    public Builder setHelpText(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      helpText_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The help text to display for the parameter.
     * </pre>
     *
     * <code>string help_text = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearHelpText() {

      helpText_ = getDefaultInstance().getHelpText();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The help text to display for the parameter.
     * </pre>
     *
     * <code>string help_text = 3;</code>
     *
     * @param value The bytes for helpText to set.
     * @return This builder for chaining.
     */
    public Builder setHelpTextBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private boolean isOptional_;
    /**
     *
     *
     * <pre>
     * Optional. Whether the parameter is optional. Defaults to false.
     * </pre>
     *
     * <code>bool is_optional = 4;</code>
     *
     * @return The isOptional.
     */
    @java.lang.Override
    public boolean getIsOptional() {
      return isOptional_;
    }
    /**
     *
     *
     * <pre>
     * Optional. Whether the parameter is optional. Defaults to false.
     * </pre>
     *
     * <code>bool is_optional = 4;</code>
     *
     * @param value The isOptional to set.
     * @return This builder for chaining.
     */
    public Builder setIsOptional(boolean value) {

      isOptional_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Whether the parameter is optional. Defaults to false.
     * </pre>
     *
     * <code>bool is_optional = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearIsOptional() {

      isOptional_ = false;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList regexes_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureRegexesIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        regexes_ = new com.google.protobuf.LazyStringArrayList(regexes_);
        bitField0_ |= 0x00000001;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. Regexes that the parameter must match.
     * </pre>
     *
     * <code>repeated string regexes = 5;</code>
     *
     * @return A list containing the regexes.
     */
    public com.google.protobuf.ProtocolStringList getRegexesList() {
      return regexes_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * Optional. Regexes that the parameter must match.
     * </pre>
     *
     * <code>repeated string regexes = 5;</code>
     *
     * @return The count of regexes.
     */
    public int getRegexesCount() {
      return regexes_.size();
    }
    /**
     *
     *
     * <pre>
     * Optional. Regexes that the parameter must match.
     * </pre>
     *
     * <code>repeated string regexes = 5;</code>
     *
     * @param index The index of the element to return.
     * @return The regexes at the given index.
     */
    public java.lang.String getRegexes(int index) {
      return regexes_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Optional. Regexes that the parameter must match.
     * </pre>
     *
     * <code>repeated string regexes = 5;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the regexes at the given index.
     */
    public com.google.protobuf.ByteString getRegexesBytes(int index) {
      return regexes_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * Optional. Regexes that the parameter must match.
     * </pre>
     *
     * <code>repeated string regexes = 5;</code>
     *
     * @param index The index to set the value at.
     * @param value The regexes to set.
     * @return This builder for chaining.
     */
    public Builder setRegexes(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureRegexesIsMutable();
      regexes_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Regexes that the parameter must match.
     * </pre>
     *
     * <code>repeated string regexes = 5;</code>
     *
     * @param value The regexes to add.
     * @return This builder for chaining.
     */
    public Builder addRegexes(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureRegexesIsMutable();
      regexes_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Regexes that the parameter must match.
     * </pre>
     *
     * <code>repeated string regexes = 5;</code>
     *
     * @param values The regexes to add.
     * @return This builder for chaining.
     */
    public Builder addAllRegexes(java.lang.Iterable<java.lang.String> values) {
      ensureRegexesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, regexes_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Regexes that the parameter must match.
     * </pre>
     *
     * <code>repeated string regexes = 5;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearRegexes() {
      regexes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Regexes that the parameter must match.
     * </pre>
     *
     * <code>repeated string regexes = 5;</code>
     *
     * @param value The bytes of the regexes to add.
     * @return This builder for chaining.
     */
    public Builder addRegexesBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureRegexesIsMutable();
      regexes_.add(value);
      onChanged();
      return this;
    }

    private int paramType_ = 0;
    /**
     *
     *
     * <pre>
     * Optional. The type of the parameter.
     * Used for selecting input picker.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.ParameterType param_type = 6;</code>
     *
     * @return The enum numeric value on the wire for paramType.
     */
    @java.lang.Override
    public int getParamTypeValue() {
      return paramType_;
    }
    /**
     *
     *
     * <pre>
     * Optional. The type of the parameter.
     * Used for selecting input picker.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.ParameterType param_type = 6;</code>
     *
     * @param value The enum numeric value on the wire for paramType to set.
     * @return This builder for chaining.
     */
    public Builder setParamTypeValue(int value) {

      paramType_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The type of the parameter.
     * Used for selecting input picker.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.ParameterType param_type = 6;</code>
     *
     * @return The paramType.
     */
    @java.lang.Override
    public com.google.dataflow.v1beta3.ParameterType getParamType() {
      @SuppressWarnings("deprecation")
      com.google.dataflow.v1beta3.ParameterType result =
          com.google.dataflow.v1beta3.ParameterType.valueOf(paramType_);
      return result == null ? com.google.dataflow.v1beta3.ParameterType.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * Optional. The type of the parameter.
     * Used for selecting input picker.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.ParameterType param_type = 6;</code>
     *
     * @param value The paramType to set.
     * @return This builder for chaining.
     */
    public Builder setParamType(com.google.dataflow.v1beta3.ParameterType value) {
      if (value == null) {
        throw new NullPointerException();
      }

      paramType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The type of the parameter.
     * Used for selecting input picker.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.ParameterType param_type = 6;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearParamType() {

      paramType_ = 0;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> customMetadata_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetCustomMetadata() {
      if (customMetadata_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            CustomMetadataDefaultEntryHolder.defaultEntry);
      }
      return customMetadata_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableCustomMetadata() {
      onChanged();
      ;
      if (customMetadata_ == null) {
        customMetadata_ =
            com.google.protobuf.MapField.newMapField(CustomMetadataDefaultEntryHolder.defaultEntry);
      }
      if (!customMetadata_.isMutable()) {
        customMetadata_ = customMetadata_.copy();
      }
      return customMetadata_;
    }

    public int getCustomMetadataCount() {
      return internalGetCustomMetadata().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Optional. Additional metadata for describing this parameter.
     * </pre>
     *
     * <code>map&lt;string, string&gt; custom_metadata = 7;</code>
     */
    @java.lang.Override
    public boolean containsCustomMetadata(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetCustomMetadata().getMap().containsKey(key);
    }
    /** Use {@link #getCustomMetadataMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getCustomMetadata() {
      return getCustomMetadataMap();
    }
    /**
     *
     *
     * <pre>
     * Optional. Additional metadata for describing this parameter.
     * </pre>
     *
     * <code>map&lt;string, string&gt; custom_metadata = 7;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getCustomMetadataMap() {
      return internalGetCustomMetadata().getMap();
    }
    /**
     *
     *
     * <pre>
     * Optional. Additional metadata for describing this parameter.
     * </pre>
     *
     * <code>map&lt;string, string&gt; custom_metadata = 7;</code>
     */
    @java.lang.Override
    public java.lang.String getCustomMetadataOrDefault(
        java.lang.String key, java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetCustomMetadata().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Optional. Additional metadata for describing this parameter.
     * </pre>
     *
     * <code>map&lt;string, string&gt; custom_metadata = 7;</code>
     */
    @java.lang.Override
    public java.lang.String getCustomMetadataOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetCustomMetadata().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearCustomMetadata() {
      internalGetMutableCustomMetadata().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Additional metadata for describing this parameter.
     * </pre>
     *
     * <code>map&lt;string, string&gt; custom_metadata = 7;</code>
     */
    public Builder removeCustomMetadata(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableCustomMetadata().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableCustomMetadata() {
      return internalGetMutableCustomMetadata().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Optional. Additional metadata for describing this parameter.
     * </pre>
     *
     * <code>map&lt;string, string&gt; custom_metadata = 7;</code>
     */
    public Builder putCustomMetadata(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }

      internalGetMutableCustomMetadata().getMutableMap().put(key, value);
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Additional metadata for describing this parameter.
     * </pre>
     *
     * <code>map&lt;string, string&gt; custom_metadata = 7;</code>
     */
    public Builder putAllCustomMetadata(java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableCustomMetadata().getMutableMap().putAll(values);
      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:google.dataflow.v1beta3.ParameterMetadata)
  }

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

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

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

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

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

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

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