# Interface GoogleSearchToolOrBuilder (0.9.0)

0.9.0 (latest) 0.7.0 0.4.0 0.3.0 0.1.0

    public interface GoogleSearchToolOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getContextUrls(int index)

    public abstract String getContextUrls(int index)

Optional. Content will be fetched directly from these URLs for context and
grounding. Example: "<https://example.com/path.html>". A maximum of 20 URLs
are allowed.

`repeated string context_urls = 3 [(.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 contextUrls at the given index. |

### getContextUrlsBytes(int index)

    public abstract ByteString getContextUrlsBytes(int index)

Optional. Content will be fetched directly from these URLs for context and
grounding. Example: "<https://example.com/path.html>". A maximum of 20 URLs
are allowed.

`repeated string context_urls = 3 [(.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 contextUrls at the given index. |

### getContextUrlsCount()

    public abstract int getContextUrlsCount()

Optional. Content will be fetched directly from these URLs for context and
grounding. Example: "<https://example.com/path.html>". A maximum of 20 URLs
are allowed.

`repeated string context_urls = 3 [(.google.api.field_behavior) = OPTIONAL];`

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

### getContextUrlsList()

    public abstract List<String> getContextUrlsList()

Optional. Content will be fetched directly from these URLs for context and
grounding. Example: "<https://example.com/path.html>". A maximum of 20 URLs
are allowed.

`repeated string context_urls = 3 [(.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 contextUrls. |

### getDescription()

    public abstract String getDescription()

Optional. Description of the tool's purpose.

`string description = 2 [(.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. Description of the tool's purpose.

`string description = 2 [(.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. |

### getExcludeDomains(int index)

    public abstract String getExcludeDomains(int index)

Optional. List of domains to be excluded from the search results.
Example: "example.com".
A maximum of 2000 domains can be excluded.

`repeated string exclude_domains = 4 [(.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 excludeDomains at the given index. |

### getExcludeDomainsBytes(int index)

    public abstract ByteString getExcludeDomainsBytes(int index)

Optional. List of domains to be excluded from the search results.
Example: "example.com".
A maximum of 2000 domains can be excluded.

`repeated string exclude_domains = 4 [(.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 excludeDomains at the given index. |

### getExcludeDomainsCount()

    public abstract int getExcludeDomainsCount()

Optional. List of domains to be excluded from the search results.
Example: "example.com".
A maximum of 2000 domains can be excluded.

`repeated string exclude_domains = 4 [(.google.api.field_behavior) = OPTIONAL];`

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

### getExcludeDomainsList()

    public abstract List<String> getExcludeDomainsList()

Optional. List of domains to be excluded from the search results.
Example: "example.com".
A maximum of 2000 domains can be excluded.

`repeated string exclude_domains = 4 [(.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 excludeDomains. |

### getName()

    public abstract String getName()

Required. The name of the tool.

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

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

### getNameBytes()

    public abstract ByteString getNameBytes()

Required. The name of the tool.

`string name = 1 [(.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 name. |

### getPreferredDomains(int index)

    public abstract String getPreferredDomains(int index)

Optional. Specifies domains to restrict search results to.
Example: "example.com", "another.site". A maximum of 20 domains can be
specified.

`repeated string preferred_domains = 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 preferredDomains at the given index. |

### getPreferredDomainsBytes(int index)

    public abstract ByteString getPreferredDomainsBytes(int index)

Optional. Specifies domains to restrict search results to.
Example: "example.com", "another.site". A maximum of 20 domains can be
specified.

`repeated string preferred_domains = 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 preferredDomains at the given index. |

### getPreferredDomainsCount()

    public abstract int getPreferredDomainsCount()

Optional. Specifies domains to restrict search results to.
Example: "example.com", "another.site". A maximum of 20 domains can be
specified.

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

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

### getPreferredDomainsList()

    public abstract List<String> getPreferredDomainsList()

Optional. Specifies domains to restrict search results to.
Example: "example.com", "another.site". A maximum of 20 domains can be
specified.

`repeated string preferred_domains = 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 preferredDomains. |

### getPromptConfig()

    public abstract GoogleSearchTool.PromptConfig getPromptConfig()

Optional. Prompt instructions passed to planner on how the search results
should be processed for text and voice.

`
.google.cloud.ces.v1.GoogleSearchTool.PromptConfig prompt_config = 5 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-ces/latest/com.google.cloud.ces.v1.GoogleSearchTool.PromptConfig` | The promptConfig. |

### getPromptConfigOrBuilder()

    public abstract GoogleSearchTool.PromptConfigOrBuilder getPromptConfigOrBuilder()

Optional. Prompt instructions passed to planner on how the search results
should be processed for text and voice.

`
.google.cloud.ces.v1.GoogleSearchTool.PromptConfig prompt_config = 5 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-ces/latest/com.google.cloud.ces.v1.GoogleSearchTool.PromptConfigOrBuilder` |   |

### hasPromptConfig()

    public abstract boolean hasPromptConfig()

Optional. Prompt instructions passed to planner on how the search results
should be processed for text and voice.

`
.google.cloud.ces.v1.GoogleSearchTool.PromptConfig prompt_config = 5 [(.google.api.field_behavior) = OPTIONAL];
`

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