# Interface CompleteQueryResponseOrBuilder (2.95.0)

2.95.0 (latest) 2.93.0 2.90.0 2.89.0 2.87.0 2.85.0 2.84.0 2.82.0 2.80.0 2.78.0 2.77.0 2.76.0 2.75.0 2.74.0 2.72.0 2.70.0 2.69.0 2.66.0 2.65.0 2.64.0 2.62.0 2.61.0 2.60.0 2.59.0 2.58.0 2.57.0 2.56.0 2.55.0 2.54.0 2.53.0 2.51.0 2.50.0 2.49.0 2.48.0 2.47.0 2.46.0 2.45.0 2.44.0 2.43.0 2.42.0 2.41.0 2.39.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.0 2.26.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.1 2.4.0 2.3.0 2.2.3 2.1.0 2.0.19

    public interface CompleteQueryResponseOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### containsAttributeResults(String key)

    public abstract boolean containsAttributeResults(String key)

A map of matched attribute suggestions. This field is only available for
`cloud-retail` dataset.

Current supported keys:

- `brands`

- `categories`

`
map<string, .google.cloud.retail.v2beta.CompleteQueryResponse.AttributeResult> attribute_results = 4;
`

| **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` |   |

### getAttributeResults() (deprecated)

    public abstract Map<String,CompleteQueryResponse.AttributeResult> getAttributeResults()

Use [#getAttributeResultsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-retail/latest/com.google.cloud.retail.v2beta.CompleteQueryResponseOrBuilder#com_google_cloud_retail_v2beta_CompleteQueryResponseOrBuilder_getAttributeResultsMap__) 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.cloud.google.com/java/docs/reference/google-cloud-retail/latest/com.google.cloud.retail.v2beta.CompleteQueryResponse.AttributeResult>` |   |

### getAttributeResultsCount()

    public abstract int getAttributeResultsCount()

A map of matched attribute suggestions. This field is only available for
`cloud-retail` dataset.

Current supported keys:

- `brands`

- `categories`

`
map<string, .google.cloud.retail.v2beta.CompleteQueryResponse.AttributeResult> attribute_results = 4;
`

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

### getAttributeResultsMap()

    public abstract Map<String,CompleteQueryResponse.AttributeResult> getAttributeResultsMap()

A map of matched attribute suggestions. This field is only available for
`cloud-retail` dataset.

Current supported keys:

- `brands`

- `categories`

`
map<string, .google.cloud.retail.v2beta.CompleteQueryResponse.AttributeResult> attribute_results = 4;
`

| **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.cloud.google.com/java/docs/reference/google-cloud-retail/latest/com.google.cloud.retail.v2beta.CompleteQueryResponse.AttributeResult>` |   |

### getAttributeResultsOrDefault(String key, CompleteQueryResponse.AttributeResult defaultValue)

    public abstract CompleteQueryResponse.AttributeResult getAttributeResultsOrDefault(String key, CompleteQueryResponse.AttributeResult defaultValue)

A map of matched attribute suggestions. This field is only available for
`cloud-retail` dataset.

Current supported keys:

- `brands`

- `categories`

`
map<string, .google.cloud.retail.v2beta.CompleteQueryResponse.AttributeResult> attribute_results = 4;
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-retail/latest/com.google.cloud.retail.v2beta.CompleteQueryResponse.AttributeResult` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-retail/latest/com.google.cloud.retail.v2beta.CompleteQueryResponse.AttributeResult` |   |

### getAttributeResultsOrThrow(String key)

    public abstract CompleteQueryResponse.AttributeResult getAttributeResultsOrThrow(String key)

A map of matched attribute suggestions. This field is only available for
`cloud-retail` dataset.

Current supported keys:

- `brands`

- `categories`

