/*
 * 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

// Protobuf Java Version: 3.25.8
package com.google.showcase.v1beta1;

/**
 *
 *
 * <pre>
 * The request for Block method.
 * </pre>
 *
 * Protobuf type {@code google.showcase.v1beta1.BlockRequest}
 */
public final class BlockRequest extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.showcase.v1beta1.BlockRequest)
    BlockRequestOrBuilder {
  private static final long serialVersionUID = 0L;

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

  private BlockRequest() {}

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

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.showcase.v1beta1.EchoOuterClass
        .internal_static_google_showcase_v1beta1_BlockRequest_descriptor;
  }

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

  private int bitField0_;
  private int responseCase_ = 0;

  @SuppressWarnings("serial")
  private java.lang.Object response_;

  public enum ResponseCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    ERROR(2),
    SUCCESS(3),
    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 2:
          return ERROR;
        case 3:
          return SUCCESS;
        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 RESPONSE_DELAY_FIELD_NUMBER = 1;
  private com.google.protobuf.Duration responseDelay_;

  /**
   *
   *
   * <pre>
   * The amount of time to block before returning a response.
   * </pre>
   *
   * <code>.google.protobuf.Duration response_delay = 1;</code>
   *
   * @return Whether the responseDelay field is set.
   */
  @java.lang.Override
  public boolean hasResponseDelay() {
    return ((bitField0_ & 0x00000001) != 0);
  }

  /**
   *
   *
   * <pre>
   * The amount of time to block before returning a response.
   * </pre>
   *
   * <code>.google.protobuf.Duration response_delay = 1;</code>
   *
   * @return The responseDelay.
   */
  @java.lang.Override
  public com.google.protobuf.Duration getResponseDelay() {
    return responseDelay_ == null
        ? com.google.protobuf.Duration.getDefaultInstance()
        : responseDelay_;
  }

  /**
   *
   *
   * <pre>
   * The amount of time to block before returning a response.
   * </pre>
   *
   * <code>.google.protobuf.Duration response_delay = 1;</code>
   */
  @java.lang.Override
  public com.google.protobuf.DurationOrBuilder getResponseDelayOrBuilder() {
    return responseDelay_ == null
        ? com.google.protobuf.Duration.getDefaultInstance()
        : responseDelay_;
  }

  public static final int ERROR_FIELD_NUMBER = 2;

  /**
   *
   *
   * <pre>
   * The error that will be returned by the server. If this code is specified
   * to be the OK rpc code, an empty response will be returned.
   * </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 that will be returned by the server. If this code is specified
   * to be the OK rpc code, an empty response will be returned.
   * </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 that will be returned by the server. If this code is specified
   * to be the OK rpc code, an empty response will be returned.
   * </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 SUCCESS_FIELD_NUMBER = 3;

  /**
   *
   *
   * <pre>
   * The response to be returned that will signify successful method call.
   * </pre>
   *
   * <code>.google.showcase.v1beta1.BlockResponse success = 3;</code>
   *
   * @return Whether the success field is set.
   */
  @java.lang.Override
  public boolean hasSuccess() {
    return responseCase_ == 3;
  }

  /**
   *
   *
   * <pre>
   * The response to be returned that will signify successful method call.
   * </pre>
   *
   * <code>.google.showcase.v1beta1.BlockResponse success = 3;</code>
   *
   * @return The success.
   */
  @java.lang.Override
  public com.google.showcase.v1beta1.BlockResponse getSuccess() {
    if (responseCase_ == 3) {
      return (com.google.showcase.v1beta1.BlockResponse) response_;
    }
    return com.google.showcase.v1beta1.BlockResponse.getDefaultInstance();
  }

  /**
   *
   *
   * <pre>
   * The response to be returned that will signify successful method call.
   * </pre>
   *
   * <code>.google.showcase.v1beta1.BlockResponse success = 3;</code>
   */
  @java.lang.Override
  public com.google.showcase.v1beta1.BlockResponseOrBuilder getSuccessOrBuilder() {
    if (responseCase_ == 3) {
      return (com.google.showcase.v1beta1.BlockResponse) response_;
    }
    return com.google.showcase.v1beta1.BlockResponse.getDefaultInstance();
  }

  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 (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(1, getResponseDelay());
    }
    if (responseCase_ == 2) {
      output.writeMessage(2, (com.google.rpc.Status) response_);
    }
    if (responseCase_ == 3) {
      output.writeMessage(3, (com.google.showcase.v1beta1.BlockResponse) response_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getResponseDelay());
    }
    if (responseCase_ == 2) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              2, (com.google.rpc.Status) response_);
    }
    if (responseCase_ == 3) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              3, (com.google.showcase.v1beta1.BlockResponse) response_);
    }
    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.showcase.v1beta1.BlockRequest)) {
      return super.equals(obj);
    }
    com.google.showcase.v1beta1.BlockRequest other = (com.google.showcase.v1beta1.BlockRequest) obj;

    if (hasResponseDelay() != other.hasResponseDelay()) return false;
    if (hasResponseDelay()) {
      if (!getResponseDelay().equals(other.getResponseDelay())) return false;
    }
    if (!getResponseCase().equals(other.getResponseCase())) return false;
    switch (responseCase_) {
      case 2:
        if (!getError().equals(other.getError())) return false;
        break;
      case 3:
        if (!getSuccess().equals(other.getSuccess())) return false;
        break;
      case 0:
      default:
    }
    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 (hasResponseDelay()) {
      hash = (37 * hash) + RESPONSE_DELAY_FIELD_NUMBER;
      hash = (53 * hash) + getResponseDelay().hashCode();
    }
    switch (responseCase_) {
      case 2:
        hash = (37 * hash) + ERROR_FIELD_NUMBER;
        hash = (53 * hash) + getError().hashCode();
        break;
      case 3:
        hash = (37 * hash) + SUCCESS_FIELD_NUMBER;
        hash = (53 * hash) + getSuccess().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

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

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

  public static com.google.showcase.v1beta1.BlockRequest 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.BlockRequest 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 for Block method.
   * </pre>
   *
   * Protobuf type {@code google.showcase.v1beta1.BlockRequest}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.showcase.v1beta1.BlockRequest)
      com.google.showcase.v1beta1.BlockRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.showcase.v1beta1.EchoOuterClass
          .internal_static_google_showcase_v1beta1_BlockRequest_descriptor;
    }

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

    // Construct using com.google.showcase.v1beta1.BlockRequest.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

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

    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
        getResponseDelayFieldBuilder();
      }
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      responseDelay_ = null;
      if (responseDelayBuilder_ != null) {
        responseDelayBuilder_.dispose();
        responseDelayBuilder_ = null;
      }
      if (errorBuilder_ != null) {
        errorBuilder_.clear();
      }
      if (successBuilder_ != null) {
        successBuilder_.clear();
      }
      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_BlockRequest_descriptor;
    }

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

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

    @java.lang.Override
    public com.google.showcase.v1beta1.BlockRequest buildPartial() {
      com.google.showcase.v1beta1.BlockRequest result =
          new com.google.showcase.v1beta1.BlockRequest(this);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      buildPartialOneofs(result);
      onBuilt();
      return result;
    }

    private void buildPartial0(com.google.showcase.v1beta1.BlockRequest result) {
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.responseDelay_ =
            responseDelayBuilder_ == null ? responseDelay_ : responseDelayBuilder_.build();
        to_bitField0_ |= 0x00000001;
      }
      result.bitField0_ |= to_bitField0_;
    }

    private void buildPartialOneofs(com.google.showcase.v1beta1.BlockRequest result) {
      result.responseCase_ = responseCase_;
      result.response_ = this.response_;
      if (responseCase_ == 2 && errorBuilder_ != null) {
        result.response_ = errorBuilder_.build();
      }
      if (responseCase_ == 3 && successBuilder_ != null) {
        result.response_ = successBuilder_.build();
      }
    }

    @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.BlockRequest) {
        return mergeFrom((com.google.showcase.v1beta1.BlockRequest) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.showcase.v1beta1.BlockRequest other) {
      if (other == com.google.showcase.v1beta1.BlockRequest.getDefaultInstance()) return this;
      if (other.hasResponseDelay()) {
        mergeResponseDelay(other.getResponseDelay());
      }
      switch (other.getResponseCase()) {
        case ERROR:
          {
            mergeError(other.getError());
            break;
          }
        case SUCCESS:
          {
            mergeSuccess(other.getSuccess());
            break;
          }
        case RESPONSE_NOT_SET:
          {
            break;
          }
      }
      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(getResponseDelayFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 18:
              {
                input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry);
                responseCase_ = 2;
                break;
              } // case 18
            case 26:
              {
                input.readMessage(getSuccessFieldBuilder().getBuilder(), extensionRegistry);
                responseCase_ = 3;
                break;
              } // case 26
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int 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_;

    private com.google.protobuf.Duration responseDelay_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Duration,
            com.google.protobuf.Duration.Builder,
            com.google.protobuf.DurationOrBuilder>
        responseDelayBuilder_;

    /**
     *
     *
     * <pre>
     * The amount of time to block before returning a response.
     * </pre>
     *
     * <code>.google.protobuf.Duration response_delay = 1;</code>
     *
     * @return Whether the responseDelay field is set.
     */
    public boolean hasResponseDelay() {
      return ((bitField0_ & 0x00000001) != 0);
    }

    /**
     *
     *
     * <pre>
     * The amount of time to block before returning a response.
     * </pre>
     *
     * <code>.google.protobuf.Duration response_delay = 1;</code>
     *
     * @return The responseDelay.
     */
    public com.google.protobuf.Duration getResponseDelay() {
      if (responseDelayBuilder_ == null) {
        return responseDelay_ == null
            ? com.google.protobuf.Duration.getDefaultInstance()
            : responseDelay_;
      } else {
        return responseDelayBuilder_.getMessage();
      }
    }

    /**
     *
     *
     * <pre>
     * The amount of time to block before returning a response.
     * </pre>
     *
     * <code>.google.protobuf.Duration response_delay = 1;</code>
     */
    public Builder setResponseDelay(com.google.protobuf.Duration value) {
      if (responseDelayBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        responseDelay_ = value;
      } else {
        responseDelayBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The amount of time to block before returning a response.
     * </pre>
     *
     * <code>.google.protobuf.Duration response_delay = 1;</code>
     */
    public Builder setResponseDelay(com.google.protobuf.Duration.Builder builderForValue) {
      if (responseDelayBuilder_ == null) {
        responseDelay_ = builderForValue.build();
      } else {
        responseDelayBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The amount of time to block before returning a response.
     * </pre>
     *
     * <code>.google.protobuf.Duration response_delay = 1;</code>
     */
    public Builder mergeResponseDelay(com.google.protobuf.Duration value) {
      if (responseDelayBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)
            && responseDelay_ != null
            && responseDelay_ != com.google.protobuf.Duration.getDefaultInstance()) {
          getResponseDelayBuilder().mergeFrom(value);
        } else {
          responseDelay_ = value;
        }
      } else {
        responseDelayBuilder_.mergeFrom(value);
      }
      if (responseDelay_ != null) {
        bitField0_ |= 0x00000001;
        onChanged();
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * The amount of time to block before returning a response.
     * </pre>
     *
     * <code>.google.protobuf.Duration response_delay = 1;</code>
     */
    public Builder clearResponseDelay() {
      bitField0_ = (bitField0_ & ~0x00000001);
      responseDelay_ = null;
      if (responseDelayBuilder_ != null) {
        responseDelayBuilder_.dispose();
        responseDelayBuilder_ = null;
      }
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The amount of time to block before returning a response.
     * </pre>
     *
     * <code>.google.protobuf.Duration response_delay = 1;</code>
     */
    public com.google.protobuf.Duration.Builder getResponseDelayBuilder() {
      bitField0_ |= 0x00000001;
      onChanged();
      return getResponseDelayFieldBuilder().getBuilder();
    }

    /**
     *
     *
     * <pre>
     * The amount of time to block before returning a response.
     * </pre>
     *
     * <code>.google.protobuf.Duration response_delay = 1;</code>
     */
    public com.google.protobuf.DurationOrBuilder getResponseDelayOrBuilder() {
      if (responseDelayBuilder_ != null) {
        return responseDelayBuilder_.getMessageOrBuilder();
      } else {
        return responseDelay_ == null
            ? com.google.protobuf.Duration.getDefaultInstance()
            : responseDelay_;
      }
    }

    /**
     *
     *
     * <pre>
     * The amount of time to block before returning a response.
     * </pre>
     *
     * <code>.google.protobuf.Duration response_delay = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Duration,
            com.google.protobuf.Duration.Builder,
            com.google.protobuf.DurationOrBuilder>
        getResponseDelayFieldBuilder() {
      if (responseDelayBuilder_ == null) {
        responseDelayBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Duration,
                com.google.protobuf.Duration.Builder,
                com.google.protobuf.DurationOrBuilder>(
                getResponseDelay(), getParentForChildren(), isClean());
        responseDelay_ = null;
      }
      return responseDelayBuilder_;
    }

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

    /**
     *
     *
     * <pre>
     * The error that will be returned by the server. If this code is specified
     * to be the OK rpc code, an empty response will be returned.
     * </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 that will be returned by the server. If this code is specified
     * to be the OK rpc code, an empty response will be returned.
     * </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 that will be returned by the server. If this code is specified
     * to be the OK rpc code, an empty response will be returned.
     * </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 that will be returned by the server. If this code is specified
     * to be the OK rpc code, an empty response will be returned.
     * </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 that will be returned by the server. If this code is specified
     * to be the OK rpc code, an empty response will be returned.
     * </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 that will be returned by the server. If this code is specified
     * to be the OK rpc code, an empty response will be returned.
     * </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 that will be returned by the server. If this code is specified
     * to be the OK rpc code, an empty response will be returned.
     * </pre>
     *
     * <code>.google.rpc.Status error = 2;</code>
     */
    public com.google.rpc.Status.Builder getErrorBuilder() {
      return getErrorFieldBuilder().getBuilder();
    }

    /**
     *
     *
     * <pre>
     * The error that will be returned by the server. If this code is specified
     * to be the OK rpc code, an empty response will be returned.
     * </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 that will be returned by the server. If this code is specified
     * to be the OK rpc code, an empty response will be returned.
     * </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 com.google.protobuf.SingleFieldBuilderV3<
            com.google.showcase.v1beta1.BlockResponse,
            com.google.showcase.v1beta1.BlockResponse.Builder,
            com.google.showcase.v1beta1.BlockResponseOrBuilder>
        successBuilder_;

    /**
     *
     *
     * <pre>
     * The response to be returned that will signify successful method call.
     * </pre>
     *
     * <code>.google.showcase.v1beta1.BlockResponse success = 3;</code>
     *
     * @return Whether the success field is set.
     */
    @java.lang.Override
    public boolean hasSuccess() {
      return responseCase_ == 3;
    }

    /**
     *
     *
     * <pre>
     * The response to be returned that will signify successful method call.
     * </pre>
     *
     * <code>.google.showcase.v1beta1.BlockResponse success = 3;</code>
     *
     * @return The success.
     */
    @java.lang.Override
    public com.google.showcase.v1beta1.BlockResponse getSuccess() {
      if (successBuilder_ == null) {
        if (responseCase_ == 3) {
          return (com.google.showcase.v1beta1.BlockResponse) response_;
        }
        return com.google.showcase.v1beta1.BlockResponse.getDefaultInstance();
      } else {
        if (responseCase_ == 3) {
          return successBuilder_.getMessage();
        }
        return com.google.showcase.v1beta1.BlockResponse.getDefaultInstance();
      }
    }

    /**
     *
     *
     * <pre>
     * The response to be returned that will signify successful method call.
     * </pre>
     *
     * <code>.google.showcase.v1beta1.BlockResponse success = 3;</code>
     */
    public Builder setSuccess(com.google.showcase.v1beta1.BlockResponse value) {
      if (successBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        response_ = value;
        onChanged();
      } else {
        successBuilder_.setMessage(value);
      }
      responseCase_ = 3;
      return this;
    }

    /**
     *
     *
     * <pre>
     * The response to be returned that will signify successful method call.
     * </pre>
     *
     * <code>.google.showcase.v1beta1.BlockResponse success = 3;</code>
     */
    public Builder setSuccess(com.google.showcase.v1beta1.BlockResponse.Builder builderForValue) {
      if (successBuilder_ == null) {
        response_ = builderForValue.build();
        onChanged();
      } else {
        successBuilder_.setMessage(builderForValue.build());
      }
      responseCase_ = 3;
      return this;
    }

    /**
     *
     *
     * <pre>
     * The response to be returned that will signify successful method call.
     * </pre>
     *
     * <code>.google.showcase.v1beta1.BlockResponse success = 3;</code>
     */
    public Builder mergeSuccess(com.google.showcase.v1beta1.BlockResponse value) {
      if (successBuilder_ == null) {
        if (responseCase_ == 3
            && response_ != com.google.showcase.v1beta1.BlockResponse.getDefaultInstance()) {
          response_ =
              com.google.showcase.v1beta1.BlockResponse.newBuilder(
                      (com.google.showcase.v1beta1.BlockResponse) response_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          response_ = value;
        }
        onChanged();
      } else {
        if (responseCase_ == 3) {
          successBuilder_.mergeFrom(value);
        } else {
          successBuilder_.setMessage(value);
        }
      }
      responseCase_ = 3;
      return this;
    }

    /**
     *
     *
     * <pre>
     * The response to be returned that will signify successful method call.
     * </pre>
     *
     * <code>.google.showcase.v1beta1.BlockResponse success = 3;</code>
     */
    public Builder clearSuccess() {
      if (successBuilder_ == null) {
        if (responseCase_ == 3) {
          responseCase_ = 0;
          response_ = null;
          onChanged();
        }
      } else {
        if (responseCase_ == 3) {
          responseCase_ = 0;
          response_ = null;
        }
        successBuilder_.clear();
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * The response to be returned that will signify successful method call.
     * </pre>
     *
     * <code>.google.showcase.v1beta1.BlockResponse success = 3;</code>
     */
    public com.google.showcase.v1beta1.BlockResponse.Builder getSuccessBuilder() {
      return getSuccessFieldBuilder().getBuilder();
    }

    /**
     *
     *
     * <pre>
     * The response to be returned that will signify successful method call.
     * </pre>
     *
     * <code>.google.showcase.v1beta1.BlockResponse success = 3;</code>
     */
    @java.lang.Override
    public com.google.showcase.v1beta1.BlockResponseOrBuilder getSuccessOrBuilder() {
      if ((responseCase_ == 3) && (successBuilder_ != null)) {
        return successBuilder_.getMessageOrBuilder();
      } else {
        if (responseCase_ == 3) {
          return (com.google.showcase.v1beta1.BlockResponse) response_;
        }
        return com.google.showcase.v1beta1.BlockResponse.getDefaultInstance();
      }
    }

    /**
     *
     *
     * <pre>
     * The response to be returned that will signify successful method call.
     * </pre>
     *
     * <code>.google.showcase.v1beta1.BlockResponse success = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.showcase.v1beta1.BlockResponse,
            com.google.showcase.v1beta1.BlockResponse.Builder,
            com.google.showcase.v1beta1.BlockResponseOrBuilder>
        getSuccessFieldBuilder() {
      if (successBuilder_ == null) {
        if (!(responseCase_ == 3)) {
          response_ = com.google.showcase.v1beta1.BlockResponse.getDefaultInstance();
        }
        successBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.showcase.v1beta1.BlockResponse,
                com.google.showcase.v1beta1.BlockResponse.Builder,
                com.google.showcase.v1beta1.BlockResponseOrBuilder>(
                (com.google.showcase.v1beta1.BlockResponse) response_,
                getParentForChildren(),
                isClean());
        response_ = null;
      }
      responseCase_ = 3;
      onChanged();
      return successBuilder_;
    }

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

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

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

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

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

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

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