Class GoogleSearchTool (0.1.0)

public final class GoogleSearchTool extends GeneratedMessage 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 Fields

CONTEXT_URLS_FIELD_NUMBER

public static final int CONTEXT_URLS_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

EXCLUDE_DOMAINS_FIELD_NUMBER

public static final int EXCLUDE_DOMAINS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PREFERRED_DOMAINS_FIELD_NUMBER

public static final int PREFERRED_DOMAINS_FIELD_NUMBER
Field Value
Type Description
int

PROMPT_CONFIG_FIELD_NUMBER

public static final int PROMPT_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static GoogleSearchTool getDefaultInstance()
Returns
Type Description
GoogleSearchTool

getDescriptor()

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

newBuilder()

public static GoogleSearchTool.Builder newBuilder()
Returns
Type Description
GoogleSearchTool.Builder

newBuilder(GoogleSearchTool prototype)

public static GoogleSearchTool.Builder newBuilder(GoogleSearchTool prototype)
Parameter
Name Description
prototype GoogleSearchTool
Returns
Type Description
GoogleSearchTool.Builder

parseDelimitedFrom(InputStream input)

public static GoogleSearchTool parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
GoogleSearchTool
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static GoogleSearchTool parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GoogleSearchTool
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static GoogleSearchTool parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
GoogleSearchTool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static GoogleSearchTool parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GoogleSearchTool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static GoogleSearchTool parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
GoogleSearchTool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static GoogleSearchTool parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GoogleSearchTool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static GoogleSearchTool parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
GoogleSearchTool
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static GoogleSearchTool parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GoogleSearchTool
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static GoogleSearchTool parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
GoogleSearchTool
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static GoogleSearchTool parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GoogleSearchTool
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static GoogleSearchTool parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
GoogleSearchTool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static GoogleSearchTool parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GoogleSearchTool
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<GoogleSearchTool> parser()
Returns
Type Description
Parser<GoogleSearchTool>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

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.

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.

getParserForType()

public Parser<GoogleSearchTool> getParserForType()
Returns
Type Description
Parser<GoogleSearchTool>
Overrides

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.

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public GoogleSearchTool.Builder newBuilderForType()
Returns
Type Description
GoogleSearchTool.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected GoogleSearchTool.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
GoogleSearchTool.Builder
Overrides

toBuilder()

public GoogleSearchTool.Builder toBuilder()
Returns
Type Description
GoogleSearchTool.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException