Class SearchKnowledgeRequest (4.61.0)

public final class SearchKnowledgeRequest extends GeneratedMessageV3 implements SearchKnowledgeRequestOrBuilder

The request message for Conversations.SearchKnowledge.

Protobuf type google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest

Static Fields

CONVERSATION_FIELD_NUMBER

public static final int CONVERSATION_FIELD_NUMBER
Field Value
Type Description
int

CONVERSATION_PROFILE_FIELD_NUMBER

public static final int CONVERSATION_PROFILE_FIELD_NUMBER
Field Value
Type Description
int

END_USER_METADATA_FIELD_NUMBER

public static final int END_USER_METADATA_FIELD_NUMBER
Field Value
Type Description
int

EXACT_SEARCH_FIELD_NUMBER

public static final int EXACT_SEARCH_FIELD_NUMBER
Field Value
Type Description
int

LATEST_MESSAGE_FIELD_NUMBER

public static final int LATEST_MESSAGE_FIELD_NUMBER
Field Value
Type Description
int

PARENT_FIELD_NUMBER

public static final int PARENT_FIELD_NUMBER
Field Value
Type Description
int

QUERY_FIELD_NUMBER

public static final int QUERY_FIELD_NUMBER
Field Value
Type Description
int

QUERY_SOURCE_FIELD_NUMBER

public static final int QUERY_SOURCE_FIELD_NUMBER
Field Value
Type Description
int

SEARCH_CONFIG_FIELD_NUMBER

public static final int SEARCH_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

SESSION_ID_FIELD_NUMBER

public static final int SESSION_ID_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static SearchKnowledgeRequest getDefaultInstance()
Returns
Type Description
SearchKnowledgeRequest

getDescriptor()

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

newBuilder()

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

newBuilder(SearchKnowledgeRequest prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getConversation()

public String getConversation()

Optional. The conversation (between human agent and end user) where the search request is triggered. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

string conversation = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The conversation.

getConversationBytes()

public ByteString getConversationBytes()

Optional. The conversation (between human agent and end user) where the search request is triggered. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

string conversation = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for conversation.

getConversationProfile()

public String getConversationProfile()

Required. The conversation profile used to configure the search. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.

string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The conversationProfile.

getConversationProfileBytes()

public ByteString getConversationProfileBytes()

Required. The conversation profile used to configure the search. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.

string conversation_profile = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for conversationProfile.

getDefaultInstanceForType()

public SearchKnowledgeRequest getDefaultInstanceForType()
Returns
Type Description
SearchKnowledgeRequest

getEndUserMetadata()

public Struct getEndUserMetadata()

Optional. Information about the end-user to improve the relevance and accuracy of generative answers.

This will be interpreted and used by a language model, so, for good results, the data should be self-descriptive, and in a simple structure.

Example:

<code><code>json { "subscription plan": "Business Premium Plus", "devices owned": [ {"model": "Google Pixel 7"}, {"model": "Google Pixel Tablet"} ] } </code></code>

.google.protobuf.Struct end_user_metadata = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Struct

The endUserMetadata.

getEndUserMetadataOrBuilder()

public StructOrBuilder getEndUserMetadataOrBuilder()

Optional. Information about the end-user to improve the relevance and accuracy of generative answers.

This will be interpreted and used by a language model, so, for good results, the data should be self-descriptive, and in a simple structure.

Example:

<code><code>json { "subscription plan": "Business Premium Plus", "devices owned": [ {"model": "Google Pixel 7"}, {"model": "Google Pixel Tablet"} ] } </code></code>

.google.protobuf.Struct end_user_metadata = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
StructOrBuilder

getExactSearch()

public boolean getExactSearch()

Optional. Whether to search the query exactly without query rewrite.

bool exact_search = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The exactSearch.

getLatestMessage()

public String getLatestMessage()

Optional. The name of the latest conversation message when the request is triggered. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.

string latest_message = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The latestMessage.

getLatestMessageBytes()

public ByteString getLatestMessageBytes()

Optional. The name of the latest conversation message when the request is triggered. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.

string latest_message = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for latestMessage.

getParent()

public String getParent()

Required. The parent resource contains the conversation profile Format: 'projects/<Project ID>' or projects/<Project ID>/locations/<Location ID>.

string parent = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The parent resource contains the conversation profile Format: 'projects/<Project ID>' or projects/<Project ID>/locations/<Location ID>.

string parent = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for parent.

getParserForType()

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

getQuery()

public TextInput getQuery()

Required. The natural language text query for knowledge search.

.google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TextInput

The query.

getQueryOrBuilder()

public TextInputOrBuilder getQueryOrBuilder()

Required. The natural language text query for knowledge search.

.google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TextInputOrBuilder

getQuerySource()

public SearchKnowledgeRequest.QuerySource getQuerySource()

Optional. The source of the query in the request.

.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest.QuerySource query_source = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SearchKnowledgeRequest.QuerySource

The querySource.

getQuerySourceValue()

public int getQuerySourceValue()

Optional. The source of the query in the request.

.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest.QuerySource query_source = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for querySource.

getSearchConfig()

public SearchKnowledgeRequest.SearchConfig getSearchConfig()

Optional. Configuration specific to search queries with data stores.

.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest.SearchConfig search_config = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SearchKnowledgeRequest.SearchConfig

The searchConfig.

getSearchConfigOrBuilder()

public SearchKnowledgeRequest.SearchConfigOrBuilder getSearchConfigOrBuilder()

Optional. Configuration specific to search queries with data stores.

.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest.SearchConfig search_config = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SearchKnowledgeRequest.SearchConfigOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSessionId()

public String getSessionId()

Required. The ID of the search session. The session_id can be combined with Dialogflow V3 Agent ID retrieved from conversation profile or on its own to identify a search session. The search history of the same session will impact the search result. It's up to the API caller to choose an appropriate Session ID. It can be a random number or some type of session identifiers (preferably hashed). The length must not exceed 36 characters.

string session_id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The sessionId.

getSessionIdBytes()

public ByteString getSessionIdBytes()

Required. The ID of the search session. The session_id can be combined with Dialogflow V3 Agent ID retrieved from conversation profile or on its own to identify a search session. The search history of the same session will impact the search result. It's up to the API caller to choose an appropriate Session ID. It can be a random number or some type of session identifiers (preferably hashed). The length must not exceed 36 characters.

string session_id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for sessionId.

hasEndUserMetadata()

public boolean hasEndUserMetadata()

Optional. Information about the end-user to improve the relevance and accuracy of generative answers.

This will be interpreted and used by a language model, so, for good results, the data should be self-descriptive, and in a simple structure.

Example:

<code><code>json { "subscription plan": "Business Premium Plus", "devices owned": [ {"model": "Google Pixel 7"}, {"model": "Google Pixel Tablet"} ] } </code></code>

.google.protobuf.Struct end_user_metadata = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the endUserMetadata field is set.

hasQuery()

public boolean hasQuery()

Required. The natural language text query for knowledge search.

.google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the query field is set.

hasSearchConfig()

public boolean hasSearchConfig()

Optional. Configuration specific to search queries with data stores.

.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest.SearchConfig search_config = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the searchConfig field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected SearchKnowledgeRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
SearchKnowledgeRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

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