// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: ga4gh/read_service.proto

package ga4gh;

public final class ReadServiceOuterClass {
  private ReadServiceOuterClass() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface SearchReadGroupSetsRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:ga4gh.SearchReadGroupSetsRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The dataset to search.
     * </pre>
     *
     * <code>optional string dataset_id = 1;</code>
     */
    java.lang.String getDatasetId();
    /**
     * <pre>
     * The dataset to search.
     * </pre>
     *
     * <code>optional string dataset_id = 1;</code>
     */
    com.google.protobuf.ByteString
        getDatasetIdBytes();

    /**
     * <pre>
     * Only return read group sets with this name (case-sensitive, exact match).
     * </pre>
     *
     * <code>optional string name = 2;</code>
     */
    java.lang.String getName();
    /**
     * <pre>
     * Only return read group sets with this name (case-sensitive, exact match).
     * </pre>
     *
     * <code>optional string name = 2;</code>
     */
    com.google.protobuf.ByteString
        getNameBytes();

    /**
     * <pre>
     * Specifies the maximum number of results to return in a single page.
     * If unspecified, a system default will be used.
     * </pre>
     *
     * <code>optional int32 page_size = 3;</code>
     */
    int getPageSize();

    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * To get the next page of results, set this parameter to the value of
     * `next_page_token` from the previous response.
     * </pre>
     *
     * <code>optional string page_token = 4;</code>
     */
    java.lang.String getPageToken();
    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * To get the next page of results, set this parameter to the value of
     * `next_page_token` from the previous response.
     * </pre>
     *
     * <code>optional string page_token = 4;</code>
     */
    com.google.protobuf.ByteString
        getPageTokenBytes();
  }
  /**
   * <pre>
   * This request maps to the body of `POST /readgroupsets/search` as JSON.
   * TODO: Factor this out to a common API patterns section.
   * - If searching by a resource ID, and that resource is not found, the method
   *   will return a `404` HTTP status code (`NOT_FOUND`).
   * - If searching by other attributes, e.g. `name`, and no matches are found, the
   *   method will return a `200` HTTP status code (`OK`) with an empty result list.
   * </pre>
   *
   * Protobuf type {@code ga4gh.SearchReadGroupSetsRequest}
   */
  public  static final class SearchReadGroupSetsRequest extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:ga4gh.SearchReadGroupSetsRequest)
      SearchReadGroupSetsRequestOrBuilder {
    // Use SearchReadGroupSetsRequest.newBuilder() to construct.
    private SearchReadGroupSetsRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
    }
    private SearchReadGroupSetsRequest() {
      datasetId_ = "";
      name_ = "";
      pageSize_ = 0;
      pageToken_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private SearchReadGroupSetsRequest(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              java.lang.String s = input.readStringRequireUtf8();

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

              name_ = s;
              break;
            }
            case 24: {

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

              pageToken_ = s;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadGroupSetsRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadGroupSetsRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest.class, ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest.Builder.class);
    }

    public static final int DATASET_ID_FIELD_NUMBER = 1;
    private volatile java.lang.Object datasetId_;
    /**
     * <pre>
     * The dataset to search.
     * </pre>
     *
     * <code>optional string dataset_id = 1;</code>
     */
    public java.lang.String getDatasetId() {
      java.lang.Object ref = datasetId_;
      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();
        datasetId_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The dataset to search.
     * </pre>
     *
     * <code>optional string dataset_id = 1;</code>
     */
    public com.google.protobuf.ByteString
        getDatasetIdBytes() {
      java.lang.Object ref = datasetId_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        datasetId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int NAME_FIELD_NUMBER = 2;
    private volatile java.lang.Object name_;
    /**
     * <pre>
     * Only return read group sets with this name (case-sensitive, exact match).
     * </pre>
     *
     * <code>optional string name = 2;</code>
     */
    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;
      }
    }
    /**
     * <pre>
     * Only return read group sets with this name (case-sensitive, exact match).
     * </pre>
     *
     * <code>optional string name = 2;</code>
     */
    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 PAGE_SIZE_FIELD_NUMBER = 3;
    private int pageSize_;
    /**
     * <pre>
     * Specifies the maximum number of results to return in a single page.
     * If unspecified, a system default will be used.
     * </pre>
     *
     * <code>optional int32 page_size = 3;</code>
     */
    public int getPageSize() {
      return pageSize_;
    }

    public static final int PAGE_TOKEN_FIELD_NUMBER = 4;
    private volatile java.lang.Object pageToken_;
    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * To get the next page of results, set this parameter to the value of
     * `next_page_token` from the previous response.
     * </pre>
     *
     * <code>optional string page_token = 4;</code>
     */
    public java.lang.String getPageToken() {
      java.lang.Object ref = pageToken_;
      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();
        pageToken_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * To get the next page of results, set this parameter to the value of
     * `next_page_token` from the previous response.
     * </pre>
     *
     * <code>optional string page_token = 4;</code>
     */
    public com.google.protobuf.ByteString
        getPageTokenBytes() {
      java.lang.Object ref = pageToken_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        pageToken_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!getDatasetIdBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 1, datasetId_);
      }
      if (!getNameBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 2, name_);
      }
      if (pageSize_ != 0) {
        output.writeInt32(3, pageSize_);
      }
      if (!getPageTokenBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (!getDatasetIdBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, datasetId_);
      }
      if (!getNameBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_);
      }
      if (pageSize_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(3, pageSize_);
      }
      if (!getPageTokenBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * This request maps to the body of `POST /readgroupsets/search` as JSON.
     * TODO: Factor this out to a common API patterns section.
     * - If searching by a resource ID, and that resource is not found, the method
     *   will return a `404` HTTP status code (`NOT_FOUND`).
     * - If searching by other attributes, e.g. `name`, and no matches are found, the
     *   method will return a `200` HTTP status code (`OK`) with an empty result list.
     * </pre>
     *
     * Protobuf type {@code ga4gh.SearchReadGroupSetsRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:ga4gh.SearchReadGroupSetsRequest)
        ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadGroupSetsRequest_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadGroupSetsRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest.class, ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest.Builder.class);
      }

      // Construct using ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        datasetId_ = "";

        name_ = "";

        pageSize_ = 0;

        pageToken_ = "";

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadGroupSetsRequest_descriptor;
      }

      public ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest getDefaultInstanceForType() {
        return ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest.getDefaultInstance();
      }

      public ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest build() {
        ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest buildPartial() {
        ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest result = new ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest(this);
        result.datasetId_ = datasetId_;
        result.name_ = name_;
        result.pageSize_ = pageSize_;
        result.pageToken_ = pageToken_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest) {
          return mergeFrom((ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest other) {
        if (other == ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest.getDefaultInstance()) return this;
        if (!other.getDatasetId().isEmpty()) {
          datasetId_ = other.datasetId_;
          onChanged();
        }
        if (!other.getName().isEmpty()) {
          name_ = other.name_;
          onChanged();
        }
        if (other.getPageSize() != 0) {
          setPageSize(other.getPageSize());
        }
        if (!other.getPageToken().isEmpty()) {
          pageToken_ = other.pageToken_;
          onChanged();
        }
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object datasetId_ = "";
      /**
       * <pre>
       * The dataset to search.
       * </pre>
       *
       * <code>optional string dataset_id = 1;</code>
       */
      public java.lang.String getDatasetId() {
        java.lang.Object ref = datasetId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          datasetId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The dataset to search.
       * </pre>
       *
       * <code>optional string dataset_id = 1;</code>
       */
      public com.google.protobuf.ByteString
          getDatasetIdBytes() {
        java.lang.Object ref = datasetId_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          datasetId_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The dataset to search.
       * </pre>
       *
       * <code>optional string dataset_id = 1;</code>
       */
      public Builder setDatasetId(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        datasetId_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The dataset to search.
       * </pre>
       *
       * <code>optional string dataset_id = 1;</code>
       */
      public Builder clearDatasetId() {
        
        datasetId_ = getDefaultInstance().getDatasetId();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The dataset to search.
       * </pre>
       *
       * <code>optional string dataset_id = 1;</code>
       */
      public Builder setDatasetIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        datasetId_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object name_ = "";
      /**
       * <pre>
       * Only return read group sets with this name (case-sensitive, exact match).
       * </pre>
       *
       * <code>optional string name = 2;</code>
       */
      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;
        }
      }
      /**
       * <pre>
       * Only return read group sets with this name (case-sensitive, exact match).
       * </pre>
       *
       * <code>optional string name = 2;</code>
       */
      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;
        }
      }
      /**
       * <pre>
       * Only return read group sets with this name (case-sensitive, exact match).
       * </pre>
       *
       * <code>optional string name = 2;</code>
       */
      public Builder setName(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        name_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Only return read group sets with this name (case-sensitive, exact match).
       * </pre>
       *
       * <code>optional string name = 2;</code>
       */
      public Builder clearName() {
        
        name_ = getDefaultInstance().getName();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Only return read group sets with this name (case-sensitive, exact match).
       * </pre>
       *
       * <code>optional string name = 2;</code>
       */
      public Builder setNameBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        name_ = value;
        onChanged();
        return this;
      }

      private int pageSize_ ;
      /**
       * <pre>
       * Specifies the maximum number of results to return in a single page.
       * If unspecified, a system default will be used.
       * </pre>
       *
       * <code>optional int32 page_size = 3;</code>
       */
      public int getPageSize() {
        return pageSize_;
      }
      /**
       * <pre>
       * Specifies the maximum number of results to return in a single page.
       * If unspecified, a system default will be used.
       * </pre>
       *
       * <code>optional int32 page_size = 3;</code>
       */
      public Builder setPageSize(int value) {
        
        pageSize_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Specifies the maximum number of results to return in a single page.
       * If unspecified, a system default will be used.
       * </pre>
       *
       * <code>optional int32 page_size = 3;</code>
       */
      public Builder clearPageSize() {
        
        pageSize_ = 0;
        onChanged();
        return this;
      }

      private java.lang.Object pageToken_ = "";
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * To get the next page of results, set this parameter to the value of
       * `next_page_token` from the previous response.
       * </pre>
       *
       * <code>optional string page_token = 4;</code>
       */
      public java.lang.String getPageToken() {
        java.lang.Object ref = pageToken_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          pageToken_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * To get the next page of results, set this parameter to the value of
       * `next_page_token` from the previous response.
       * </pre>
       *
       * <code>optional string page_token = 4;</code>
       */
      public com.google.protobuf.ByteString
          getPageTokenBytes() {
        java.lang.Object ref = pageToken_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          pageToken_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * To get the next page of results, set this parameter to the value of
       * `next_page_token` from the previous response.
       * </pre>
       *
       * <code>optional string page_token = 4;</code>
       */
      public Builder setPageToken(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        pageToken_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * To get the next page of results, set this parameter to the value of
       * `next_page_token` from the previous response.
       * </pre>
       *
       * <code>optional string page_token = 4;</code>
       */
      public Builder clearPageToken() {
        
        pageToken_ = getDefaultInstance().getPageToken();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * To get the next page of results, set this parameter to the value of
       * `next_page_token` from the previous response.
       * </pre>
       *
       * <code>optional string page_token = 4;</code>
       */
      public Builder setPageTokenBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        pageToken_ = value;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }


      // @@protoc_insertion_point(builder_scope:ga4gh.SearchReadGroupSetsRequest)
    }

    // @@protoc_insertion_point(class_scope:ga4gh.SearchReadGroupSetsRequest)
    private static final ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest();
    }

    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface SearchReadGroupSetsResponseOrBuilder extends
      // @@protoc_insertion_point(interface_extends:ga4gh.SearchReadGroupSetsResponse)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The list of matching read group sets.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
     */
    java.util.List<ga4gh.Reads.ReadGroupSet> 
        getReadGroupSetsList();
    /**
     * <pre>
     * The list of matching read group sets.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
     */
    ga4gh.Reads.ReadGroupSet getReadGroupSets(int index);
    /**
     * <pre>
     * The list of matching read group sets.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
     */
    int getReadGroupSetsCount();
    /**
     * <pre>
     * The list of matching read group sets.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
     */
    java.util.List<? extends ga4gh.Reads.ReadGroupSetOrBuilder> 
        getReadGroupSetsOrBuilderList();
    /**
     * <pre>
     * The list of matching read group sets.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
     */
    ga4gh.Reads.ReadGroupSetOrBuilder getReadGroupSetsOrBuilder(
        int index);

    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * Provide this value in a subsequent request to return the next page of
     * results. This field will be empty if there aren't any additional results.
     * </pre>
     *
     * <code>optional string next_page_token = 2;</code>
     */
    java.lang.String getNextPageToken();
    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * Provide this value in a subsequent request to return the next page of
     * results. This field will be empty if there aren't any additional results.
     * </pre>
     *
     * <code>optional string next_page_token = 2;</code>
     */
    com.google.protobuf.ByteString
        getNextPageTokenBytes();
  }
  /**
   * <pre>
   * This is the response from `POST /readgroupsets/search` expressed as JSON.
   * </pre>
   *
   * Protobuf type {@code ga4gh.SearchReadGroupSetsResponse}
   */
  public  static final class SearchReadGroupSetsResponse extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:ga4gh.SearchReadGroupSetsResponse)
      SearchReadGroupSetsResponseOrBuilder {
    // Use SearchReadGroupSetsResponse.newBuilder() to construct.
    private SearchReadGroupSetsResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
    }
    private SearchReadGroupSetsResponse() {
      readGroupSets_ = java.util.Collections.emptyList();
      nextPageToken_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private SearchReadGroupSetsResponse(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                readGroupSets_ = new java.util.ArrayList<ga4gh.Reads.ReadGroupSet>();
                mutable_bitField0_ |= 0x00000001;
              }
              readGroupSets_.add(input.readMessage(ga4gh.Reads.ReadGroupSet.parser(), extensionRegistry));
              break;
            }
            case 18: {
              java.lang.String s = input.readStringRequireUtf8();

              nextPageToken_ = s;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
          readGroupSets_ = java.util.Collections.unmodifiableList(readGroupSets_);
        }
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadGroupSetsResponse_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadGroupSetsResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse.class, ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse.Builder.class);
    }

    private int bitField0_;
    public static final int READ_GROUP_SETS_FIELD_NUMBER = 1;
    private java.util.List<ga4gh.Reads.ReadGroupSet> readGroupSets_;
    /**
     * <pre>
     * The list of matching read group sets.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
     */
    public java.util.List<ga4gh.Reads.ReadGroupSet> getReadGroupSetsList() {
      return readGroupSets_;
    }
    /**
     * <pre>
     * The list of matching read group sets.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
     */
    public java.util.List<? extends ga4gh.Reads.ReadGroupSetOrBuilder> 
        getReadGroupSetsOrBuilderList() {
      return readGroupSets_;
    }
    /**
     * <pre>
     * The list of matching read group sets.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
     */
    public int getReadGroupSetsCount() {
      return readGroupSets_.size();
    }
    /**
     * <pre>
     * The list of matching read group sets.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
     */
    public ga4gh.Reads.ReadGroupSet getReadGroupSets(int index) {
      return readGroupSets_.get(index);
    }
    /**
     * <pre>
     * The list of matching read group sets.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
     */
    public ga4gh.Reads.ReadGroupSetOrBuilder getReadGroupSetsOrBuilder(
        int index) {
      return readGroupSets_.get(index);
    }

    public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2;
    private volatile java.lang.Object nextPageToken_;
    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * Provide this value in a subsequent request to return the next page of
     * results. This field will be empty if there aren't any additional results.
     * </pre>
     *
     * <code>optional string next_page_token = 2;</code>
     */
    public java.lang.String getNextPageToken() {
      java.lang.Object ref = nextPageToken_;
      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();
        nextPageToken_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * Provide this value in a subsequent request to return the next page of
     * results. This field will be empty if there aren't any additional results.
     * </pre>
     *
     * <code>optional string next_page_token = 2;</code>
     */
    public com.google.protobuf.ByteString
        getNextPageTokenBytes() {
      java.lang.Object ref = nextPageToken_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        nextPageToken_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      for (int i = 0; i < readGroupSets_.size(); i++) {
        output.writeMessage(1, readGroupSets_.get(i));
      }
      if (!getNextPageTokenBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      for (int i = 0; i < readGroupSets_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, readGroupSets_.get(i));
      }
      if (!getNextPageTokenBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * This is the response from `POST /readgroupsets/search` expressed as JSON.
     * </pre>
     *
     * Protobuf type {@code ga4gh.SearchReadGroupSetsResponse}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:ga4gh.SearchReadGroupSetsResponse)
        ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadGroupSetsResponse_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadGroupSetsResponse_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse.class, ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse.Builder.class);
      }

      // Construct using ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getReadGroupSetsFieldBuilder();
        }
      }
      public Builder clear() {
        super.clear();
        if (readGroupSetsBuilder_ == null) {
          readGroupSets_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          readGroupSetsBuilder_.clear();
        }
        nextPageToken_ = "";

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadGroupSetsResponse_descriptor;
      }

      public ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse getDefaultInstanceForType() {
        return ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse.getDefaultInstance();
      }

      public ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse build() {
        ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse buildPartial() {
        ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse result = new ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (readGroupSetsBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001)) {
            readGroupSets_ = java.util.Collections.unmodifiableList(readGroupSets_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.readGroupSets_ = readGroupSets_;
        } else {
          result.readGroupSets_ = readGroupSetsBuilder_.build();
        }
        result.nextPageToken_ = nextPageToken_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse) {
          return mergeFrom((ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse other) {
        if (other == ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse.getDefaultInstance()) return this;
        if (readGroupSetsBuilder_ == null) {
          if (!other.readGroupSets_.isEmpty()) {
            if (readGroupSets_.isEmpty()) {
              readGroupSets_ = other.readGroupSets_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureReadGroupSetsIsMutable();
              readGroupSets_.addAll(other.readGroupSets_);
            }
            onChanged();
          }
        } else {
          if (!other.readGroupSets_.isEmpty()) {
            if (readGroupSetsBuilder_.isEmpty()) {
              readGroupSetsBuilder_.dispose();
              readGroupSetsBuilder_ = null;
              readGroupSets_ = other.readGroupSets_;
              bitField0_ = (bitField0_ & ~0x00000001);
              readGroupSetsBuilder_ = 
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                   getReadGroupSetsFieldBuilder() : null;
            } else {
              readGroupSetsBuilder_.addAllMessages(other.readGroupSets_);
            }
          }
        }
        if (!other.getNextPageToken().isEmpty()) {
          nextPageToken_ = other.nextPageToken_;
          onChanged();
        }
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.util.List<ga4gh.Reads.ReadGroupSet> readGroupSets_ =
        java.util.Collections.emptyList();
      private void ensureReadGroupSetsIsMutable() {
        if (!((bitField0_ & 0x00000001) == 0x00000001)) {
          readGroupSets_ = new java.util.ArrayList<ga4gh.Reads.ReadGroupSet>(readGroupSets_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilder<
          ga4gh.Reads.ReadGroupSet, ga4gh.Reads.ReadGroupSet.Builder, ga4gh.Reads.ReadGroupSetOrBuilder> readGroupSetsBuilder_;

      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public java.util.List<ga4gh.Reads.ReadGroupSet> getReadGroupSetsList() {
        if (readGroupSetsBuilder_ == null) {
          return java.util.Collections.unmodifiableList(readGroupSets_);
        } else {
          return readGroupSetsBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public int getReadGroupSetsCount() {
        if (readGroupSetsBuilder_ == null) {
          return readGroupSets_.size();
        } else {
          return readGroupSetsBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public ga4gh.Reads.ReadGroupSet getReadGroupSets(int index) {
        if (readGroupSetsBuilder_ == null) {
          return readGroupSets_.get(index);
        } else {
          return readGroupSetsBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public Builder setReadGroupSets(
          int index, ga4gh.Reads.ReadGroupSet value) {
        if (readGroupSetsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureReadGroupSetsIsMutable();
          readGroupSets_.set(index, value);
          onChanged();
        } else {
          readGroupSetsBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public Builder setReadGroupSets(
          int index, ga4gh.Reads.ReadGroupSet.Builder builderForValue) {
        if (readGroupSetsBuilder_ == null) {
          ensureReadGroupSetsIsMutable();
          readGroupSets_.set(index, builderForValue.build());
          onChanged();
        } else {
          readGroupSetsBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public Builder addReadGroupSets(ga4gh.Reads.ReadGroupSet value) {
        if (readGroupSetsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureReadGroupSetsIsMutable();
          readGroupSets_.add(value);
          onChanged();
        } else {
          readGroupSetsBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public Builder addReadGroupSets(
          int index, ga4gh.Reads.ReadGroupSet value) {
        if (readGroupSetsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureReadGroupSetsIsMutable();
          readGroupSets_.add(index, value);
          onChanged();
        } else {
          readGroupSetsBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public Builder addReadGroupSets(
          ga4gh.Reads.ReadGroupSet.Builder builderForValue) {
        if (readGroupSetsBuilder_ == null) {
          ensureReadGroupSetsIsMutable();
          readGroupSets_.add(builderForValue.build());
          onChanged();
        } else {
          readGroupSetsBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public Builder addReadGroupSets(
          int index, ga4gh.Reads.ReadGroupSet.Builder builderForValue) {
        if (readGroupSetsBuilder_ == null) {
          ensureReadGroupSetsIsMutable();
          readGroupSets_.add(index, builderForValue.build());
          onChanged();
        } else {
          readGroupSetsBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public Builder addAllReadGroupSets(
          java.lang.Iterable<? extends ga4gh.Reads.ReadGroupSet> values) {
        if (readGroupSetsBuilder_ == null) {
          ensureReadGroupSetsIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, readGroupSets_);
          onChanged();
        } else {
          readGroupSetsBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public Builder clearReadGroupSets() {
        if (readGroupSetsBuilder_ == null) {
          readGroupSets_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          readGroupSetsBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public Builder removeReadGroupSets(int index) {
        if (readGroupSetsBuilder_ == null) {
          ensureReadGroupSetsIsMutable();
          readGroupSets_.remove(index);
          onChanged();
        } else {
          readGroupSetsBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public ga4gh.Reads.ReadGroupSet.Builder getReadGroupSetsBuilder(
          int index) {
        return getReadGroupSetsFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public ga4gh.Reads.ReadGroupSetOrBuilder getReadGroupSetsOrBuilder(
          int index) {
        if (readGroupSetsBuilder_ == null) {
          return readGroupSets_.get(index);  } else {
          return readGroupSetsBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public java.util.List<? extends ga4gh.Reads.ReadGroupSetOrBuilder> 
           getReadGroupSetsOrBuilderList() {
        if (readGroupSetsBuilder_ != null) {
          return readGroupSetsBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(readGroupSets_);
        }
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public ga4gh.Reads.ReadGroupSet.Builder addReadGroupSetsBuilder() {
        return getReadGroupSetsFieldBuilder().addBuilder(
            ga4gh.Reads.ReadGroupSet.getDefaultInstance());
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public ga4gh.Reads.ReadGroupSet.Builder addReadGroupSetsBuilder(
          int index) {
        return getReadGroupSetsFieldBuilder().addBuilder(
            index, ga4gh.Reads.ReadGroupSet.getDefaultInstance());
      }
      /**
       * <pre>
       * The list of matching read group sets.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadGroupSet read_group_sets = 1;</code>
       */
      public java.util.List<ga4gh.Reads.ReadGroupSet.Builder> 
           getReadGroupSetsBuilderList() {
        return getReadGroupSetsFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilder<
          ga4gh.Reads.ReadGroupSet, ga4gh.Reads.ReadGroupSet.Builder, ga4gh.Reads.ReadGroupSetOrBuilder> 
          getReadGroupSetsFieldBuilder() {
        if (readGroupSetsBuilder_ == null) {
          readGroupSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
              ga4gh.Reads.ReadGroupSet, ga4gh.Reads.ReadGroupSet.Builder, ga4gh.Reads.ReadGroupSetOrBuilder>(
                  readGroupSets_,
                  ((bitField0_ & 0x00000001) == 0x00000001),
                  getParentForChildren(),
                  isClean());
          readGroupSets_ = null;
        }
        return readGroupSetsBuilder_;
      }

      private java.lang.Object nextPageToken_ = "";
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * Provide this value in a subsequent request to return the next page of
       * results. This field will be empty if there aren't any additional results.
       * </pre>
       *
       * <code>optional string next_page_token = 2;</code>
       */
      public java.lang.String getNextPageToken() {
        java.lang.Object ref = nextPageToken_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          nextPageToken_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * Provide this value in a subsequent request to return the next page of
       * results. This field will be empty if there aren't any additional results.
       * </pre>
       *
       * <code>optional string next_page_token = 2;</code>
       */
      public com.google.protobuf.ByteString
          getNextPageTokenBytes() {
        java.lang.Object ref = nextPageToken_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          nextPageToken_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * Provide this value in a subsequent request to return the next page of
       * results. This field will be empty if there aren't any additional results.
       * </pre>
       *
       * <code>optional string next_page_token = 2;</code>
       */
      public Builder setNextPageToken(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        nextPageToken_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * Provide this value in a subsequent request to return the next page of
       * results. This field will be empty if there aren't any additional results.
       * </pre>
       *
       * <code>optional string next_page_token = 2;</code>
       */
      public Builder clearNextPageToken() {
        
        nextPageToken_ = getDefaultInstance().getNextPageToken();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * Provide this value in a subsequent request to return the next page of
       * results. This field will be empty if there aren't any additional results.
       * </pre>
       *
       * <code>optional string next_page_token = 2;</code>
       */
      public Builder setNextPageTokenBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        nextPageToken_ = value;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }


      // @@protoc_insertion_point(builder_scope:ga4gh.SearchReadGroupSetsResponse)
    }

    // @@protoc_insertion_point(class_scope:ga4gh.SearchReadGroupSetsResponse)
    private static final ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse();
    }

    public static ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface GetReadGroupSetRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:ga4gh.GetReadGroupSetRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The ID of the `ReadGroupSet` to be retrieved.
     * </pre>
     *
     * <code>optional string read_group_set_id = 1;</code>
     */
    java.lang.String getReadGroupSetId();
    /**
     * <pre>
     * The ID of the `ReadGroupSet` to be retrieved.
     * </pre>
     *
     * <code>optional string read_group_set_id = 1;</code>
     */
    com.google.protobuf.ByteString
        getReadGroupSetIdBytes();
  }
  /**
   * <pre>
   * This request maps to the URL `GET /readgroupsets/{read_group_set_id}`.
   * </pre>
   *
   * Protobuf type {@code ga4gh.GetReadGroupSetRequest}
   */
  public  static final class GetReadGroupSetRequest extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:ga4gh.GetReadGroupSetRequest)
      GetReadGroupSetRequestOrBuilder {
    // Use GetReadGroupSetRequest.newBuilder() to construct.
    private GetReadGroupSetRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
    }
    private GetReadGroupSetRequest() {
      readGroupSetId_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private GetReadGroupSetRequest(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              java.lang.String s = input.readStringRequireUtf8();

              readGroupSetId_ = s;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_GetReadGroupSetRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_GetReadGroupSetRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest.class, ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest.Builder.class);
    }

    public static final int READ_GROUP_SET_ID_FIELD_NUMBER = 1;
    private volatile java.lang.Object readGroupSetId_;
    /**
     * <pre>
     * The ID of the `ReadGroupSet` to be retrieved.
     * </pre>
     *
     * <code>optional string read_group_set_id = 1;</code>
     */
    public java.lang.String getReadGroupSetId() {
      java.lang.Object ref = readGroupSetId_;
      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();
        readGroupSetId_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The ID of the `ReadGroupSet` to be retrieved.
     * </pre>
     *
     * <code>optional string read_group_set_id = 1;</code>
     */
    public com.google.protobuf.ByteString
        getReadGroupSetIdBytes() {
      java.lang.Object ref = readGroupSetId_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        readGroupSetId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!getReadGroupSetIdBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 1, readGroupSetId_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (!getReadGroupSetIdBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, readGroupSetId_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    public static ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * This request maps to the URL `GET /readgroupsets/{read_group_set_id}`.
     * </pre>
     *
     * Protobuf type {@code ga4gh.GetReadGroupSetRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:ga4gh.GetReadGroupSetRequest)
        ga4gh.ReadServiceOuterClass.GetReadGroupSetRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_GetReadGroupSetRequest_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_GetReadGroupSetRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest.class, ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest.Builder.class);
      }

      // Construct using ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        readGroupSetId_ = "";

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_GetReadGroupSetRequest_descriptor;
      }

      public ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest getDefaultInstanceForType() {
        return ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest.getDefaultInstance();
      }

      public ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest build() {
        ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest buildPartial() {
        ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest result = new ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest(this);
        result.readGroupSetId_ = readGroupSetId_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest) {
          return mergeFrom((ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest other) {
        if (other == ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest.getDefaultInstance()) return this;
        if (!other.getReadGroupSetId().isEmpty()) {
          readGroupSetId_ = other.readGroupSetId_;
          onChanged();
        }
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object readGroupSetId_ = "";
      /**
       * <pre>
       * The ID of the `ReadGroupSet` to be retrieved.
       * </pre>
       *
       * <code>optional string read_group_set_id = 1;</code>
       */
      public java.lang.String getReadGroupSetId() {
        java.lang.Object ref = readGroupSetId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          readGroupSetId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The ID of the `ReadGroupSet` to be retrieved.
       * </pre>
       *
       * <code>optional string read_group_set_id = 1;</code>
       */
      public com.google.protobuf.ByteString
          getReadGroupSetIdBytes() {
        java.lang.Object ref = readGroupSetId_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          readGroupSetId_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The ID of the `ReadGroupSet` to be retrieved.
       * </pre>
       *
       * <code>optional string read_group_set_id = 1;</code>
       */
      public Builder setReadGroupSetId(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        readGroupSetId_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The ID of the `ReadGroupSet` to be retrieved.
       * </pre>
       *
       * <code>optional string read_group_set_id = 1;</code>
       */
      public Builder clearReadGroupSetId() {
        
        readGroupSetId_ = getDefaultInstance().getReadGroupSetId();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The ID of the `ReadGroupSet` to be retrieved.
       * </pre>
       *
       * <code>optional string read_group_set_id = 1;</code>
       */
      public Builder setReadGroupSetIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        readGroupSetId_ = value;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }


      // @@protoc_insertion_point(builder_scope:ga4gh.GetReadGroupSetRequest)
    }

    // @@protoc_insertion_point(class_scope:ga4gh.GetReadGroupSetRequest)
    private static final ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest();
    }

    public static ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public ga4gh.ReadServiceOuterClass.GetReadGroupSetRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface SearchReadsRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:ga4gh.SearchReadsRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The ReadGroups to search. At least one id must be specified.
     * </pre>
     *
     * <code>repeated string read_group_ids = 1;</code>
     */
    com.google.protobuf.ProtocolStringList
        getReadGroupIdsList();
    /**
     * <pre>
     * The ReadGroups to search. At least one id must be specified.
     * </pre>
     *
     * <code>repeated string read_group_ids = 1;</code>
     */
    int getReadGroupIdsCount();
    /**
     * <pre>
     * The ReadGroups to search. At least one id must be specified.
     * </pre>
     *
     * <code>repeated string read_group_ids = 1;</code>
     */
    java.lang.String getReadGroupIds(int index);
    /**
     * <pre>
     * The ReadGroups to search. At least one id must be specified.
     * </pre>
     *
     * <code>repeated string read_group_ids = 1;</code>
     */
    com.google.protobuf.ByteString
        getReadGroupIdsBytes(int index);

    /**
     * <pre>
     * The reference to query. Leaving blank returns results from all
     * references, including unmapped reads - this could be very large.
     * </pre>
     *
     * <code>optional string reference_id = 2;</code>
     */
    java.lang.String getReferenceId();
    /**
     * <pre>
     * The reference to query. Leaving blank returns results from all
     * references, including unmapped reads - this could be very large.
     * </pre>
     *
     * <code>optional string reference_id = 2;</code>
     */
    com.google.protobuf.ByteString
        getReferenceIdBytes();

    /**
     * <pre>
     * The start position (0-based) of this query.
     * If a reference is specified, this defaults to 0.
     * Genomic positions are non-negative integers less than reference length.
     * Requests spanning the join of circular genomes are represented as
     * two requests one on each side of the join (position 0).
     * </pre>
     *
     * <code>optional int64 start = 3;</code>
     */
    long getStart();

    /**
     * <pre>
     * The end position (0-based, exclusive) of this query.
     * If a reference is specified, this defaults to the
     * reference's length.
     * </pre>
     *
     * <code>optional int64 end = 4;</code>
     */
    long getEnd();

    /**
     * <pre>
     * Specifies the maximum number of results to return in a single page.
     * If unspecified, a system default will be used.
     * </pre>
     *
     * <code>optional int32 page_size = 5;</code>
     */
    int getPageSize();

    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * To get the next page of results, set this parameter to the value of
     * `next_page_token` from the previous response.
     * </pre>
     *
     * <code>optional string page_token = 6;</code>
     */
    java.lang.String getPageToken();
    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * To get the next page of results, set this parameter to the value of
     * `next_page_token` from the previous response.
     * </pre>
     *
     * <code>optional string page_token = 6;</code>
     */
    com.google.protobuf.ByteString
        getPageTokenBytes();
  }
  /**
   * <pre>
   * ******************  /reads  *********************
   * This request maps to the body of `POST /reads/search` as JSON.
   * If a reference is specified, all queried `ReadGroup`s must be aligned
   * to `ReferenceSet`s containing that same `Reference`. If no reference is
   * specified, all `ReadGroup`s must be aligned to the same `ReferenceSet`.
   * </pre>
   *
   * Protobuf type {@code ga4gh.SearchReadsRequest}
   */
  public  static final class SearchReadsRequest extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:ga4gh.SearchReadsRequest)
      SearchReadsRequestOrBuilder {
    // Use SearchReadsRequest.newBuilder() to construct.
    private SearchReadsRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
    }
    private SearchReadsRequest() {
      readGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      referenceId_ = "";
      start_ = 0L;
      end_ = 0L;
      pageSize_ = 0;
      pageToken_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private SearchReadsRequest(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              java.lang.String s = input.readStringRequireUtf8();
              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                readGroupIds_ = new com.google.protobuf.LazyStringArrayList();
                mutable_bitField0_ |= 0x00000001;
              }
              readGroupIds_.add(s);
              break;
            }
            case 18: {
              java.lang.String s = input.readStringRequireUtf8();

              referenceId_ = s;
              break;
            }
            case 24: {

              start_ = input.readInt64();
              break;
            }
            case 32: {

              end_ = input.readInt64();
              break;
            }
            case 40: {

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

              pageToken_ = s;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
          readGroupIds_ = readGroupIds_.getUnmodifiableView();
        }
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadsRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadsRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ga4gh.ReadServiceOuterClass.SearchReadsRequest.class, ga4gh.ReadServiceOuterClass.SearchReadsRequest.Builder.class);
    }

    private int bitField0_;
    public static final int READ_GROUP_IDS_FIELD_NUMBER = 1;
    private com.google.protobuf.LazyStringList readGroupIds_;
    /**
     * <pre>
     * The ReadGroups to search. At least one id must be specified.
     * </pre>
     *
     * <code>repeated string read_group_ids = 1;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getReadGroupIdsList() {
      return readGroupIds_;
    }
    /**
     * <pre>
     * The ReadGroups to search. At least one id must be specified.
     * </pre>
     *
     * <code>repeated string read_group_ids = 1;</code>
     */
    public int getReadGroupIdsCount() {
      return readGroupIds_.size();
    }
    /**
     * <pre>
     * The ReadGroups to search. At least one id must be specified.
     * </pre>
     *
     * <code>repeated string read_group_ids = 1;</code>
     */
    public java.lang.String getReadGroupIds(int index) {
      return readGroupIds_.get(index);
    }
    /**
     * <pre>
     * The ReadGroups to search. At least one id must be specified.
     * </pre>
     *
     * <code>repeated string read_group_ids = 1;</code>
     */
    public com.google.protobuf.ByteString
        getReadGroupIdsBytes(int index) {
      return readGroupIds_.getByteString(index);
    }

    public static final int REFERENCE_ID_FIELD_NUMBER = 2;
    private volatile java.lang.Object referenceId_;
    /**
     * <pre>
     * The reference to query. Leaving blank returns results from all
     * references, including unmapped reads - this could be very large.
     * </pre>
     *
     * <code>optional string reference_id = 2;</code>
     */
    public java.lang.String getReferenceId() {
      java.lang.Object ref = referenceId_;
      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();
        referenceId_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The reference to query. Leaving blank returns results from all
     * references, including unmapped reads - this could be very large.
     * </pre>
     *
     * <code>optional string reference_id = 2;</code>
     */
    public com.google.protobuf.ByteString
        getReferenceIdBytes() {
      java.lang.Object ref = referenceId_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        referenceId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int START_FIELD_NUMBER = 3;
    private long start_;
    /**
     * <pre>
     * The start position (0-based) of this query.
     * If a reference is specified, this defaults to 0.
     * Genomic positions are non-negative integers less than reference length.
     * Requests spanning the join of circular genomes are represented as
     * two requests one on each side of the join (position 0).
     * </pre>
     *
     * <code>optional int64 start = 3;</code>
     */
    public long getStart() {
      return start_;
    }

    public static final int END_FIELD_NUMBER = 4;
    private long end_;
    /**
     * <pre>
     * The end position (0-based, exclusive) of this query.
     * If a reference is specified, this defaults to the
     * reference's length.
     * </pre>
     *
     * <code>optional int64 end = 4;</code>
     */
    public long getEnd() {
      return end_;
    }

    public static final int PAGE_SIZE_FIELD_NUMBER = 5;
    private int pageSize_;
    /**
     * <pre>
     * Specifies the maximum number of results to return in a single page.
     * If unspecified, a system default will be used.
     * </pre>
     *
     * <code>optional int32 page_size = 5;</code>
     */
    public int getPageSize() {
      return pageSize_;
    }

    public static final int PAGE_TOKEN_FIELD_NUMBER = 6;
    private volatile java.lang.Object pageToken_;
    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * To get the next page of results, set this parameter to the value of
     * `next_page_token` from the previous response.
     * </pre>
     *
     * <code>optional string page_token = 6;</code>
     */
    public java.lang.String getPageToken() {
      java.lang.Object ref = pageToken_;
      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();
        pageToken_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * To get the next page of results, set this parameter to the value of
     * `next_page_token` from the previous response.
     * </pre>
     *
     * <code>optional string page_token = 6;</code>
     */
    public com.google.protobuf.ByteString
        getPageTokenBytes() {
      java.lang.Object ref = pageToken_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        pageToken_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      for (int i = 0; i < readGroupIds_.size(); i++) {
        com.google.protobuf.GeneratedMessage.writeString(output, 1, readGroupIds_.getRaw(i));
      }
      if (!getReferenceIdBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 2, referenceId_);
      }
      if (start_ != 0L) {
        output.writeInt64(3, start_);
      }
      if (end_ != 0L) {
        output.writeInt64(4, end_);
      }
      if (pageSize_ != 0) {
        output.writeInt32(5, pageSize_);
      }
      if (!getPageTokenBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 6, pageToken_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      {
        int dataSize = 0;
        for (int i = 0; i < readGroupIds_.size(); i++) {
          dataSize += computeStringSizeNoTag(readGroupIds_.getRaw(i));
        }
        size += dataSize;
        size += 1 * getReadGroupIdsList().size();
      }
      if (!getReferenceIdBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, referenceId_);
      }
      if (start_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(3, start_);
      }
      if (end_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(4, end_);
      }
      if (pageSize_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(5, pageSize_);
      }
      if (!getPageTokenBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(6, pageToken_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    public static ga4gh.ReadServiceOuterClass.SearchReadsRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsRequest parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsRequest parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsRequest parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(ga4gh.ReadServiceOuterClass.SearchReadsRequest prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * ******************  /reads  *********************
     * This request maps to the body of `POST /reads/search` as JSON.
     * If a reference is specified, all queried `ReadGroup`s must be aligned
     * to `ReferenceSet`s containing that same `Reference`. If no reference is
     * specified, all `ReadGroup`s must be aligned to the same `ReferenceSet`.
     * </pre>
     *
     * Protobuf type {@code ga4gh.SearchReadsRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:ga4gh.SearchReadsRequest)
        ga4gh.ReadServiceOuterClass.SearchReadsRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadsRequest_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadsRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                ga4gh.ReadServiceOuterClass.SearchReadsRequest.class, ga4gh.ReadServiceOuterClass.SearchReadsRequest.Builder.class);
      }

      // Construct using ga4gh.ReadServiceOuterClass.SearchReadsRequest.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        readGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000001);
        referenceId_ = "";

        start_ = 0L;

        end_ = 0L;

        pageSize_ = 0;

        pageToken_ = "";

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadsRequest_descriptor;
      }

      public ga4gh.ReadServiceOuterClass.SearchReadsRequest getDefaultInstanceForType() {
        return ga4gh.ReadServiceOuterClass.SearchReadsRequest.getDefaultInstance();
      }

      public ga4gh.ReadServiceOuterClass.SearchReadsRequest build() {
        ga4gh.ReadServiceOuterClass.SearchReadsRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public ga4gh.ReadServiceOuterClass.SearchReadsRequest buildPartial() {
        ga4gh.ReadServiceOuterClass.SearchReadsRequest result = new ga4gh.ReadServiceOuterClass.SearchReadsRequest(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((bitField0_ & 0x00000001) == 0x00000001)) {
          readGroupIds_ = readGroupIds_.getUnmodifiableView();
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.readGroupIds_ = readGroupIds_;
        result.referenceId_ = referenceId_;
        result.start_ = start_;
        result.end_ = end_;
        result.pageSize_ = pageSize_;
        result.pageToken_ = pageToken_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof ga4gh.ReadServiceOuterClass.SearchReadsRequest) {
          return mergeFrom((ga4gh.ReadServiceOuterClass.SearchReadsRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(ga4gh.ReadServiceOuterClass.SearchReadsRequest other) {
        if (other == ga4gh.ReadServiceOuterClass.SearchReadsRequest.getDefaultInstance()) return this;
        if (!other.readGroupIds_.isEmpty()) {
          if (readGroupIds_.isEmpty()) {
            readGroupIds_ = other.readGroupIds_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureReadGroupIdsIsMutable();
            readGroupIds_.addAll(other.readGroupIds_);
          }
          onChanged();
        }
        if (!other.getReferenceId().isEmpty()) {
          referenceId_ = other.referenceId_;
          onChanged();
        }
        if (other.getStart() != 0L) {
          setStart(other.getStart());
        }
        if (other.getEnd() != 0L) {
          setEnd(other.getEnd());
        }
        if (other.getPageSize() != 0) {
          setPageSize(other.getPageSize());
        }
        if (!other.getPageToken().isEmpty()) {
          pageToken_ = other.pageToken_;
          onChanged();
        }
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        ga4gh.ReadServiceOuterClass.SearchReadsRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (ga4gh.ReadServiceOuterClass.SearchReadsRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private com.google.protobuf.LazyStringList readGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      private void ensureReadGroupIdsIsMutable() {
        if (!((bitField0_ & 0x00000001) == 0x00000001)) {
          readGroupIds_ = new com.google.protobuf.LazyStringArrayList(readGroupIds_);
          bitField0_ |= 0x00000001;
         }
      }
      /**
       * <pre>
       * The ReadGroups to search. At least one id must be specified.
       * </pre>
       *
       * <code>repeated string read_group_ids = 1;</code>
       */
      public com.google.protobuf.ProtocolStringList
          getReadGroupIdsList() {
        return readGroupIds_.getUnmodifiableView();
      }
      /**
       * <pre>
       * The ReadGroups to search. At least one id must be specified.
       * </pre>
       *
       * <code>repeated string read_group_ids = 1;</code>
       */
      public int getReadGroupIdsCount() {
        return readGroupIds_.size();
      }
      /**
       * <pre>
       * The ReadGroups to search. At least one id must be specified.
       * </pre>
       *
       * <code>repeated string read_group_ids = 1;</code>
       */
      public java.lang.String getReadGroupIds(int index) {
        return readGroupIds_.get(index);
      }
      /**
       * <pre>
       * The ReadGroups to search. At least one id must be specified.
       * </pre>
       *
       * <code>repeated string read_group_ids = 1;</code>
       */
      public com.google.protobuf.ByteString
          getReadGroupIdsBytes(int index) {
        return readGroupIds_.getByteString(index);
      }
      /**
       * <pre>
       * The ReadGroups to search. At least one id must be specified.
       * </pre>
       *
       * <code>repeated string read_group_ids = 1;</code>
       */
      public Builder setReadGroupIds(
          int index, java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureReadGroupIdsIsMutable();
        readGroupIds_.set(index, value);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The ReadGroups to search. At least one id must be specified.
       * </pre>
       *
       * <code>repeated string read_group_ids = 1;</code>
       */
      public Builder addReadGroupIds(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureReadGroupIdsIsMutable();
        readGroupIds_.add(value);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The ReadGroups to search. At least one id must be specified.
       * </pre>
       *
       * <code>repeated string read_group_ids = 1;</code>
       */
      public Builder addAllReadGroupIds(
          java.lang.Iterable<java.lang.String> values) {
        ensureReadGroupIdsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, readGroupIds_);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The ReadGroups to search. At least one id must be specified.
       * </pre>
       *
       * <code>repeated string read_group_ids = 1;</code>
       */
      public Builder clearReadGroupIds() {
        readGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The ReadGroups to search. At least one id must be specified.
       * </pre>
       *
       * <code>repeated string read_group_ids = 1;</code>
       */
      public Builder addReadGroupIdsBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        ensureReadGroupIdsIsMutable();
        readGroupIds_.add(value);
        onChanged();
        return this;
      }

      private java.lang.Object referenceId_ = "";
      /**
       * <pre>
       * The reference to query. Leaving blank returns results from all
       * references, including unmapped reads - this could be very large.
       * </pre>
       *
       * <code>optional string reference_id = 2;</code>
       */
      public java.lang.String getReferenceId() {
        java.lang.Object ref = referenceId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          referenceId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The reference to query. Leaving blank returns results from all
       * references, including unmapped reads - this could be very large.
       * </pre>
       *
       * <code>optional string reference_id = 2;</code>
       */
      public com.google.protobuf.ByteString
          getReferenceIdBytes() {
        java.lang.Object ref = referenceId_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          referenceId_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The reference to query. Leaving blank returns results from all
       * references, including unmapped reads - this could be very large.
       * </pre>
       *
       * <code>optional string reference_id = 2;</code>
       */
      public Builder setReferenceId(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        referenceId_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The reference to query. Leaving blank returns results from all
       * references, including unmapped reads - this could be very large.
       * </pre>
       *
       * <code>optional string reference_id = 2;</code>
       */
      public Builder clearReferenceId() {
        
        referenceId_ = getDefaultInstance().getReferenceId();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The reference to query. Leaving blank returns results from all
       * references, including unmapped reads - this could be very large.
       * </pre>
       *
       * <code>optional string reference_id = 2;</code>
       */
      public Builder setReferenceIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        referenceId_ = value;
        onChanged();
        return this;
      }

      private long start_ ;
      /**
       * <pre>
       * The start position (0-based) of this query.
       * If a reference is specified, this defaults to 0.
       * Genomic positions are non-negative integers less than reference length.
       * Requests spanning the join of circular genomes are represented as
       * two requests one on each side of the join (position 0).
       * </pre>
       *
       * <code>optional int64 start = 3;</code>
       */
      public long getStart() {
        return start_;
      }
      /**
       * <pre>
       * The start position (0-based) of this query.
       * If a reference is specified, this defaults to 0.
       * Genomic positions are non-negative integers less than reference length.
       * Requests spanning the join of circular genomes are represented as
       * two requests one on each side of the join (position 0).
       * </pre>
       *
       * <code>optional int64 start = 3;</code>
       */
      public Builder setStart(long value) {
        
        start_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The start position (0-based) of this query.
       * If a reference is specified, this defaults to 0.
       * Genomic positions are non-negative integers less than reference length.
       * Requests spanning the join of circular genomes are represented as
       * two requests one on each side of the join (position 0).
       * </pre>
       *
       * <code>optional int64 start = 3;</code>
       */
      public Builder clearStart() {
        
        start_ = 0L;
        onChanged();
        return this;
      }

      private long end_ ;
      /**
       * <pre>
       * The end position (0-based, exclusive) of this query.
       * If a reference is specified, this defaults to the
       * reference's length.
       * </pre>
       *
       * <code>optional int64 end = 4;</code>
       */
      public long getEnd() {
        return end_;
      }
      /**
       * <pre>
       * The end position (0-based, exclusive) of this query.
       * If a reference is specified, this defaults to the
       * reference's length.
       * </pre>
       *
       * <code>optional int64 end = 4;</code>
       */
      public Builder setEnd(long value) {
        
        end_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The end position (0-based, exclusive) of this query.
       * If a reference is specified, this defaults to the
       * reference's length.
       * </pre>
       *
       * <code>optional int64 end = 4;</code>
       */
      public Builder clearEnd() {
        
        end_ = 0L;
        onChanged();
        return this;
      }

      private int pageSize_ ;
      /**
       * <pre>
       * Specifies the maximum number of results to return in a single page.
       * If unspecified, a system default will be used.
       * </pre>
       *
       * <code>optional int32 page_size = 5;</code>
       */
      public int getPageSize() {
        return pageSize_;
      }
      /**
       * <pre>
       * Specifies the maximum number of results to return in a single page.
       * If unspecified, a system default will be used.
       * </pre>
       *
       * <code>optional int32 page_size = 5;</code>
       */
      public Builder setPageSize(int value) {
        
        pageSize_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Specifies the maximum number of results to return in a single page.
       * If unspecified, a system default will be used.
       * </pre>
       *
       * <code>optional int32 page_size = 5;</code>
       */
      public Builder clearPageSize() {
        
        pageSize_ = 0;
        onChanged();
        return this;
      }

      private java.lang.Object pageToken_ = "";
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * To get the next page of results, set this parameter to the value of
       * `next_page_token` from the previous response.
       * </pre>
       *
       * <code>optional string page_token = 6;</code>
       */
      public java.lang.String getPageToken() {
        java.lang.Object ref = pageToken_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          pageToken_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * To get the next page of results, set this parameter to the value of
       * `next_page_token` from the previous response.
       * </pre>
       *
       * <code>optional string page_token = 6;</code>
       */
      public com.google.protobuf.ByteString
          getPageTokenBytes() {
        java.lang.Object ref = pageToken_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          pageToken_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * To get the next page of results, set this parameter to the value of
       * `next_page_token` from the previous response.
       * </pre>
       *
       * <code>optional string page_token = 6;</code>
       */
      public Builder setPageToken(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        pageToken_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * To get the next page of results, set this parameter to the value of
       * `next_page_token` from the previous response.
       * </pre>
       *
       * <code>optional string page_token = 6;</code>
       */
      public Builder clearPageToken() {
        
        pageToken_ = getDefaultInstance().getPageToken();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * To get the next page of results, set this parameter to the value of
       * `next_page_token` from the previous response.
       * </pre>
       *
       * <code>optional string page_token = 6;</code>
       */
      public Builder setPageTokenBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        pageToken_ = value;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }


      // @@protoc_insertion_point(builder_scope:ga4gh.SearchReadsRequest)
    }

    // @@protoc_insertion_point(class_scope:ga4gh.SearchReadsRequest)
    private static final ga4gh.ReadServiceOuterClass.SearchReadsRequest DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new ga4gh.ReadServiceOuterClass.SearchReadsRequest();
    }

    public static ga4gh.ReadServiceOuterClass.SearchReadsRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public ga4gh.ReadServiceOuterClass.SearchReadsRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface SearchReadsResponseOrBuilder extends
      // @@protoc_insertion_point(interface_extends:ga4gh.SearchReadsResponse)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The list of matching alignment messages, sorted by position.
     * Unmapped reads, which have no position, are returned last.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
     */
    java.util.List<ga4gh.Reads.ReadAlignment> 
        getAlignmentsList();
    /**
     * <pre>
     * The list of matching alignment messages, sorted by position.
     * Unmapped reads, which have no position, are returned last.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
     */
    ga4gh.Reads.ReadAlignment getAlignments(int index);
    /**
     * <pre>
     * The list of matching alignment messages, sorted by position.
     * Unmapped reads, which have no position, are returned last.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
     */
    int getAlignmentsCount();
    /**
     * <pre>
     * The list of matching alignment messages, sorted by position.
     * Unmapped reads, which have no position, are returned last.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
     */
    java.util.List<? extends ga4gh.Reads.ReadAlignmentOrBuilder> 
        getAlignmentsOrBuilderList();
    /**
     * <pre>
     * The list of matching alignment messages, sorted by position.
     * Unmapped reads, which have no position, are returned last.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
     */
    ga4gh.Reads.ReadAlignmentOrBuilder getAlignmentsOrBuilder(
        int index);

    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * Provide this value in a subsequent request to return the next page of
     * results. This field will be empty if there aren't any additional results.
     * </pre>
     *
     * <code>optional string next_page_token = 2;</code>
     */
    java.lang.String getNextPageToken();
    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * Provide this value in a subsequent request to return the next page of
     * results. This field will be empty if there aren't any additional results.
     * </pre>
     *
     * <code>optional string next_page_token = 2;</code>
     */
    com.google.protobuf.ByteString
        getNextPageTokenBytes();
  }
  /**
   * <pre>
   * This is the response from `POST /reads/search` expressed as JSON.
   * </pre>
   *
   * Protobuf type {@code ga4gh.SearchReadsResponse}
   */
  public  static final class SearchReadsResponse extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:ga4gh.SearchReadsResponse)
      SearchReadsResponseOrBuilder {
    // Use SearchReadsResponse.newBuilder() to construct.
    private SearchReadsResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
    }
    private SearchReadsResponse() {
      alignments_ = java.util.Collections.emptyList();
      nextPageToken_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private SearchReadsResponse(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                alignments_ = new java.util.ArrayList<ga4gh.Reads.ReadAlignment>();
                mutable_bitField0_ |= 0x00000001;
              }
              alignments_.add(input.readMessage(ga4gh.Reads.ReadAlignment.parser(), extensionRegistry));
              break;
            }
            case 18: {
              java.lang.String s = input.readStringRequireUtf8();

              nextPageToken_ = s;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
          alignments_ = java.util.Collections.unmodifiableList(alignments_);
        }
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadsResponse_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadsResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ga4gh.ReadServiceOuterClass.SearchReadsResponse.class, ga4gh.ReadServiceOuterClass.SearchReadsResponse.Builder.class);
    }

    private int bitField0_;
    public static final int ALIGNMENTS_FIELD_NUMBER = 1;
    private java.util.List<ga4gh.Reads.ReadAlignment> alignments_;
    /**
     * <pre>
     * The list of matching alignment messages, sorted by position.
     * Unmapped reads, which have no position, are returned last.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
     */
    public java.util.List<ga4gh.Reads.ReadAlignment> getAlignmentsList() {
      return alignments_;
    }
    /**
     * <pre>
     * The list of matching alignment messages, sorted by position.
     * Unmapped reads, which have no position, are returned last.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
     */
    public java.util.List<? extends ga4gh.Reads.ReadAlignmentOrBuilder> 
        getAlignmentsOrBuilderList() {
      return alignments_;
    }
    /**
     * <pre>
     * The list of matching alignment messages, sorted by position.
     * Unmapped reads, which have no position, are returned last.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
     */
    public int getAlignmentsCount() {
      return alignments_.size();
    }
    /**
     * <pre>
     * The list of matching alignment messages, sorted by position.
     * Unmapped reads, which have no position, are returned last.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
     */
    public ga4gh.Reads.ReadAlignment getAlignments(int index) {
      return alignments_.get(index);
    }
    /**
     * <pre>
     * The list of matching alignment messages, sorted by position.
     * Unmapped reads, which have no position, are returned last.
     * </pre>
     *
     * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
     */
    public ga4gh.Reads.ReadAlignmentOrBuilder getAlignmentsOrBuilder(
        int index) {
      return alignments_.get(index);
    }

    public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2;
    private volatile java.lang.Object nextPageToken_;
    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * Provide this value in a subsequent request to return the next page of
     * results. This field will be empty if there aren't any additional results.
     * </pre>
     *
     * <code>optional string next_page_token = 2;</code>
     */
    public java.lang.String getNextPageToken() {
      java.lang.Object ref = nextPageToken_;
      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();
        nextPageToken_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The continuation token, which is used to page through large result sets.
     * Provide this value in a subsequent request to return the next page of
     * results. This field will be empty if there aren't any additional results.
     * </pre>
     *
     * <code>optional string next_page_token = 2;</code>
     */
    public com.google.protobuf.ByteString
        getNextPageTokenBytes() {
      java.lang.Object ref = nextPageToken_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        nextPageToken_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      for (int i = 0; i < alignments_.size(); i++) {
        output.writeMessage(1, alignments_.get(i));
      }
      if (!getNextPageTokenBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      for (int i = 0; i < alignments_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, alignments_.get(i));
      }
      if (!getNextPageTokenBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    public static ga4gh.ReadServiceOuterClass.SearchReadsResponse parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsResponse parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsResponse parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsResponse parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsResponse parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsResponse parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsResponse parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsResponse parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsResponse parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.ReadServiceOuterClass.SearchReadsResponse parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(ga4gh.ReadServiceOuterClass.SearchReadsResponse prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * This is the response from `POST /reads/search` expressed as JSON.
     * </pre>
     *
     * Protobuf type {@code ga4gh.SearchReadsResponse}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:ga4gh.SearchReadsResponse)
        ga4gh.ReadServiceOuterClass.SearchReadsResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadsResponse_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadsResponse_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                ga4gh.ReadServiceOuterClass.SearchReadsResponse.class, ga4gh.ReadServiceOuterClass.SearchReadsResponse.Builder.class);
      }

      // Construct using ga4gh.ReadServiceOuterClass.SearchReadsResponse.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getAlignmentsFieldBuilder();
        }
      }
      public Builder clear() {
        super.clear();
        if (alignmentsBuilder_ == null) {
          alignments_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          alignmentsBuilder_.clear();
        }
        nextPageToken_ = "";

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return ga4gh.ReadServiceOuterClass.internal_static_ga4gh_SearchReadsResponse_descriptor;
      }

      public ga4gh.ReadServiceOuterClass.SearchReadsResponse getDefaultInstanceForType() {
        return ga4gh.ReadServiceOuterClass.SearchReadsResponse.getDefaultInstance();
      }

      public ga4gh.ReadServiceOuterClass.SearchReadsResponse build() {
        ga4gh.ReadServiceOuterClass.SearchReadsResponse result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public ga4gh.ReadServiceOuterClass.SearchReadsResponse buildPartial() {
        ga4gh.ReadServiceOuterClass.SearchReadsResponse result = new ga4gh.ReadServiceOuterClass.SearchReadsResponse(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (alignmentsBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001)) {
            alignments_ = java.util.Collections.unmodifiableList(alignments_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.alignments_ = alignments_;
        } else {
          result.alignments_ = alignmentsBuilder_.build();
        }
        result.nextPageToken_ = nextPageToken_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof ga4gh.ReadServiceOuterClass.SearchReadsResponse) {
          return mergeFrom((ga4gh.ReadServiceOuterClass.SearchReadsResponse)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(ga4gh.ReadServiceOuterClass.SearchReadsResponse other) {
        if (other == ga4gh.ReadServiceOuterClass.SearchReadsResponse.getDefaultInstance()) return this;
        if (alignmentsBuilder_ == null) {
          if (!other.alignments_.isEmpty()) {
            if (alignments_.isEmpty()) {
              alignments_ = other.alignments_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureAlignmentsIsMutable();
              alignments_.addAll(other.alignments_);
            }
            onChanged();
          }
        } else {
          if (!other.alignments_.isEmpty()) {
            if (alignmentsBuilder_.isEmpty()) {
              alignmentsBuilder_.dispose();
              alignmentsBuilder_ = null;
              alignments_ = other.alignments_;
              bitField0_ = (bitField0_ & ~0x00000001);
              alignmentsBuilder_ = 
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                   getAlignmentsFieldBuilder() : null;
            } else {
              alignmentsBuilder_.addAllMessages(other.alignments_);
            }
          }
        }
        if (!other.getNextPageToken().isEmpty()) {
          nextPageToken_ = other.nextPageToken_;
          onChanged();
        }
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        ga4gh.ReadServiceOuterClass.SearchReadsResponse parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (ga4gh.ReadServiceOuterClass.SearchReadsResponse) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.util.List<ga4gh.Reads.ReadAlignment> alignments_ =
        java.util.Collections.emptyList();
      private void ensureAlignmentsIsMutable() {
        if (!((bitField0_ & 0x00000001) == 0x00000001)) {
          alignments_ = new java.util.ArrayList<ga4gh.Reads.ReadAlignment>(alignments_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilder<
          ga4gh.Reads.ReadAlignment, ga4gh.Reads.ReadAlignment.Builder, ga4gh.Reads.ReadAlignmentOrBuilder> alignmentsBuilder_;

      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public java.util.List<ga4gh.Reads.ReadAlignment> getAlignmentsList() {
        if (alignmentsBuilder_ == null) {
          return java.util.Collections.unmodifiableList(alignments_);
        } else {
          return alignmentsBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public int getAlignmentsCount() {
        if (alignmentsBuilder_ == null) {
          return alignments_.size();
        } else {
          return alignmentsBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public ga4gh.Reads.ReadAlignment getAlignments(int index) {
        if (alignmentsBuilder_ == null) {
          return alignments_.get(index);
        } else {
          return alignmentsBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public Builder setAlignments(
          int index, ga4gh.Reads.ReadAlignment value) {
        if (alignmentsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureAlignmentsIsMutable();
          alignments_.set(index, value);
          onChanged();
        } else {
          alignmentsBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public Builder setAlignments(
          int index, ga4gh.Reads.ReadAlignment.Builder builderForValue) {
        if (alignmentsBuilder_ == null) {
          ensureAlignmentsIsMutable();
          alignments_.set(index, builderForValue.build());
          onChanged();
        } else {
          alignmentsBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public Builder addAlignments(ga4gh.Reads.ReadAlignment value) {
        if (alignmentsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureAlignmentsIsMutable();
          alignments_.add(value);
          onChanged();
        } else {
          alignmentsBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public Builder addAlignments(
          int index, ga4gh.Reads.ReadAlignment value) {
        if (alignmentsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureAlignmentsIsMutable();
          alignments_.add(index, value);
          onChanged();
        } else {
          alignmentsBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public Builder addAlignments(
          ga4gh.Reads.ReadAlignment.Builder builderForValue) {
        if (alignmentsBuilder_ == null) {
          ensureAlignmentsIsMutable();
          alignments_.add(builderForValue.build());
          onChanged();
        } else {
          alignmentsBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public Builder addAlignments(
          int index, ga4gh.Reads.ReadAlignment.Builder builderForValue) {
        if (alignmentsBuilder_ == null) {
          ensureAlignmentsIsMutable();
          alignments_.add(index, builderForValue.build());
          onChanged();
        } else {
          alignmentsBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public Builder addAllAlignments(
          java.lang.Iterable<? extends ga4gh.Reads.ReadAlignment> values) {
        if (alignmentsBuilder_ == null) {
          ensureAlignmentsIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, alignments_);
          onChanged();
        } else {
          alignmentsBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public Builder clearAlignments() {
        if (alignmentsBuilder_ == null) {
          alignments_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          alignmentsBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public Builder removeAlignments(int index) {
        if (alignmentsBuilder_ == null) {
          ensureAlignmentsIsMutable();
          alignments_.remove(index);
          onChanged();
        } else {
          alignmentsBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public ga4gh.Reads.ReadAlignment.Builder getAlignmentsBuilder(
          int index) {
        return getAlignmentsFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public ga4gh.Reads.ReadAlignmentOrBuilder getAlignmentsOrBuilder(
          int index) {
        if (alignmentsBuilder_ == null) {
          return alignments_.get(index);  } else {
          return alignmentsBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public java.util.List<? extends ga4gh.Reads.ReadAlignmentOrBuilder> 
           getAlignmentsOrBuilderList() {
        if (alignmentsBuilder_ != null) {
          return alignmentsBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(alignments_);
        }
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public ga4gh.Reads.ReadAlignment.Builder addAlignmentsBuilder() {
        return getAlignmentsFieldBuilder().addBuilder(
            ga4gh.Reads.ReadAlignment.getDefaultInstance());
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public ga4gh.Reads.ReadAlignment.Builder addAlignmentsBuilder(
          int index) {
        return getAlignmentsFieldBuilder().addBuilder(
            index, ga4gh.Reads.ReadAlignment.getDefaultInstance());
      }
      /**
       * <pre>
       * The list of matching alignment messages, sorted by position.
       * Unmapped reads, which have no position, are returned last.
       * </pre>
       *
       * <code>repeated .ga4gh.ReadAlignment alignments = 1;</code>
       */
      public java.util.List<ga4gh.Reads.ReadAlignment.Builder> 
           getAlignmentsBuilderList() {
        return getAlignmentsFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilder<
          ga4gh.Reads.ReadAlignment, ga4gh.Reads.ReadAlignment.Builder, ga4gh.Reads.ReadAlignmentOrBuilder> 
          getAlignmentsFieldBuilder() {
        if (alignmentsBuilder_ == null) {
          alignmentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
              ga4gh.Reads.ReadAlignment, ga4gh.Reads.ReadAlignment.Builder, ga4gh.Reads.ReadAlignmentOrBuilder>(
                  alignments_,
                  ((bitField0_ & 0x00000001) == 0x00000001),
                  getParentForChildren(),
                  isClean());
          alignments_ = null;
        }
        return alignmentsBuilder_;
      }

      private java.lang.Object nextPageToken_ = "";
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * Provide this value in a subsequent request to return the next page of
       * results. This field will be empty if there aren't any additional results.
       * </pre>
       *
       * <code>optional string next_page_token = 2;</code>
       */
      public java.lang.String getNextPageToken() {
        java.lang.Object ref = nextPageToken_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          nextPageToken_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * Provide this value in a subsequent request to return the next page of
       * results. This field will be empty if there aren't any additional results.
       * </pre>
       *
       * <code>optional string next_page_token = 2;</code>
       */
      public com.google.protobuf.ByteString
          getNextPageTokenBytes() {
        java.lang.Object ref = nextPageToken_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          nextPageToken_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * Provide this value in a subsequent request to return the next page of
       * results. This field will be empty if there aren't any additional results.
       * </pre>
       *
       * <code>optional string next_page_token = 2;</code>
       */
      public Builder setNextPageToken(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        nextPageToken_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * Provide this value in a subsequent request to return the next page of
       * results. This field will be empty if there aren't any additional results.
       * </pre>
       *
       * <code>optional string next_page_token = 2;</code>
       */
      public Builder clearNextPageToken() {
        
        nextPageToken_ = getDefaultInstance().getNextPageToken();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The continuation token, which is used to page through large result sets.
       * Provide this value in a subsequent request to return the next page of
       * results. This field will be empty if there aren't any additional results.
       * </pre>
       *
       * <code>optional string next_page_token = 2;</code>
       */
      public Builder setNextPageTokenBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        nextPageToken_ = value;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }


      // @@protoc_insertion_point(builder_scope:ga4gh.SearchReadsResponse)
    }

    // @@protoc_insertion_point(class_scope:ga4gh.SearchReadsResponse)
    private static final ga4gh.ReadServiceOuterClass.SearchReadsResponse DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new ga4gh.ReadServiceOuterClass.SearchReadsResponse();
    }

    public static ga4gh.ReadServiceOuterClass.SearchReadsResponse getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public ga4gh.ReadServiceOuterClass.SearchReadsResponse getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_ga4gh_SearchReadGroupSetsRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ga4gh_SearchReadGroupSetsRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_ga4gh_SearchReadGroupSetsResponse_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ga4gh_SearchReadGroupSetsResponse_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_ga4gh_GetReadGroupSetRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ga4gh_GetReadGroupSetRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_ga4gh_SearchReadsRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ga4gh_SearchReadsRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_ga4gh_SearchReadsResponse_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ga4gh_SearchReadsResponse_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\030ga4gh/read_service.proto\022\005ga4gh\032\021ga4gh" +
      "/reads.proto\"e\n\032SearchReadGroupSetsReque" +
      "st\022\022\n\ndataset_id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\021\n\t" +
      "page_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"d\n\033S" +
      "earchReadGroupSetsResponse\022,\n\017read_group" +
      "_sets\030\001 \003(\0132\023.ga4gh.ReadGroupSet\022\027\n\017next" +
      "_page_token\030\002 \001(\t\"3\n\026GetReadGroupSetRequ" +
      "est\022\031\n\021read_group_set_id\030\001 \001(\t\"\205\001\n\022Searc" +
      "hReadsRequest\022\026\n\016read_group_ids\030\001 \003(\t\022\024\n" +
      "\014reference_id\030\002 \001(\t\022\r\n\005start\030\003 \001(\003\022\013\n\003en",
      "d\030\004 \001(\003\022\021\n\tpage_size\030\005 \001(\005\022\022\n\npage_token" +
      "\030\006 \001(\t\"X\n\023SearchReadsResponse\022(\n\nalignme" +
      "nts\030\001 \003(\0132\024.ga4gh.ReadAlignment\022\027\n\017next_" +
      "page_token\030\002 \001(\t2\370\001\n\013ReadService\022\\\n\023Sear" +
      "chReadGroupSets\022!.ga4gh.SearchReadGroupS" +
      "etsRequest\032\".ga4gh.SearchReadGroupSetsRe" +
      "sponse\022E\n\017GetReadGroupSet\022\035.ga4gh.GetRea" +
      "dGroupSetRequest\032\023.ga4gh.ReadGroupSet\022D\n" +
      "\013SearchReads\022\031.ga4gh.SearchReadsRequest\032" +
      "\032.ga4gh.SearchReadsResponseb\006proto3"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
          public com.google.protobuf.ExtensionRegistry assignDescriptors(
              com.google.protobuf.Descriptors.FileDescriptor root) {
            descriptor = root;
            return null;
          }
        };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          ga4gh.Reads.getDescriptor(),
        }, assigner);
    internal_static_ga4gh_SearchReadGroupSetsRequest_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_ga4gh_SearchReadGroupSetsRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_ga4gh_SearchReadGroupSetsRequest_descriptor,
        new java.lang.String[] { "DatasetId", "Name", "PageSize", "PageToken", });
    internal_static_ga4gh_SearchReadGroupSetsResponse_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_ga4gh_SearchReadGroupSetsResponse_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_ga4gh_SearchReadGroupSetsResponse_descriptor,
        new java.lang.String[] { "ReadGroupSets", "NextPageToken", });
    internal_static_ga4gh_GetReadGroupSetRequest_descriptor =
      getDescriptor().getMessageTypes().get(2);
    internal_static_ga4gh_GetReadGroupSetRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_ga4gh_GetReadGroupSetRequest_descriptor,
        new java.lang.String[] { "ReadGroupSetId", });
    internal_static_ga4gh_SearchReadsRequest_descriptor =
      getDescriptor().getMessageTypes().get(3);
    internal_static_ga4gh_SearchReadsRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_ga4gh_SearchReadsRequest_descriptor,
        new java.lang.String[] { "ReadGroupIds", "ReferenceId", "Start", "End", "PageSize", "PageToken", });
    internal_static_ga4gh_SearchReadsResponse_descriptor =
      getDescriptor().getMessageTypes().get(4);
    internal_static_ga4gh_SearchReadsResponse_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_ga4gh_SearchReadsResponse_descriptor,
        new java.lang.String[] { "Alignments", "NextPageToken", });
    ga4gh.Reads.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
