# Interface IndexOrBuilder (0.15.0)

0.15.0 (latest) 0.12.0 0.9.0 0.8.0 0.6.0 0.4.0 0.3.0 0.1.0

    public interface IndexOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsLabels(String key)

    public abstract boolean containsLabels(String key)

Optional. Labels as key value pairs.

`map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getCreateTime()

    public abstract Timestamp getCreateTime()

Output only. \[Output only\] Create time stamp

`.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The createTime. |

### getCreateTimeOrBuilder()

    public abstract TimestampOrBuilder getCreateTimeOrBuilder()

Output only. \[Output only\] Create time stamp

`.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getDedicatedInfrastructure()

    public abstract DedicatedInfrastructure getDedicatedInfrastructure()

Optional. Dedicated infrastructure for the index.

`
.google.cloud.vectorsearch.v1beta.DedicatedInfrastructure dedicated_infrastructure = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-vectorsearch/latest/com.google.cloud.vectorsearch.v1beta.DedicatedInfrastructure` | The dedicatedInfrastructure. |

### getDedicatedInfrastructureOrBuilder()

    public abstract DedicatedInfrastructureOrBuilder getDedicatedInfrastructureOrBuilder()

Optional. Dedicated infrastructure for the index.

`
.google.cloud.vectorsearch.v1beta.DedicatedInfrastructure dedicated_infrastructure = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-vectorsearch/latest/com.google.cloud.vectorsearch.v1beta.DedicatedInfrastructureOrBuilder` |   |

### getDenseScann()

    public abstract DenseScannIndex getDenseScann()

Optional. Dense ScaNN index.

`
.google.cloud.vectorsearch.v1beta.DenseScannIndex dense_scann = 12 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-vectorsearch/latest/com.google.cloud.vectorsearch.v1beta.DenseScannIndex` | The denseScann. |

### getDenseScannOrBuilder()

    public abstract DenseScannIndexOrBuilder getDenseScannOrBuilder()

Optional. Dense ScaNN index.

`
.google.cloud.vectorsearch.v1beta.DenseScannIndex dense_scann = 12 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-vectorsearch/latest/com.google.cloud.vectorsearch.v1beta.DenseScannIndexOrBuilder` |   |

### getDescription()

    public abstract String getDescription()

Optional. User-specified description of the index

`string description = 9 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The description. |

### getDescriptionBytes()

    public abstract ByteString getDescriptionBytes()

Optional. User-specified description of the index

`string description = 9 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for description. |

### getDisplayName()

    public abstract String getDisplayName()

Optional. User-specified display name of the index

`string display_name = 8 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The displayName. |

### getDisplayNameBytes()

    public abstract ByteString getDisplayNameBytes()

Optional. User-specified display name of the index

`string display_name = 8 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for displayName. |

### getDistanceMetric()

    public abstract DistanceMetric getDistanceMetric()

Optional. Distance metric used for indexing. If not specified, will default
to DOT_PRODUCT.

`
.google.cloud.vectorsearch.v1beta.DistanceMetric distance_metric = 4 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-vectorsearch/latest/com.google.cloud.vectorsearch.v1beta.DistanceMetric` | The distanceMetric. |

### getDistanceMetricValue()

    public abstract int getDistanceMetricValue()

Optional. Distance metric used for indexing. If not specified, will default
to DOT_PRODUCT.

`
.google.cloud.vectorsearch.v1beta.DistanceMetric distance_metric = 4 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for distanceMetric. |

### getFilterFields(int index)

    public abstract String getFilterFields(int index)

Optional. The fields to push into the index to enable fast ANN inline
filtering.

`repeated string filter_fields = 6 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The filterFields at the given index. |

### getFilterFieldsBytes(int index)

    public abstract ByteString getFilterFieldsBytes(int index)

Optional. The fields to push into the index to enable fast ANN inline
filtering.

`repeated string filter_fields = 6 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the filterFields at the given index. |