`
map<string, .google.cloud.retail.v2beta.CompleteQueryResponse.AttributeResult> attribute_results = 4;
`

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-retail/latest/com.google.cloud.retail.v2beta.CompleteQueryResponse.AttributeResult` |   |

### getAttributionToken()

    public abstract String getAttributionToken()

A unique complete token. This should be included in the
UserEvent.completion_detail
for search events resulting from this completion, which enables accurate
attribution of complete model performance.

`string attribution_token = 2;`

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

### getAttributionTokenBytes()

    public abstract ByteString getAttributionTokenBytes()

A unique complete token. This should be included in the
UserEvent.completion_detail
for search events resulting from this completion, which enables accurate
attribution of complete model performance.

`string attribution_token = 2;`

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

### getCompletionResults(int index)

    public abstract CompleteQueryResponse.CompletionResult getCompletionResults(int index)

Results of the matching suggestions. The result list is ordered and the
first result is top suggestion.

`
repeated .google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult completion_results = 1;
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-retail/latest/com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult` |   |

### getCompletionResultsCount()

    public abstract int getCompletionResultsCount()

Results of the matching suggestions. The result list is ordered and the
first result is top suggestion.

`
repeated .google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult completion_results = 1;
`

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

### getCompletionResultsList()

    public abstract List<CompleteQueryResponse.CompletionResult> getCompletionResultsList()

Results of the matching suggestions. The result list is ordered and the
first result is top suggestion.

`
repeated .google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult completion_results = 1;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-retail/latest/com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult>` |   |

### getCompletionResultsOrBuilder(int index)

    public abstract CompleteQueryResponse.CompletionResultOrBuilder getCompletionResultsOrBuilder(int index)

Results of the matching suggestions. The result list is ordered and the
first result is top suggestion.

`
repeated .google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult completion_results = 1;
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-retail/latest/com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResultOrBuilder` |   |

### getCompletionResultsOrBuilderList()

    public abstract List<? extends CompleteQueryResponse.CompletionResultOrBuilder> getCompletionResultsOrBuilderList()

Results of the matching suggestions. The result list is ordered and the
first result is top suggestion.

`
repeated .google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult completion_results = 1;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResultOrBuilder>` |   |

### getRecentSearchResults(int index) (deprecated)

    public abstract CompleteQueryResponse.RecentSearchResult getRecentSearchResults(int index)

Deprecated. Matched recent searches of this user. The maximum number of
recent searches is 10. This field is a restricted feature. If you want to
enable it, contact Retail Search support.

This feature is only available when
CompleteQueryRequest.visitor_id
field is set and UserEvent is
imported. The recent searches satisfy the follow rules:

- They are ordered from latest to oldest.

- They are matched with
  CompleteQueryRequest.query
  case insensitively.

- They are transformed to lower case.

- They are UTF-8 safe.

  Recent searches are deduplicated. More recent searches will be reserved
  when duplication happens.

`
repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-retail/latest/com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult` |   |

### getRecentSearchResultsCount() (deprecated)

    public abstract int getRecentSearchResultsCount()

Deprecated. Matched recent searches of this user. The maximum number of
recent searches is 10. This field is a restricted feature. If you want to
enable it, contact Retail Search support.

This feature is only available when
CompleteQueryRequest.visitor_id
field is set and UserEvent is
imported. The recent searches satisfy the follow rules:

- They are ordered from latest to oldest.

- They are matched with
  CompleteQueryRequest.query
  case insensitively.

- They are transformed to lower case.

- They are UTF-8 safe.

  Recent searches are deduplicated. More recent searches will be reserved
  when duplication happens.

`
repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true];
`

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

### getRecentSearchResultsList() (deprecated)

    public abstract List<CompleteQueryResponse.RecentSearchResult> getRecentSearchResultsList()

Deprecated. Matched recent searches of this user. The maximum number of
recent searches is 10. This field is a restricted feature. If you want to
enable it, contact Retail Search support.

This feature is only available when
CompleteQueryRequest.visitor_id
field is set and UserEvent is
imported. The recent searches satisfy the follow rules:

- They are ordered from latest to oldest.

- They are matched with
  CompleteQueryRequest.query
  case insensitively.

- They are transformed to lower case.

- They are UTF-8 safe.

  Recent searches are deduplicated. More recent searches will be reserved
  when duplication happens.

`
repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-retail/latest/com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult>` |   |

### getRecentSearchResultsOrBuilder(int index) (deprecated)

    public abstract CompleteQueryResponse.RecentSearchResultOrBuilder getRecentSearchResultsOrBuilder(int index)

Deprecated. Matched recent searches of this user. The maximum number of
recent searches is 10. This field is a restricted feature. If you want to
enable it, contact Retail Search support.

This feature is only available when
CompleteQueryRequest.visitor_id
field is set and UserEvent is
imported. The recent searches satisfy the follow rules:

- They are ordered from latest to oldest.

- They are matched with
  CompleteQueryRequest.query
  case insensitively.

- They are transformed to lower case.

- They are UTF-8 safe.

  Recent searches are deduplicated. More recent searches will be reserved
  when duplication happens.

`
repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-retail/latest/com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResultOrBuilder` |   |

### getRecentSearchResultsOrBuilderList() (deprecated)

    public abstract List<? extends CompleteQueryResponse.RecentSearchResultOrBuilder> getRecentSearchResultsOrBuilderList()

Deprecated. Matched recent searches of this user. The maximum number of
recent searches is 10. This field is a restricted feature. If you want to
enable it, contact Retail Search support.

This feature is only available when
CompleteQueryRequest.visitor_id
field is set and UserEvent is
imported. The recent searches satisfy the follow rules:

- They are ordered from latest to oldest.

- They are matched with
  CompleteQueryRequest.query
  case insensitively.

- They are transformed to lower case.

- They are UTF-8 safe.

  Recent searches are deduplicated. More recent searches will be reserved
  when duplication happens.

`
repeated .google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResultOrBuilder>` |   |