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

package ga4gh;

public final class SequenceAnnotationServiceOuterClass {
  private SequenceAnnotationServiceOuterClass() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface SearchFeatureSetsRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:ga4gh.SearchFeatureSetsRequest)
      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>
     * 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 = 2;</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 = 3;</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 = 3;</code>
     */
    com.google.protobuf.ByteString
        getPageTokenBytes();
  }
  /**
   * <pre>
   ** This request maps to the body of `POST /featuresets/search` as JSON. 
   * </pre>
   *
   * Protobuf type {@code ga4gh.SearchFeatureSetsRequest}
   */
  public  static final class SearchFeatureSetsRequest extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:ga4gh.SearchFeatureSetsRequest)
      SearchFeatureSetsRequestOrBuilder {
    // Use SearchFeatureSetsRequest.newBuilder() to construct.
    private SearchFeatureSetsRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
    }
    private SearchFeatureSetsRequest() {
      datasetId_ = "";
      pageSize_ = 0;
      pageToken_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private SearchFeatureSetsRequest(
        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 16: {

              pageSize_ = input.readInt32();
              break;
            }
            case 26: {
              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.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeatureSetsRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeatureSetsRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest.class, ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest.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 PAGE_SIZE_FIELD_NUMBER = 2;
    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 = 2;</code>
     */
    public int getPageSize() {
      return pageSize_;
    }

    public static final int PAGE_TOKEN_FIELD_NUMBER = 3;
    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 = 3;</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 = 3;</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 (pageSize_ != 0) {
        output.writeInt32(2, pageSize_);
      }
      if (!getPageTokenBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 3, 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 (pageSize_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(2, pageSize_);
      }
      if (!getPageTokenBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest 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.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest 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.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest 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.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest 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 /featuresets/search` as JSON. 
     * </pre>
     *
     * Protobuf type {@code ga4gh.SearchFeatureSetsRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:ga4gh.SearchFeatureSetsRequest)
        ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeatureSetsRequest_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeatureSetsRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest.class, ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest.Builder.class);
      }

      // Construct using ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest.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_ = "";

        pageSize_ = 0;

        pageToken_ = "";

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeatureSetsRequest_descriptor;
      }

      public ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest getDefaultInstanceForType() {
        return ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest.getDefaultInstance();
      }

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

      public ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest buildPartial() {
        ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest result = new ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest(this);
        result.datasetId_ = datasetId_;
        result.pageSize_ = pageSize_;
        result.pageToken_ = pageToken_;
        onBuilt();
        return result;
      }

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

      public Builder mergeFrom(ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest other) {
        if (other == ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest.getDefaultInstance()) return this;
        if (!other.getDatasetId().isEmpty()) {
          datasetId_ = other.datasetId_;
          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.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest) 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 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 = 2;</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 = 2;</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 = 2;</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 = 3;</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 = 3;</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 = 3;</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 = 3;</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 = 3;</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.SearchFeatureSetsRequest)
    }

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

    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

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

    /**
     * <pre>
     * The list of matching feature sets.
     * </pre>
     *
     * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
     */
    java.util.List<ga4gh.SequenceAnnotations.FeatureSet> 
        getFeatureSetsList();
    /**
     * <pre>
     * The list of matching feature sets.
     * </pre>
     *
     * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
     */
    ga4gh.SequenceAnnotations.FeatureSet getFeatureSets(int index);
    /**
     * <pre>
     * The list of matching feature sets.
     * </pre>
     *
     * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
     */
    int getFeatureSetsCount();
    /**
     * <pre>
     * The list of matching feature sets.
     * </pre>
     *
     * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
     */
    java.util.List<? extends ga4gh.SequenceAnnotations.FeatureSetOrBuilder> 
        getFeatureSetsOrBuilderList();
    /**
     * <pre>
     * The list of matching feature sets.
     * </pre>
     *
     * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
     */
    ga4gh.SequenceAnnotations.FeatureSetOrBuilder getFeatureSetsOrBuilder(
        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 /featuresets/search` expressed as JSON.
   * </pre>
   *
   * Protobuf type {@code ga4gh.SearchFeatureSetsResponse}
   */
  public  static final class SearchFeatureSetsResponse extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:ga4gh.SearchFeatureSetsResponse)
      SearchFeatureSetsResponseOrBuilder {
    // Use SearchFeatureSetsResponse.newBuilder() to construct.
    private SearchFeatureSetsResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
    }
    private SearchFeatureSetsResponse() {
      featureSets_ = java.util.Collections.emptyList();
      nextPageToken_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private SearchFeatureSetsResponse(
        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)) {
                featureSets_ = new java.util.ArrayList<ga4gh.SequenceAnnotations.FeatureSet>();
                mutable_bitField0_ |= 0x00000001;
              }
              featureSets_.add(input.readMessage(ga4gh.SequenceAnnotations.FeatureSet.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)) {
          featureSets_ = java.util.Collections.unmodifiableList(featureSets_);
        }
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeatureSetsResponse_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeatureSetsResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse.class, ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse.Builder.class);
    }

    private int bitField0_;
    public static final int FEATURE_SETS_FIELD_NUMBER = 1;
    private java.util.List<ga4gh.SequenceAnnotations.FeatureSet> featureSets_;
    /**
     * <pre>
     * The list of matching feature sets.
     * </pre>
     *
     * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
     */
    public java.util.List<ga4gh.SequenceAnnotations.FeatureSet> getFeatureSetsList() {
      return featureSets_;
    }
    /**
     * <pre>
     * The list of matching feature sets.
     * </pre>
     *
     * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
     */
    public java.util.List<? extends ga4gh.SequenceAnnotations.FeatureSetOrBuilder> 
        getFeatureSetsOrBuilderList() {
      return featureSets_;
    }
    /**
     * <pre>
     * The list of matching feature sets.
     * </pre>
     *
     * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
     */
    public int getFeatureSetsCount() {
      return featureSets_.size();
    }
    /**
     * <pre>
     * The list of matching feature sets.
     * </pre>
     *
     * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
     */
    public ga4gh.SequenceAnnotations.FeatureSet getFeatureSets(int index) {
      return featureSets_.get(index);
    }
    /**
     * <pre>
     * The list of matching feature sets.
     * </pre>
     *
     * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
     */
    public ga4gh.SequenceAnnotations.FeatureSetOrBuilder getFeatureSetsOrBuilder(
        int index) {
      return featureSets_.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 < featureSets_.size(); i++) {
        output.writeMessage(1, featureSets_.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 < featureSets_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, featureSets_.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.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse 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.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse 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.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse 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.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse 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 /featuresets/search` expressed as JSON.
     * </pre>
     *
     * Protobuf type {@code ga4gh.SearchFeatureSetsResponse}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:ga4gh.SearchFeatureSetsResponse)
        ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeatureSetsResponse_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeatureSetsResponse_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse.class, ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse.Builder.class);
      }

      // Construct using ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

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

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeatureSetsResponse_descriptor;
      }

      public ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse getDefaultInstanceForType() {
        return ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse.getDefaultInstance();
      }

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

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

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

      public Builder mergeFrom(ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse other) {
        if (other == ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse.getDefaultInstance()) return this;
        if (featureSetsBuilder_ == null) {
          if (!other.featureSets_.isEmpty()) {
            if (featureSets_.isEmpty()) {
              featureSets_ = other.featureSets_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureFeatureSetsIsMutable();
              featureSets_.addAll(other.featureSets_);
            }
            onChanged();
          }
        } else {
          if (!other.featureSets_.isEmpty()) {
            if (featureSetsBuilder_.isEmpty()) {
              featureSetsBuilder_.dispose();
              featureSetsBuilder_ = null;
              featureSets_ = other.featureSets_;
              bitField0_ = (bitField0_ & ~0x00000001);
              featureSetsBuilder_ = 
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                   getFeatureSetsFieldBuilder() : null;
            } else {
              featureSetsBuilder_.addAllMessages(other.featureSets_);
            }
          }
        }
        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.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.util.List<ga4gh.SequenceAnnotations.FeatureSet> featureSets_ =
        java.util.Collections.emptyList();
      private void ensureFeatureSetsIsMutable() {
        if (!((bitField0_ & 0x00000001) == 0x00000001)) {
          featureSets_ = new java.util.ArrayList<ga4gh.SequenceAnnotations.FeatureSet>(featureSets_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilder<
          ga4gh.SequenceAnnotations.FeatureSet, ga4gh.SequenceAnnotations.FeatureSet.Builder, ga4gh.SequenceAnnotations.FeatureSetOrBuilder> featureSetsBuilder_;

      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public java.util.List<ga4gh.SequenceAnnotations.FeatureSet> getFeatureSetsList() {
        if (featureSetsBuilder_ == null) {
          return java.util.Collections.unmodifiableList(featureSets_);
        } else {
          return featureSetsBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public int getFeatureSetsCount() {
        if (featureSetsBuilder_ == null) {
          return featureSets_.size();
        } else {
          return featureSetsBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public ga4gh.SequenceAnnotations.FeatureSet getFeatureSets(int index) {
        if (featureSetsBuilder_ == null) {
          return featureSets_.get(index);
        } else {
          return featureSetsBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public Builder setFeatureSets(
          int index, ga4gh.SequenceAnnotations.FeatureSet value) {
        if (featureSetsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureFeatureSetsIsMutable();
          featureSets_.set(index, value);
          onChanged();
        } else {
          featureSetsBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public Builder setFeatureSets(
          int index, ga4gh.SequenceAnnotations.FeatureSet.Builder builderForValue) {
        if (featureSetsBuilder_ == null) {
          ensureFeatureSetsIsMutable();
          featureSets_.set(index, builderForValue.build());
          onChanged();
        } else {
          featureSetsBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public Builder addFeatureSets(ga4gh.SequenceAnnotations.FeatureSet value) {
        if (featureSetsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureFeatureSetsIsMutable();
          featureSets_.add(value);
          onChanged();
        } else {
          featureSetsBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public Builder addFeatureSets(
          int index, ga4gh.SequenceAnnotations.FeatureSet value) {
        if (featureSetsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureFeatureSetsIsMutable();
          featureSets_.add(index, value);
          onChanged();
        } else {
          featureSetsBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public Builder addFeatureSets(
          ga4gh.SequenceAnnotations.FeatureSet.Builder builderForValue) {
        if (featureSetsBuilder_ == null) {
          ensureFeatureSetsIsMutable();
          featureSets_.add(builderForValue.build());
          onChanged();
        } else {
          featureSetsBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public Builder addFeatureSets(
          int index, ga4gh.SequenceAnnotations.FeatureSet.Builder builderForValue) {
        if (featureSetsBuilder_ == null) {
          ensureFeatureSetsIsMutable();
          featureSets_.add(index, builderForValue.build());
          onChanged();
        } else {
          featureSetsBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public Builder addAllFeatureSets(
          java.lang.Iterable<? extends ga4gh.SequenceAnnotations.FeatureSet> values) {
        if (featureSetsBuilder_ == null) {
          ensureFeatureSetsIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, featureSets_);
          onChanged();
        } else {
          featureSetsBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public Builder clearFeatureSets() {
        if (featureSetsBuilder_ == null) {
          featureSets_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          featureSetsBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public Builder removeFeatureSets(int index) {
        if (featureSetsBuilder_ == null) {
          ensureFeatureSetsIsMutable();
          featureSets_.remove(index);
          onChanged();
        } else {
          featureSetsBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public ga4gh.SequenceAnnotations.FeatureSet.Builder getFeatureSetsBuilder(
          int index) {
        return getFeatureSetsFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public ga4gh.SequenceAnnotations.FeatureSetOrBuilder getFeatureSetsOrBuilder(
          int index) {
        if (featureSetsBuilder_ == null) {
          return featureSets_.get(index);  } else {
          return featureSetsBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public java.util.List<? extends ga4gh.SequenceAnnotations.FeatureSetOrBuilder> 
           getFeatureSetsOrBuilderList() {
        if (featureSetsBuilder_ != null) {
          return featureSetsBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(featureSets_);
        }
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public ga4gh.SequenceAnnotations.FeatureSet.Builder addFeatureSetsBuilder() {
        return getFeatureSetsFieldBuilder().addBuilder(
            ga4gh.SequenceAnnotations.FeatureSet.getDefaultInstance());
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public ga4gh.SequenceAnnotations.FeatureSet.Builder addFeatureSetsBuilder(
          int index) {
        return getFeatureSetsFieldBuilder().addBuilder(
            index, ga4gh.SequenceAnnotations.FeatureSet.getDefaultInstance());
      }
      /**
       * <pre>
       * The list of matching feature sets.
       * </pre>
       *
       * <code>repeated .ga4gh.FeatureSet feature_sets = 1;</code>
       */
      public java.util.List<ga4gh.SequenceAnnotations.FeatureSet.Builder> 
           getFeatureSetsBuilderList() {
        return getFeatureSetsFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilder<
          ga4gh.SequenceAnnotations.FeatureSet, ga4gh.SequenceAnnotations.FeatureSet.Builder, ga4gh.SequenceAnnotations.FeatureSetOrBuilder> 
          getFeatureSetsFieldBuilder() {
        if (featureSetsBuilder_ == null) {
          featureSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
              ga4gh.SequenceAnnotations.FeatureSet, ga4gh.SequenceAnnotations.FeatureSet.Builder, ga4gh.SequenceAnnotations.FeatureSetOrBuilder>(
                  featureSets_,
                  ((bitField0_ & 0x00000001) == 0x00000001),
                  getParentForChildren(),
                  isClean());
          featureSets_ = null;
        }
        return featureSetsBuilder_;
      }

      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.SearchFeatureSetsResponse)
    }

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

    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

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

    /**
     * <pre>
     * The ID of the `FeatureSet` to be retrieved.
     * </pre>
     *
     * <code>optional string feature_set_id = 1;</code>
     */
    java.lang.String getFeatureSetId();
    /**
     * <pre>
     * The ID of the `FeatureSet` to be retrieved.
     * </pre>
     *
     * <code>optional string feature_set_id = 1;</code>
     */
    com.google.protobuf.ByteString
        getFeatureSetIdBytes();
  }
  /**
   * <pre>
   * This request maps to the URL `GET /featuresets/{id}`.
   * </pre>
   *
   * Protobuf type {@code ga4gh.GetFeatureSetRequest}
   */
  public  static final class GetFeatureSetRequest extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:ga4gh.GetFeatureSetRequest)
      GetFeatureSetRequestOrBuilder {
    // Use GetFeatureSetRequest.newBuilder() to construct.
    private GetFeatureSetRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
    }
    private GetFeatureSetRequest() {
      featureSetId_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private GetFeatureSetRequest(
        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();

              featureSetId_ = 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.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_GetFeatureSetRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_GetFeatureSetRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest.class, ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest.Builder.class);
    }

    public static final int FEATURE_SET_ID_FIELD_NUMBER = 1;
    private volatile java.lang.Object featureSetId_;
    /**
     * <pre>
     * The ID of the `FeatureSet` to be retrieved.
     * </pre>
     *
     * <code>optional string feature_set_id = 1;</code>
     */
    public java.lang.String getFeatureSetId() {
      java.lang.Object ref = featureSetId_;
      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();
        featureSetId_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The ID of the `FeatureSet` to be retrieved.
     * </pre>
     *
     * <code>optional string feature_set_id = 1;</code>
     */
    public com.google.protobuf.ByteString
        getFeatureSetIdBytes() {
      java.lang.Object ref = featureSetId_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        featureSetId_ = 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 (!getFeatureSetIdBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 1, featureSetId_);
      }
    }

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

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

    private static final long serialVersionUID = 0L;
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest 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.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest 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.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest 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.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest 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 /featuresets/{id}`.
     * </pre>
     *
     * Protobuf type {@code ga4gh.GetFeatureSetRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:ga4gh.GetFeatureSetRequest)
        ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_GetFeatureSetRequest_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_GetFeatureSetRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest.class, ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest.Builder.class);
      }

      // Construct using ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest.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();
        featureSetId_ = "";

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_GetFeatureSetRequest_descriptor;
      }

      public ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest getDefaultInstanceForType() {
        return ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest.getDefaultInstance();
      }

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

      public ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest buildPartial() {
        ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest result = new ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest(this);
        result.featureSetId_ = featureSetId_;
        onBuilt();
        return result;
      }

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

      public Builder mergeFrom(ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest other) {
        if (other == ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest.getDefaultInstance()) return this;
        if (!other.getFeatureSetId().isEmpty()) {
          featureSetId_ = other.featureSetId_;
          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.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object featureSetId_ = "";
      /**
       * <pre>
       * The ID of the `FeatureSet` to be retrieved.
       * </pre>
       *
       * <code>optional string feature_set_id = 1;</code>
       */
      public java.lang.String getFeatureSetId() {
        java.lang.Object ref = featureSetId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          featureSetId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The ID of the `FeatureSet` to be retrieved.
       * </pre>
       *
       * <code>optional string feature_set_id = 1;</code>
       */
      public com.google.protobuf.ByteString
          getFeatureSetIdBytes() {
        java.lang.Object ref = featureSetId_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          featureSetId_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The ID of the `FeatureSet` to be retrieved.
       * </pre>
       *
       * <code>optional string feature_set_id = 1;</code>
       */
      public Builder setFeatureSetId(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        featureSetId_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The ID of the `FeatureSet` to be retrieved.
       * </pre>
       *
       * <code>optional string feature_set_id = 1;</code>
       */
      public Builder clearFeatureSetId() {
        
        featureSetId_ = getDefaultInstance().getFeatureSetId();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The ID of the `FeatureSet` to be retrieved.
       * </pre>
       *
       * <code>optional string feature_set_id = 1;</code>
       */
      public Builder setFeatureSetIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        featureSetId_ = 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.GetFeatureSetRequest)
    }

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

    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureSetRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

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

    /**
     * <pre>
     * The annotation set to search within. Either `feature_set_id` or
     * `parent_id` must be non-empty.
     * </pre>
     *
     * <code>optional string feature_set_id = 1;</code>
     */
    java.lang.String getFeatureSetId();
    /**
     * <pre>
     * The annotation set to search within. Either `feature_set_id` or
     * `parent_id` must be non-empty.
     * </pre>
     *
     * <code>optional string feature_set_id = 1;</code>
     */
    com.google.protobuf.ByteString
        getFeatureSetIdBytes();

    /**
     * <pre>
     * Restricts the search to direct children of the given parent `feature`
     * ID. Either `feature_set_id` or `parent_id` must be non-empty.
     * </pre>
     *
     * <code>optional string parent_id = 2;</code>
     */
    java.lang.String getParentId();
    /**
     * <pre>
     * Restricts the search to direct children of the given parent `feature`
     * ID. Either `feature_set_id` or `parent_id` must be non-empty.
     * </pre>
     *
     * <code>optional string parent_id = 2;</code>
     */
    com.google.protobuf.ByteString
        getParentIdBytes();

    /**
     * <pre>
     * Only return features on the reference with this name
     * (matched to literal reference name as imported from the GFF3).
     * </pre>
     *
     * <code>optional string reference_name = 3;</code>
     */
    java.lang.String getReferenceName();
    /**
     * <pre>
     * Only return features on the reference with this name
     * (matched to literal reference name as imported from the GFF3).
     * </pre>
     *
     * <code>optional string reference_name = 3;</code>
     */
    com.google.protobuf.ByteString
        getReferenceNameBytes();

    /**
     * <pre>
     * Required. The beginning of the window (0-based, inclusive) for which
     * overlapping features should be returned.  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 = 4;</code>
     */
    long getStart();

    /**
     * <pre>
     * Required. The end of the window (0-based, exclusive) for which overlapping
     * features should be returned.
     * </pre>
     *
     * <code>optional int64 end = 5;</code>
     */
    long getEnd();

    /**
     * <pre>
     * If specified, this query matches only annotations whose `feature_type`
     * matches one of the provided ontology terms.
     * </pre>
     *
     * <code>repeated string feature_types = 6;</code>
     */
    com.google.protobuf.ProtocolStringList
        getFeatureTypesList();
    /**
     * <pre>
     * If specified, this query matches only annotations whose `feature_type`
     * matches one of the provided ontology terms.
     * </pre>
     *
     * <code>repeated string feature_types = 6;</code>
     */
    int getFeatureTypesCount();
    /**
     * <pre>
     * If specified, this query matches only annotations whose `feature_type`
     * matches one of the provided ontology terms.
     * </pre>
     *
     * <code>repeated string feature_types = 6;</code>
     */
    java.lang.String getFeatureTypes(int index);
    /**
     * <pre>
     * If specified, this query matches only annotations whose `feature_type`
     * matches one of the provided ontology terms.
     * </pre>
     *
     * <code>repeated string feature_types = 6;</code>
     */
    com.google.protobuf.ByteString
        getFeatureTypesBytes(int index);

    /**
     * <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 = 7;</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 = 8;</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 = 8;</code>
     */
    com.google.protobuf.ByteString
        getPageTokenBytes();
  }
  /**
   * <pre>
   * This request maps to the body of `POST /features/search` as JSON.
   * </pre>
   *
   * Protobuf type {@code ga4gh.SearchFeaturesRequest}
   */
  public  static final class SearchFeaturesRequest extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:ga4gh.SearchFeaturesRequest)
      SearchFeaturesRequestOrBuilder {
    // Use SearchFeaturesRequest.newBuilder() to construct.
    private SearchFeaturesRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
    }
    private SearchFeaturesRequest() {
      featureSetId_ = "";
      parentId_ = "";
      referenceName_ = "";
      start_ = 0L;
      end_ = 0L;
      featureTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      pageSize_ = 0;
      pageToken_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private SearchFeaturesRequest(
        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();

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

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

              referenceName_ = s;
              break;
            }
            case 32: {

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

              end_ = input.readInt64();
              break;
            }
            case 50: {
              java.lang.String s = input.readStringRequireUtf8();
              if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
                featureTypes_ = new com.google.protobuf.LazyStringArrayList();
                mutable_bitField0_ |= 0x00000020;
              }
              featureTypes_.add(s);
              break;
            }
            case 56: {

              pageSize_ = input.readInt32();
              break;
            }
            case 66: {
              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_ & 0x00000020) == 0x00000020)) {
          featureTypes_ = featureTypes_.getUnmodifiableView();
        }
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeaturesRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeaturesRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest.class, ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest.Builder.class);
    }

    private int bitField0_;
    public static final int FEATURE_SET_ID_FIELD_NUMBER = 1;
    private volatile java.lang.Object featureSetId_;
    /**
     * <pre>
     * The annotation set to search within. Either `feature_set_id` or
     * `parent_id` must be non-empty.
     * </pre>
     *
     * <code>optional string feature_set_id = 1;</code>
     */
    public java.lang.String getFeatureSetId() {
      java.lang.Object ref = featureSetId_;
      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();
        featureSetId_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The annotation set to search within. Either `feature_set_id` or
     * `parent_id` must be non-empty.
     * </pre>
     *
     * <code>optional string feature_set_id = 1;</code>
     */
    public com.google.protobuf.ByteString
        getFeatureSetIdBytes() {
      java.lang.Object ref = featureSetId_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        featureSetId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int PARENT_ID_FIELD_NUMBER = 2;
    private volatile java.lang.Object parentId_;
    /**
     * <pre>
     * Restricts the search to direct children of the given parent `feature`
     * ID. Either `feature_set_id` or `parent_id` must be non-empty.
     * </pre>
     *
     * <code>optional string parent_id = 2;</code>
     */
    public java.lang.String getParentId() {
      java.lang.Object ref = parentId_;
      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();
        parentId_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * Restricts the search to direct children of the given parent `feature`
     * ID. Either `feature_set_id` or `parent_id` must be non-empty.
     * </pre>
     *
     * <code>optional string parent_id = 2;</code>
     */
    public com.google.protobuf.ByteString
        getParentIdBytes() {
      java.lang.Object ref = parentId_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        parentId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int REFERENCE_NAME_FIELD_NUMBER = 3;
    private volatile java.lang.Object referenceName_;
    /**
     * <pre>
     * Only return features on the reference with this name
     * (matched to literal reference name as imported from the GFF3).
     * </pre>
     *
     * <code>optional string reference_name = 3;</code>
     */
    public java.lang.String getReferenceName() {
      java.lang.Object ref = referenceName_;
      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();
        referenceName_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * Only return features on the reference with this name
     * (matched to literal reference name as imported from the GFF3).
     * </pre>
     *
     * <code>optional string reference_name = 3;</code>
     */
    public com.google.protobuf.ByteString
        getReferenceNameBytes() {
      java.lang.Object ref = referenceName_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        referenceName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int START_FIELD_NUMBER = 4;
    private long start_;
    /**
     * <pre>
     * Required. The beginning of the window (0-based, inclusive) for which
     * overlapping features should be returned.  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 = 4;</code>
     */
    public long getStart() {
      return start_;
    }

    public static final int END_FIELD_NUMBER = 5;
    private long end_;
    /**
     * <pre>
     * Required. The end of the window (0-based, exclusive) for which overlapping
     * features should be returned.
     * </pre>
     *
     * <code>optional int64 end = 5;</code>
     */
    public long getEnd() {
      return end_;
    }

    public static final int FEATURE_TYPES_FIELD_NUMBER = 6;
    private com.google.protobuf.LazyStringList featureTypes_;
    /**
     * <pre>
     * If specified, this query matches only annotations whose `feature_type`
     * matches one of the provided ontology terms.
     * </pre>
     *
     * <code>repeated string feature_types = 6;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getFeatureTypesList() {
      return featureTypes_;
    }
    /**
     * <pre>
     * If specified, this query matches only annotations whose `feature_type`
     * matches one of the provided ontology terms.
     * </pre>
     *
     * <code>repeated string feature_types = 6;</code>
     */
    public int getFeatureTypesCount() {
      return featureTypes_.size();
    }
    /**
     * <pre>
     * If specified, this query matches only annotations whose `feature_type`
     * matches one of the provided ontology terms.
     * </pre>
     *
     * <code>repeated string feature_types = 6;</code>
     */
    public java.lang.String getFeatureTypes(int index) {
      return featureTypes_.get(index);
    }
    /**
     * <pre>
     * If specified, this query matches only annotations whose `feature_type`
     * matches one of the provided ontology terms.
     * </pre>
     *
     * <code>repeated string feature_types = 6;</code>
     */
    public com.google.protobuf.ByteString
        getFeatureTypesBytes(int index) {
      return featureTypes_.getByteString(index);
    }

    public static final int PAGE_SIZE_FIELD_NUMBER = 7;
    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 = 7;</code>
     */
    public int getPageSize() {
      return pageSize_;
    }

    public static final int PAGE_TOKEN_FIELD_NUMBER = 8;
    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 = 8;</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 = 8;</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 (!getFeatureSetIdBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 1, featureSetId_);
      }
      if (!getParentIdBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 2, parentId_);
      }
      if (!getReferenceNameBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 3, referenceName_);
      }
      if (start_ != 0L) {
        output.writeInt64(4, start_);
      }
      if (end_ != 0L) {
        output.writeInt64(5, end_);
      }
      for (int i = 0; i < featureTypes_.size(); i++) {
        com.google.protobuf.GeneratedMessage.writeString(output, 6, featureTypes_.getRaw(i));
      }
      if (pageSize_ != 0) {
        output.writeInt32(7, pageSize_);
      }
      if (!getPageTokenBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 8, pageToken_);
      }
    }

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

      size = 0;
      if (!getFeatureSetIdBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, featureSetId_);
      }
      if (!getParentIdBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, parentId_);
      }
      if (!getReferenceNameBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, referenceName_);
      }
      if (start_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(4, start_);
      }
      if (end_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(5, end_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < featureTypes_.size(); i++) {
          dataSize += computeStringSizeNoTag(featureTypes_.getRaw(i));
        }
        size += dataSize;
        size += 1 * getFeatureTypesList().size();
      }
      if (pageSize_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(7, pageSize_);
      }
      if (!getPageTokenBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(8, pageToken_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest 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.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest 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.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest 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.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest 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 /features/search` as JSON.
     * </pre>
     *
     * Protobuf type {@code ga4gh.SearchFeaturesRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:ga4gh.SearchFeaturesRequest)
        ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeaturesRequest_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeaturesRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest.class, ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest.Builder.class);
      }

      // Construct using ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest.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();
        featureSetId_ = "";

        parentId_ = "";

        referenceName_ = "";

        start_ = 0L;

        end_ = 0L;

        featureTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000020);
        pageSize_ = 0;

        pageToken_ = "";

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeaturesRequest_descriptor;
      }

      public ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest getDefaultInstanceForType() {
        return ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest.getDefaultInstance();
      }

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

      public ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest buildPartial() {
        ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest result = new ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        result.featureSetId_ = featureSetId_;
        result.parentId_ = parentId_;
        result.referenceName_ = referenceName_;
        result.start_ = start_;
        result.end_ = end_;
        if (((bitField0_ & 0x00000020) == 0x00000020)) {
          featureTypes_ = featureTypes_.getUnmodifiableView();
          bitField0_ = (bitField0_ & ~0x00000020);
        }
        result.featureTypes_ = featureTypes_;
        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.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest) {
          return mergeFrom((ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest other) {
        if (other == ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest.getDefaultInstance()) return this;
        if (!other.getFeatureSetId().isEmpty()) {
          featureSetId_ = other.featureSetId_;
          onChanged();
        }
        if (!other.getParentId().isEmpty()) {
          parentId_ = other.parentId_;
          onChanged();
        }
        if (!other.getReferenceName().isEmpty()) {
          referenceName_ = other.referenceName_;
          onChanged();
        }
        if (other.getStart() != 0L) {
          setStart(other.getStart());
        }
        if (other.getEnd() != 0L) {
          setEnd(other.getEnd());
        }
        if (!other.featureTypes_.isEmpty()) {
          if (featureTypes_.isEmpty()) {
            featureTypes_ = other.featureTypes_;
            bitField0_ = (bitField0_ & ~0x00000020);
          } else {
            ensureFeatureTypesIsMutable();
            featureTypes_.addAll(other.featureTypes_);
          }
          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.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.lang.Object featureSetId_ = "";
      /**
       * <pre>
       * The annotation set to search within. Either `feature_set_id` or
       * `parent_id` must be non-empty.
       * </pre>
       *
       * <code>optional string feature_set_id = 1;</code>
       */
      public java.lang.String getFeatureSetId() {
        java.lang.Object ref = featureSetId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          featureSetId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The annotation set to search within. Either `feature_set_id` or
       * `parent_id` must be non-empty.
       * </pre>
       *
       * <code>optional string feature_set_id = 1;</code>
       */
      public com.google.protobuf.ByteString
          getFeatureSetIdBytes() {
        java.lang.Object ref = featureSetId_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          featureSetId_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The annotation set to search within. Either `feature_set_id` or
       * `parent_id` must be non-empty.
       * </pre>
       *
       * <code>optional string feature_set_id = 1;</code>
       */
      public Builder setFeatureSetId(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        featureSetId_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The annotation set to search within. Either `feature_set_id` or
       * `parent_id` must be non-empty.
       * </pre>
       *
       * <code>optional string feature_set_id = 1;</code>
       */
      public Builder clearFeatureSetId() {
        
        featureSetId_ = getDefaultInstance().getFeatureSetId();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The annotation set to search within. Either `feature_set_id` or
       * `parent_id` must be non-empty.
       * </pre>
       *
       * <code>optional string feature_set_id = 1;</code>
       */
      public Builder setFeatureSetIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        featureSetId_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object parentId_ = "";
      /**
       * <pre>
       * Restricts the search to direct children of the given parent `feature`
       * ID. Either `feature_set_id` or `parent_id` must be non-empty.
       * </pre>
       *
       * <code>optional string parent_id = 2;</code>
       */
      public java.lang.String getParentId() {
        java.lang.Object ref = parentId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          parentId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * Restricts the search to direct children of the given parent `feature`
       * ID. Either `feature_set_id` or `parent_id` must be non-empty.
       * </pre>
       *
       * <code>optional string parent_id = 2;</code>
       */
      public com.google.protobuf.ByteString
          getParentIdBytes() {
        java.lang.Object ref = parentId_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          parentId_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * Restricts the search to direct children of the given parent `feature`
       * ID. Either `feature_set_id` or `parent_id` must be non-empty.
       * </pre>
       *
       * <code>optional string parent_id = 2;</code>
       */
      public Builder setParentId(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        parentId_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Restricts the search to direct children of the given parent `feature`
       * ID. Either `feature_set_id` or `parent_id` must be non-empty.
       * </pre>
       *
       * <code>optional string parent_id = 2;</code>
       */
      public Builder clearParentId() {
        
        parentId_ = getDefaultInstance().getParentId();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Restricts the search to direct children of the given parent `feature`
       * ID. Either `feature_set_id` or `parent_id` must be non-empty.
       * </pre>
       *
       * <code>optional string parent_id = 2;</code>
       */
      public Builder setParentIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        parentId_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object referenceName_ = "";
      /**
       * <pre>
       * Only return features on the reference with this name
       * (matched to literal reference name as imported from the GFF3).
       * </pre>
       *
       * <code>optional string reference_name = 3;</code>
       */
      public java.lang.String getReferenceName() {
        java.lang.Object ref = referenceName_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          referenceName_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * Only return features on the reference with this name
       * (matched to literal reference name as imported from the GFF3).
       * </pre>
       *
       * <code>optional string reference_name = 3;</code>
       */
      public com.google.protobuf.ByteString
          getReferenceNameBytes() {
        java.lang.Object ref = referenceName_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          referenceName_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * Only return features on the reference with this name
       * (matched to literal reference name as imported from the GFF3).
       * </pre>
       *
       * <code>optional string reference_name = 3;</code>
       */
      public Builder setReferenceName(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        referenceName_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Only return features on the reference with this name
       * (matched to literal reference name as imported from the GFF3).
       * </pre>
       *
       * <code>optional string reference_name = 3;</code>
       */
      public Builder clearReferenceName() {
        
        referenceName_ = getDefaultInstance().getReferenceName();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Only return features on the reference with this name
       * (matched to literal reference name as imported from the GFF3).
       * </pre>
       *
       * <code>optional string reference_name = 3;</code>
       */
      public Builder setReferenceNameBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        referenceName_ = value;
        onChanged();
        return this;
      }

      private long start_ ;
      /**
       * <pre>
       * Required. The beginning of the window (0-based, inclusive) for which
       * overlapping features should be returned.  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 = 4;</code>
       */
      public long getStart() {
        return start_;
      }
      /**
       * <pre>
       * Required. The beginning of the window (0-based, inclusive) for which
       * overlapping features should be returned.  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 = 4;</code>
       */
      public Builder setStart(long value) {
        
        start_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Required. The beginning of the window (0-based, inclusive) for which
       * overlapping features should be returned.  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 = 4;</code>
       */
      public Builder clearStart() {
        
        start_ = 0L;
        onChanged();
        return this;
      }

      private long end_ ;
      /**
       * <pre>
       * Required. The end of the window (0-based, exclusive) for which overlapping
       * features should be returned.
       * </pre>
       *
       * <code>optional int64 end = 5;</code>
       */
      public long getEnd() {
        return end_;
      }
      /**
       * <pre>
       * Required. The end of the window (0-based, exclusive) for which overlapping
       * features should be returned.
       * </pre>
       *
       * <code>optional int64 end = 5;</code>
       */
      public Builder setEnd(long value) {
        
        end_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Required. The end of the window (0-based, exclusive) for which overlapping
       * features should be returned.
       * </pre>
       *
       * <code>optional int64 end = 5;</code>
       */
      public Builder clearEnd() {
        
        end_ = 0L;
        onChanged();
        return this;
      }

      private com.google.protobuf.LazyStringList featureTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      private void ensureFeatureTypesIsMutable() {
        if (!((bitField0_ & 0x00000020) == 0x00000020)) {
          featureTypes_ = new com.google.protobuf.LazyStringArrayList(featureTypes_);
          bitField0_ |= 0x00000020;
         }
      }
      /**
       * <pre>
       * If specified, this query matches only annotations whose `feature_type`
       * matches one of the provided ontology terms.
       * </pre>
       *
       * <code>repeated string feature_types = 6;</code>
       */
      public com.google.protobuf.ProtocolStringList
          getFeatureTypesList() {
        return featureTypes_.getUnmodifiableView();
      }
      /**
       * <pre>
       * If specified, this query matches only annotations whose `feature_type`
       * matches one of the provided ontology terms.
       * </pre>
       *
       * <code>repeated string feature_types = 6;</code>
       */
      public int getFeatureTypesCount() {
        return featureTypes_.size();
      }
      /**
       * <pre>
       * If specified, this query matches only annotations whose `feature_type`
       * matches one of the provided ontology terms.
       * </pre>
       *
       * <code>repeated string feature_types = 6;</code>
       */
      public java.lang.String getFeatureTypes(int index) {
        return featureTypes_.get(index);
      }
      /**
       * <pre>
       * If specified, this query matches only annotations whose `feature_type`
       * matches one of the provided ontology terms.
       * </pre>
       *
       * <code>repeated string feature_types = 6;</code>
       */
      public com.google.protobuf.ByteString
          getFeatureTypesBytes(int index) {
        return featureTypes_.getByteString(index);
      }
      /**
       * <pre>
       * If specified, this query matches only annotations whose `feature_type`
       * matches one of the provided ontology terms.
       * </pre>
       *
       * <code>repeated string feature_types = 6;</code>
       */
      public Builder setFeatureTypes(
          int index, java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureFeatureTypesIsMutable();
        featureTypes_.set(index, value);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * If specified, this query matches only annotations whose `feature_type`
       * matches one of the provided ontology terms.
       * </pre>
       *
       * <code>repeated string feature_types = 6;</code>
       */
      public Builder addFeatureTypes(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureFeatureTypesIsMutable();
        featureTypes_.add(value);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * If specified, this query matches only annotations whose `feature_type`
       * matches one of the provided ontology terms.
       * </pre>
       *
       * <code>repeated string feature_types = 6;</code>
       */
      public Builder addAllFeatureTypes(
          java.lang.Iterable<java.lang.String> values) {
        ensureFeatureTypesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, featureTypes_);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * If specified, this query matches only annotations whose `feature_type`
       * matches one of the provided ontology terms.
       * </pre>
       *
       * <code>repeated string feature_types = 6;</code>
       */
      public Builder clearFeatureTypes() {
        featureTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000020);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * If specified, this query matches only annotations whose `feature_type`
       * matches one of the provided ontology terms.
       * </pre>
       *
       * <code>repeated string feature_types = 6;</code>
       */
      public Builder addFeatureTypesBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        ensureFeatureTypesIsMutable();
        featureTypes_.add(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 = 7;</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 = 7;</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 = 7;</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 = 8;</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 = 8;</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 = 8;</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 = 8;</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 = 8;</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.SearchFeaturesRequest)
    }

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

    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

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

    /**
     * <pre>
     * The list of matching annotations, sorted by start position. Annotations
     * which share a start position are returned in a deterministic order.
     * </pre>
     *
     * <code>repeated .ga4gh.Feature features = 1;</code>
     */
    java.util.List<ga4gh.SequenceAnnotations.Feature> 
        getFeaturesList();
    /**
     * <pre>
     * The list of matching annotations, sorted by start position. Annotations
     * which share a start position are returned in a deterministic order.
     * </pre>
     *
     * <code>repeated .ga4gh.Feature features = 1;</code>
     */
    ga4gh.SequenceAnnotations.Feature getFeatures(int index);
    /**
     * <pre>
     * The list of matching annotations, sorted by start position. Annotations
     * which share a start position are returned in a deterministic order.
     * </pre>
     *
     * <code>repeated .ga4gh.Feature features = 1;</code>
     */
    int getFeaturesCount();
    /**
     * <pre>
     * The list of matching annotations, sorted by start position. Annotations
     * which share a start position are returned in a deterministic order.
     * </pre>
     *
     * <code>repeated .ga4gh.Feature features = 1;</code>
     */
    java.util.List<? extends ga4gh.SequenceAnnotations.FeatureOrBuilder> 
        getFeaturesOrBuilderList();
    /**
     * <pre>
     * The list of matching annotations, sorted by start position. Annotations
     * which share a start position are returned in a deterministic order.
     * </pre>
     *
     * <code>repeated .ga4gh.Feature features = 1;</code>
     */
    ga4gh.SequenceAnnotations.FeatureOrBuilder getFeaturesOrBuilder(
        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 /features/search` expressed as JSON.
   * </pre>
   *
   * Protobuf type {@code ga4gh.SearchFeaturesResponse}
   */
  public  static final class SearchFeaturesResponse extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:ga4gh.SearchFeaturesResponse)
      SearchFeaturesResponseOrBuilder {
    // Use SearchFeaturesResponse.newBuilder() to construct.
    private SearchFeaturesResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
    }
    private SearchFeaturesResponse() {
      features_ = java.util.Collections.emptyList();
      nextPageToken_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private SearchFeaturesResponse(
        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)) {
                features_ = new java.util.ArrayList<ga4gh.SequenceAnnotations.Feature>();
                mutable_bitField0_ |= 0x00000001;
              }
              features_.add(input.readMessage(ga4gh.SequenceAnnotations.Feature.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)) {
          features_ = java.util.Collections.unmodifiableList(features_);
        }
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeaturesResponse_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeaturesResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse.class, ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse.Builder.class);
    }

    private int bitField0_;
    public static final int FEATURES_FIELD_NUMBER = 1;
    private java.util.List<ga4gh.SequenceAnnotations.Feature> features_;
    /**
     * <pre>
     * The list of matching annotations, sorted by start position. Annotations
     * which share a start position are returned in a deterministic order.
     * </pre>
     *
     * <code>repeated .ga4gh.Feature features = 1;</code>
     */
    public java.util.List<ga4gh.SequenceAnnotations.Feature> getFeaturesList() {
      return features_;
    }
    /**
     * <pre>
     * The list of matching annotations, sorted by start position. Annotations
     * which share a start position are returned in a deterministic order.
     * </pre>
     *
     * <code>repeated .ga4gh.Feature features = 1;</code>
     */
    public java.util.List<? extends ga4gh.SequenceAnnotations.FeatureOrBuilder> 
        getFeaturesOrBuilderList() {
      return features_;
    }
    /**
     * <pre>
     * The list of matching annotations, sorted by start position. Annotations
     * which share a start position are returned in a deterministic order.
     * </pre>
     *
     * <code>repeated .ga4gh.Feature features = 1;</code>
     */
    public int getFeaturesCount() {
      return features_.size();
    }
    /**
     * <pre>
     * The list of matching annotations, sorted by start position. Annotations
     * which share a start position are returned in a deterministic order.
     * </pre>
     *
     * <code>repeated .ga4gh.Feature features = 1;</code>
     */
    public ga4gh.SequenceAnnotations.Feature getFeatures(int index) {
      return features_.get(index);
    }
    /**
     * <pre>
     * The list of matching annotations, sorted by start position. Annotations
     * which share a start position are returned in a deterministic order.
     * </pre>
     *
     * <code>repeated .ga4gh.Feature features = 1;</code>
     */
    public ga4gh.SequenceAnnotations.FeatureOrBuilder getFeaturesOrBuilder(
        int index) {
      return features_.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 < features_.size(); i++) {
        output.writeMessage(1, features_.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 < features_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, features_.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.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse 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.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse 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.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse 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.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse 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 /features/search` expressed as JSON.
     * </pre>
     *
     * Protobuf type {@code ga4gh.SearchFeaturesResponse}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:ga4gh.SearchFeaturesResponse)
        ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeaturesResponse_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeaturesResponse_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse.class, ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse.Builder.class);
      }

      // Construct using ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

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

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_SearchFeaturesResponse_descriptor;
      }

      public ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse getDefaultInstanceForType() {
        return ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse.getDefaultInstance();
      }

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

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

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

      public Builder mergeFrom(ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse other) {
        if (other == ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse.getDefaultInstance()) return this;
        if (featuresBuilder_ == null) {
          if (!other.features_.isEmpty()) {
            if (features_.isEmpty()) {
              features_ = other.features_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureFeaturesIsMutable();
              features_.addAll(other.features_);
            }
            onChanged();
          }
        } else {
          if (!other.features_.isEmpty()) {
            if (featuresBuilder_.isEmpty()) {
              featuresBuilder_.dispose();
              featuresBuilder_ = null;
              features_ = other.features_;
              bitField0_ = (bitField0_ & ~0x00000001);
              featuresBuilder_ = 
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                   getFeaturesFieldBuilder() : null;
            } else {
              featuresBuilder_.addAllMessages(other.features_);
            }
          }
        }
        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.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.util.List<ga4gh.SequenceAnnotations.Feature> features_ =
        java.util.Collections.emptyList();
      private void ensureFeaturesIsMutable() {
        if (!((bitField0_ & 0x00000001) == 0x00000001)) {
          features_ = new java.util.ArrayList<ga4gh.SequenceAnnotations.Feature>(features_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilder<
          ga4gh.SequenceAnnotations.Feature, ga4gh.SequenceAnnotations.Feature.Builder, ga4gh.SequenceAnnotations.FeatureOrBuilder> featuresBuilder_;

      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public java.util.List<ga4gh.SequenceAnnotations.Feature> getFeaturesList() {
        if (featuresBuilder_ == null) {
          return java.util.Collections.unmodifiableList(features_);
        } else {
          return featuresBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public int getFeaturesCount() {
        if (featuresBuilder_ == null) {
          return features_.size();
        } else {
          return featuresBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public ga4gh.SequenceAnnotations.Feature getFeatures(int index) {
        if (featuresBuilder_ == null) {
          return features_.get(index);
        } else {
          return featuresBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public Builder setFeatures(
          int index, ga4gh.SequenceAnnotations.Feature value) {
        if (featuresBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureFeaturesIsMutable();
          features_.set(index, value);
          onChanged();
        } else {
          featuresBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public Builder setFeatures(
          int index, ga4gh.SequenceAnnotations.Feature.Builder builderForValue) {
        if (featuresBuilder_ == null) {
          ensureFeaturesIsMutable();
          features_.set(index, builderForValue.build());
          onChanged();
        } else {
          featuresBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public Builder addFeatures(ga4gh.SequenceAnnotations.Feature value) {
        if (featuresBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureFeaturesIsMutable();
          features_.add(value);
          onChanged();
        } else {
          featuresBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public Builder addFeatures(
          int index, ga4gh.SequenceAnnotations.Feature value) {
        if (featuresBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureFeaturesIsMutable();
          features_.add(index, value);
          onChanged();
        } else {
          featuresBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public Builder addFeatures(
          ga4gh.SequenceAnnotations.Feature.Builder builderForValue) {
        if (featuresBuilder_ == null) {
          ensureFeaturesIsMutable();
          features_.add(builderForValue.build());
          onChanged();
        } else {
          featuresBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public Builder addFeatures(
          int index, ga4gh.SequenceAnnotations.Feature.Builder builderForValue) {
        if (featuresBuilder_ == null) {
          ensureFeaturesIsMutable();
          features_.add(index, builderForValue.build());
          onChanged();
        } else {
          featuresBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public Builder addAllFeatures(
          java.lang.Iterable<? extends ga4gh.SequenceAnnotations.Feature> values) {
        if (featuresBuilder_ == null) {
          ensureFeaturesIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, features_);
          onChanged();
        } else {
          featuresBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public Builder clearFeatures() {
        if (featuresBuilder_ == null) {
          features_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          featuresBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public Builder removeFeatures(int index) {
        if (featuresBuilder_ == null) {
          ensureFeaturesIsMutable();
          features_.remove(index);
          onChanged();
        } else {
          featuresBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public ga4gh.SequenceAnnotations.Feature.Builder getFeaturesBuilder(
          int index) {
        return getFeaturesFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public ga4gh.SequenceAnnotations.FeatureOrBuilder getFeaturesOrBuilder(
          int index) {
        if (featuresBuilder_ == null) {
          return features_.get(index);  } else {
          return featuresBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public java.util.List<? extends ga4gh.SequenceAnnotations.FeatureOrBuilder> 
           getFeaturesOrBuilderList() {
        if (featuresBuilder_ != null) {
          return featuresBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(features_);
        }
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public ga4gh.SequenceAnnotations.Feature.Builder addFeaturesBuilder() {
        return getFeaturesFieldBuilder().addBuilder(
            ga4gh.SequenceAnnotations.Feature.getDefaultInstance());
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public ga4gh.SequenceAnnotations.Feature.Builder addFeaturesBuilder(
          int index) {
        return getFeaturesFieldBuilder().addBuilder(
            index, ga4gh.SequenceAnnotations.Feature.getDefaultInstance());
      }
      /**
       * <pre>
       * The list of matching annotations, sorted by start position. Annotations
       * which share a start position are returned in a deterministic order.
       * </pre>
       *
       * <code>repeated .ga4gh.Feature features = 1;</code>
       */
      public java.util.List<ga4gh.SequenceAnnotations.Feature.Builder> 
           getFeaturesBuilderList() {
        return getFeaturesFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilder<
          ga4gh.SequenceAnnotations.Feature, ga4gh.SequenceAnnotations.Feature.Builder, ga4gh.SequenceAnnotations.FeatureOrBuilder> 
          getFeaturesFieldBuilder() {
        if (featuresBuilder_ == null) {
          featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
              ga4gh.SequenceAnnotations.Feature, ga4gh.SequenceAnnotations.Feature.Builder, ga4gh.SequenceAnnotations.FeatureOrBuilder>(
                  features_,
                  ((bitField0_ & 0x00000001) == 0x00000001),
                  getParentForChildren(),
                  isClean());
          features_ = null;
        }
        return featuresBuilder_;
      }

      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.SearchFeaturesResponse)
    }

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

    public static ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

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

    /**
     * <pre>
     * The ID of the `Feature` to be retrieved.
     * </pre>
     *
     * <code>optional string feature_id = 1;</code>
     */
    java.lang.String getFeatureId();
    /**
     * <pre>
     * The ID of the `Feature` to be retrieved.
     * </pre>
     *
     * <code>optional string feature_id = 1;</code>
     */
    com.google.protobuf.ByteString
        getFeatureIdBytes();
  }
  /**
   * <pre>
   * This request maps to the URL `GET /features/{id}`.
   * </pre>
   *
   * Protobuf type {@code ga4gh.GetFeatureRequest}
   */
  public  static final class GetFeatureRequest extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:ga4gh.GetFeatureRequest)
      GetFeatureRequestOrBuilder {
    // Use GetFeatureRequest.newBuilder() to construct.
    private GetFeatureRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
    }
    private GetFeatureRequest() {
      featureId_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private GetFeatureRequest(
        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();

              featureId_ = 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.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_GetFeatureRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_GetFeatureRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest.class, ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest.Builder.class);
    }

    public static final int FEATURE_ID_FIELD_NUMBER = 1;
    private volatile java.lang.Object featureId_;
    /**
     * <pre>
     * The ID of the `Feature` to be retrieved.
     * </pre>
     *
     * <code>optional string feature_id = 1;</code>
     */
    public java.lang.String getFeatureId() {
      java.lang.Object ref = featureId_;
      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();
        featureId_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The ID of the `Feature` to be retrieved.
     * </pre>
     *
     * <code>optional string feature_id = 1;</code>
     */
    public com.google.protobuf.ByteString
        getFeatureIdBytes() {
      java.lang.Object ref = featureId_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        featureId_ = 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 (!getFeatureIdBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessage.writeString(output, 1, featureId_);
      }
    }

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

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

    private static final long serialVersionUID = 0L;
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest 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.SequenceAnnotationServiceOuterClass.GetFeatureRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest 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.SequenceAnnotationServiceOuterClass.GetFeatureRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest 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.SequenceAnnotationServiceOuterClass.GetFeatureRequest 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 /features/{id}`.
     * </pre>
     *
     * Protobuf type {@code ga4gh.GetFeatureRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:ga4gh.GetFeatureRequest)
        ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_GetFeatureRequest_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_GetFeatureRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest.class, ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest.Builder.class);
      }

      // Construct using ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest.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();
        featureId_ = "";

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return ga4gh.SequenceAnnotationServiceOuterClass.internal_static_ga4gh_GetFeatureRequest_descriptor;
      }

      public ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest getDefaultInstanceForType() {
        return ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest.getDefaultInstance();
      }

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

      public ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest buildPartial() {
        ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest result = new ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest(this);
        result.featureId_ = featureId_;
        onBuilt();
        return result;
      }

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

      public Builder mergeFrom(ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest other) {
        if (other == ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest.getDefaultInstance()) return this;
        if (!other.getFeatureId().isEmpty()) {
          featureId_ = other.featureId_;
          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.SequenceAnnotationServiceOuterClass.GetFeatureRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object featureId_ = "";
      /**
       * <pre>
       * The ID of the `Feature` to be retrieved.
       * </pre>
       *
       * <code>optional string feature_id = 1;</code>
       */
      public java.lang.String getFeatureId() {
        java.lang.Object ref = featureId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          featureId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The ID of the `Feature` to be retrieved.
       * </pre>
       *
       * <code>optional string feature_id = 1;</code>
       */
      public com.google.protobuf.ByteString
          getFeatureIdBytes() {
        java.lang.Object ref = featureId_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          featureId_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The ID of the `Feature` to be retrieved.
       * </pre>
       *
       * <code>optional string feature_id = 1;</code>
       */
      public Builder setFeatureId(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        featureId_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The ID of the `Feature` to be retrieved.
       * </pre>
       *
       * <code>optional string feature_id = 1;</code>
       */
      public Builder clearFeatureId() {
        
        featureId_ = getDefaultInstance().getFeatureId();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The ID of the `Feature` to be retrieved.
       * </pre>
       *
       * <code>optional string feature_id = 1;</code>
       */
      public Builder setFeatureIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        featureId_ = 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.GetFeatureRequest)
    }

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

    public static ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public ga4gh.SequenceAnnotationServiceOuterClass.GetFeatureRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_ga4gh_SearchFeatureSetsRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ga4gh_SearchFeatureSetsRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_ga4gh_SearchFeatureSetsResponse_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ga4gh_SearchFeatureSetsResponse_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_ga4gh_GetFeatureSetRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ga4gh_GetFeatureSetRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_ga4gh_SearchFeaturesRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ga4gh_SearchFeaturesRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_ga4gh_SearchFeaturesResponse_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ga4gh_SearchFeaturesResponse_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_ga4gh_GetFeatureRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_ga4gh_GetFeatureRequest_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\'ga4gh/sequence_annotation_service.prot" +
      "o\022\005ga4gh\032 ga4gh/sequence_annotations.pro" +
      "to\"U\n\030SearchFeatureSetsRequest\022\022\n\ndatase" +
      "t_id\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_to" +
      "ken\030\003 \001(\t\"]\n\031SearchFeatureSetsResponse\022\'" +
      "\n\014feature_sets\030\001 \003(\0132\021.ga4gh.FeatureSet\022" +
      "\027\n\017next_page_token\030\002 \001(\t\".\n\024GetFeatureSe" +
      "tRequest\022\026\n\016feature_set_id\030\001 \001(\t\"\264\001\n\025Sea" +
      "rchFeaturesRequest\022\026\n\016feature_set_id\030\001 \001" +
      "(\t\022\021\n\tparent_id\030\002 \001(\t\022\026\n\016reference_name\030",
      "\003 \001(\t\022\r\n\005start\030\004 \001(\003\022\013\n\003end\030\005 \001(\003\022\025\n\rfea" +
      "ture_types\030\006 \003(\t\022\021\n\tpage_size\030\007 \001(\005\022\022\n\np" +
      "age_token\030\010 \001(\t\"S\n\026SearchFeaturesRespons" +
      "e\022 \n\010features\030\001 \003(\0132\016.ga4gh.Feature\022\027\n\017n" +
      "ext_page_token\030\002 \001(\t\"\'\n\021GetFeatureReques" +
      "t\022\022\n\nfeature_id\030\001 \001(\t2\273\002\n\031SequenceAnnota" +
      "tionService\022V\n\021SearchFeatureSets\022\037.ga4gh" +
      ".SearchFeatureSetsRequest\032 .ga4gh.Search" +
      "FeatureSetsResponse\022?\n\rGetFeatureSet\022\033.g" +
      "a4gh.GetFeatureSetRequest\032\021.ga4gh.Featur",
      "eSet\022M\n\016SearchFeatures\022\034.ga4gh.SearchFea" +
      "turesRequest\032\035.ga4gh.SearchFeaturesRespo" +
      "nse\0226\n\nGetFeature\022\030.ga4gh.GetFeatureRequ" +
      "est\032\016.ga4gh.Featureb\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.SequenceAnnotations.getDescriptor(),
        }, assigner);
    internal_static_ga4gh_SearchFeatureSetsRequest_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_ga4gh_SearchFeatureSetsRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_ga4gh_SearchFeatureSetsRequest_descriptor,
        new java.lang.String[] { "DatasetId", "PageSize", "PageToken", });
    internal_static_ga4gh_SearchFeatureSetsResponse_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_ga4gh_SearchFeatureSetsResponse_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_ga4gh_SearchFeatureSetsResponse_descriptor,
        new java.lang.String[] { "FeatureSets", "NextPageToken", });
    internal_static_ga4gh_GetFeatureSetRequest_descriptor =
      getDescriptor().getMessageTypes().get(2);
    internal_static_ga4gh_GetFeatureSetRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_ga4gh_GetFeatureSetRequest_descriptor,
        new java.lang.String[] { "FeatureSetId", });
    internal_static_ga4gh_SearchFeaturesRequest_descriptor =
      getDescriptor().getMessageTypes().get(3);
    internal_static_ga4gh_SearchFeaturesRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_ga4gh_SearchFeaturesRequest_descriptor,
        new java.lang.String[] { "FeatureSetId", "ParentId", "ReferenceName", "Start", "End", "FeatureTypes", "PageSize", "PageToken", });
    internal_static_ga4gh_SearchFeaturesResponse_descriptor =
      getDescriptor().getMessageTypes().get(4);
    internal_static_ga4gh_SearchFeaturesResponse_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_ga4gh_SearchFeaturesResponse_descriptor,
        new java.lang.String[] { "Features", "NextPageToken", });
    internal_static_ga4gh_GetFeatureRequest_descriptor =
      getDescriptor().getMessageTypes().get(5);
    internal_static_ga4gh_GetFeatureRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_ga4gh_GetFeatureRequest_descriptor,
        new java.lang.String[] { "FeatureId", });
    ga4gh.SequenceAnnotations.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