### getFilterFieldsCount()

    public abstract int getFilterFieldsCount()

Optional. The fields to push into the index to enable fast ANN inline
filtering.

`repeated string filter_fields = 6 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of filterFields. |

### getFilterFieldsList()

    public abstract List<String> getFilterFieldsList()

Optional. The fields to push into the index to enable fast ANN inline
filtering.

`repeated string filter_fields = 6 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the filterFields. |

### getIndexField()

    public abstract String getIndexField()

Required. The collection schema field to index.

`string index_field = 5 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The indexField. |

### getIndexFieldBytes()

    public abstract ByteString getIndexFieldBytes()

Required. The collection schema field to index.

`string index_field = 5 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for indexField. |

### getIndexTypeCase()

    public abstract Index.IndexTypeCase getIndexTypeCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-vectorsearch/latest/com.google.cloud.vectorsearch.v1beta.Index.IndexTypeCase` |   |

### getInfraTypeCase()

    public abstract Index.InfraTypeCase getInfraTypeCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-vectorsearch/latest/com.google.cloud.vectorsearch.v1beta.Index.InfraTypeCase` |   |

### getLabels() (deprecated)

    public abstract Map<String,String> getLabels()

Use [#getLabelsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-vectorsearch/latest/com.google.cloud.vectorsearch.v1beta.IndexOrBuilder#com_google_cloud_vectorsearch_v1beta_IndexOrBuilder_getLabelsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsCount()

    public abstract int getLabelsCount()

Optional. Labels as key value pairs.

`map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getLabelsMap()

    public abstract Map<String,String> getLabelsMap()

Optional. Labels as key value pairs.

`map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsOrDefault(String key, String defaultValue)

    public abstract String getLabelsOrDefault(String key, String defaultValue)

Optional. Labels as key value pairs.

`map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getLabelsOrThrow(String key)

    public abstract String getLabelsOrThrow(String key)

Optional. Labels as key value pairs.

`map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getName()

    public abstract String getName()

Identifier. name of resource

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract ByteString getNameBytes()

Identifier. name of resource

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getStoreFields(int index)

    public abstract String getStoreFields(int index)

Optional. The fields to push into the index to enable inline data
retrieval.

`repeated string store_fields = 7 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The storeFields at the given index. |

### getStoreFieldsBytes(int index)

    public abstract ByteString getStoreFieldsBytes(int index)

Optional. The fields to push into the index to enable inline data
retrieval.

`repeated string store_fields = 7 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the storeFields at the given index. |

### getStoreFieldsCount()

    public abstract int getStoreFieldsCount()

Optional. The fields to push into the index to enable inline data
retrieval.

`repeated string store_fields = 7 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of storeFields. |

### getStoreFieldsList()

    public abstract List<String> getStoreFieldsList()

Optional. The fields to push into the index to enable inline data
retrieval.

`repeated string store_fields = 7 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the storeFields. |

### getUpdateTime()

    public abstract Timestamp getUpdateTime()

Output only. \[Output only\] Update time stamp

`.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The updateTime. |

### getUpdateTimeOrBuilder()

    public abstract TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. \[Output only\] Update time stamp

`.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### hasCreateTime()

    public abstract boolean hasCreateTime()

Output only. \[Output only\] Create time stamp

`.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the createTime field is set. |

### hasDedicatedInfrastructure()

    public abstract boolean hasDedicatedInfrastructure()

Optional. Dedicated infrastructure for the index.

`
.google.cloud.vectorsearch.v1beta.DedicatedInfrastructure dedicated_infrastructure = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the dedicatedInfrastructure field is set. |

### hasDenseScann()

    public abstract boolean hasDenseScann()

Optional. Dense ScaNN index.

`
.google.cloud.vectorsearch.v1beta.DenseScannIndex dense_scann = 12 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the denseScann field is set. |

### hasUpdateTime()

    public abstract boolean hasUpdateTime()

Output only. \[Output only\] Update time stamp

`.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the updateTime field is set. |