/*
 * 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/cloud/functions/v2beta/functions.proto

package com.google.cloud.functions.v2beta;

/**
 *
 *
 * <pre>
 * Describes the Build step of the function that builds a container from the
 * given source.
 * </pre>
 *
 * Protobuf type {@code google.cloud.functions.v2beta.BuildConfig}
 */
public final class BuildConfig extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.functions.v2beta.BuildConfig)
    BuildConfigOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use BuildConfig.newBuilder() to construct.
  private BuildConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private BuildConfig() {
    build_ = "";
    runtime_ = "";
    entryPoint_ = "";
    workerPool_ = "";
    dockerRepository_ = "";
  }

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

  @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.cloud.functions.v2beta.FunctionsProto
        .internal_static_google_cloud_functions_v2beta_BuildConfig_descriptor;
  }

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

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.functions.v2beta.FunctionsProto
        .internal_static_google_cloud_functions_v2beta_BuildConfig_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.functions.v2beta.BuildConfig.class,
            com.google.cloud.functions.v2beta.BuildConfig.Builder.class);
  }

  public static final int BUILD_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object build_ = "";
  /**
   *
   *
   * <pre>
   * Output only. The Cloud Build name of the latest successful deployment of the
   * function.
   * </pre>
   *
   * <code>
   * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
   * </code>
   *
   * @return The build.
   */
  @java.lang.Override
  public java.lang.String getBuild() {
    java.lang.Object ref = build_;
    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();
      build_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. The Cloud Build name of the latest successful deployment of the
   * function.
   * </pre>
   *
   * <code>
   * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
   * </code>
   *
   * @return The bytes for build.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getBuildBytes() {
    java.lang.Object ref = build_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      build_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int RUNTIME_FIELD_NUMBER = 2;

  @SuppressWarnings("serial")
  private volatile java.lang.Object runtime_ = "";
  /**
   *
   *
   * <pre>
   * The runtime in which to run the function. Required when deploying a new
   * function, optional when updating an existing function. For a complete
   * list of possible choices, see the
   * [`gcloud` command
   * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).
   * </pre>
   *
   * <code>string runtime = 2;</code>
   *
   * @return The runtime.
   */
  @java.lang.Override
  public java.lang.String getRuntime() {
    java.lang.Object ref = runtime_;
    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();
      runtime_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The runtime in which to run the function. Required when deploying a new
   * function, optional when updating an existing function. For a complete
   * list of possible choices, see the
   * [`gcloud` command
   * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).
   * </pre>
   *
   * <code>string runtime = 2;</code>
   *
   * @return The bytes for runtime.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getRuntimeBytes() {
    java.lang.Object ref = runtime_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      runtime_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ENTRY_POINT_FIELD_NUMBER = 3;

  @SuppressWarnings("serial")
  private volatile java.lang.Object entryPoint_ = "";
  /**
   *
   *
   * <pre>
   * The name of the function (as defined in source code) that will be
   * executed. Defaults to the resource name suffix, if not specified. For
   * backward compatibility, if function with given name is not found, then the
   * system will try to use function named "function".
   * For Node.js this is name of a function exported by the module specified
   * in `source_location`.
   * </pre>
   *
   * <code>string entry_point = 3;</code>
   *
   * @return The entryPoint.
   */
  @java.lang.Override
  public java.lang.String getEntryPoint() {
    java.lang.Object ref = entryPoint_;
    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();
      entryPoint_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The name of the function (as defined in source code) that will be
   * executed. Defaults to the resource name suffix, if not specified. For
   * backward compatibility, if function with given name is not found, then the
   * system will try to use function named "function".
   * For Node.js this is name of a function exported by the module specified
   * in `source_location`.
   * </pre>
   *
   * <code>string entry_point = 3;</code>
   *
   * @return The bytes for entryPoint.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getEntryPointBytes() {
    java.lang.Object ref = entryPoint_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      entryPoint_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SOURCE_FIELD_NUMBER = 4;
  private com.google.cloud.functions.v2beta.Source source_;
  /**
   *
   *
   * <pre>
   * The location of the function source code.
   * </pre>
   *
   * <code>.google.cloud.functions.v2beta.Source source = 4;</code>
   *
   * @return Whether the source field is set.
   */
  @java.lang.Override
  public boolean hasSource() {
    return source_ != null;
  }
  /**
   *
   *
   * <pre>
   * The location of the function source code.
   * </pre>
   *
   * <code>.google.cloud.functions.v2beta.Source source = 4;</code>
   *
   * @return The source.
   */
  @java.lang.Override
  public com.google.cloud.functions.v2beta.Source getSource() {
    return source_ == null
        ? com.google.cloud.functions.v2beta.Source.getDefaultInstance()
        : source_;
  }
  /**
   *
   *
   * <pre>
   * The location of the function source code.
   * </pre>
   *
   * <code>.google.cloud.functions.v2beta.Source source = 4;</code>
   */
  @java.lang.Override
  public com.google.cloud.functions.v2beta.SourceOrBuilder getSourceOrBuilder() {
    return source_ == null
        ? com.google.cloud.functions.v2beta.Source.getDefaultInstance()
        : source_;
  }

  public static final int SOURCE_PROVENANCE_FIELD_NUMBER = 8;
  private com.google.cloud.functions.v2beta.SourceProvenance sourceProvenance_;
  /**
   *
   *
   * <pre>
   * Output only. A permanent fixed identifier for source.
   * </pre>
   *
   * <code>
   * .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the sourceProvenance field is set.
   */
  @java.lang.Override
  public boolean hasSourceProvenance() {
    return sourceProvenance_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. A permanent fixed identifier for source.
   * </pre>
   *
   * <code>
   * .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The sourceProvenance.
   */
  @java.lang.Override
  public com.google.cloud.functions.v2beta.SourceProvenance getSourceProvenance() {
    return sourceProvenance_ == null
        ? com.google.cloud.functions.v2beta.SourceProvenance.getDefaultInstance()
        : sourceProvenance_;
  }
  /**
   *
   *
   * <pre>
   * Output only. A permanent fixed identifier for source.
   * </pre>
   *
   * <code>
   * .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.functions.v2beta.SourceProvenanceOrBuilder
      getSourceProvenanceOrBuilder() {
    return sourceProvenance_ == null
        ? com.google.cloud.functions.v2beta.SourceProvenance.getDefaultInstance()
        : sourceProvenance_;
  }

  public static final int WORKER_POOL_FIELD_NUMBER = 5;

  @SuppressWarnings("serial")
  private volatile java.lang.Object workerPool_ = "";
  /**
   *
   *
   * <pre>
   * Name of the Cloud Build Custom Worker Pool that should be used to build the
   * function. The format of this field is
   * `projects/{project}/locations/{region}/workerPools/{workerPool}` where
   * {project} and {region} are the project id and region respectively where the
   * worker pool is defined and {workerPool} is the short name of the worker
   * pool.
   * If the project id is not the same as the function, then the Cloud
   * Functions Service Agent
   * (service-&lt;project_number&gt;&#64;gcf-admin-robot.iam.gserviceaccount.com) must be
   * granted the role Cloud Build Custom Workers Builder
   * (roles/cloudbuild.customworkers.builder) in the project.
   * </pre>
   *
   * <code>string worker_pool = 5 [(.google.api.resource_reference) = { ... }</code>
   *
   * @return The workerPool.
   */
  @java.lang.Override
  public java.lang.String getWorkerPool() {
    java.lang.Object ref = workerPool_;
    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();
      workerPool_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Name of the Cloud Build Custom Worker Pool that should be used to build the
   * function. The format of this field is
   * `projects/{project}/locations/{region}/workerPools/{workerPool}` where
   * {project} and {region} are the project id and region respectively where the
   * worker pool is defined and {workerPool} is the short name of the worker
   * pool.
   * If the project id is not the same as the function, then the Cloud
   * Functions Service Agent
   * (service-&lt;project_number&gt;&#64;gcf-admin-robot.iam.gserviceaccount.com) must be
   * granted the role Cloud Build Custom Workers Builder
   * (roles/cloudbuild.customworkers.builder) in the project.
   * </pre>
   *
   * <code>string worker_pool = 5 [(.google.api.resource_reference) = { ... }</code>
   *
   * @return The bytes for workerPool.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getWorkerPoolBytes() {
    java.lang.Object ref = workerPool_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      workerPool_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ENVIRONMENT_VARIABLES_FIELD_NUMBER = 6;

  private static final class EnvironmentVariablesDefaultEntryHolder {
    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.cloud.functions.v2beta.FunctionsProto
                .internal_static_google_cloud_functions_v2beta_BuildConfig_EnvironmentVariablesEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<java.lang.String, java.lang.String> environmentVariables_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String>
      internalGetEnvironmentVariables() {
    if (environmentVariables_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          EnvironmentVariablesDefaultEntryHolder.defaultEntry);
    }
    return environmentVariables_;
  }

  public int getEnvironmentVariablesCount() {
    return internalGetEnvironmentVariables().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * User-provided build-time environment variables for the function
   * </pre>
   *
   * <code>map&lt;string, string&gt; environment_variables = 6;</code>
   */
  @java.lang.Override
  public boolean containsEnvironmentVariables(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetEnvironmentVariables().getMap().containsKey(key);
  }
  /** Use {@link #getEnvironmentVariablesMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getEnvironmentVariables() {
    return getEnvironmentVariablesMap();
  }
  /**
   *
   *
   * <pre>
   * User-provided build-time environment variables for the function
   * </pre>
   *
   * <code>map&lt;string, string&gt; environment_variables = 6;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getEnvironmentVariablesMap() {
    return internalGetEnvironmentVariables().getMap();
  }
  /**
   *
   *
   * <pre>
   * User-provided build-time environment variables for the function
   * </pre>
   *
   * <code>map&lt;string, string&gt; environment_variables = 6;</code>
   */
  @java.lang.Override
  public /* nullable */ java.lang.String getEnvironmentVariablesOrDefault(
      java.lang.String key,
      /* nullable */
      java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetEnvironmentVariables().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * User-provided build-time environment variables for the function
   * </pre>
   *
   * <code>map&lt;string, string&gt; environment_variables = 6;</code>
   */
  @java.lang.Override
  public java.lang.String getEnvironmentVariablesOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetEnvironmentVariables().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int DOCKER_REPOSITORY_FIELD_NUMBER = 7;

  @SuppressWarnings("serial")
  private volatile java.lang.Object dockerRepository_ = "";
  /**
   *
   *
   * <pre>
   * Optional. User managed repository created in Artifact Registry optionally with a
   * customer managed encryption key. This is the repository to which the
   * function docker image will be pushed after it is built by Cloud Build.
   * If unspecified, GCF will create and use a repository named 'gcf-artifacts'
   * for every deployed region.
   * It must match the pattern
   * `projects/{project}/locations/{location}/repositories/{repository}`.
   * Cross-project repositories are not supported.
   * Cross-location repositories are not supported.
   * Repository format must be 'DOCKER'.
   * </pre>
   *
   * <code>
   * string docker_repository = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
   * </code>
   *
   * @return The dockerRepository.
   */
  @java.lang.Override
  public java.lang.String getDockerRepository() {
    java.lang.Object ref = dockerRepository_;
    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();
      dockerRepository_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Optional. User managed repository created in Artifact Registry optionally with a
   * customer managed encryption key. This is the repository to which the
   * function docker image will be pushed after it is built by Cloud Build.
   * If unspecified, GCF will create and use a repository named 'gcf-artifacts'
   * for every deployed region.
   * It must match the pattern
   * `projects/{project}/locations/{location}/repositories/{repository}`.
   * Cross-project repositories are not supported.
   * Cross-location repositories are not supported.
   * Repository format must be 'DOCKER'.
   * </pre>
   *
   * <code>
   * string docker_repository = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
   * </code>
   *
   * @return The bytes for dockerRepository.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getDockerRepositoryBytes() {
    java.lang.Object ref = dockerRepository_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      dockerRepository_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(build_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, build_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtime_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, runtime_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entryPoint_);
    }
    if (source_ != null) {
      output.writeMessage(4, getSource());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerPool_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, workerPool_);
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output,
        internalGetEnvironmentVariables(),
        EnvironmentVariablesDefaultEntryHolder.defaultEntry,
        6);
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dockerRepository_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, dockerRepository_);
    }
    if (sourceProvenance_ != null) {
      output.writeMessage(8, getSourceProvenance());
    }
    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(build_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, build_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtime_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, runtime_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entryPoint_);
    }
    if (source_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSource());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerPool_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, workerPool_);
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetEnvironmentVariables().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> environmentVariables__ =
          EnvironmentVariablesDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, environmentVariables__);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dockerRepository_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, dockerRepository_);
    }
    if (sourceProvenance_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSourceProvenance());
    }
    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.cloud.functions.v2beta.BuildConfig)) {
      return super.equals(obj);
    }
    com.google.cloud.functions.v2beta.BuildConfig other =
        (com.google.cloud.functions.v2beta.BuildConfig) obj;

    if (!getBuild().equals(other.getBuild())) return false;
    if (!getRuntime().equals(other.getRuntime())) return false;
    if (!getEntryPoint().equals(other.getEntryPoint())) return false;
    if (hasSource() != other.hasSource()) return false;
    if (hasSource()) {
      if (!getSource().equals(other.getSource())) return false;
    }
    if (hasSourceProvenance() != other.hasSourceProvenance()) return false;
    if (hasSourceProvenance()) {
      if (!getSourceProvenance().equals(other.getSourceProvenance())) return false;
    }
    if (!getWorkerPool().equals(other.getWorkerPool())) return false;
    if (!internalGetEnvironmentVariables().equals(other.internalGetEnvironmentVariables()))
      return false;
    if (!getDockerRepository().equals(other.getDockerRepository())) 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) + BUILD_FIELD_NUMBER;
    hash = (53 * hash) + getBuild().hashCode();
    hash = (37 * hash) + RUNTIME_FIELD_NUMBER;
    hash = (53 * hash) + getRuntime().hashCode();
    hash = (37 * hash) + ENTRY_POINT_FIELD_NUMBER;
    hash = (53 * hash) + getEntryPoint().hashCode();
    if (hasSource()) {
      hash = (37 * hash) + SOURCE_FIELD_NUMBER;
      hash = (53 * hash) + getSource().hashCode();
    }
    if (hasSourceProvenance()) {
      hash = (37 * hash) + SOURCE_PROVENANCE_FIELD_NUMBER;
      hash = (53 * hash) + getSourceProvenance().hashCode();
    }
    hash = (37 * hash) + WORKER_POOL_FIELD_NUMBER;
    hash = (53 * hash) + getWorkerPool().hashCode();
    if (!internalGetEnvironmentVariables().getMap().isEmpty()) {
      hash = (37 * hash) + ENVIRONMENT_VARIABLES_FIELD_NUMBER;
      hash = (53 * hash) + internalGetEnvironmentVariables().hashCode();
    }
    hash = (37 * hash) + DOCKER_REPOSITORY_FIELD_NUMBER;
    hash = (53 * hash) + getDockerRepository().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.functions.v2beta.BuildConfig parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.functions.v2beta.BuildConfig parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.functions.v2beta.BuildConfig parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

  public static com.google.cloud.functions.v2beta.BuildConfig parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.functions.v2beta.BuildConfig parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

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

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

  public static com.google.cloud.functions.v2beta.BuildConfig 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.cloud.functions.v2beta.BuildConfig 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>
   * Describes the Build step of the function that builds a container from the
   * given source.
   * </pre>
   *
   * Protobuf type {@code google.cloud.functions.v2beta.BuildConfig}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.functions.v2beta.BuildConfig)
      com.google.cloud.functions.v2beta.BuildConfigOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.functions.v2beta.FunctionsProto
          .internal_static_google_cloud_functions_v2beta_BuildConfig_descriptor;
    }

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

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

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.functions.v2beta.FunctionsProto
          .internal_static_google_cloud_functions_v2beta_BuildConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.functions.v2beta.BuildConfig.class,
              com.google.cloud.functions.v2beta.BuildConfig.Builder.class);
    }

    // Construct using com.google.cloud.functions.v2beta.BuildConfig.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      build_ = "";
      runtime_ = "";
      entryPoint_ = "";
      source_ = null;
      if (sourceBuilder_ != null) {
        sourceBuilder_.dispose();
        sourceBuilder_ = null;
      }
      sourceProvenance_ = null;
      if (sourceProvenanceBuilder_ != null) {
        sourceProvenanceBuilder_.dispose();
        sourceProvenanceBuilder_ = null;
      }
      workerPool_ = "";
      internalGetMutableEnvironmentVariables().clear();
      dockerRepository_ = "";
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.functions.v2beta.FunctionsProto
          .internal_static_google_cloud_functions_v2beta_BuildConfig_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.functions.v2beta.BuildConfig getDefaultInstanceForType() {
      return com.google.cloud.functions.v2beta.BuildConfig.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.functions.v2beta.BuildConfig build() {
      com.google.cloud.functions.v2beta.BuildConfig result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.functions.v2beta.BuildConfig buildPartial() {
      com.google.cloud.functions.v2beta.BuildConfig result =
          new com.google.cloud.functions.v2beta.BuildConfig(this);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartial0(com.google.cloud.functions.v2beta.BuildConfig result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.build_ = build_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.runtime_ = runtime_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.entryPoint_ = entryPoint_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.source_ = sourceBuilder_ == null ? source_ : sourceBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.sourceProvenance_ =
            sourceProvenanceBuilder_ == null ? sourceProvenance_ : sourceProvenanceBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.workerPool_ = workerPool_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.environmentVariables_ = internalGetEnvironmentVariables();
        result.environmentVariables_.makeImmutable();
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.dockerRepository_ = dockerRepository_;
      }
    }

    @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.cloud.functions.v2beta.BuildConfig) {
        return mergeFrom((com.google.cloud.functions.v2beta.BuildConfig) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.functions.v2beta.BuildConfig other) {
      if (other == com.google.cloud.functions.v2beta.BuildConfig.getDefaultInstance()) return this;
      if (!other.getBuild().isEmpty()) {
        build_ = other.build_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (!other.getRuntime().isEmpty()) {
        runtime_ = other.runtime_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      if (!other.getEntryPoint().isEmpty()) {
        entryPoint_ = other.entryPoint_;
        bitField0_ |= 0x00000004;
        onChanged();
      }
      if (other.hasSource()) {
        mergeSource(other.getSource());
      }
      if (other.hasSourceProvenance()) {
        mergeSourceProvenance(other.getSourceProvenance());
      }
      if (!other.getWorkerPool().isEmpty()) {
        workerPool_ = other.workerPool_;
        bitField0_ |= 0x00000020;
        onChanged();
      }
      internalGetMutableEnvironmentVariables().mergeFrom(other.internalGetEnvironmentVariables());
      bitField0_ |= 0x00000040;
      if (!other.getDockerRepository().isEmpty()) {
        dockerRepository_ = other.dockerRepository_;
        bitField0_ |= 0x00000080;
        onChanged();
      }
      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:
              {
                build_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 18:
              {
                runtime_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 18
            case 26:
              {
                entryPoint_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            case 34:
              {
                input.readMessage(getSourceFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 34
            case 42:
              {
                workerPool_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000020;
                break;
              } // case 42
            case 50:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
                    environmentVariables__ =
                        input.readMessage(
                            EnvironmentVariablesDefaultEntryHolder.defaultEntry.getParserForType(),
                            extensionRegistry);
                internalGetMutableEnvironmentVariables()
                    .getMutableMap()
                    .put(environmentVariables__.getKey(), environmentVariables__.getValue());
                bitField0_ |= 0x00000040;
                break;
              } // case 50
            case 58:
              {
                dockerRepository_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000080;
                break;
              } // case 58
            case 66:
              {
                input.readMessage(
                    getSourceProvenanceFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000010;
                break;
              } // case 66
            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 build_ = "";
    /**
     *
     *
     * <pre>
     * Output only. The Cloud Build name of the latest successful deployment of the
     * function.
     * </pre>
     *
     * <code>
     * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @return The build.
     */
    public java.lang.String getBuild() {
      java.lang.Object ref = build_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        build_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The Cloud Build name of the latest successful deployment of the
     * function.
     * </pre>
     *
     * <code>
     * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @return The bytes for build.
     */
    public com.google.protobuf.ByteString getBuildBytes() {
      java.lang.Object ref = build_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        build_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The Cloud Build name of the latest successful deployment of the
     * function.
     * </pre>
     *
     * <code>
     * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @param value The build to set.
     * @return This builder for chaining.
     */
    public Builder setBuild(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      build_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The Cloud Build name of the latest successful deployment of the
     * function.
     * </pre>
     *
     * <code>
     * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearBuild() {
      build_ = getDefaultInstance().getBuild();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The Cloud Build name of the latest successful deployment of the
     * function.
     * </pre>
     *
     * <code>
     * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @param value The bytes for build to set.
     * @return This builder for chaining.
     */
    public Builder setBuildBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      build_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private java.lang.Object runtime_ = "";
    /**
     *
     *
     * <pre>
     * The runtime in which to run the function. Required when deploying a new
     * function, optional when updating an existing function. For a complete
     * list of possible choices, see the
     * [`gcloud` command
     * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).
     * </pre>
     *
     * <code>string runtime = 2;</code>
     *
     * @return The runtime.
     */
    public java.lang.String getRuntime() {
      java.lang.Object ref = runtime_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        runtime_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The runtime in which to run the function. Required when deploying a new
     * function, optional when updating an existing function. For a complete
     * list of possible choices, see the
     * [`gcloud` command
     * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).
     * </pre>
     *
     * <code>string runtime = 2;</code>
     *
     * @return The bytes for runtime.
     */
    public com.google.protobuf.ByteString getRuntimeBytes() {
      java.lang.Object ref = runtime_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        runtime_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The runtime in which to run the function. Required when deploying a new
     * function, optional when updating an existing function. For a complete
     * list of possible choices, see the
     * [`gcloud` command
     * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).
     * </pre>
     *
     * <code>string runtime = 2;</code>
     *
     * @param value The runtime to set.
     * @return This builder for chaining.
     */
    public Builder setRuntime(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      runtime_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The runtime in which to run the function. Required when deploying a new
     * function, optional when updating an existing function. For a complete
     * list of possible choices, see the
     * [`gcloud` command
     * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).
     * </pre>
     *
     * <code>string runtime = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearRuntime() {
      runtime_ = getDefaultInstance().getRuntime();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The runtime in which to run the function. Required when deploying a new
     * function, optional when updating an existing function. For a complete
     * list of possible choices, see the
     * [`gcloud` command
     * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).
     * </pre>
     *
     * <code>string runtime = 2;</code>
     *
     * @param value The bytes for runtime to set.
     * @return This builder for chaining.
     */
    public Builder setRuntimeBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      runtime_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    private java.lang.Object entryPoint_ = "";
    /**
     *
     *
     * <pre>
     * The name of the function (as defined in source code) that will be
     * executed. Defaults to the resource name suffix, if not specified. For
     * backward compatibility, if function with given name is not found, then the
     * system will try to use function named "function".
     * For Node.js this is name of a function exported by the module specified
     * in `source_location`.
     * </pre>
     *
     * <code>string entry_point = 3;</code>
     *
     * @return The entryPoint.
     */
    public java.lang.String getEntryPoint() {
      java.lang.Object ref = entryPoint_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        entryPoint_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The name of the function (as defined in source code) that will be
     * executed. Defaults to the resource name suffix, if not specified. For
     * backward compatibility, if function with given name is not found, then the
     * system will try to use function named "function".
     * For Node.js this is name of a function exported by the module specified
     * in `source_location`.
     * </pre>
     *
     * <code>string entry_point = 3;</code>
     *
     * @return The bytes for entryPoint.
     */
    public com.google.protobuf.ByteString getEntryPointBytes() {
      java.lang.Object ref = entryPoint_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        entryPoint_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The name of the function (as defined in source code) that will be
     * executed. Defaults to the resource name suffix, if not specified. For
     * backward compatibility, if function with given name is not found, then the
     * system will try to use function named "function".
     * For Node.js this is name of a function exported by the module specified
     * in `source_location`.
     * </pre>
     *
     * <code>string entry_point = 3;</code>
     *
     * @param value The entryPoint to set.
     * @return This builder for chaining.
     */
    public Builder setEntryPoint(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      entryPoint_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The name of the function (as defined in source code) that will be
     * executed. Defaults to the resource name suffix, if not specified. For
     * backward compatibility, if function with given name is not found, then the
     * system will try to use function named "function".
     * For Node.js this is name of a function exported by the module specified
     * in `source_location`.
     * </pre>
     *
     * <code>string entry_point = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearEntryPoint() {
      entryPoint_ = getDefaultInstance().getEntryPoint();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The name of the function (as defined in source code) that will be
     * executed. Defaults to the resource name suffix, if not specified. For
     * backward compatibility, if function with given name is not found, then the
     * system will try to use function named "function".
     * For Node.js this is name of a function exported by the module specified
     * in `source_location`.
     * </pre>
     *
     * <code>string entry_point = 3;</code>
     *
     * @param value The bytes for entryPoint to set.
     * @return This builder for chaining.
     */
    public Builder setEntryPointBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      entryPoint_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    private com.google.cloud.functions.v2beta.Source source_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.functions.v2beta.Source,
            com.google.cloud.functions.v2beta.Source.Builder,
            com.google.cloud.functions.v2beta.SourceOrBuilder>
        sourceBuilder_;
    /**
     *
     *
     * <pre>
     * The location of the function source code.
     * </pre>
     *
     * <code>.google.cloud.functions.v2beta.Source source = 4;</code>
     *
     * @return Whether the source field is set.
     */
    public boolean hasSource() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * The location of the function source code.
     * </pre>
     *
     * <code>.google.cloud.functions.v2beta.Source source = 4;</code>
     *
     * @return The source.
     */
    public com.google.cloud.functions.v2beta.Source getSource() {
      if (sourceBuilder_ == null) {
        return source_ == null
            ? com.google.cloud.functions.v2beta.Source.getDefaultInstance()
            : source_;
      } else {
        return sourceBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The location of the function source code.
     * </pre>
     *
     * <code>.google.cloud.functions.v2beta.Source source = 4;</code>
     */
    public Builder setSource(com.google.cloud.functions.v2beta.Source value) {
      if (sourceBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        source_ = value;
      } else {
        sourceBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The location of the function source code.
     * </pre>
     *
     * <code>.google.cloud.functions.v2beta.Source source = 4;</code>
     */
    public Builder setSource(com.google.cloud.functions.v2beta.Source.Builder builderForValue) {
      if (sourceBuilder_ == null) {
        source_ = builderForValue.build();
      } else {
        sourceBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The location of the function source code.
     * </pre>
     *
     * <code>.google.cloud.functions.v2beta.Source source = 4;</code>
     */
    public Builder mergeSource(com.google.cloud.functions.v2beta.Source value) {
      if (sourceBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)
            && source_ != null
            && source_ != com.google.cloud.functions.v2beta.Source.getDefaultInstance()) {
          getSourceBuilder().mergeFrom(value);
        } else {
          source_ = value;
        }
      } else {
        sourceBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The location of the function source code.
     * </pre>
     *
     * <code>.google.cloud.functions.v2beta.Source source = 4;</code>
     */
    public Builder clearSource() {
      bitField0_ = (bitField0_ & ~0x00000008);
      source_ = null;
      if (sourceBuilder_ != null) {
        sourceBuilder_.dispose();
        sourceBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The location of the function source code.
     * </pre>
     *
     * <code>.google.cloud.functions.v2beta.Source source = 4;</code>
     */
    public com.google.cloud.functions.v2beta.Source.Builder getSourceBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getSourceFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The location of the function source code.
     * </pre>
     *
     * <code>.google.cloud.functions.v2beta.Source source = 4;</code>
     */
    public com.google.cloud.functions.v2beta.SourceOrBuilder getSourceOrBuilder() {
      if (sourceBuilder_ != null) {
        return sourceBuilder_.getMessageOrBuilder();
      } else {
        return source_ == null
            ? com.google.cloud.functions.v2beta.Source.getDefaultInstance()
            : source_;
      }
    }
    /**
     *
     *
     * <pre>
     * The location of the function source code.
     * </pre>
     *
     * <code>.google.cloud.functions.v2beta.Source source = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.functions.v2beta.Source,
            com.google.cloud.functions.v2beta.Source.Builder,
            com.google.cloud.functions.v2beta.SourceOrBuilder>
        getSourceFieldBuilder() {
      if (sourceBuilder_ == null) {
        sourceBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.functions.v2beta.Source,
                com.google.cloud.functions.v2beta.Source.Builder,
                com.google.cloud.functions.v2beta.SourceOrBuilder>(
                getSource(), getParentForChildren(), isClean());
        source_ = null;
      }
      return sourceBuilder_;
    }

    private com.google.cloud.functions.v2beta.SourceProvenance sourceProvenance_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.functions.v2beta.SourceProvenance,
            com.google.cloud.functions.v2beta.SourceProvenance.Builder,
            com.google.cloud.functions.v2beta.SourceProvenanceOrBuilder>
        sourceProvenanceBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. A permanent fixed identifier for source.
     * </pre>
     *
     * <code>
     * .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the sourceProvenance field is set.
     */
    public boolean hasSourceProvenance() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. A permanent fixed identifier for source.
     * </pre>
     *
     * <code>
     * .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The sourceProvenance.
     */
    public com.google.cloud.functions.v2beta.SourceProvenance getSourceProvenance() {
      if (sourceProvenanceBuilder_ == null) {
        return sourceProvenance_ == null
            ? com.google.cloud.functions.v2beta.SourceProvenance.getDefaultInstance()
            : sourceProvenance_;
      } else {
        return sourceProvenanceBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. A permanent fixed identifier for source.
     * </pre>
     *
     * <code>
     * .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setSourceProvenance(com.google.cloud.functions.v2beta.SourceProvenance value) {
      if (sourceProvenanceBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        sourceProvenance_ = value;
      } else {
        sourceProvenanceBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. A permanent fixed identifier for source.
     * </pre>
     *
     * <code>
     * .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setSourceProvenance(
        com.google.cloud.functions.v2beta.SourceProvenance.Builder builderForValue) {
      if (sourceProvenanceBuilder_ == null) {
        sourceProvenance_ = builderForValue.build();
      } else {
        sourceProvenanceBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. A permanent fixed identifier for source.
     * </pre>
     *
     * <code>
     * .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeSourceProvenance(com.google.cloud.functions.v2beta.SourceProvenance value) {
      if (sourceProvenanceBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)
            && sourceProvenance_ != null
            && sourceProvenance_
                != com.google.cloud.functions.v2beta.SourceProvenance.getDefaultInstance()) {
          getSourceProvenanceBuilder().mergeFrom(value);
        } else {
          sourceProvenance_ = value;
        }
      } else {
        sourceProvenanceBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. A permanent fixed identifier for source.
     * </pre>
     *
     * <code>
     * .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearSourceProvenance() {
      bitField0_ = (bitField0_ & ~0x00000010);
      sourceProvenance_ = null;
      if (sourceProvenanceBuilder_ != null) {
        sourceProvenanceBuilder_.dispose();
        sourceProvenanceBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. A permanent fixed identifier for source.
     * </pre>
     *
     * <code>
     * .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.functions.v2beta.SourceProvenance.Builder getSourceProvenanceBuilder() {
      bitField0_ |= 0x00000010;
      onChanged();
      return getSourceProvenanceFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. A permanent fixed identifier for source.
     * </pre>
     *
     * <code>
     * .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.functions.v2beta.SourceProvenanceOrBuilder
        getSourceProvenanceOrBuilder() {
      if (sourceProvenanceBuilder_ != null) {
        return sourceProvenanceBuilder_.getMessageOrBuilder();
      } else {
        return sourceProvenance_ == null
            ? com.google.cloud.functions.v2beta.SourceProvenance.getDefaultInstance()
            : sourceProvenance_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. A permanent fixed identifier for source.
     * </pre>
     *
     * <code>
     * .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.functions.v2beta.SourceProvenance,
            com.google.cloud.functions.v2beta.SourceProvenance.Builder,
            com.google.cloud.functions.v2beta.SourceProvenanceOrBuilder>
        getSourceProvenanceFieldBuilder() {
      if (sourceProvenanceBuilder_ == null) {
        sourceProvenanceBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.functions.v2beta.SourceProvenance,
                com.google.cloud.functions.v2beta.SourceProvenance.Builder,
                com.google.cloud.functions.v2beta.SourceProvenanceOrBuilder>(
                getSourceProvenance(), getParentForChildren(), isClean());
        sourceProvenance_ = null;
      }
      return sourceProvenanceBuilder_;
    }

    private java.lang.Object workerPool_ = "";
    /**
     *
     *
     * <pre>
     * Name of the Cloud Build Custom Worker Pool that should be used to build the
     * function. The format of this field is
     * `projects/{project}/locations/{region}/workerPools/{workerPool}` where
     * {project} and {region} are the project id and region respectively where the
     * worker pool is defined and {workerPool} is the short name of the worker
     * pool.
     * If the project id is not the same as the function, then the Cloud
     * Functions Service Agent
     * (service-&lt;project_number&gt;&#64;gcf-admin-robot.iam.gserviceaccount.com) must be
     * granted the role Cloud Build Custom Workers Builder
     * (roles/cloudbuild.customworkers.builder) in the project.
     * </pre>
     *
     * <code>string worker_pool = 5 [(.google.api.resource_reference) = { ... }</code>
     *
     * @return The workerPool.
     */
    public java.lang.String getWorkerPool() {
      java.lang.Object ref = workerPool_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        workerPool_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Name of the Cloud Build Custom Worker Pool that should be used to build the
     * function. The format of this field is
     * `projects/{project}/locations/{region}/workerPools/{workerPool}` where
     * {project} and {region} are the project id and region respectively where the
     * worker pool is defined and {workerPool} is the short name of the worker
     * pool.
     * If the project id is not the same as the function, then the Cloud
     * Functions Service Agent
     * (service-&lt;project_number&gt;&#64;gcf-admin-robot.iam.gserviceaccount.com) must be
     * granted the role Cloud Build Custom Workers Builder
     * (roles/cloudbuild.customworkers.builder) in the project.
     * </pre>
     *
     * <code>string worker_pool = 5 [(.google.api.resource_reference) = { ... }</code>
     *
     * @return The bytes for workerPool.
     */
    public com.google.protobuf.ByteString getWorkerPoolBytes() {
      java.lang.Object ref = workerPool_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        workerPool_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Name of the Cloud Build Custom Worker Pool that should be used to build the
     * function. The format of this field is
     * `projects/{project}/locations/{region}/workerPools/{workerPool}` where
     * {project} and {region} are the project id and region respectively where the
     * worker pool is defined and {workerPool} is the short name of the worker
     * pool.
     * If the project id is not the same as the function, then the Cloud
     * Functions Service Agent
     * (service-&lt;project_number&gt;&#64;gcf-admin-robot.iam.gserviceaccount.com) must be
     * granted the role Cloud Build Custom Workers Builder
     * (roles/cloudbuild.customworkers.builder) in the project.
     * </pre>
     *
     * <code>string worker_pool = 5 [(.google.api.resource_reference) = { ... }</code>
     *
     * @param value The workerPool to set.
     * @return This builder for chaining.
     */
    public Builder setWorkerPool(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      workerPool_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Name of the Cloud Build Custom Worker Pool that should be used to build the
     * function. The format of this field is
     * `projects/{project}/locations/{region}/workerPools/{workerPool}` where
     * {project} and {region} are the project id and region respectively where the
     * worker pool is defined and {workerPool} is the short name of the worker
     * pool.
     * If the project id is not the same as the function, then the Cloud
     * Functions Service Agent
     * (service-&lt;project_number&gt;&#64;gcf-admin-robot.iam.gserviceaccount.com) must be
     * granted the role Cloud Build Custom Workers Builder
     * (roles/cloudbuild.customworkers.builder) in the project.
     * </pre>
     *
     * <code>string worker_pool = 5 [(.google.api.resource_reference) = { ... }</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearWorkerPool() {
      workerPool_ = getDefaultInstance().getWorkerPool();
      bitField0_ = (bitField0_ & ~0x00000020);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Name of the Cloud Build Custom Worker Pool that should be used to build the
     * function. The format of this field is
     * `projects/{project}/locations/{region}/workerPools/{workerPool}` where
     * {project} and {region} are the project id and region respectively where the
     * worker pool is defined and {workerPool} is the short name of the worker
     * pool.
     * If the project id is not the same as the function, then the Cloud
     * Functions Service Agent
     * (service-&lt;project_number&gt;&#64;gcf-admin-robot.iam.gserviceaccount.com) must be
     * granted the role Cloud Build Custom Workers Builder
     * (roles/cloudbuild.customworkers.builder) in the project.
     * </pre>
     *
     * <code>string worker_pool = 5 [(.google.api.resource_reference) = { ... }</code>
     *
     * @param value The bytes for workerPool to set.
     * @return This builder for chaining.
     */
    public Builder setWorkerPoolBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      workerPool_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }

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

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetEnvironmentVariables() {
      if (environmentVariables_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            EnvironmentVariablesDefaultEntryHolder.defaultEntry);
      }
      return environmentVariables_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableEnvironmentVariables() {
      if (environmentVariables_ == null) {
        environmentVariables_ =
            com.google.protobuf.MapField.newMapField(
                EnvironmentVariablesDefaultEntryHolder.defaultEntry);
      }
      if (!environmentVariables_.isMutable()) {
        environmentVariables_ = environmentVariables_.copy();
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return environmentVariables_;
    }

    public int getEnvironmentVariablesCount() {
      return internalGetEnvironmentVariables().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * User-provided build-time environment variables for the function
     * </pre>
     *
     * <code>map&lt;string, string&gt; environment_variables = 6;</code>
     */
    @java.lang.Override
    public boolean containsEnvironmentVariables(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetEnvironmentVariables().getMap().containsKey(key);
    }
    /** Use {@link #getEnvironmentVariablesMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getEnvironmentVariables() {
      return getEnvironmentVariablesMap();
    }
    /**
     *
     *
     * <pre>
     * User-provided build-time environment variables for the function
     * </pre>
     *
     * <code>map&lt;string, string&gt; environment_variables = 6;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getEnvironmentVariablesMap() {
      return internalGetEnvironmentVariables().getMap();
    }
    /**
     *
     *
     * <pre>
     * User-provided build-time environment variables for the function
     * </pre>
     *
     * <code>map&lt;string, string&gt; environment_variables = 6;</code>
     */
    @java.lang.Override
    public /* nullable */ java.lang.String getEnvironmentVariablesOrDefault(
        java.lang.String key,
        /* nullable */
        java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetEnvironmentVariables().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * User-provided build-time environment variables for the function
     * </pre>
     *
     * <code>map&lt;string, string&gt; environment_variables = 6;</code>
     */
    @java.lang.Override
    public java.lang.String getEnvironmentVariablesOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetEnvironmentVariables().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearEnvironmentVariables() {
      bitField0_ = (bitField0_ & ~0x00000040);
      internalGetMutableEnvironmentVariables().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * User-provided build-time environment variables for the function
     * </pre>
     *
     * <code>map&lt;string, string&gt; environment_variables = 6;</code>
     */
    public Builder removeEnvironmentVariables(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableEnvironmentVariables().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableEnvironmentVariables() {
      bitField0_ |= 0x00000040;
      return internalGetMutableEnvironmentVariables().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * User-provided build-time environment variables for the function
     * </pre>
     *
     * <code>map&lt;string, string&gt; environment_variables = 6;</code>
     */
    public Builder putEnvironmentVariables(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableEnvironmentVariables().getMutableMap().put(key, value);
      bitField0_ |= 0x00000040;
      return this;
    }
    /**
     *
     *
     * <pre>
     * User-provided build-time environment variables for the function
     * </pre>
     *
     * <code>map&lt;string, string&gt; environment_variables = 6;</code>
     */
    public Builder putAllEnvironmentVariables(
        java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableEnvironmentVariables().getMutableMap().putAll(values);
      bitField0_ |= 0x00000040;
      return this;
    }

    private java.lang.Object dockerRepository_ = "";
    /**
     *
     *
     * <pre>
     * Optional. User managed repository created in Artifact Registry optionally with a
     * customer managed encryption key. This is the repository to which the
     * function docker image will be pushed after it is built by Cloud Build.
     * If unspecified, GCF will create and use a repository named 'gcf-artifacts'
     * for every deployed region.
     * It must match the pattern
     * `projects/{project}/locations/{location}/repositories/{repository}`.
     * Cross-project repositories are not supported.
     * Cross-location repositories are not supported.
     * Repository format must be 'DOCKER'.
     * </pre>
     *
     * <code>
     * string docker_repository = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @return The dockerRepository.
     */
    public java.lang.String getDockerRepository() {
      java.lang.Object ref = dockerRepository_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        dockerRepository_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. User managed repository created in Artifact Registry optionally with a
     * customer managed encryption key. This is the repository to which the
     * function docker image will be pushed after it is built by Cloud Build.
     * If unspecified, GCF will create and use a repository named 'gcf-artifacts'
     * for every deployed region.
     * It must match the pattern
     * `projects/{project}/locations/{location}/repositories/{repository}`.
     * Cross-project repositories are not supported.
     * Cross-location repositories are not supported.
     * Repository format must be 'DOCKER'.
     * </pre>
     *
     * <code>
     * string docker_repository = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @return The bytes for dockerRepository.
     */
    public com.google.protobuf.ByteString getDockerRepositoryBytes() {
      java.lang.Object ref = dockerRepository_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        dockerRepository_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. User managed repository created in Artifact Registry optionally with a
     * customer managed encryption key. This is the repository to which the
     * function docker image will be pushed after it is built by Cloud Build.
     * If unspecified, GCF will create and use a repository named 'gcf-artifacts'
     * for every deployed region.
     * It must match the pattern
     * `projects/{project}/locations/{location}/repositories/{repository}`.
     * Cross-project repositories are not supported.
     * Cross-location repositories are not supported.
     * Repository format must be 'DOCKER'.
     * </pre>
     *
     * <code>
     * string docker_repository = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @param value The dockerRepository to set.
     * @return This builder for chaining.
     */
    public Builder setDockerRepository(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      dockerRepository_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. User managed repository created in Artifact Registry optionally with a
     * customer managed encryption key. This is the repository to which the
     * function docker image will be pushed after it is built by Cloud Build.
     * If unspecified, GCF will create and use a repository named 'gcf-artifacts'
     * for every deployed region.
     * It must match the pattern
     * `projects/{project}/locations/{location}/repositories/{repository}`.
     * Cross-project repositories are not supported.
     * Cross-location repositories are not supported.
     * Repository format must be 'DOCKER'.
     * </pre>
     *
     * <code>
     * string docker_repository = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDockerRepository() {
      dockerRepository_ = getDefaultInstance().getDockerRepository();
      bitField0_ = (bitField0_ & ~0x00000080);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. User managed repository created in Artifact Registry optionally with a
     * customer managed encryption key. This is the repository to which the
     * function docker image will be pushed after it is built by Cloud Build.
     * If unspecified, GCF will create and use a repository named 'gcf-artifacts'
     * for every deployed region.
     * It must match the pattern
     * `projects/{project}/locations/{location}/repositories/{repository}`.
     * Cross-project repositories are not supported.
     * Cross-location repositories are not supported.
     * Repository format must be 'DOCKER'.
     * </pre>
     *
     * <code>
     * string docker_repository = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @param value The bytes for dockerRepository to set.
     * @return This builder for chaining.
     */
    public Builder setDockerRepositoryBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      dockerRepository_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }

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

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

    // @@protoc_insertion_point(builder_scope:google.cloud.functions.v2beta.BuildConfig)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.functions.v2beta.BuildConfig)
  private static final com.google.cloud.functions.v2beta.BuildConfig DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.functions.v2beta.BuildConfig();
  }

  public static com.google.cloud.functions.v2beta.BuildConfig getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<BuildConfig> PARSER =
      new com.google.protobuf.AbstractParser<BuildConfig>() {
        @java.lang.Override
        public BuildConfig 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<BuildConfig> parser() {
    return PARSER;
  }

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

  @java.lang.Override
  public com.google.cloud.functions.v2beta.BuildConfig getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
