/*
 * 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/sequence.proto

package com.google.showcase.v1beta1;

/** Protobuf type {@code google.showcase.v1beta1.StreamingSequence} */
public final class StreamingSequence extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.showcase.v1beta1.StreamingSequence)
    StreamingSequenceOrBuilder {
  private static final long serialVersionUID = 0L;

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

  private StreamingSequence() {
    name_ = "";
    content_ = "";
    responses_ = java.util.Collections.emptyList();
  }

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

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

  private StreamingSequence(
      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();

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

              content_ = s;
              break;
            }
          case 26:
            {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                responses_ =
                    new java.util.ArrayList<
                        com.google.showcase.v1beta1.StreamingSequence.Response>();
                mutable_bitField0_ |= 0x00000001;
              }
              responses_.add(
                  input.readMessage(
                      com.google.showcase.v1beta1.StreamingSequence.Response.parser(),
                      extensionRegistry));
              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 {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        responses_ = java.util.Collections.unmodifiableList(responses_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

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

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

  public interface ResponseOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.showcase.v1beta1.StreamingSequence.Response)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * The status to return for an individual attempt.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     *
     * @return Whether the status field is set.
     */
    boolean hasStatus();

    /**
     *
     *
     * <pre>
     * The status to return for an individual attempt.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     *
     * @return The status.
     */
    com.google.rpc.Status getStatus();

    /**
     *
     *
     * <pre>
     * The status to return for an individual attempt.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     */
    com.google.rpc.StatusOrBuilder getStatusOrBuilder();

    /**
     *
     *
     * <pre>
     * The amount of time to delay sending the response.
     * </pre>
     *
     * <code>.google.protobuf.Duration delay = 2;</code>
     *
     * @return Whether the delay field is set.
     */
    boolean hasDelay();

    /**
     *
     *
     * <pre>
     * The amount of time to delay sending the response.
     * </pre>
     *
     * <code>.google.protobuf.Duration delay = 2;</code>
     *
     * @return The delay.
     */
    com.google.protobuf.Duration getDelay();

    /**
     *
     *
     * <pre>
     * The amount of time to delay sending the response.
     * </pre>
     *
     * <code>.google.protobuf.Duration delay = 2;</code>
     */
    com.google.protobuf.DurationOrBuilder getDelayOrBuilder();

    /**
     *
     *
     * <pre>
     * The index that the status should be sent
     * </pre>
     *
     * <code>int32 response_index = 3;</code>
     *
     * @return The responseIndex.
     */
    int getResponseIndex();
  }

  /**
   *
   *
   * <pre>
   * A server response to an RPC Attempt in a sequence.
   * </pre>
   *
   * Protobuf type {@code google.showcase.v1beta1.StreamingSequence.Response}
   */
  public static final class Response extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.showcase.v1beta1.StreamingSequence.Response)
      ResponseOrBuilder {
    private static final long serialVersionUID = 0L;

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

    private Response() {}

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

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

    private Response(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                com.google.rpc.Status.Builder subBuilder = null;
                if (status_ != null) {
                  subBuilder = status_.toBuilder();
                }
                status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry);
                if (subBuilder != null) {
                  subBuilder.mergeFrom(status_);
                  status_ = subBuilder.buildPartial();
                }

                break;
              }
            case 18:
              {
                com.google.protobuf.Duration.Builder subBuilder = null;
                if (delay_ != null) {
                  subBuilder = delay_.toBuilder();
                }
                delay_ =
                    input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
                if (subBuilder != null) {
                  subBuilder.mergeFrom(delay_);
                  delay_ = subBuilder.buildPartial();
                }

                break;
              }
            case 24:
              {
                responseIndex_ = input.readInt32();
                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.SequenceOuterClass
          .internal_static_google_showcase_v1beta1_StreamingSequence_Response_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.showcase.v1beta1.SequenceOuterClass
          .internal_static_google_showcase_v1beta1_StreamingSequence_Response_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.showcase.v1beta1.StreamingSequence.Response.class,
              com.google.showcase.v1beta1.StreamingSequence.Response.Builder.class);
    }

    public static final int STATUS_FIELD_NUMBER = 1;
    private com.google.rpc.Status status_;

    /**
     *
     *
     * <pre>
     * The status to return for an individual attempt.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     *
     * @return Whether the status field is set.
     */
    @java.lang.Override
    public boolean hasStatus() {
      return status_ != null;
    }

    /**
     *
     *
     * <pre>
     * The status to return for an individual attempt.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     *
     * @return The status.
     */
    @java.lang.Override
    public com.google.rpc.Status getStatus() {
      return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
    }

    /**
     *
     *
     * <pre>
     * The status to return for an individual attempt.
     * </pre>
     *
     * <code>.google.rpc.Status status = 1;</code>
     */
    @java.lang.Override
    public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
      return getStatus();
    }

    public static final int DELAY_FIELD_NUMBER = 2;
    private com.google.protobuf.Duration delay_;

    /**
     *
     *
     * <pre>
     * The amount of time to delay sending the response.
     * </pre>
     *
     * <code>.google.protobuf.Duration delay = 2;</code>
     *
     * @return Whether the delay field is set.
     */
    @java.lang.Override
    public boolean hasDelay() {
      return delay_ != null;
    }

    /**
     *
     *
     * <pre>
     * The amount of time to delay sending the response.
     * </pre>
     *
     * <code>.google.protobuf.Duration delay = 2;</code>
     *
     * @return The delay.
     */
    @java.lang.Override
    public com.google.protobuf.Duration getDelay() {
      return delay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : delay_;
    }

    /**
     *
     *
     * <pre>
     * The amount of time to delay sending the response.
     * </pre>
     *
     * <code>.google.protobuf.Duration delay = 2;</code>
     */
    @java.lang.Override
    public com.google.protobuf.DurationOrBuilder getDelayOrBuilder() {
      return getDelay();
    }

    public static final int RESPONSE_INDEX_FIELD_NUMBER = 3;
    private int responseIndex_;

    /**
     *
     *
     * <pre>
     * The index that the status should be sent
     * </pre>
     *
     * <code>int32 response_index = 3;</code>
     *
     * @return The responseIndex.
     */
    @java.lang.Override
    public int getResponseIndex() {
      return responseIndex_;
    }

    private byte memoizedIsInitialized = -1;

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

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
      if (status_ != null) {
        output.writeMessage(1, getStatus());
      }
      if (delay_ != null) {
        output.writeMessage(2, getDelay());
      }
      if (responseIndex_ != 0) {
        output.writeInt32(3, responseIndex_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (status_ != null) {
        size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStatus());
      }
      if (delay_ != null) {
        size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDelay());
      }
      if (responseIndex_ != 0) {
        size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, responseIndex_);
      }
      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.StreamingSequence.Response)) {
        return super.equals(obj);
      }
      com.google.showcase.v1beta1.StreamingSequence.Response other =
          (com.google.showcase.v1beta1.StreamingSequence.Response) obj;

      if (hasStatus() != other.hasStatus()) return false;
      if (hasStatus()) {
        if (!getStatus().equals(other.getStatus())) return false;
      }
      if (hasDelay() != other.hasDelay()) return false;
      if (hasDelay()) {
        if (!getDelay().equals(other.getDelay())) return false;
      }
      if (getResponseIndex() != other.getResponseIndex()) return false;
      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();
      if (hasStatus()) {
        hash = (37 * hash) + STATUS_FIELD_NUMBER;
        hash = (53 * hash) + getStatus().hashCode();
      }
      if (hasDelay()) {
        hash = (37 * hash) + DELAY_FIELD_NUMBER;
        hash = (53 * hash) + getDelay().hashCode();
      }
      hash = (37 * hash) + RESPONSE_INDEX_FIELD_NUMBER;
      hash = (53 * hash) + getResponseIndex();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

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

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

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

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

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

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

    public static com.google.showcase.v1beta1.StreamingSequence.Response 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.StreamingSequence.Response prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

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

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }

    /**
     *
     *
     * <pre>
     * A server response to an RPC Attempt in a sequence.
     * </pre>
     *
     * Protobuf type {@code google.showcase.v1beta1.StreamingSequence.Response}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.showcase.v1beta1.StreamingSequence.Response)
        com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.showcase.v1beta1.SequenceOuterClass
            .internal_static_google_showcase_v1beta1_StreamingSequence_Response_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.showcase.v1beta1.SequenceOuterClass
            .internal_static_google_showcase_v1beta1_StreamingSequence_Response_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.showcase.v1beta1.StreamingSequence.Response.class,
                com.google.showcase.v1beta1.StreamingSequence.Response.Builder.class);
      }

      // Construct using com.google.showcase.v1beta1.StreamingSequence.Response.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();
        if (statusBuilder_ == null) {
          status_ = null;
        } else {
          status_ = null;
          statusBuilder_ = null;
        }
        if (delayBuilder_ == null) {
          delay_ = null;
        } else {
          delay_ = null;
          delayBuilder_ = null;
        }
        responseIndex_ = 0;

        return this;
      }

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

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

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

      @java.lang.Override
      public com.google.showcase.v1beta1.StreamingSequence.Response buildPartial() {
        com.google.showcase.v1beta1.StreamingSequence.Response result =
            new com.google.showcase.v1beta1.StreamingSequence.Response(this);
        if (statusBuilder_ == null) {
          result.status_ = status_;
        } else {
          result.status_ = statusBuilder_.build();
        }
        if (delayBuilder_ == null) {
          result.delay_ = delay_;
        } else {
          result.delay_ = delayBuilder_.build();
        }
        result.responseIndex_ = responseIndex_;
        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.StreamingSequence.Response) {
          return mergeFrom((com.google.showcase.v1beta1.StreamingSequence.Response) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.showcase.v1beta1.StreamingSequence.Response other) {
        if (other == com.google.showcase.v1beta1.StreamingSequence.Response.getDefaultInstance())
          return this;
        if (other.hasStatus()) {
          mergeStatus(other.getStatus());
        }
        if (other.hasDelay()) {
          mergeDelay(other.getDelay());
        }
        if (other.getResponseIndex() != 0) {
          setResponseIndex(other.getResponseIndex());
        }
        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.StreamingSequence.Response parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage =
              (com.google.showcase.v1beta1.StreamingSequence.Response) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

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

      /**
       *
       *
       * <pre>
       * The status to return for an individual attempt.
       * </pre>
       *
       * <code>.google.rpc.Status status = 1;</code>
       *
       * @return Whether the status field is set.
       */
      public boolean hasStatus() {
        return statusBuilder_ != null || status_ != null;
      }

      /**
       *
       *
       * <pre>
       * The status to return for an individual attempt.
       * </pre>
       *
       * <code>.google.rpc.Status status = 1;</code>
       *
       * @return The status.
       */
      public com.google.rpc.Status getStatus() {
        if (statusBuilder_ == null) {
          return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
        } else {
          return statusBuilder_.getMessage();
        }
      }

      /**
       *
       *
       * <pre>
       * The status to return for an individual attempt.
       * </pre>
       *
       * <code>.google.rpc.Status status = 1;</code>
       */
      public Builder setStatus(com.google.rpc.Status value) {
        if (statusBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          status_ = value;
          onChanged();
        } else {
          statusBuilder_.setMessage(value);
        }

        return this;
      }

      /**
       *
       *
       * <pre>
       * The status to return for an individual attempt.
       * </pre>
       *
       * <code>.google.rpc.Status status = 1;</code>
       */
      public Builder setStatus(com.google.rpc.Status.Builder builderForValue) {
        if (statusBuilder_ == null) {
          status_ = builderForValue.build();
          onChanged();
        } else {
          statusBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }

      /**
       *
       *
       * <pre>
       * The status to return for an individual attempt.
       * </pre>
       *
       * <code>.google.rpc.Status status = 1;</code>
       */
      public Builder mergeStatus(com.google.rpc.Status value) {
        if (statusBuilder_ == null) {
          if (status_ != null) {
            status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial();
          } else {
            status_ = value;
          }
          onChanged();
        } else {
          statusBuilder_.mergeFrom(value);
        }

        return this;
      }

      /**
       *
       *
       * <pre>
       * The status to return for an individual attempt.
       * </pre>
       *
       * <code>.google.rpc.Status status = 1;</code>
       */
      public Builder clearStatus() {
        if (statusBuilder_ == null) {
          status_ = null;
          onChanged();
        } else {
          status_ = null;
          statusBuilder_ = null;
        }

        return this;
      }

      /**
       *
       *
       * <pre>
       * The status to return for an individual attempt.
       * </pre>
       *
       * <code>.google.rpc.Status status = 1;</code>
       */
      public com.google.rpc.Status.Builder getStatusBuilder() {

        onChanged();
        return getStatusFieldBuilder().getBuilder();
      }

      /**
       *
       *
       * <pre>
       * The status to return for an individual attempt.
       * </pre>
       *
       * <code>.google.rpc.Status status = 1;</code>
       */
      public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
        if (statusBuilder_ != null) {
          return statusBuilder_.getMessageOrBuilder();
        } else {
          return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
        }
      }

      /**
       *
       *
       * <pre>
       * The status to return for an individual attempt.
       * </pre>
       *
       * <code>.google.rpc.Status status = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
          getStatusFieldBuilder() {
        if (statusBuilder_ == null) {
          statusBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.rpc.Status,
                  com.google.rpc.Status.Builder,
                  com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean());
          status_ = null;
        }
        return statusBuilder_;
      }

      private com.google.protobuf.Duration delay_;
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Duration,
              com.google.protobuf.Duration.Builder,
              com.google.protobuf.DurationOrBuilder>
          delayBuilder_;

      /**
       *
       *
       * <pre>
       * The amount of time to delay sending the response.
       * </pre>
       *
       * <code>.google.protobuf.Duration delay = 2;</code>
       *
       * @return Whether the delay field is set.
       */
      public boolean hasDelay() {
        return delayBuilder_ != null || delay_ != null;
      }

      /**
       *
       *
       * <pre>
       * The amount of time to delay sending the response.
       * </pre>
       *
       * <code>.google.protobuf.Duration delay = 2;</code>
       *
       * @return The delay.
       */
      public com.google.protobuf.Duration getDelay() {
        if (delayBuilder_ == null) {
          return delay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : delay_;
        } else {
          return delayBuilder_.getMessage();
        }
      }

      /**
       *
       *
       * <pre>
       * The amount of time to delay sending the response.
       * </pre>
       *
       * <code>.google.protobuf.Duration delay = 2;</code>
       */
      public Builder setDelay(com.google.protobuf.Duration value) {
        if (delayBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          delay_ = value;
          onChanged();
        } else {
          delayBuilder_.setMessage(value);
        }

        return this;
      }

      /**
       *
       *
       * <pre>
       * The amount of time to delay sending the response.
       * </pre>
       *
       * <code>.google.protobuf.Duration delay = 2;</code>
       */
      public Builder setDelay(com.google.protobuf.Duration.Builder builderForValue) {
        if (delayBuilder_ == null) {
          delay_ = builderForValue.build();
          onChanged();
        } else {
          delayBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }

      /**
       *
       *
       * <pre>
       * The amount of time to delay sending the response.
       * </pre>
       *
       * <code>.google.protobuf.Duration delay = 2;</code>
       */
      public Builder mergeDelay(com.google.protobuf.Duration value) {
        if (delayBuilder_ == null) {
          if (delay_ != null) {
            delay_ =
                com.google.protobuf.Duration.newBuilder(delay_).mergeFrom(value).buildPartial();
          } else {
            delay_ = value;
          }
          onChanged();
        } else {
          delayBuilder_.mergeFrom(value);
        }

        return this;
      }

      /**
       *
       *
       * <pre>
       * The amount of time to delay sending the response.
       * </pre>
       *
       * <code>.google.protobuf.Duration delay = 2;</code>
       */
      public Builder clearDelay() {
        if (delayBuilder_ == null) {
          delay_ = null;
          onChanged();
        } else {
          delay_ = null;
          delayBuilder_ = null;
        }

        return this;
      }

      /**
       *
       *
       * <pre>
       * The amount of time to delay sending the response.
       * </pre>
       *
       * <code>.google.protobuf.Duration delay = 2;</code>
       */
      public com.google.protobuf.Duration.Builder getDelayBuilder() {

        onChanged();
        return getDelayFieldBuilder().getBuilder();
      }

      /**
       *
       *
       * <pre>
       * The amount of time to delay sending the response.
       * </pre>
       *
       * <code>.google.protobuf.Duration delay = 2;</code>
       */
      public com.google.protobuf.DurationOrBuilder getDelayOrBuilder() {
        if (delayBuilder_ != null) {
          return delayBuilder_.getMessageOrBuilder();
        } else {
          return delay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : delay_;
        }
      }

      /**
       *
       *
       * <pre>
       * The amount of time to delay sending the response.
       * </pre>
       *
       * <code>.google.protobuf.Duration delay = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Duration,
              com.google.protobuf.Duration.Builder,
              com.google.protobuf.DurationOrBuilder>
          getDelayFieldBuilder() {
        if (delayBuilder_ == null) {
          delayBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.protobuf.Duration,
                  com.google.protobuf.Duration.Builder,
                  com.google.protobuf.DurationOrBuilder>(
                  getDelay(), getParentForChildren(), isClean());
          delay_ = null;
        }
        return delayBuilder_;
      }

      private int responseIndex_;

      /**
       *
       *
       * <pre>
       * The index that the status should be sent
       * </pre>
       *
       * <code>int32 response_index = 3;</code>
       *
       * @return The responseIndex.
       */
      @java.lang.Override
      public int getResponseIndex() {
        return responseIndex_;
      }

      /**
       *
       *
       * <pre>
       * The index that the status should be sent
       * </pre>
       *
       * <code>int32 response_index = 3;</code>
       *
       * @param value The responseIndex to set.
       * @return This builder for chaining.
       */
      public Builder setResponseIndex(int value) {

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

      /**
       *
       *
       * <pre>
       * The index that the status should be sent
       * </pre>
       *
       * <code>int32 response_index = 3;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearResponseIndex() {

        responseIndex_ = 0;
        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.StreamingSequence.Response)
    }

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

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

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

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

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

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

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

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;

  /**
   * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    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();
      name_ = s;
      return s;
    }
  }

  /**
   * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CONTENT_FIELD_NUMBER = 2;
  private volatile java.lang.Object content_;

  /**
   *
   *
   * <pre>
   * The Content that the stream will send
   * </pre>
   *
   * <code>string content = 2;</code>
   *
   * @return The content.
   */
  @java.lang.Override
  public java.lang.String getContent() {
    java.lang.Object ref = content_;
    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();
      content_ = s;
      return s;
    }
  }

  /**
   *
   *
   * <pre>
   * The Content that the stream will send
   * </pre>
   *
   * <code>string content = 2;</code>
   *
   * @return The bytes for content.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getContentBytes() {
    java.lang.Object ref = content_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      content_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int RESPONSES_FIELD_NUMBER = 3;
  private java.util.List<com.google.showcase.v1beta1.StreamingSequence.Response> responses_;

  /**
   *
   *
   * <pre>
   * Sequence of responses to return in order for each attempt. If empty, the
   * default response is an immediate OK.
   * </pre>
   *
   * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.showcase.v1beta1.StreamingSequence.Response> getResponsesList() {
    return responses_;
  }

  /**
   *
   *
   * <pre>
   * Sequence of responses to return in order for each attempt. If empty, the
   * default response is an immediate OK.
   * </pre>
   *
   * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder>
      getResponsesOrBuilderList() {
    return responses_;
  }

  /**
   *
   *
   * <pre>
   * Sequence of responses to return in order for each attempt. If empty, the
   * default response is an immediate OK.
   * </pre>
   *
   * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
   */
  @java.lang.Override
  public int getResponsesCount() {
    return responses_.size();
  }

  /**
   *
   *
   * <pre>
   * Sequence of responses to return in order for each attempt. If empty, the
   * default response is an immediate OK.
   * </pre>
   *
   * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
   */
  @java.lang.Override
  public com.google.showcase.v1beta1.StreamingSequence.Response getResponses(int index) {
    return responses_.get(index);
  }

  /**
   *
   *
   * <pre>
   * Sequence of responses to return in order for each attempt. If empty, the
   * default response is an immediate OK.
   * </pre>
   *
   * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
   */
  @java.lang.Override
  public com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder getResponsesOrBuilder(
      int index) {
    return responses_.get(index);
  }

  private byte memoizedIsInitialized = -1;

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_);
    }
    for (int i = 0; i < responses_.size(); i++) {
      output.writeMessage(3, responses_.get(i));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_);
    }
    for (int i = 0; i < responses_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, responses_.get(i));
    }
    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.StreamingSequence)) {
      return super.equals(obj);
    }
    com.google.showcase.v1beta1.StreamingSequence other =
        (com.google.showcase.v1beta1.StreamingSequence) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getContent().equals(other.getContent())) return false;
    if (!getResponsesList().equals(other.getResponsesList())) return false;
    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) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + CONTENT_FIELD_NUMBER;
    hash = (53 * hash) + getContent().hashCode();
    if (getResponsesCount() > 0) {
      hash = (37 * hash) + RESPONSES_FIELD_NUMBER;
      hash = (53 * hash) + getResponsesList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

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

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

  public static com.google.showcase.v1beta1.StreamingSequence 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.StreamingSequence 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;
  }

  /** Protobuf type {@code google.showcase.v1beta1.StreamingSequence} */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.showcase.v1beta1.StreamingSequence)
      com.google.showcase.v1beta1.StreamingSequenceOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.showcase.v1beta1.SequenceOuterClass
          .internal_static_google_showcase_v1beta1_StreamingSequence_descriptor;
    }

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

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

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

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      name_ = "";

      content_ = "";

      if (responsesBuilder_ == null) {
        responses_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        responsesBuilder_.clear();
      }
      return this;
    }

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

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

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

    @java.lang.Override
    public com.google.showcase.v1beta1.StreamingSequence buildPartial() {
      com.google.showcase.v1beta1.StreamingSequence result =
          new com.google.showcase.v1beta1.StreamingSequence(this);
      int from_bitField0_ = bitField0_;
      result.name_ = name_;
      result.content_ = content_;
      if (responsesBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          responses_ = java.util.Collections.unmodifiableList(responses_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.responses_ = responses_;
      } else {
        result.responses_ = responsesBuilder_.build();
      }
      onBuilt();
      return result;
    }

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

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

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

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

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

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

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

    public Builder mergeFrom(com.google.showcase.v1beta1.StreamingSequence other) {
      if (other == com.google.showcase.v1beta1.StreamingSequence.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (!other.getContent().isEmpty()) {
        content_ = other.content_;
        onChanged();
      }
      if (responsesBuilder_ == null) {
        if (!other.responses_.isEmpty()) {
          if (responses_.isEmpty()) {
            responses_ = other.responses_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureResponsesIsMutable();
            responses_.addAll(other.responses_);
          }
          onChanged();
        }
      } else {
        if (!other.responses_.isEmpty()) {
          if (responsesBuilder_.isEmpty()) {
            responsesBuilder_.dispose();
            responsesBuilder_ = null;
            responses_ = other.responses_;
            bitField0_ = (bitField0_ & ~0x00000001);
            responsesBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getResponsesFieldBuilder()
                    : null;
          } else {
            responsesBuilder_.addAllMessages(other.responses_);
          }
        }
      }
      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.StreamingSequence parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.showcase.v1beta1.StreamingSequence) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int bitField0_;

    private java.lang.Object name_ = "";

    /**
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

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

    /**
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {

      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }

    /**
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object content_ = "";

    /**
     *
     *
     * <pre>
     * The Content that the stream will send
     * </pre>
     *
     * <code>string content = 2;</code>
     *
     * @return The content.
     */
    public java.lang.String getContent() {
      java.lang.Object ref = content_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        content_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The Content that the stream will send
     * </pre>
     *
     * <code>string content = 2;</code>
     *
     * @return The bytes for content.
     */
    public com.google.protobuf.ByteString getContentBytes() {
      java.lang.Object ref = content_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        content_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The Content that the stream will send
     * </pre>
     *
     * <code>string content = 2;</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();
      }

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

    /**
     *
     *
     * <pre>
     * The Content that the stream will send
     * </pre>
     *
     * <code>string content = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearContent() {

      content_ = getDefaultInstance().getContent();
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The Content that the stream will send
     * </pre>
     *
     * <code>string content = 2;</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);

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

    private java.util.List<com.google.showcase.v1beta1.StreamingSequence.Response> responses_ =
        java.util.Collections.emptyList();

    private void ensureResponsesIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        responses_ =
            new java.util.ArrayList<com.google.showcase.v1beta1.StreamingSequence.Response>(
                responses_);
        bitField0_ |= 0x00000001;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.showcase.v1beta1.StreamingSequence.Response,
            com.google.showcase.v1beta1.StreamingSequence.Response.Builder,
            com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder>
        responsesBuilder_;

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public java.util.List<com.google.showcase.v1beta1.StreamingSequence.Response>
        getResponsesList() {
      if (responsesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(responses_);
      } else {
        return responsesBuilder_.getMessageList();
      }
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public int getResponsesCount() {
      if (responsesBuilder_ == null) {
        return responses_.size();
      } else {
        return responsesBuilder_.getCount();
      }
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public com.google.showcase.v1beta1.StreamingSequence.Response getResponses(int index) {
      if (responsesBuilder_ == null) {
        return responses_.get(index);
      } else {
        return responsesBuilder_.getMessage(index);
      }
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public Builder setResponses(
        int index, com.google.showcase.v1beta1.StreamingSequence.Response value) {
      if (responsesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureResponsesIsMutable();
        responses_.set(index, value);
        onChanged();
      } else {
        responsesBuilder_.setMessage(index, value);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public Builder setResponses(
        int index, com.google.showcase.v1beta1.StreamingSequence.Response.Builder builderForValue) {
      if (responsesBuilder_ == null) {
        ensureResponsesIsMutable();
        responses_.set(index, builderForValue.build());
        onChanged();
      } else {
        responsesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public Builder addResponses(com.google.showcase.v1beta1.StreamingSequence.Response value) {
      if (responsesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureResponsesIsMutable();
        responses_.add(value);
        onChanged();
      } else {
        responsesBuilder_.addMessage(value);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public Builder addResponses(
        int index, com.google.showcase.v1beta1.StreamingSequence.Response value) {
      if (responsesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureResponsesIsMutable();
        responses_.add(index, value);
        onChanged();
      } else {
        responsesBuilder_.addMessage(index, value);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public Builder addResponses(
        com.google.showcase.v1beta1.StreamingSequence.Response.Builder builderForValue) {
      if (responsesBuilder_ == null) {
        ensureResponsesIsMutable();
        responses_.add(builderForValue.build());
        onChanged();
      } else {
        responsesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public Builder addResponses(
        int index, com.google.showcase.v1beta1.StreamingSequence.Response.Builder builderForValue) {
      if (responsesBuilder_ == null) {
        ensureResponsesIsMutable();
        responses_.add(index, builderForValue.build());
        onChanged();
      } else {
        responsesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public Builder addAllResponses(
        java.lang.Iterable<? extends com.google.showcase.v1beta1.StreamingSequence.Response>
            values) {
      if (responsesBuilder_ == null) {
        ensureResponsesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, responses_);
        onChanged();
      } else {
        responsesBuilder_.addAllMessages(values);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public Builder clearResponses() {
      if (responsesBuilder_ == null) {
        responses_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        responsesBuilder_.clear();
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public Builder removeResponses(int index) {
      if (responsesBuilder_ == null) {
        ensureResponsesIsMutable();
        responses_.remove(index);
        onChanged();
      } else {
        responsesBuilder_.remove(index);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public com.google.showcase.v1beta1.StreamingSequence.Response.Builder getResponsesBuilder(
        int index) {
      return getResponsesFieldBuilder().getBuilder(index);
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder getResponsesOrBuilder(
        int index) {
      if (responsesBuilder_ == null) {
        return responses_.get(index);
      } else {
        return responsesBuilder_.getMessageOrBuilder(index);
      }
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public java.util.List<? extends com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder>
        getResponsesOrBuilderList() {
      if (responsesBuilder_ != null) {
        return responsesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(responses_);
      }
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public com.google.showcase.v1beta1.StreamingSequence.Response.Builder addResponsesBuilder() {
      return getResponsesFieldBuilder()
          .addBuilder(com.google.showcase.v1beta1.StreamingSequence.Response.getDefaultInstance());
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public com.google.showcase.v1beta1.StreamingSequence.Response.Builder addResponsesBuilder(
        int index) {
      return getResponsesFieldBuilder()
          .addBuilder(
              index, com.google.showcase.v1beta1.StreamingSequence.Response.getDefaultInstance());
    }

    /**
     *
     *
     * <pre>
     * Sequence of responses to return in order for each attempt. If empty, the
     * default response is an immediate OK.
     * </pre>
     *
     * <code>repeated .google.showcase.v1beta1.StreamingSequence.Response responses = 3;</code>
     */
    public java.util.List<com.google.showcase.v1beta1.StreamingSequence.Response.Builder>
        getResponsesBuilderList() {
      return getResponsesFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.showcase.v1beta1.StreamingSequence.Response,
            com.google.showcase.v1beta1.StreamingSequence.Response.Builder,
            com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder>
        getResponsesFieldBuilder() {
      if (responsesBuilder_ == null) {
        responsesBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.showcase.v1beta1.StreamingSequence.Response,
                com.google.showcase.v1beta1.StreamingSequence.Response.Builder,
                com.google.showcase.v1beta1.StreamingSequence.ResponseOrBuilder>(
                responses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
        responses_ = null;
      }
      return responsesBuilder_;
    }

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

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

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

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

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

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

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

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