/*
 * 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>
 * A request to launch a template.
 * </pre>
 *
 * Protobuf type {@code google.dataflow.v1beta3.LaunchTemplateRequest}
 */
public final class LaunchTemplateRequest extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.dataflow.v1beta3.LaunchTemplateRequest)
    LaunchTemplateRequestOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use LaunchTemplateRequest.newBuilder() to construct.
  private LaunchTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private LaunchTemplateRequest() {
    projectId_ = "";
    location_ = "";
  }

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

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

  private LaunchTemplateRequest(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10:
            {
              java.lang.String s = input.readStringRequireUtf8();

              projectId_ = s;
              break;
            }
          case 16:
            {
              validateOnly_ = input.readBool();
              break;
            }
          case 26:
            {
              java.lang.String s = input.readStringRequireUtf8();
              templateCase_ = 3;
              template_ = s;
              break;
            }
          case 34:
            {
              com.google.dataflow.v1beta3.LaunchTemplateParameters.Builder subBuilder = null;
              if (launchParameters_ != null) {
                subBuilder = launchParameters_.toBuilder();
              }
              launchParameters_ =
                  input.readMessage(
                      com.google.dataflow.v1beta3.LaunchTemplateParameters.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(launchParameters_);
                launchParameters_ = subBuilder.buildPartial();
              }

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

              location_ = s;
              break;
            }
          case 50:
            {
              com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.Builder subBuilder = null;
              if (templateCase_ == 6) {
                subBuilder =
                    ((com.google.dataflow.v1beta3.DynamicTemplateLaunchParams) template_)
                        .toBuilder();
              }
              template_ =
                  input.readMessage(
                      com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(
                    (com.google.dataflow.v1beta3.DynamicTemplateLaunchParams) template_);
                template_ = subBuilder.buildPartial();
              }
              templateCase_ = 6;
              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 {
      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_LaunchTemplateRequest_descriptor;
  }

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

  private int templateCase_ = 0;
  private java.lang.Object template_;

  public enum TemplateCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    GCS_PATH(3),
    DYNAMIC_TEMPLATE(6),
    TEMPLATE_NOT_SET(0);
    private final int value;

    private TemplateCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static TemplateCase valueOf(int value) {
      return forNumber(value);
    }

    public static TemplateCase forNumber(int value) {
      switch (value) {
        case 3:
          return GCS_PATH;
        case 6:
          return DYNAMIC_TEMPLATE;
        case 0:
          return TEMPLATE_NOT_SET;
        default:
          return null;
      }
    }

    public int getNumber() {
      return this.value;
    }
  };

  public TemplateCase getTemplateCase() {
    return TemplateCase.forNumber(templateCase_);
  }

  public static final int PROJECT_ID_FIELD_NUMBER = 1;
  private volatile java.lang.Object projectId_;
  /**
   *
   *
   * <pre>
   * Required. The ID of the Cloud Platform project that the job belongs to.
   * </pre>
   *
   * <code>string project_id = 1;</code>
   *
   * @return The projectId.
   */
  @java.lang.Override
  public java.lang.String getProjectId() {
    java.lang.Object ref = projectId_;
    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();
      projectId_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Required. The ID of the Cloud Platform project that the job belongs to.
   * </pre>
   *
   * <code>string project_id = 1;</code>
   *
   * @return The bytes for projectId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getProjectIdBytes() {
    java.lang.Object ref = projectId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      projectId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int VALIDATE_ONLY_FIELD_NUMBER = 2;
  private boolean validateOnly_;
  /**
   *
   *
   * <pre>
   * If true, the request is validated but not actually executed.
   * Defaults to false.
   * </pre>
   *
   * <code>bool validate_only = 2;</code>
   *
   * @return The validateOnly.
   */
  @java.lang.Override
  public boolean getValidateOnly() {
    return validateOnly_;
  }

  public static final int GCS_PATH_FIELD_NUMBER = 3;
  /**
   *
   *
   * <pre>
   * A Cloud Storage path to the template from which to create
   * the job.
   * Must be valid Cloud Storage URL, beginning with 'gs://'.
   * </pre>
   *
   * <code>string gcs_path = 3;</code>
   *
   * @return Whether the gcsPath field is set.
   */
  public boolean hasGcsPath() {
    return templateCase_ == 3;
  }
  /**
   *
   *
   * <pre>
   * A Cloud Storage path to the template from which to create
   * the job.
   * Must be valid Cloud Storage URL, beginning with 'gs://'.
   * </pre>
   *
   * <code>string gcs_path = 3;</code>
   *
   * @return The gcsPath.
   */
  public java.lang.String getGcsPath() {
    java.lang.Object ref = "";
    if (templateCase_ == 3) {
      ref = template_;
    }
    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();
      if (templateCase_ == 3) {
        template_ = s;
      }
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * A Cloud Storage path to the template from which to create
   * the job.
   * Must be valid Cloud Storage URL, beginning with 'gs://'.
   * </pre>
   *
   * <code>string gcs_path = 3;</code>
   *
   * @return The bytes for gcsPath.
   */
  public com.google.protobuf.ByteString getGcsPathBytes() {
    java.lang.Object ref = "";
    if (templateCase_ == 3) {
      ref = template_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      if (templateCase_ == 3) {
        template_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DYNAMIC_TEMPLATE_FIELD_NUMBER = 6;
  /**
   *
   *
   * <pre>
   * Params for launching a dynamic template.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.DynamicTemplateLaunchParams dynamic_template = 6;</code>
   *
   * @return Whether the dynamicTemplate field is set.
   */
  @java.lang.Override
  public boolean hasDynamicTemplate() {
    return templateCase_ == 6;
  }
  /**
   *
   *
   * <pre>
   * Params for launching a dynamic template.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.DynamicTemplateLaunchParams dynamic_template = 6;</code>
   *
   * @return The dynamicTemplate.
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.DynamicTemplateLaunchParams getDynamicTemplate() {
    if (templateCase_ == 6) {
      return (com.google.dataflow.v1beta3.DynamicTemplateLaunchParams) template_;
    }
    return com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Params for launching a dynamic template.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.DynamicTemplateLaunchParams dynamic_template = 6;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.DynamicTemplateLaunchParamsOrBuilder
      getDynamicTemplateOrBuilder() {
    if (templateCase_ == 6) {
      return (com.google.dataflow.v1beta3.DynamicTemplateLaunchParams) template_;
    }
    return com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.getDefaultInstance();
  }

  public static final int LAUNCH_PARAMETERS_FIELD_NUMBER = 4;
  private com.google.dataflow.v1beta3.LaunchTemplateParameters launchParameters_;
  /**
   *
   *
   * <pre>
   * The parameters of the template to launch. This should be part of the
   * body of the POST request.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.LaunchTemplateParameters launch_parameters = 4;</code>
   *
   * @return Whether the launchParameters field is set.
   */
  @java.lang.Override
  public boolean hasLaunchParameters() {
    return launchParameters_ != null;
  }
  /**
   *
   *
   * <pre>
   * The parameters of the template to launch. This should be part of the
   * body of the POST request.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.LaunchTemplateParameters launch_parameters = 4;</code>
   *
   * @return The launchParameters.
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.LaunchTemplateParameters getLaunchParameters() {
    return launchParameters_ == null
        ? com.google.dataflow.v1beta3.LaunchTemplateParameters.getDefaultInstance()
        : launchParameters_;
  }
  /**
   *
   *
   * <pre>
   * The parameters of the template to launch. This should be part of the
   * body of the POST request.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.LaunchTemplateParameters launch_parameters = 4;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.LaunchTemplateParametersOrBuilder
      getLaunchParametersOrBuilder() {
    return getLaunchParameters();
  }

  public static final int LOCATION_FIELD_NUMBER = 5;
  private volatile java.lang.Object location_;
  /**
   *
   *
   * <pre>
   * The [regional endpoint]
   * (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
   * which to direct the request.
   * </pre>
   *
   * <code>string location = 5;</code>
   *
   * @return The location.
   */
  @java.lang.Override
  public java.lang.String getLocation() {
    java.lang.Object ref = location_;
    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();
      location_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The [regional endpoint]
   * (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
   * which to direct the request.
   * </pre>
   *
   * <code>string location = 5;</code>
   *
   * @return The bytes for location.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getLocationBytes() {
    java.lang.Object ref = location_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      location_ = 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(projectId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_);
    }
    if (validateOnly_ != false) {
      output.writeBool(2, validateOnly_);
    }
    if (templateCase_ == 3) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, template_);
    }
    if (launchParameters_ != null) {
      output.writeMessage(4, getLaunchParameters());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, location_);
    }
    if (templateCase_ == 6) {
      output.writeMessage(6, (com.google.dataflow.v1beta3.DynamicTemplateLaunchParams) template_);
    }
    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(projectId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_);
    }
    if (validateOnly_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_);
    }
    if (templateCase_ == 3) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, template_);
    }
    if (launchParameters_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getLaunchParameters());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, location_);
    }
    if (templateCase_ == 6) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              6, (com.google.dataflow.v1beta3.DynamicTemplateLaunchParams) template_);
    }
    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.LaunchTemplateRequest)) {
      return super.equals(obj);
    }
    com.google.dataflow.v1beta3.LaunchTemplateRequest other =
        (com.google.dataflow.v1beta3.LaunchTemplateRequest) obj;

    if (!getProjectId().equals(other.getProjectId())) return false;
    if (getValidateOnly() != other.getValidateOnly()) return false;
    if (hasLaunchParameters() != other.hasLaunchParameters()) return false;
    if (hasLaunchParameters()) {
      if (!getLaunchParameters().equals(other.getLaunchParameters())) return false;
    }
    if (!getLocation().equals(other.getLocation())) return false;
    if (!getTemplateCase().equals(other.getTemplateCase())) return false;
    switch (templateCase_) {
      case 3:
        if (!getGcsPath().equals(other.getGcsPath())) return false;
        break;
      case 6:
        if (!getDynamicTemplate().equals(other.getDynamicTemplate())) return false;
        break;
      case 0:
      default:
    }
    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) + PROJECT_ID_FIELD_NUMBER;
    hash = (53 * hash) + getProjectId().hashCode();
    hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly());
    if (hasLaunchParameters()) {
      hash = (37 * hash) + LAUNCH_PARAMETERS_FIELD_NUMBER;
      hash = (53 * hash) + getLaunchParameters().hashCode();
    }
    hash = (37 * hash) + LOCATION_FIELD_NUMBER;
    hash = (53 * hash) + getLocation().hashCode();
    switch (templateCase_) {
      case 3:
        hash = (37 * hash) + GCS_PATH_FIELD_NUMBER;
        hash = (53 * hash) + getGcsPath().hashCode();
        break;
      case 6:
        hash = (37 * hash) + DYNAMIC_TEMPLATE_FIELD_NUMBER;
        hash = (53 * hash) + getDynamicTemplate().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

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

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

  public static com.google.dataflow.v1beta3.LaunchTemplateRequest 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.LaunchTemplateRequest prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * A request to launch a template.
   * </pre>
   *
   * Protobuf type {@code google.dataflow.v1beta3.LaunchTemplateRequest}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.dataflow.v1beta3.LaunchTemplateRequest)
      com.google.dataflow.v1beta3.LaunchTemplateRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.dataflow.v1beta3.TemplatesProto
          .internal_static_google_dataflow_v1beta3_LaunchTemplateRequest_descriptor;
    }

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

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

      validateOnly_ = false;

      if (launchParametersBuilder_ == null) {
        launchParameters_ = null;
      } else {
        launchParameters_ = null;
        launchParametersBuilder_ = null;
      }
      location_ = "";

      templateCase_ = 0;
      template_ = null;
      return this;
    }

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

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

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

    @java.lang.Override
    public com.google.dataflow.v1beta3.LaunchTemplateRequest buildPartial() {
      com.google.dataflow.v1beta3.LaunchTemplateRequest result =
          new com.google.dataflow.v1beta3.LaunchTemplateRequest(this);
      result.projectId_ = projectId_;
      result.validateOnly_ = validateOnly_;
      if (templateCase_ == 3) {
        result.template_ = template_;
      }
      if (templateCase_ == 6) {
        if (dynamicTemplateBuilder_ == null) {
          result.template_ = template_;
        } else {
          result.template_ = dynamicTemplateBuilder_.build();
        }
      }
      if (launchParametersBuilder_ == null) {
        result.launchParameters_ = launchParameters_;
      } else {
        result.launchParameters_ = launchParametersBuilder_.build();
      }
      result.location_ = location_;
      result.templateCase_ = templateCase_;
      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.LaunchTemplateRequest) {
        return mergeFrom((com.google.dataflow.v1beta3.LaunchTemplateRequest) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.dataflow.v1beta3.LaunchTemplateRequest other) {
      if (other == com.google.dataflow.v1beta3.LaunchTemplateRequest.getDefaultInstance())
        return this;
      if (!other.getProjectId().isEmpty()) {
        projectId_ = other.projectId_;
        onChanged();
      }
      if (other.getValidateOnly() != false) {
        setValidateOnly(other.getValidateOnly());
      }
      if (other.hasLaunchParameters()) {
        mergeLaunchParameters(other.getLaunchParameters());
      }
      if (!other.getLocation().isEmpty()) {
        location_ = other.location_;
        onChanged();
      }
      switch (other.getTemplateCase()) {
        case GCS_PATH:
          {
            templateCase_ = 3;
            template_ = other.template_;
            onChanged();
            break;
          }
        case DYNAMIC_TEMPLATE:
          {
            mergeDynamicTemplate(other.getDynamicTemplate());
            break;
          }
        case TEMPLATE_NOT_SET:
          {
            break;
          }
      }
      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.LaunchTemplateRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage =
            (com.google.dataflow.v1beta3.LaunchTemplateRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int templateCase_ = 0;
    private java.lang.Object template_;

    public TemplateCase getTemplateCase() {
      return TemplateCase.forNumber(templateCase_);
    }

    public Builder clearTemplate() {
      templateCase_ = 0;
      template_ = null;
      onChanged();
      return this;
    }

    private java.lang.Object projectId_ = "";
    /**
     *
     *
     * <pre>
     * Required. The ID of the Cloud Platform project that the job belongs to.
     * </pre>
     *
     * <code>string project_id = 1;</code>
     *
     * @return The projectId.
     */
    public java.lang.String getProjectId() {
      java.lang.Object ref = projectId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        projectId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The ID of the Cloud Platform project that the job belongs to.
     * </pre>
     *
     * <code>string project_id = 1;</code>
     *
     * @return The bytes for projectId.
     */
    public com.google.protobuf.ByteString getProjectIdBytes() {
      java.lang.Object ref = projectId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        projectId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The ID of the Cloud Platform project that the job belongs to.
     * </pre>
     *
     * <code>string project_id = 1;</code>
     *
     * @param value The projectId to set.
     * @return This builder for chaining.
     */
    public Builder setProjectId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      projectId_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The ID of the Cloud Platform project that the job belongs to.
     * </pre>
     *
     * <code>string project_id = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearProjectId() {

      projectId_ = getDefaultInstance().getProjectId();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The ID of the Cloud Platform project that the job belongs to.
     * </pre>
     *
     * <code>string project_id = 1;</code>
     *
     * @param value The bytes for projectId to set.
     * @return This builder for chaining.
     */
    public Builder setProjectIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private boolean validateOnly_;
    /**
     *
     *
     * <pre>
     * If true, the request is validated but not actually executed.
     * Defaults to false.
     * </pre>
     *
     * <code>bool validate_only = 2;</code>
     *
     * @return The validateOnly.
     */
    @java.lang.Override
    public boolean getValidateOnly() {
      return validateOnly_;
    }
    /**
     *
     *
     * <pre>
     * If true, the request is validated but not actually executed.
     * Defaults to false.
     * </pre>
     *
     * <code>bool validate_only = 2;</code>
     *
     * @param value The validateOnly to set.
     * @return This builder for chaining.
     */
    public Builder setValidateOnly(boolean value) {

      validateOnly_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * If true, the request is validated but not actually executed.
     * Defaults to false.
     * </pre>
     *
     * <code>bool validate_only = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearValidateOnly() {

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

    /**
     *
     *
     * <pre>
     * A Cloud Storage path to the template from which to create
     * the job.
     * Must be valid Cloud Storage URL, beginning with 'gs://'.
     * </pre>
     *
     * <code>string gcs_path = 3;</code>
     *
     * @return Whether the gcsPath field is set.
     */
    @java.lang.Override
    public boolean hasGcsPath() {
      return templateCase_ == 3;
    }
    /**
     *
     *
     * <pre>
     * A Cloud Storage path to the template from which to create
     * the job.
     * Must be valid Cloud Storage URL, beginning with 'gs://'.
     * </pre>
     *
     * <code>string gcs_path = 3;</code>
     *
     * @return The gcsPath.
     */
    @java.lang.Override
    public java.lang.String getGcsPath() {
      java.lang.Object ref = "";
      if (templateCase_ == 3) {
        ref = template_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (templateCase_ == 3) {
          template_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * A Cloud Storage path to the template from which to create
     * the job.
     * Must be valid Cloud Storage URL, beginning with 'gs://'.
     * </pre>
     *
     * <code>string gcs_path = 3;</code>
     *
     * @return The bytes for gcsPath.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getGcsPathBytes() {
      java.lang.Object ref = "";
      if (templateCase_ == 3) {
        ref = template_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        if (templateCase_ == 3) {
          template_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * A Cloud Storage path to the template from which to create
     * the job.
     * Must be valid Cloud Storage URL, beginning with 'gs://'.
     * </pre>
     *
     * <code>string gcs_path = 3;</code>
     *
     * @param value The gcsPath to set.
     * @return This builder for chaining.
     */
    public Builder setGcsPath(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      templateCase_ = 3;
      template_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * A Cloud Storage path to the template from which to create
     * the job.
     * Must be valid Cloud Storage URL, beginning with 'gs://'.
     * </pre>
     *
     * <code>string gcs_path = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearGcsPath() {
      if (templateCase_ == 3) {
        templateCase_ = 0;
        template_ = null;
        onChanged();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * A Cloud Storage path to the template from which to create
     * the job.
     * Must be valid Cloud Storage URL, beginning with 'gs://'.
     * </pre>
     *
     * <code>string gcs_path = 3;</code>
     *
     * @param value The bytes for gcsPath to set.
     * @return This builder for chaining.
     */
    public Builder setGcsPathBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      templateCase_ = 3;
      template_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.dataflow.v1beta3.DynamicTemplateLaunchParams,
            com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.Builder,
            com.google.dataflow.v1beta3.DynamicTemplateLaunchParamsOrBuilder>
        dynamicTemplateBuilder_;
    /**
     *
     *
     * <pre>
     * Params for launching a dynamic template.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.DynamicTemplateLaunchParams dynamic_template = 6;</code>
     *
     * @return Whether the dynamicTemplate field is set.
     */
    @java.lang.Override
    public boolean hasDynamicTemplate() {
      return templateCase_ == 6;
    }
    /**
     *
     *
     * <pre>
     * Params for launching a dynamic template.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.DynamicTemplateLaunchParams dynamic_template = 6;</code>
     *
     * @return The dynamicTemplate.
     */
    @java.lang.Override
    public com.google.dataflow.v1beta3.DynamicTemplateLaunchParams getDynamicTemplate() {
      if (dynamicTemplateBuilder_ == null) {
        if (templateCase_ == 6) {
          return (com.google.dataflow.v1beta3.DynamicTemplateLaunchParams) template_;
        }
        return com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.getDefaultInstance();
      } else {
        if (templateCase_ == 6) {
          return dynamicTemplateBuilder_.getMessage();
        }
        return com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Params for launching a dynamic template.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.DynamicTemplateLaunchParams dynamic_template = 6;</code>
     */
    public Builder setDynamicTemplate(
        com.google.dataflow.v1beta3.DynamicTemplateLaunchParams value) {
      if (dynamicTemplateBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        template_ = value;
        onChanged();
      } else {
        dynamicTemplateBuilder_.setMessage(value);
      }
      templateCase_ = 6;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Params for launching a dynamic template.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.DynamicTemplateLaunchParams dynamic_template = 6;</code>
     */
    public Builder setDynamicTemplate(
        com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.Builder builderForValue) {
      if (dynamicTemplateBuilder_ == null) {
        template_ = builderForValue.build();
        onChanged();
      } else {
        dynamicTemplateBuilder_.setMessage(builderForValue.build());
      }
      templateCase_ = 6;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Params for launching a dynamic template.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.DynamicTemplateLaunchParams dynamic_template = 6;</code>
     */
    public Builder mergeDynamicTemplate(
        com.google.dataflow.v1beta3.DynamicTemplateLaunchParams value) {
      if (dynamicTemplateBuilder_ == null) {
        if (templateCase_ == 6
            && template_
                != com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.getDefaultInstance()) {
          template_ =
              com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.newBuilder(
                      (com.google.dataflow.v1beta3.DynamicTemplateLaunchParams) template_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          template_ = value;
        }
        onChanged();
      } else {
        if (templateCase_ == 6) {
          dynamicTemplateBuilder_.mergeFrom(value);
        } else {
          dynamicTemplateBuilder_.setMessage(value);
        }
      }
      templateCase_ = 6;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Params for launching a dynamic template.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.DynamicTemplateLaunchParams dynamic_template = 6;</code>
     */
    public Builder clearDynamicTemplate() {
      if (dynamicTemplateBuilder_ == null) {
        if (templateCase_ == 6) {
          templateCase_ = 0;
          template_ = null;
          onChanged();
        }
      } else {
        if (templateCase_ == 6) {
          templateCase_ = 0;
          template_ = null;
        }
        dynamicTemplateBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Params for launching a dynamic template.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.DynamicTemplateLaunchParams dynamic_template = 6;</code>
     */
    public com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.Builder
        getDynamicTemplateBuilder() {
      return getDynamicTemplateFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Params for launching a dynamic template.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.DynamicTemplateLaunchParams dynamic_template = 6;</code>
     */
    @java.lang.Override
    public com.google.dataflow.v1beta3.DynamicTemplateLaunchParamsOrBuilder
        getDynamicTemplateOrBuilder() {
      if ((templateCase_ == 6) && (dynamicTemplateBuilder_ != null)) {
        return dynamicTemplateBuilder_.getMessageOrBuilder();
      } else {
        if (templateCase_ == 6) {
          return (com.google.dataflow.v1beta3.DynamicTemplateLaunchParams) template_;
        }
        return com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Params for launching a dynamic template.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.DynamicTemplateLaunchParams dynamic_template = 6;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.dataflow.v1beta3.DynamicTemplateLaunchParams,
            com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.Builder,
            com.google.dataflow.v1beta3.DynamicTemplateLaunchParamsOrBuilder>
        getDynamicTemplateFieldBuilder() {
      if (dynamicTemplateBuilder_ == null) {
        if (!(templateCase_ == 6)) {
          template_ = com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.getDefaultInstance();
        }
        dynamicTemplateBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.dataflow.v1beta3.DynamicTemplateLaunchParams,
                com.google.dataflow.v1beta3.DynamicTemplateLaunchParams.Builder,
                com.google.dataflow.v1beta3.DynamicTemplateLaunchParamsOrBuilder>(
                (com.google.dataflow.v1beta3.DynamicTemplateLaunchParams) template_,
                getParentForChildren(),
                isClean());
        template_ = null;
      }
      templateCase_ = 6;
      onChanged();
      ;
      return dynamicTemplateBuilder_;
    }

    private com.google.dataflow.v1beta3.LaunchTemplateParameters launchParameters_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.dataflow.v1beta3.LaunchTemplateParameters,
            com.google.dataflow.v1beta3.LaunchTemplateParameters.Builder,
            com.google.dataflow.v1beta3.LaunchTemplateParametersOrBuilder>
        launchParametersBuilder_;
    /**
     *
     *
     * <pre>
     * The parameters of the template to launch. This should be part of the
     * body of the POST request.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.LaunchTemplateParameters launch_parameters = 4;</code>
     *
     * @return Whether the launchParameters field is set.
     */
    public boolean hasLaunchParameters() {
      return launchParametersBuilder_ != null || launchParameters_ != null;
    }
    /**
     *
     *
     * <pre>
     * The parameters of the template to launch. This should be part of the
     * body of the POST request.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.LaunchTemplateParameters launch_parameters = 4;</code>
     *
     * @return The launchParameters.
     */
    public com.google.dataflow.v1beta3.LaunchTemplateParameters getLaunchParameters() {
      if (launchParametersBuilder_ == null) {
        return launchParameters_ == null
            ? com.google.dataflow.v1beta3.LaunchTemplateParameters.getDefaultInstance()
            : launchParameters_;
      } else {
        return launchParametersBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The parameters of the template to launch. This should be part of the
     * body of the POST request.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.LaunchTemplateParameters launch_parameters = 4;</code>
     */
    public Builder setLaunchParameters(com.google.dataflow.v1beta3.LaunchTemplateParameters value) {
      if (launchParametersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        launchParameters_ = value;
        onChanged();
      } else {
        launchParametersBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The parameters of the template to launch. This should be part of the
     * body of the POST request.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.LaunchTemplateParameters launch_parameters = 4;</code>
     */
    public Builder setLaunchParameters(
        com.google.dataflow.v1beta3.LaunchTemplateParameters.Builder builderForValue) {
      if (launchParametersBuilder_ == null) {
        launchParameters_ = builderForValue.build();
        onChanged();
      } else {
        launchParametersBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The parameters of the template to launch. This should be part of the
     * body of the POST request.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.LaunchTemplateParameters launch_parameters = 4;</code>
     */
    public Builder mergeLaunchParameters(
        com.google.dataflow.v1beta3.LaunchTemplateParameters value) {
      if (launchParametersBuilder_ == null) {
        if (launchParameters_ != null) {
          launchParameters_ =
              com.google.dataflow.v1beta3.LaunchTemplateParameters.newBuilder(launchParameters_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          launchParameters_ = value;
        }
        onChanged();
      } else {
        launchParametersBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The parameters of the template to launch. This should be part of the
     * body of the POST request.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.LaunchTemplateParameters launch_parameters = 4;</code>
     */
    public Builder clearLaunchParameters() {
      if (launchParametersBuilder_ == null) {
        launchParameters_ = null;
        onChanged();
      } else {
        launchParameters_ = null;
        launchParametersBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The parameters of the template to launch. This should be part of the
     * body of the POST request.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.LaunchTemplateParameters launch_parameters = 4;</code>
     */
    public com.google.dataflow.v1beta3.LaunchTemplateParameters.Builder
        getLaunchParametersBuilder() {

      onChanged();
      return getLaunchParametersFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The parameters of the template to launch. This should be part of the
     * body of the POST request.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.LaunchTemplateParameters launch_parameters = 4;</code>
     */
    public com.google.dataflow.v1beta3.LaunchTemplateParametersOrBuilder
        getLaunchParametersOrBuilder() {
      if (launchParametersBuilder_ != null) {
        return launchParametersBuilder_.getMessageOrBuilder();
      } else {
        return launchParameters_ == null
            ? com.google.dataflow.v1beta3.LaunchTemplateParameters.getDefaultInstance()
            : launchParameters_;
      }
    }
    /**
     *
     *
     * <pre>
     * The parameters of the template to launch. This should be part of the
     * body of the POST request.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.LaunchTemplateParameters launch_parameters = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.dataflow.v1beta3.LaunchTemplateParameters,
            com.google.dataflow.v1beta3.LaunchTemplateParameters.Builder,
            com.google.dataflow.v1beta3.LaunchTemplateParametersOrBuilder>
        getLaunchParametersFieldBuilder() {
      if (launchParametersBuilder_ == null) {
        launchParametersBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.dataflow.v1beta3.LaunchTemplateParameters,
                com.google.dataflow.v1beta3.LaunchTemplateParameters.Builder,
                com.google.dataflow.v1beta3.LaunchTemplateParametersOrBuilder>(
                getLaunchParameters(), getParentForChildren(), isClean());
        launchParameters_ = null;
      }
      return launchParametersBuilder_;
    }

    private java.lang.Object location_ = "";
    /**
     *
     *
     * <pre>
     * The [regional endpoint]
     * (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
     * which to direct the request.
     * </pre>
     *
     * <code>string location = 5;</code>
     *
     * @return The location.
     */
    public java.lang.String getLocation() {
      java.lang.Object ref = location_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        location_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The [regional endpoint]
     * (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
     * which to direct the request.
     * </pre>
     *
     * <code>string location = 5;</code>
     *
     * @return The bytes for location.
     */
    public com.google.protobuf.ByteString getLocationBytes() {
      java.lang.Object ref = location_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        location_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The [regional endpoint]
     * (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
     * which to direct the request.
     * </pre>
     *
     * <code>string location = 5;</code>
     *
     * @param value The location to set.
     * @return This builder for chaining.
     */
    public Builder setLocation(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      location_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The [regional endpoint]
     * (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
     * which to direct the request.
     * </pre>
     *
     * <code>string location = 5;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearLocation() {

      location_ = getDefaultInstance().getLocation();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The [regional endpoint]
     * (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to
     * which to direct the request.
     * </pre>
     *
     * <code>string location = 5;</code>
     *
     * @param value The bytes for location to set.
     * @return This builder for chaining.
     */
    public Builder setLocationBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

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

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

    // @@protoc_insertion_point(builder_scope:google.dataflow.v1beta3.LaunchTemplateRequest)
  }

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

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

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

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

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

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

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