Class GoogleSearchTool.Builder (0.1.0)

public static final class GoogleSearchTool.Builder extends GeneratedMessage.Builder<GoogleSearchTool.Builder> implements GoogleSearchToolOrBuilder

Represents a tool to perform Google web searches for grounding. See https://cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool#google-search.

Protobuf type google.cloud.ces.v1.GoogleSearchTool

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllContextUrls(Iterable<String> values)

public GoogleSearchTool.Builder addAllContextUrls(Iterable<String> values)

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
values Iterable<String>

The contextUrls to add.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

addAllExcludeDomains(Iterable<String> values)

public GoogleSearchTool.Builder addAllExcludeDomains(Iterable<String> values)

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
values Iterable<String>

The excludeDomains to add.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

addAllPreferredDomains(Iterable<String> values)

public GoogleSearchTool.Builder addAllPreferredDomains(Iterable<String> values)

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
values Iterable<String>

The preferredDomains to add.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

addContextUrls(String value)

public GoogleSearchTool.Builder addContextUrls(String value)

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
value String

The contextUrls to add.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

addContextUrlsBytes(ByteString value)

public GoogleSearchTool.Builder addContextUrlsBytes(ByteString value)

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
value ByteString

The bytes of the contextUrls to add.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

addExcludeDomains(String value)

public GoogleSearchTool.Builder addExcludeDomains(String value)

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
value String

The excludeDomains to add.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

addExcludeDomainsBytes(ByteString value)

public GoogleSearchTool.Builder addExcludeDomainsBytes(ByteString value)

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
value ByteString

The bytes of the excludeDomains to add.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

addPreferredDomains(String value)

public GoogleSearchTool.Builder addPreferredDomains(String value)

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
value String

The preferredDomains to add.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

addPreferredDomainsBytes(ByteString value)

public GoogleSearchTool.Builder addPreferredDomainsBytes(ByteString value)

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
value ByteString

The bytes of the preferredDomains to add.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

build()

public GoogleSearchTool build()
Returns
Type Description
GoogleSearchTool

buildPartial()

public GoogleSearchTool buildPartial()
Returns
Type Description
GoogleSearchTool

clear()

public GoogleSearchTool.Builder clear()
Returns
Type Description
GoogleSearchTool.Builder
Overrides

clearContextUrls()

public GoogleSearchTool.Builder clearContextUrls()

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
GoogleSearchTool.Builder

This builder for chaining.

clearDescription()

public GoogleSearchTool.Builder clearDescription()

Optional. Description of the tool's purpose.

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

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

clearExcludeDomains()

public GoogleSearchTool.Builder clearExcludeDomains()

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
GoogleSearchTool.Builder

This builder for chaining.

clearName()

public GoogleSearchTool.Builder clearName()

Required. The name of the tool.

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

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

clearPreferredDomains()

public GoogleSearchTool.Builder clearPreferredDomains()

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
GoogleSearchTool.Builder

This builder for chaining.

clearPromptConfig()

public GoogleSearchTool.Builder clearPromptConfig()

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
GoogleSearchTool.Builder

getContextUrls(int index)

public 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 int

The index of the element to return.

Returns
Type Description
String

The contextUrls at the given index.

getContextUrlsBytes(int index)

public 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 int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the contextUrls at the given index.

getContextUrlsCount()

public 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
int

The count of contextUrls.

getContextUrlsList()

public ProtocolStringList 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
ProtocolStringList

A list containing the contextUrls.

getDefaultInstanceForType()

public GoogleSearchTool getDefaultInstanceForType()
Returns
Type Description
GoogleSearchTool

getDescription()

public String getDescription()

Optional. Description of the tool's purpose.

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

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Description of the tool's purpose.

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

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getExcludeDomains(int index)

public 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 int

The index of the element to return.

Returns
Type Description
String

The excludeDomains at the given index.

getExcludeDomainsBytes(int index)

public 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 int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the excludeDomains at the given index.

getExcludeDomainsCount()

public 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
int

The count of excludeDomains.

getExcludeDomainsList()

public ProtocolStringList 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
ProtocolStringList

A list containing the excludeDomains.

getName()

public String getName()

Required. The name of the tool.

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The name of the tool.

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

Returns
Type Description
ByteString

The bytes for name.

getPreferredDomains(int index)

public 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 int

The index of the element to return.

Returns
Type Description
String

The preferredDomains at the given index.

getPreferredDomainsBytes(int index)

public 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 int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the preferredDomains at the given index.

getPreferredDomainsCount()

public 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
int

The count of preferredDomains.

getPreferredDomainsList()

public ProtocolStringList 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
ProtocolStringList

A list containing the preferredDomains.

getPromptConfig()

public 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
GoogleSearchTool.PromptConfig

The promptConfig.

getPromptConfigBuilder()

public GoogleSearchTool.PromptConfig.Builder getPromptConfigBuilder()

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
GoogleSearchTool.PromptConfig.Builder

getPromptConfigOrBuilder()

public 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
GoogleSearchTool.PromptConfigOrBuilder

hasPromptConfig()

public 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
boolean

Whether the promptConfig field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GoogleSearchTool other)

public GoogleSearchTool.Builder mergeFrom(GoogleSearchTool other)
Parameter
Name Description
other GoogleSearchTool
Returns
Type Description
GoogleSearchTool.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public GoogleSearchTool.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GoogleSearchTool.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public GoogleSearchTool.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
GoogleSearchTool.Builder
Overrides

mergePromptConfig(GoogleSearchTool.PromptConfig value)

public GoogleSearchTool.Builder mergePromptConfig(GoogleSearchTool.PromptConfig value)

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];

Parameter
Name Description
value GoogleSearchTool.PromptConfig
Returns
Type Description
GoogleSearchTool.Builder

setContextUrls(int index, String value)

public GoogleSearchTool.Builder setContextUrls(int index, String value)

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];

Parameters
Name Description
index int

The index to set the value at.

value String

The contextUrls to set.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

setDescription(String value)

public GoogleSearchTool.Builder setDescription(String value)

Optional. Description of the tool's purpose.

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

Parameter
Name Description
value String

The description to set.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public GoogleSearchTool.Builder setDescriptionBytes(ByteString value)

Optional. Description of the tool's purpose.

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

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

setExcludeDomains(int index, String value)

public GoogleSearchTool.Builder setExcludeDomains(int index, String value)

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];

Parameters
Name Description
index int

The index to set the value at.

value String

The excludeDomains to set.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

setName(String value)

public GoogleSearchTool.Builder setName(String value)

Required. The name of the tool.

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

setNameBytes(ByteString value)

public GoogleSearchTool.Builder setNameBytes(ByteString value)

Required. The name of the tool.

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

setPreferredDomains(int index, String value)

public GoogleSearchTool.Builder setPreferredDomains(int index, String value)

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];

Parameters
Name Description
index int

The index to set the value at.

value String

The preferredDomains to set.

Returns
Type Description
GoogleSearchTool.Builder

This builder for chaining.

setPromptConfig(GoogleSearchTool.PromptConfig value)

public GoogleSearchTool.Builder setPromptConfig(GoogleSearchTool.PromptConfig value)

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];

Parameter
Name Description
value GoogleSearchTool.PromptConfig
Returns
Type Description
GoogleSearchTool.Builder

setPromptConfig(GoogleSearchTool.PromptConfig.Builder builderForValue)

public GoogleSearchTool.Builder setPromptConfig(GoogleSearchTool.PromptConfig.Builder builderForValue)

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];

Parameter
Name Description
builderForValue GoogleSearchTool.PromptConfig.Builder
Returns
Type Description
GoogleSearchTool.Builder