# Class GetIndexesRequest.Builder (5.0.3)

    public static final class GetIndexesRequest.Builder

The builder of [GetIndexesRequest](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.GetIndexesRequest)s.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> GetIndexesRequest.Builder

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Methods

### build()

    public GetIndexesRequest build()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.GetIndexesRequest` | builds and returns a brand new instance of a [GetIndexesRequest](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.GetIndexesRequest) using values set on this builder |

### setAllNamespaces(boolean allNamespaces)

    public GetIndexesRequest.Builder setAllNamespaces(boolean allNamespaces)

Sets whether or not to fetch indexes from all namespaces.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `allNamespaces` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` whether or not to fetch indexes from all namespaces |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.GetIndexesRequest.Builder` | this builder |

### setIncludeStartIndex(boolean includeStartIndex)

    public GetIndexesRequest.Builder setIncludeStartIndex(boolean includeStartIndex)

Sets whether or not to include the index whose name is specified via
the [#setStartIndexName(String)](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.GetIndexesRequest.Builder#com_google_appengine_api_search_GetIndexesRequest_Builder_setStartIndexName_java_lang_String_) method.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `includeStartIndex` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` whether or not to return the start index |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.GetIndexesRequest.Builder` | this builder |

### setIndexNamePrefix(String indexNamePrefix)

    public GetIndexesRequest.Builder setIndexNamePrefix(String indexNamePrefix)

Sets the prefix to be matched against the names of returned indexes.
If the prefix is set to, say "a", only indexes with names starting with
'a' will be returned.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `indexNamePrefix` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the prefix used to select returned indexes |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.GetIndexesRequest.Builder` | this builder |

### setLimit(Integer limit)

    public GetIndexesRequest.Builder setLimit(Integer limit)

Sets the maximum number of indexes to return.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `limit` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html` the number of indexes to return |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.GetIndexesRequest.Builder` | this builder |

### setNamespace(String namespace)

    public GetIndexesRequest.Builder setNamespace(String namespace)

Sets the namespace to use for this request. Only indexes
defined within this namespace will be fetched.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `namespace` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The namespace for this request. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.GetIndexesRequest.Builder` | this builder |

### setOffset(Integer offset)

    public GetIndexesRequest.Builder setOffset(Integer offset)

Sets the offset of the first index to return. This method comes with
a performance penalty and if you just want to page through all indexes
you should consider [#setStartIndexName(String)](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.GetIndexesRequest.Builder#com_google_appengine_api_search_GetIndexesRequest_Builder_setStartIndexName_java_lang_String_) method.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `offset` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html` the offset of the first returned index |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.GetIndexesRequest.Builder` | this builder |

### setSchemaFetched(boolean schemaFetched)

    public GetIndexesRequest.Builder setSchemaFetched(boolean schemaFetched)

Sets whether or not the schema is returned with indexes. An index schema
is a map from field names to field types.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `schemaFetched` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` whether or not schemas are present in returned indexes |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.GetIndexesRequest.Builder` | this builder |

### setStartIndexName(String startIndexName)

    public GetIndexesRequest.Builder setStartIndexName(String startIndexName)

Sets the name of the first index to return. You may exclude this index by
using the [#setIncludeStartIndex(boolean)](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.GetIndexesRequest.Builder#com_google_appengine_api_search_GetIndexesRequest_Builder_setIncludeStartIndex_boolean_) method.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `startIndexName` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the name of the first index to be returned |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.GetIndexesRequest.Builder` | this builder |