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

  private GetTemplateResponse() {
    templateType_ = 0;
  }

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

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

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

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

  /**
   *
   *
   * <pre>
   * Template Type.
   * </pre>
   *
   * Protobuf enum {@code google.dataflow.v1beta3.GetTemplateResponse.TemplateType}
   */
  public enum TemplateType implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Unknown Template Type.
     * </pre>
     *
     * <code>UNKNOWN = 0;</code>
     */
    UNKNOWN(0),
    /**
     *
     *
     * <pre>
     * Legacy Template.
     * </pre>
     *
     * <code>LEGACY = 1;</code>
     */
    LEGACY(1),
    /**
     *
     *
     * <pre>
     * Flex Template.
     * </pre>
     *
     * <code>FLEX = 2;</code>
     */
    FLEX(2),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Unknown Template Type.
     * </pre>
     *
     * <code>UNKNOWN = 0;</code>
     */
    public static final int UNKNOWN_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Legacy Template.
     * </pre>
     *
     * <code>LEGACY = 1;</code>
     */
    public static final int LEGACY_VALUE = 1;
    /**
     *
     *
     * <pre>
     * Flex Template.
     * </pre>
     *
     * <code>FLEX = 2;</code>
     */
    public static final int FLEX_VALUE = 2;

    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static TemplateType valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static TemplateType forNumber(int value) {
      switch (value) {
        case 0:
          return UNKNOWN;
        case 1:
          return LEGACY;
        case 2:
          return FLEX;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<TemplateType> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<TemplateType> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<TemplateType>() {
          public TemplateType findValueByNumber(int number) {
            return TemplateType.forNumber(number);
          }
        };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }

    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
      return getDescriptor();
    }

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return com.google.dataflow.v1beta3.GetTemplateResponse.getDescriptor().getEnumTypes().get(0);
    }

    private static final TemplateType[] VALUES = values();

    public static TemplateType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private TemplateType(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.dataflow.v1beta3.GetTemplateResponse.TemplateType)
  }

  public static final int STATUS_FIELD_NUMBER = 1;
  private com.google.rpc.Status status_;
  /**
   *
   *
   * <pre>
   * The status of the get template request. Any problems with the
   * request will be indicated in the error_details.
   * </pre>
   *
   * <code>.google.rpc.Status status = 1;</code>
   *
   * @return Whether the status field is set.
   */
  @java.lang.Override
  public boolean hasStatus() {
    return status_ != null;
  }
  /**
   *
   *
   * <pre>
   * The status of the get template request. Any problems with the
   * request will be indicated in the error_details.
   * </pre>
   *
   * <code>.google.rpc.Status status = 1;</code>
   *
   * @return The status.
   */
  @java.lang.Override
  public com.google.rpc.Status getStatus() {
    return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
  }
  /**
   *
   *
   * <pre>
   * The status of the get template request. Any problems with the
   * request will be indicated in the error_details.
   * </pre>
   *
   * <code>.google.rpc.Status status = 1;</code>
   */
  @java.lang.Override
  public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
    return getStatus();
  }

  public static final int METADATA_FIELD_NUMBER = 2;
  private com.google.dataflow.v1beta3.TemplateMetadata metadata_;
  /**
   *
   *
   * <pre>
   * The template metadata describing the template name, available
   * parameters, etc.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.TemplateMetadata metadata = 2;</code>
   *
   * @return Whether the metadata field is set.
   */
  @java.lang.Override
  public boolean hasMetadata() {
    return metadata_ != null;
  }
  /**
   *
   *
   * <pre>
   * The template metadata describing the template name, available
   * parameters, etc.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.TemplateMetadata metadata = 2;</code>
   *
   * @return The metadata.
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.TemplateMetadata getMetadata() {
    return metadata_ == null
        ? com.google.dataflow.v1beta3.TemplateMetadata.getDefaultInstance()
        : metadata_;
  }
  /**
   *
   *
   * <pre>
   * The template metadata describing the template name, available
   * parameters, etc.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.TemplateMetadata metadata = 2;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.TemplateMetadataOrBuilder getMetadataOrBuilder() {
    return getMetadata();
  }

  public static final int TEMPLATE_TYPE_FIELD_NUMBER = 3;
  private int templateType_;
  /**
   *
   *
   * <pre>
   * Template Type.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.GetTemplateResponse.TemplateType template_type = 3;</code>
   *
   * @return The enum numeric value on the wire for templateType.
   */
  @java.lang.Override
  public int getTemplateTypeValue() {
    return templateType_;
  }
  /**
   *
   *
   * <pre>
   * Template Type.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.GetTemplateResponse.TemplateType template_type = 3;</code>
   *
   * @return The templateType.
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.GetTemplateResponse.TemplateType getTemplateType() {
    @SuppressWarnings("deprecation")
    com.google.dataflow.v1beta3.GetTemplateResponse.TemplateType result =
        com.google.dataflow.v1beta3.GetTemplateResponse.TemplateType.valueOf(templateType_);
    return result == null
        ? com.google.dataflow.v1beta3.GetTemplateResponse.TemplateType.UNRECOGNIZED
        : result;
  }

  public static final int RUNTIME_METADATA_FIELD_NUMBER = 4;
  private com.google.dataflow.v1beta3.RuntimeMetadata runtimeMetadata_;
  /**
   *
   *
   * <pre>
   * Describes the runtime metadata with SDKInfo and available parameters.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.RuntimeMetadata runtime_metadata = 4;</code>
   *
   * @return Whether the runtimeMetadata field is set.
   */
  @java.lang.Override
  public boolean hasRuntimeMetadata() {
    return runtimeMetadata_ != null;
  }
  /**
   *
   *
   * <pre>
   * Describes the runtime metadata with SDKInfo and available parameters.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.RuntimeMetadata runtime_metadata = 4;</code>
   *
   * @return The runtimeMetadata.
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.RuntimeMetadata getRuntimeMetadata() {
    return runtimeMetadata_ == null
        ? com.google.dataflow.v1beta3.RuntimeMetadata.getDefaultInstance()
        : runtimeMetadata_;
  }
  /**
   *
   *
   * <pre>
   * Describes the runtime metadata with SDKInfo and available parameters.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.RuntimeMetadata runtime_metadata = 4;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.RuntimeMetadataOrBuilder getRuntimeMetadataOrBuilder() {
    return getRuntimeMetadata();
  }

  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 (status_ != null) {
      output.writeMessage(1, getStatus());
    }
    if (metadata_ != null) {
      output.writeMessage(2, getMetadata());
    }
    if (templateType_
        != com.google.dataflow.v1beta3.GetTemplateResponse.TemplateType.UNKNOWN.getNumber()) {
      output.writeEnum(3, templateType_);
    }
    if (runtimeMetadata_ != null) {
      output.writeMessage(4, getRuntimeMetadata());
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (status_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStatus());
    }
    if (metadata_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetadata());
    }
    if (templateType_
        != com.google.dataflow.v1beta3.GetTemplateResponse.TemplateType.UNKNOWN.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, templateType_);
    }
    if (runtimeMetadata_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRuntimeMetadata());
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

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

    if (hasStatus() != other.hasStatus()) return false;
    if (hasStatus()) {
      if (!getStatus().equals(other.getStatus())) return false;
    }
    if (hasMetadata() != other.hasMetadata()) return false;
    if (hasMetadata()) {
      if (!getMetadata().equals(other.getMetadata())) return false;
    }
    if (templateType_ != other.templateType_) return false;
    if (hasRuntimeMetadata() != other.hasRuntimeMetadata()) return false;
    if (hasRuntimeMetadata()) {
      if (!getRuntimeMetadata().equals(other.getRuntimeMetadata())) 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();
    if (hasStatus()) {
      hash = (37 * hash) + STATUS_FIELD_NUMBER;
      hash = (53 * hash) + getStatus().hashCode();
    }
    if (hasMetadata()) {
      hash = (37 * hash) + METADATA_FIELD_NUMBER;
      hash = (53 * hash) + getMetadata().hashCode();
    }
    hash = (37 * hash) + TEMPLATE_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + templateType_;
    if (hasRuntimeMetadata()) {
      hash = (37 * hash) + RUNTIME_METADATA_FIELD_NUMBER;
      hash = (53 * hash) + getRuntimeMetadata().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

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

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

  public static com.google.dataflow.v1beta3.GetTemplateResponse 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.GetTemplateResponse 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>
   * The response to a GetTemplate request.
   * </pre>
   *
   * Protobuf type {@code google.dataflow.v1beta3.GetTemplateResponse}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.dataflow.v1beta3.GetTemplateResponse)
      com.google.dataflow.v1beta3.GetTemplateResponseOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.dataflow.v1beta3.TemplatesProto
          .internal_static_google_dataflow_v1beta3_GetTemplateResponse_descriptor;
    }

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

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

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (statusBuilder_ == null) {
        status_ = null;
      } else {
        status_ = null;
        statusBuilder_ = null;
      }
      if (metadataBuilder_ == null) {
        metadata_ = null;
      } else {
        metadata_ = null;
        metadataBuilder_ = null;
      }
      templateType_ = 0;

      if (runtimeMetadataBuilder_ == null) {
        runtimeMetadata_ = null;
      } else {
        runtimeMetadata_ = null;
        runtimeMetadataBuilder_ = null;
      }
      return this;
    }

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

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

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

    @java.lang.Override
    public com.google.dataflow.v1beta3.GetTemplateResponse buildPartial() {
      com.google.dataflow.v1beta3.GetTemplateResponse result =
          new com.google.dataflow.v1beta3.GetTemplateResponse(this);
      if (statusBuilder_ == null) {
        result.status_ = status_;
      } else {
        result.status_ = statusBuilder_.build();
      }
      if (metadataBuilder_ == null) {
        result.metadata_ = metadata_;
      } else {
        result.metadata_ = metadataBuilder_.build();
      }
      result.templateType_ = templateType_;
      if (runtimeMetadataBuilder_ == null) {
        result.runtimeMetadata_ = runtimeMetadata_;
      } else {
        result.runtimeMetadata_ = runtimeMetadataBuilder_.build();
      }
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.dataflow.v1beta3.GetTemplateResponse) {
        return mergeFrom((com.google.dataflow.v1beta3.GetTemplateResponse) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.dataflow.v1beta3.GetTemplateResponse other) {
      if (other == com.google.dataflow.v1beta3.GetTemplateResponse.getDefaultInstance())
        return this;
      if (other.hasStatus()) {
        mergeStatus(other.getStatus());
      }
      if (other.hasMetadata()) {
        mergeMetadata(other.getMetadata());
      }
      if (other.templateType_ != 0) {
        setTemplateTypeValue(other.getTemplateTypeValue());
      }
      if (other.hasRuntimeMetadata()) {
        mergeRuntimeMetadata(other.getRuntimeMetadata());
      }
      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:
              {
                input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry);

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

                break;
              } // case 18
            case 24:
              {
                templateType_ = input.readEnum();

                break;
              } // case 24
            case 34:
              {
                input.readMessage(getRuntimeMetadataFieldBuilder().getBuilder(), extensionRegistry);

                break;
              } // case 34
            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 com.google.rpc.Status status_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
        statusBuilder_;
    /**
     *
     *
     * <pre>
     * The status of the get template request. Any problems with the
     * request will be indicated in the error_details.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     *
     * @return Whether the status field is set.
     */
    public boolean hasStatus() {
      return statusBuilder_ != null || status_ != null;
    }
    /**
     *
     *
     * <pre>
     * The status of the get template request. Any problems with the
     * request will be indicated in the error_details.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     *
     * @return The status.
     */
    public com.google.rpc.Status getStatus() {
      if (statusBuilder_ == null) {
        return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
      } else {
        return statusBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The status of the get template request. Any problems with the
     * request will be indicated in the error_details.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     */
    public Builder setStatus(com.google.rpc.Status value) {
      if (statusBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        status_ = value;
        onChanged();
      } else {
        statusBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The status of the get template request. Any problems with the
     * request will be indicated in the error_details.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     */
    public Builder setStatus(com.google.rpc.Status.Builder builderForValue) {
      if (statusBuilder_ == null) {
        status_ = builderForValue.build();
        onChanged();
      } else {
        statusBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The status of the get template request. Any problems with the
     * request will be indicated in the error_details.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     */
    public Builder mergeStatus(com.google.rpc.Status value) {
      if (statusBuilder_ == null) {
        if (status_ != null) {
          status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial();
        } else {
          status_ = value;
        }
        onChanged();
      } else {
        statusBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The status of the get template request. Any problems with the
     * request will be indicated in the error_details.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     */
    public Builder clearStatus() {
      if (statusBuilder_ == null) {
        status_ = null;
        onChanged();
      } else {
        status_ = null;
        statusBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The status of the get template request. Any problems with the
     * request will be indicated in the error_details.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     */
    public com.google.rpc.Status.Builder getStatusBuilder() {

      onChanged();
      return getStatusFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The status of the get template request. Any problems with the
     * request will be indicated in the error_details.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     */
    public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
      if (statusBuilder_ != null) {
        return statusBuilder_.getMessageOrBuilder();
      } else {
        return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
      }
    }
    /**
     *
     *
     * <pre>
     * The status of the get template request. Any problems with the
     * request will be indicated in the error_details.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
        getStatusFieldBuilder() {
      if (statusBuilder_ == null) {
        statusBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.rpc.Status,
                com.google.rpc.Status.Builder,
                com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean());
        status_ = null;
      }
      return statusBuilder_;
    }

    private com.google.dataflow.v1beta3.TemplateMetadata metadata_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.dataflow.v1beta3.TemplateMetadata,
            com.google.dataflow.v1beta3.TemplateMetadata.Builder,
            com.google.dataflow.v1beta3.TemplateMetadataOrBuilder>
        metadataBuilder_;
    /**
     *
     *
     * <pre>
     * The template metadata describing the template name, available
     * parameters, etc.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TemplateMetadata metadata = 2;</code>
     *
     * @return Whether the metadata field is set.
     */
    public boolean hasMetadata() {
      return metadataBuilder_ != null || metadata_ != null;
    }
    /**
     *
     *
     * <pre>
     * The template metadata describing the template name, available
     * parameters, etc.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TemplateMetadata metadata = 2;</code>
     *
     * @return The metadata.
     */
    public com.google.dataflow.v1beta3.TemplateMetadata getMetadata() {
      if (metadataBuilder_ == null) {
        return metadata_ == null
            ? com.google.dataflow.v1beta3.TemplateMetadata.getDefaultInstance()
            : metadata_;
      } else {
        return metadataBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The template metadata describing the template name, available
     * parameters, etc.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TemplateMetadata metadata = 2;</code>
     */
    public Builder setMetadata(com.google.dataflow.v1beta3.TemplateMetadata value) {
      if (metadataBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        metadata_ = value;
        onChanged();
      } else {
        metadataBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The template metadata describing the template name, available
     * parameters, etc.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TemplateMetadata metadata = 2;</code>
     */
    public Builder setMetadata(
        com.google.dataflow.v1beta3.TemplateMetadata.Builder builderForValue) {
      if (metadataBuilder_ == null) {
        metadata_ = builderForValue.build();
        onChanged();
      } else {
        metadataBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The template metadata describing the template name, available
     * parameters, etc.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TemplateMetadata metadata = 2;</code>
     */
    public Builder mergeMetadata(com.google.dataflow.v1beta3.TemplateMetadata value) {
      if (metadataBuilder_ == null) {
        if (metadata_ != null) {
          metadata_ =
              com.google.dataflow.v1beta3.TemplateMetadata.newBuilder(metadata_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          metadata_ = value;
        }
        onChanged();
      } else {
        metadataBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The template metadata describing the template name, available
     * parameters, etc.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TemplateMetadata metadata = 2;</code>
     */
    public Builder clearMetadata() {
      if (metadataBuilder_ == null) {
        metadata_ = null;
        onChanged();
      } else {
        metadata_ = null;
        metadataBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The template metadata describing the template name, available
     * parameters, etc.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TemplateMetadata metadata = 2;</code>
     */
    public com.google.dataflow.v1beta3.TemplateMetadata.Builder getMetadataBuilder() {

      onChanged();
      return getMetadataFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The template metadata describing the template name, available
     * parameters, etc.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TemplateMetadata metadata = 2;</code>
     */
    public com.google.dataflow.v1beta3.TemplateMetadataOrBuilder getMetadataOrBuilder() {
      if (metadataBuilder_ != null) {
        return metadataBuilder_.getMessageOrBuilder();
      } else {
        return metadata_ == null
            ? com.google.dataflow.v1beta3.TemplateMetadata.getDefaultInstance()
            : metadata_;
      }
    }
    /**
     *
     *
     * <pre>
     * The template metadata describing the template name, available
     * parameters, etc.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TemplateMetadata metadata = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.dataflow.v1beta3.TemplateMetadata,
            com.google.dataflow.v1beta3.TemplateMetadata.Builder,
            com.google.dataflow.v1beta3.TemplateMetadataOrBuilder>
        getMetadataFieldBuilder() {
      if (metadataBuilder_ == null) {
        metadataBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.dataflow.v1beta3.TemplateMetadata,
                com.google.dataflow.v1beta3.TemplateMetadata.Builder,
                com.google.dataflow.v1beta3.TemplateMetadataOrBuilder>(
                getMetadata(), getParentForChildren(), isClean());
        metadata_ = null;
      }
      return metadataBuilder_;
    }

    private int templateType_ = 0;
    /**
     *
     *
     * <pre>
     * Template Type.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.GetTemplateResponse.TemplateType template_type = 3;</code>
     *
     * @return The enum numeric value on the wire for templateType.
     */
    @java.lang.Override
    public int getTemplateTypeValue() {
      return templateType_;
    }
    /**
     *
     *
     * <pre>
     * Template Type.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.GetTemplateResponse.TemplateType template_type = 3;</code>
     *
     * @param value The enum numeric value on the wire for templateType to set.
     * @return This builder for chaining.
     */
    public Builder setTemplateTypeValue(int value) {

      templateType_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Template Type.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.GetTemplateResponse.TemplateType template_type = 3;</code>
     *
     * @return The templateType.
     */
    @java.lang.Override
    public com.google.dataflow.v1beta3.GetTemplateResponse.TemplateType getTemplateType() {
      @SuppressWarnings("deprecation")
      com.google.dataflow.v1beta3.GetTemplateResponse.TemplateType result =
          com.google.dataflow.v1beta3.GetTemplateResponse.TemplateType.valueOf(templateType_);
      return result == null
          ? com.google.dataflow.v1beta3.GetTemplateResponse.TemplateType.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Template Type.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.GetTemplateResponse.TemplateType template_type = 3;</code>
     *
     * @param value The templateType to set.
     * @return This builder for chaining.
     */
    public Builder setTemplateType(
        com.google.dataflow.v1beta3.GetTemplateResponse.TemplateType value) {
      if (value == null) {
        throw new NullPointerException();
      }

      templateType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Template Type.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.GetTemplateResponse.TemplateType template_type = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearTemplateType() {

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

    private com.google.dataflow.v1beta3.RuntimeMetadata runtimeMetadata_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.dataflow.v1beta3.RuntimeMetadata,
            com.google.dataflow.v1beta3.RuntimeMetadata.Builder,
            com.google.dataflow.v1beta3.RuntimeMetadataOrBuilder>
        runtimeMetadataBuilder_;
    /**
     *
     *
     * <pre>
     * Describes the runtime metadata with SDKInfo and available parameters.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.RuntimeMetadata runtime_metadata = 4;</code>
     *
     * @return Whether the runtimeMetadata field is set.
     */
    public boolean hasRuntimeMetadata() {
      return runtimeMetadataBuilder_ != null || runtimeMetadata_ != null;
    }
    /**
     *
     *
     * <pre>
     * Describes the runtime metadata with SDKInfo and available parameters.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.RuntimeMetadata runtime_metadata = 4;</code>
     *
     * @return The runtimeMetadata.
     */
    public com.google.dataflow.v1beta3.RuntimeMetadata getRuntimeMetadata() {
      if (runtimeMetadataBuilder_ == null) {
        return runtimeMetadata_ == null
            ? com.google.dataflow.v1beta3.RuntimeMetadata.getDefaultInstance()
            : runtimeMetadata_;
      } else {
        return runtimeMetadataBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Describes the runtime metadata with SDKInfo and available parameters.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.RuntimeMetadata runtime_metadata = 4;</code>
     */
    public Builder setRuntimeMetadata(com.google.dataflow.v1beta3.RuntimeMetadata value) {
      if (runtimeMetadataBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        runtimeMetadata_ = value;
        onChanged();
      } else {
        runtimeMetadataBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Describes the runtime metadata with SDKInfo and available parameters.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.RuntimeMetadata runtime_metadata = 4;</code>
     */
    public Builder setRuntimeMetadata(
        com.google.dataflow.v1beta3.RuntimeMetadata.Builder builderForValue) {
      if (runtimeMetadataBuilder_ == null) {
        runtimeMetadata_ = builderForValue.build();
        onChanged();
      } else {
        runtimeMetadataBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Describes the runtime metadata with SDKInfo and available parameters.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.RuntimeMetadata runtime_metadata = 4;</code>
     */
    public Builder mergeRuntimeMetadata(com.google.dataflow.v1beta3.RuntimeMetadata value) {
      if (runtimeMetadataBuilder_ == null) {
        if (runtimeMetadata_ != null) {
          runtimeMetadata_ =
              com.google.dataflow.v1beta3.RuntimeMetadata.newBuilder(runtimeMetadata_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          runtimeMetadata_ = value;
        }
        onChanged();
      } else {
        runtimeMetadataBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Describes the runtime metadata with SDKInfo and available parameters.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.RuntimeMetadata runtime_metadata = 4;</code>
     */
    public Builder clearRuntimeMetadata() {
      if (runtimeMetadataBuilder_ == null) {
        runtimeMetadata_ = null;
        onChanged();
      } else {
        runtimeMetadata_ = null;
        runtimeMetadataBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Describes the runtime metadata with SDKInfo and available parameters.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.RuntimeMetadata runtime_metadata = 4;</code>
     */
    public com.google.dataflow.v1beta3.RuntimeMetadata.Builder getRuntimeMetadataBuilder() {

      onChanged();
      return getRuntimeMetadataFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Describes the runtime metadata with SDKInfo and available parameters.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.RuntimeMetadata runtime_metadata = 4;</code>
     */
    public com.google.dataflow.v1beta3.RuntimeMetadataOrBuilder getRuntimeMetadataOrBuilder() {
      if (runtimeMetadataBuilder_ != null) {
        return runtimeMetadataBuilder_.getMessageOrBuilder();
      } else {
        return runtimeMetadata_ == null
            ? com.google.dataflow.v1beta3.RuntimeMetadata.getDefaultInstance()
            : runtimeMetadata_;
      }
    }
    /**
     *
     *
     * <pre>
     * Describes the runtime metadata with SDKInfo and available parameters.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.RuntimeMetadata runtime_metadata = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.dataflow.v1beta3.RuntimeMetadata,
            com.google.dataflow.v1beta3.RuntimeMetadata.Builder,
            com.google.dataflow.v1beta3.RuntimeMetadataOrBuilder>
        getRuntimeMetadataFieldBuilder() {
      if (runtimeMetadataBuilder_ == null) {
        runtimeMetadataBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.dataflow.v1beta3.RuntimeMetadata,
                com.google.dataflow.v1beta3.RuntimeMetadata.Builder,
                com.google.dataflow.v1beta3.RuntimeMetadataOrBuilder>(
                getRuntimeMetadata(), getParentForChildren(), isClean());
        runtimeMetadata_ = null;
      }
      return runtimeMetadataBuilder_;
    }

    @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.GetTemplateResponse)
  }

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

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

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

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

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

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