/*
 * Copyright 2025 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: schema/google/showcase/v1beta1/echo.proto

package com.google.showcase.v1beta1;

/**
 *
 *
 * <pre>
 * The request message used for the Echo, Collect and Chat methods.
 * If content or opt are set in this message then the request will succeed.
 * If status is set in this message then the status will be returned as an
 * error.
 * </pre>
 *
 * Protobuf type {@code google.showcase.v1beta1.EchoRequest}
 */
public final class EchoRequest extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.showcase.v1beta1.EchoRequest)
    EchoRequestOrBuilder {
  private static final long serialVersionUID = 0L;

  // Use EchoRequest.newBuilder() to construct.
  private EchoRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private EchoRequest() {
    severity_ = 0;
    header_ = "";
    otherHeader_ = "";
    requestId_ = "";
    otherRequestId_ = "";
  }

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

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

  private EchoRequest(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10:
            {
              java.lang.String s = input.readStringRequireUtf8();
              responseCase_ = 1;
              response_ = s;
              break;
            }
          case 18:
            {
              com.google.rpc.Status.Builder subBuilder = null;
              if (responseCase_ == 2) {
                subBuilder = ((com.google.rpc.Status) response_).toBuilder();
              }
              response_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((com.google.rpc.Status) response_);
                response_ = subBuilder.buildPartial();
              }
              responseCase_ = 2;
              break;
            }
          case 24:
            {
              int rawValue = input.readEnum();

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

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

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

              requestId_ = s;
              break;
            }
          case 66:
            {
              java.lang.String s = input.readStringRequireUtf8();
              bitField0_ |= 0x00000001;
              otherRequestId_ = s;
              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.showcase.v1beta1.EchoOuterClass
        .internal_static_google_showcase_v1beta1_EchoRequest_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.showcase.v1beta1.EchoOuterClass
        .internal_static_google_showcase_v1beta1_EchoRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.showcase.v1beta1.EchoRequest.class,
            com.google.showcase.v1beta1.EchoRequest.Builder.class);
  }

  private int bitField0_;
  private int responseCase_ = 0;
  private java.lang.Object response_;

  public enum ResponseCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    CONTENT(1),
    ERROR(2),
    RESPONSE_NOT_SET(0);
    private final int value;

    private ResponseCase(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 ResponseCase valueOf(int value) {
      return forNumber(value);
    }

    public static ResponseCase forNumber(int value) {
      switch (value) {
        case 1:
          return CONTENT;
        case 2:
          return ERROR;
        case 0:
          return RESPONSE_NOT_SET;
        default:
          return null;
      }
    }

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

  public ResponseCase getResponseCase() {
    return ResponseCase.forNumber(responseCase_);
  }

  public static final int CONTENT_FIELD_NUMBER = 1;

  /**
   *
   *
   * <pre>
   * The content to be echoed by the server.
   * </pre>
   *
   * <code>string content = 1;</code>
   *
   * @return Whether the content field is set.
   */
  public boolean hasContent() {
    return responseCase_ == 1;
  }

  /**
   *
   *
   * <pre>
   * The content to be echoed by the server.
   * </pre>
   *
   * <code>string content = 1;</code>
   *
   * @return The content.
   */
  public java.lang.String getContent() {
    java.lang.Object ref = "";
    if (responseCase_ == 1) {
      ref = response_;
    }
    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 (responseCase_ == 1) {
        response_ = s;
      }
      return s;
    }
  }

  /**
   *
   *
   * <pre>
   * The content to be echoed by the server.
   * </pre>
   *
   * <code>string content = 1;</code>
   *
   * @return The bytes for content.
   */
  public com.google.protobuf.ByteString getContentBytes() {
    java.lang.Object ref = "";
    if (responseCase_ == 1) {
      ref = response_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      if (responseCase_ == 1) {
        response_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ERROR_FIELD_NUMBER = 2;

  /**
   *
   *
   * <pre>
   * The error to be thrown by the server.
   * </pre>
   *
   * <code>.google.rpc.Status error = 2;</code>
   *
   * @return Whether the error field is set.
   */
  @java.lang.Override
  public boolean hasError() {
    return responseCase_ == 2;
  }

  /**
   *
   *
   * <pre>
   * The error to be thrown by the server.
   * </pre>
   *
   * <code>.google.rpc.Status error = 2;</code>
   *
   * @return The error.
   */
  @java.lang.Override
  public com.google.rpc.Status getError() {
    if (responseCase_ == 2) {
      return (com.google.rpc.Status) response_;
    }
    return com.google.rpc.Status.getDefaultInstance();
  }

  /**
   *
   *
   * <pre>
   * The error to be thrown by the server.
   * </pre>
   *
   * <code>.google.rpc.Status error = 2;</code>
   */
  @java.lang.Override
  public com.google.rpc.StatusOrBuilder getErrorOrBuilder() {
    if (responseCase_ == 2) {
      return (com.google.rpc.Status) response_;
    }
    return com.google.rpc.Status.getDefaultInstance();
  }

  public static final int SEVERITY_FIELD_NUMBER = 3;
  private int severity_;

  /**
   *
   *
   * <pre>
   * The severity to be echoed by the server.
   * </pre>
   *
   * <code>.google.showcase.v1beta1.Severity severity = 3;</code>
   *
   * @return The enum numeric value on the wire for severity.
   */
  @java.lang.Override
  public int getSeverityValue() {
    return severity_;
  }

  /**
   *
   *
   * <pre>
   * The severity to be echoed by the server.
   * </pre>
   *
   * <code>.google.showcase.v1beta1.Severity severity = 3;</code>
   *
   * @return The severity.
   */
  @java.lang.Override
  public com.google.showcase.v1beta1.Severity getSeverity() {
    @SuppressWarnings("deprecation")
    com.google.showcase.v1beta1.Severity result =
        com.google.showcase.v1beta1.Severity.valueOf(severity_);
    return result == null ? com.google.showcase.v1beta1.Severity.UNRECOGNIZED : result;
  }

  public static final int HEADER_FIELD_NUMBER = 4;
  private volatile java.lang.Object header_;

  /**
   *
   *
   * <pre>
   * Optional. This field can be set to test the routing annotation on the Echo method.
   * </pre>
   *
   * <code>string header = 4;</code>
   *
   * @return The header.
   */
  @java.lang.Override
  public java.lang.String getHeader() {
    java.lang.Object ref = header_;
    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();
      header_ = s;
      return s;
    }
  }

  /**
   *
   *
   * <pre>
   * Optional. This field can be set to test the routing annotation on the Echo method.
   * </pre>
   *
   * <code>string header = 4;</code>
   *
   * @return The bytes for header.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getHeaderBytes() {
    java.lang.Object ref = header_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      header_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int OTHER_HEADER_FIELD_NUMBER = 5;
  private volatile java.lang.Object otherHeader_;

  /**
   *
   *
   * <pre>
   * Optional. This field can be set to test the routing annotation on the Echo method.
   * </pre>
   *
   * <code>string other_header = 5;</code>
   *
   * @return The otherHeader.
   */
  @java.lang.Override
  public java.lang.String getOtherHeader() {
    java.lang.Object ref = otherHeader_;
    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();
      otherHeader_ = s;
      return s;
    }
  }

  /**
   *
   *
   * <pre>
   * Optional. This field can be set to test the routing annotation on the Echo method.
   * </pre>
   *
   * <code>string other_header = 5;</code>
   *
   * @return The bytes for otherHeader.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getOtherHeaderBytes() {
    java.lang.Object ref = otherHeader_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      otherHeader_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int REQUEST_ID_FIELD_NUMBER = 7;
  private volatile java.lang.Object requestId_;

  /**
   *
   *
   * <pre>
   * To facilitate testing of https://google.aip.dev/client-libraries/4235
   * </pre>
   *
   * <code>string request_id = 7 [(.google.api.field_info) = { ... }</code>
   *
   * @return The requestId.
   */
  @java.lang.Override
  public java.lang.String getRequestId() {
    java.lang.Object ref = requestId_;
    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();
      requestId_ = s;
      return s;
    }
  }

  /**
   *
   *
   * <pre>
   * To facilitate testing of https://google.aip.dev/client-libraries/4235
   * </pre>
   *
   * <code>string request_id = 7 [(.google.api.field_info) = { ... }</code>
   *
   * @return The bytes for requestId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getRequestIdBytes() {
    java.lang.Object ref = requestId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      requestId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int OTHER_REQUEST_ID_FIELD_NUMBER = 8;
  private volatile java.lang.Object otherRequestId_;

  /**
   *
   *
   * <pre>
   * To facilitate testing of https://google.aip.dev/client-libraries/4235
   * </pre>
   *
   * <code>optional string other_request_id = 8 [(.google.api.field_info) = { ... }</code>
   *
   * @return Whether the otherRequestId field is set.
   */
  @java.lang.Override
  public boolean hasOtherRequestId() {
    return ((bitField0_ & 0x00000001) != 0);
  }

  /**
   *
   *
   * <pre>
   * To facilitate testing of https://google.aip.dev/client-libraries/4235
   * </pre>
   *
   * <code>optional string other_request_id = 8 [(.google.api.field_info) = { ... }</code>
   *
   * @return The otherRequestId.
   */
  @java.lang.Override
  public java.lang.String getOtherRequestId() {
    java.lang.Object ref = otherRequestId_;
    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();
      otherRequestId_ = s;
      return s;
    }
  }

  /**
   *
   *
   * <pre>
   * To facilitate testing of https://google.aip.dev/client-libraries/4235
   * </pre>
   *
   * <code>optional string other_request_id = 8 [(.google.api.field_info) = { ... }</code>
   *
   * @return The bytes for otherRequestId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getOtherRequestIdBytes() {
    java.lang.Object ref = otherRequestId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      otherRequestId_ = 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 (responseCase_ == 1) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, response_);
    }
    if (responseCase_ == 2) {
      output.writeMessage(2, (com.google.rpc.Status) response_);
    }
    if (severity_ != com.google.showcase.v1beta1.Severity.UNNECESSARY.getNumber()) {
      output.writeEnum(3, severity_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(header_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, header_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(otherHeader_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, otherHeader_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, requestId_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, otherRequestId_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (responseCase_ == 1) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, response_);
    }
    if (responseCase_ == 2) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              2, (com.google.rpc.Status) response_);
    }
    if (severity_ != com.google.showcase.v1beta1.Severity.UNNECESSARY.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, severity_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(header_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, header_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(otherHeader_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, otherHeader_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, requestId_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, otherRequestId_);
    }
    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.showcase.v1beta1.EchoRequest)) {
      return super.equals(obj);
    }
    com.google.showcase.v1beta1.EchoRequest other = (com.google.showcase.v1beta1.EchoRequest) obj;

    if (severity_ != other.severity_) return false;
    if (!getHeader().equals(other.getHeader())) return false;
    if (!getOtherHeader().equals(other.getOtherHeader())) return false;
    if (!getRequestId().equals(other.getRequestId())) return false;
    if (hasOtherRequestId() != other.hasOtherRequestId()) return false;
    if (hasOtherRequestId()) {
      if (!getOtherRequestId().equals(other.getOtherRequestId())) return false;
    }
    if (!getResponseCase().equals(other.getResponseCase())) return false;
    switch (responseCase_) {
      case 1:
        if (!getContent().equals(other.getContent())) return false;
        break;
      case 2:
        if (!getError().equals(other.getError())) 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) + SEVERITY_FIELD_NUMBER;
    hash = (53 * hash) + severity_;
    hash = (37 * hash) + HEADER_FIELD_NUMBER;
    hash = (53 * hash) + getHeader().hashCode();
    hash = (37 * hash) + OTHER_HEADER_FIELD_NUMBER;
    hash = (53 * hash) + getOtherHeader().hashCode();
    hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER;
    hash = (53 * hash) + getRequestId().hashCode();
    if (hasOtherRequestId()) {
      hash = (37 * hash) + OTHER_REQUEST_ID_FIELD_NUMBER;
      hash = (53 * hash) + getOtherRequestId().hashCode();
    }
    switch (responseCase_) {
      case 1:
        hash = (37 * hash) + CONTENT_FIELD_NUMBER;
        hash = (53 * hash) + getContent().hashCode();
        break;
      case 2:
        hash = (37 * hash) + ERROR_FIELD_NUMBER;
        hash = (53 * hash) + getError().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.showcase.v1beta1.EchoRequest parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.showcase.v1beta1.EchoRequest parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.showcase.v1beta1.EchoRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

  public static com.google.showcase.v1beta1.EchoRequest parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.showcase.v1beta1.EchoRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

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

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

  public static com.google.showcase.v1beta1.EchoRequest 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.showcase.v1beta1.EchoRequest 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 request message used for the Echo, Collect and Chat methods.
   * If content or opt are set in this message then the request will succeed.
   * If status is set in this message then the status will be returned as an
   * error.
   * </pre>
   *
   * Protobuf type {@code google.showcase.v1beta1.EchoRequest}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.showcase.v1beta1.EchoRequest)
      com.google.showcase.v1beta1.EchoRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.showcase.v1beta1.EchoOuterClass
          .internal_static_google_showcase_v1beta1_EchoRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.showcase.v1beta1.EchoOuterClass
          .internal_static_google_showcase_v1beta1_EchoRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.showcase.v1beta1.EchoRequest.class,
              com.google.showcase.v1beta1.EchoRequest.Builder.class);
    }

    // Construct using com.google.showcase.v1beta1.EchoRequest.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();
      severity_ = 0;

      header_ = "";

      otherHeader_ = "";

      requestId_ = "";

      otherRequestId_ = "";
      bitField0_ = (bitField0_ & ~0x00000001);
      responseCase_ = 0;
      response_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.showcase.v1beta1.EchoOuterClass
          .internal_static_google_showcase_v1beta1_EchoRequest_descriptor;
    }

    @java.lang.Override
    public com.google.showcase.v1beta1.EchoRequest getDefaultInstanceForType() {
      return com.google.showcase.v1beta1.EchoRequest.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.showcase.v1beta1.EchoRequest build() {
      com.google.showcase.v1beta1.EchoRequest result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.showcase.v1beta1.EchoRequest buildPartial() {
      com.google.showcase.v1beta1.EchoRequest result =
          new com.google.showcase.v1beta1.EchoRequest(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (responseCase_ == 1) {
        result.response_ = response_;
      }
      if (responseCase_ == 2) {
        if (errorBuilder_ == null) {
          result.response_ = response_;
        } else {
          result.response_ = errorBuilder_.build();
        }
      }
      result.severity_ = severity_;
      result.header_ = header_;
      result.otherHeader_ = otherHeader_;
      result.requestId_ = requestId_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        to_bitField0_ |= 0x00000001;
      }
      result.otherRequestId_ = otherRequestId_;
      result.bitField0_ = to_bitField0_;
      result.responseCase_ = responseCase_;
      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.showcase.v1beta1.EchoRequest) {
        return mergeFrom((com.google.showcase.v1beta1.EchoRequest) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.showcase.v1beta1.EchoRequest other) {
      if (other == com.google.showcase.v1beta1.EchoRequest.getDefaultInstance()) return this;
      if (other.severity_ != 0) {
        setSeverityValue(other.getSeverityValue());
      }
      if (!other.getHeader().isEmpty()) {
        header_ = other.header_;
        onChanged();
      }
      if (!other.getOtherHeader().isEmpty()) {
        otherHeader_ = other.otherHeader_;
        onChanged();
      }
      if (!other.getRequestId().isEmpty()) {
        requestId_ = other.requestId_;
        onChanged();
      }
      if (other.hasOtherRequestId()) {
        bitField0_ |= 0x00000001;
        otherRequestId_ = other.otherRequestId_;
        onChanged();
      }
      switch (other.getResponseCase()) {
        case CONTENT:
          {
            responseCase_ = 1;
            response_ = other.response_;
            onChanged();
            break;
          }
        case ERROR:
          {
            mergeError(other.getError());
            break;
          }
        case RESPONSE_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.showcase.v1beta1.EchoRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.showcase.v1beta1.EchoRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int responseCase_ = 0;
    private java.lang.Object response_;

    public ResponseCase getResponseCase() {
      return ResponseCase.forNumber(responseCase_);
    }

    public Builder clearResponse() {
      responseCase_ = 0;
      response_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    /**
     *
     *
     * <pre>
     * The content to be echoed by the server.
     * </pre>
     *
     * <code>string content = 1;</code>
     *
     * @return Whether the content field is set.
     */
    @java.lang.Override
    public boolean hasContent() {
      return responseCase_ == 1;
    }

    /**
     *
     *
     * <pre>
     * The content to be echoed by the server.
     * </pre>
     *
     * <code>string content = 1;</code>
     *
     * @return The content.
     */
    @java.lang.Override
    public java.lang.String getContent() {
      java.lang.Object ref = "";
      if (responseCase_ == 1) {
        ref = response_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (responseCase_ == 1) {
          response_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The content to be echoed by the server.
     * </pre>
     *
     * <code>string content = 1;</code>
     *
     * @return The bytes for content.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getContentBytes() {
      java.lang.Object ref = "";
      if (responseCase_ == 1) {
        ref = response_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        if (responseCase_ == 1) {
          response_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The content to be echoed by the server.
     * </pre>
     *
     * <code>string content = 1;</code>
     *
     * @param value The content to set.
     * @return This builder for chaining.
     */
    public Builder setContent(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      responseCase_ = 1;
      response_ = value;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The content to be echoed by the server.
     * </pre>
     *
     * <code>string content = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearContent() {
      if (responseCase_ == 1) {
        responseCase_ = 0;
        response_ = null;
        onChanged();
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * The content to be echoed by the server.
     * </pre>
     *
     * <code>string content = 1;</code>
     *
     * @param value The bytes for content to set.
     * @return This builder for chaining.
     */
    public Builder setContentBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      responseCase_ = 1;
      response_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
        errorBuilder_;

    /**
     *
     *
     * <pre>
     * The error to be thrown by the server.
     * </pre>
     *
     * <code>.google.rpc.Status error = 2;</code>
     *
     * @return Whether the error field is set.
     */
    @java.lang.Override
    public boolean hasError() {
      return responseCase_ == 2;
    }

    /**
     *
     *
     * <pre>
     * The error to be thrown by the server.
     * </pre>
     *
     * <code>.google.rpc.Status error = 2;</code>
     *
     * @return The error.
     */
    @java.lang.Override
    public com.google.rpc.Status getError() {
      if (errorBuilder_ == null) {
        if (responseCase_ == 2) {
          return (com.google.rpc.Status) response_;
        }
        return com.google.rpc.Status.getDefaultInstance();
      } else {
        if (responseCase_ == 2) {
          return errorBuilder_.getMessage();
        }
        return com.google.rpc.Status.getDefaultInstance();
      }
    }

    /**
     *
     *
     * <pre>
     * The error to be thrown by the server.
     * </pre>
     *
     * <code>.google.rpc.Status error = 2;</code>
     */
    public Builder setError(com.google.rpc.Status value) {
      if (errorBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        response_ = value;
        onChanged();
      } else {
        errorBuilder_.setMessage(value);
      }
      responseCase_ = 2;
      return this;
    }

    /**
     *
     *
     * <pre>
     * The error to be thrown by the server.
     * </pre>
     *
     * <code>.google.rpc.Status error = 2;</code>
     */
    public Builder setError(com.google.rpc.Status.Builder builderForValue) {
      if (errorBuilder_ == null) {
        response_ = builderForValue.build();
        onChanged();
      } else {
        errorBuilder_.setMessage(builderForValue.build());
      }
      responseCase_ = 2;
      return this;
    }

    /**
     *
     *
     * <pre>
     * The error to be thrown by the server.
     * </pre>
     *
     * <code>.google.rpc.Status error = 2;</code>
     */
    public Builder mergeError(com.google.rpc.Status value) {
      if (errorBuilder_ == null) {
        if (responseCase_ == 2 && response_ != com.google.rpc.Status.getDefaultInstance()) {
          response_ =
              com.google.rpc.Status.newBuilder((com.google.rpc.Status) response_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          response_ = value;
        }
        onChanged();
      } else {
        if (responseCase_ == 2) {
          errorBuilder_.mergeFrom(value);
        } else {
          errorBuilder_.setMessage(value);
        }
      }
      responseCase_ = 2;
      return this;
    }

    /**
     *
     *
     * <pre>
     * The error to be thrown by the server.
     * </pre>
     *
     * <code>.google.rpc.Status error = 2;</code>
     */
    public Builder clearError() {
      if (errorBuilder_ == null) {
        if (responseCase_ == 2) {
          responseCase_ = 0;
          response_ = null;
          onChanged();
        }
      } else {
        if (responseCase_ == 2) {
          responseCase_ = 0;
          response_ = null;
        }
        errorBuilder_.clear();
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * The error to be thrown by the server.
     * </pre>
     *
     * <code>.google.rpc.Status error = 2;</code>
     */
    public com.google.rpc.Status.Builder getErrorBuilder() {
      return getErrorFieldBuilder().getBuilder();
    }

    /**
     *
     *
     * <pre>
     * The error to be thrown by the server.
     * </pre>
     *
     * <code>.google.rpc.Status error = 2;</code>
     */
    @java.lang.Override
    public com.google.rpc.StatusOrBuilder getErrorOrBuilder() {
      if ((responseCase_ == 2) && (errorBuilder_ != null)) {
        return errorBuilder_.getMessageOrBuilder();
      } else {
        if (responseCase_ == 2) {
          return (com.google.rpc.Status) response_;
        }
        return com.google.rpc.Status.getDefaultInstance();
      }
    }

    /**
     *
     *
     * <pre>
     * The error to be thrown by the server.
     * </pre>
     *
     * <code>.google.rpc.Status error = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
        getErrorFieldBuilder() {
      if (errorBuilder_ == null) {
        if (!(responseCase_ == 2)) {
          response_ = com.google.rpc.Status.getDefaultInstance();
        }
        errorBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.rpc.Status,
                com.google.rpc.Status.Builder,
                com.google.rpc.StatusOrBuilder>(
                (com.google.rpc.Status) response_, getParentForChildren(), isClean());
        response_ = null;
      }
      responseCase_ = 2;
      onChanged();
      ;
      return errorBuilder_;
    }

    private int severity_ = 0;

    /**
     *
     *
     * <pre>
     * The severity to be echoed by the server.
     * </pre>
     *
     * <code>.google.showcase.v1beta1.Severity severity = 3;</code>
     *
     * @return The enum numeric value on the wire for severity.
     */
    @java.lang.Override
    public int getSeverityValue() {
      return severity_;
    }

    /**
     *
     *
     * <pre>
     * The severity to be echoed by the server.
     * </pre>
     *
     * <code>.google.showcase.v1beta1.Severity severity = 3;</code>
     *
     * @param value The enum numeric value on the wire for severity to set.
     * @return This builder for chaining.
     */
    public Builder setSeverityValue(int value) {

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

    /**
     *
     *
     * <pre>
     * The severity to be echoed by the server.
     * </pre>
     *
     * <code>.google.showcase.v1beta1.Severity severity = 3;</code>
     *
     * @return The severity.
     */
    @java.lang.Override
    public com.google.showcase.v1beta1.Severity getSeverity() {
      @SuppressWarnings("deprecation")
      com.google.showcase.v1beta1.Severity result =
          com.google.showcase.v1beta1.Severity.valueOf(severity_);
      return result == null ? com.google.showcase.v1beta1.Severity.UNRECOGNIZED : result;
    }

    /**
     *
     *
     * <pre>
     * The severity to be echoed by the server.
     * </pre>
     *
     * <code>.google.showcase.v1beta1.Severity severity = 3;</code>
     *
     * @param value The severity to set.
     * @return This builder for chaining.
     */
    public Builder setSeverity(com.google.showcase.v1beta1.Severity value) {
      if (value == null) {
        throw new NullPointerException();
      }

      severity_ = value.getNumber();
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The severity to be echoed by the server.
     * </pre>
     *
     * <code>.google.showcase.v1beta1.Severity severity = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearSeverity() {

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

    private java.lang.Object header_ = "";

    /**
     *
     *
     * <pre>
     * Optional. This field can be set to test the routing annotation on the Echo method.
     * </pre>
     *
     * <code>string header = 4;</code>
     *
     * @return The header.
     */
    public java.lang.String getHeader() {
      java.lang.Object ref = header_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        header_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * Optional. This field can be set to test the routing annotation on the Echo method.
     * </pre>
     *
     * <code>string header = 4;</code>
     *
     * @return The bytes for header.
     */
    public com.google.protobuf.ByteString getHeaderBytes() {
      java.lang.Object ref = header_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        header_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * Optional. This field can be set to test the routing annotation on the Echo method.
     * </pre>
     *
     * <code>string header = 4;</code>
     *
     * @param value The header to set.
     * @return This builder for chaining.
     */
    public Builder setHeader(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

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

    /**
     *
     *
     * <pre>
     * Optional. This field can be set to test the routing annotation on the Echo method.
     * </pre>
     *
     * <code>string header = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearHeader() {

      header_ = getDefaultInstance().getHeader();
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * Optional. This field can be set to test the routing annotation on the Echo method.
     * </pre>
     *
     * <code>string header = 4;</code>
     *
     * @param value The bytes for header to set.
     * @return This builder for chaining.
     */
    public Builder setHeaderBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object otherHeader_ = "";

    /**
     *
     *
     * <pre>
     * Optional. This field can be set to test the routing annotation on the Echo method.
     * </pre>
     *
     * <code>string other_header = 5;</code>
     *
     * @return The otherHeader.
     */
    public java.lang.String getOtherHeader() {
      java.lang.Object ref = otherHeader_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        otherHeader_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * Optional. This field can be set to test the routing annotation on the Echo method.
     * </pre>
     *
     * <code>string other_header = 5;</code>
     *
     * @return The bytes for otherHeader.
     */
    public com.google.protobuf.ByteString getOtherHeaderBytes() {
      java.lang.Object ref = otherHeader_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        otherHeader_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * Optional. This field can be set to test the routing annotation on the Echo method.
     * </pre>
     *
     * <code>string other_header = 5;</code>
     *
     * @param value The otherHeader to set.
     * @return This builder for chaining.
     */
    public Builder setOtherHeader(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

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

    /**
     *
     *
     * <pre>
     * Optional. This field can be set to test the routing annotation on the Echo method.
     * </pre>
     *
     * <code>string other_header = 5;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearOtherHeader() {

      otherHeader_ = getDefaultInstance().getOtherHeader();
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * Optional. This field can be set to test the routing annotation on the Echo method.
     * </pre>
     *
     * <code>string other_header = 5;</code>
     *
     * @param value The bytes for otherHeader to set.
     * @return This builder for chaining.
     */
    public Builder setOtherHeaderBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object requestId_ = "";

    /**
     *
     *
     * <pre>
     * To facilitate testing of https://google.aip.dev/client-libraries/4235
     * </pre>
     *
     * <code>string request_id = 7 [(.google.api.field_info) = { ... }</code>
     *
     * @return The requestId.
     */
    public java.lang.String getRequestId() {
      java.lang.Object ref = requestId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        requestId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * To facilitate testing of https://google.aip.dev/client-libraries/4235
     * </pre>
     *
     * <code>string request_id = 7 [(.google.api.field_info) = { ... }</code>
     *
     * @return The bytes for requestId.
     */
    public com.google.protobuf.ByteString getRequestIdBytes() {
      java.lang.Object ref = requestId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        requestId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * To facilitate testing of https://google.aip.dev/client-libraries/4235
     * </pre>
     *
     * <code>string request_id = 7 [(.google.api.field_info) = { ... }</code>
     *
     * @param value The requestId to set.
     * @return This builder for chaining.
     */
    public Builder setRequestId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

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

    /**
     *
     *
     * <pre>
     * To facilitate testing of https://google.aip.dev/client-libraries/4235
     * </pre>
     *
     * <code>string request_id = 7 [(.google.api.field_info) = { ... }</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearRequestId() {

      requestId_ = getDefaultInstance().getRequestId();
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * To facilitate testing of https://google.aip.dev/client-libraries/4235
     * </pre>
     *
     * <code>string request_id = 7 [(.google.api.field_info) = { ... }</code>
     *
     * @param value The bytes for requestId to set.
     * @return This builder for chaining.
     */
    public Builder setRequestIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object otherRequestId_ = "";

    /**
     *
     *
     * <pre>
     * To facilitate testing of https://google.aip.dev/client-libraries/4235
     * </pre>
     *
     * <code>optional string other_request_id = 8 [(.google.api.field_info) = { ... }</code>
     *
     * @return Whether the otherRequestId field is set.
     */
    public boolean hasOtherRequestId() {
      return ((bitField0_ & 0x00000001) != 0);
    }

    /**
     *
     *
     * <pre>
     * To facilitate testing of https://google.aip.dev/client-libraries/4235
     * </pre>
     *
     * <code>optional string other_request_id = 8 [(.google.api.field_info) = { ... }</code>
     *
     * @return The otherRequestId.
     */
    public java.lang.String getOtherRequestId() {
      java.lang.Object ref = otherRequestId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        otherRequestId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * To facilitate testing of https://google.aip.dev/client-libraries/4235
     * </pre>
     *
     * <code>optional string other_request_id = 8 [(.google.api.field_info) = { ... }</code>
     *
     * @return The bytes for otherRequestId.
     */
    public com.google.protobuf.ByteString getOtherRequestIdBytes() {
      java.lang.Object ref = otherRequestId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        otherRequestId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * To facilitate testing of https://google.aip.dev/client-libraries/4235
     * </pre>
     *
     * <code>optional string other_request_id = 8 [(.google.api.field_info) = { ... }</code>
     *
     * @param value The otherRequestId to set.
     * @return This builder for chaining.
     */
    public Builder setOtherRequestId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000001;
      otherRequestId_ = value;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * To facilitate testing of https://google.aip.dev/client-libraries/4235
     * </pre>
     *
     * <code>optional string other_request_id = 8 [(.google.api.field_info) = { ... }</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearOtherRequestId() {
      bitField0_ = (bitField0_ & ~0x00000001);
      otherRequestId_ = getDefaultInstance().getOtherRequestId();
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * To facilitate testing of https://google.aip.dev/client-libraries/4235
     * </pre>
     *
     * <code>optional string other_request_id = 8 [(.google.api.field_info) = { ... }</code>
     *
     * @param value The bytes for otherRequestId to set.
     * @return This builder for chaining.
     */
    public Builder setOtherRequestIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      bitField0_ |= 0x00000001;
      otherRequestId_ = 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.showcase.v1beta1.EchoRequest)
  }

  // @@protoc_insertion_point(class_scope:google.showcase.v1beta1.EchoRequest)
  private static final com.google.showcase.v1beta1.EchoRequest DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.showcase.v1beta1.EchoRequest();
  }

  public static com.google.showcase.v1beta1.EchoRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public com.google.showcase.v1beta1.EchoRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
