Class SearchKnowledgeRequest.Builder (4.52.0)

public static final class SearchKnowledgeRequest.Builder extends GeneratedMessageV3.Builder<SearchKnowledgeRequest.Builder> implements SearchKnowledgeRequestOrBuilder

The request message for Conversations.SearchKnowledge.

Protobuf type google.cloud.dialogflow.v2.SearchKnowledgeRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SearchKnowledgeRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SearchKnowledgeRequest.Builder
Overrides

build()

public SearchKnowledgeRequest build()
Returns
Type Description
SearchKnowledgeRequest

buildPartial()

public SearchKnowledgeRequest buildPartial()
Returns
Type Description
SearchKnowledgeRequest

clear()

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

clearConversation()

public SearchKnowledgeRequest.Builder clearConversation()

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.resource_reference) = { ... }

Returns
Type Description
SearchKnowledgeRequest.Builder

This builder for chaining.

clearConversationProfile()

public SearchKnowledgeRequest.Builder clearConversationProfile()

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SearchKnowledgeRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SearchKnowledgeRequest.Builder
Overrides

clearLatestMessage()

public SearchKnowledgeRequest.Builder clearLatestMessage()

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.resource_reference) = { ... }

Returns
Type Description
SearchKnowledgeRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SearchKnowledgeRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SearchKnowledgeRequest.Builder
Overrides

clearParent()

public SearchKnowledgeRequest.Builder clearParent()

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

string parent = 6;

Returns
Type Description
SearchKnowledgeRequest.Builder

This builder for chaining.

clearQuery()

public SearchKnowledgeRequest.Builder clearQuery()

Required. The natural language text query for knowledge search.

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

Returns
Type Description
SearchKnowledgeRequest.Builder

clearSessionId()

public SearchKnowledgeRequest.Builder clearSessionId()

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;

Returns
Type Description
SearchKnowledgeRequest.Builder

This builder for chaining.

clone()

public SearchKnowledgeRequest.Builder clone()
Returns
Type Description
SearchKnowledgeRequest.Builder
Overrides

getConversation()

public String getConversation()

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.resource_reference) = { ... }

Returns
Type Description
String

The conversation.

getConversationBytes()

public ByteString getConversationBytes()

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

getDescriptorForType()

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

getLatestMessage()

public String getLatestMessage()

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.resource_reference) = { ... }

Returns
Type Description
String

The latestMessage.

getLatestMessageBytes()

public ByteString getLatestMessageBytes()

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.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for latestMessage.

getParent()

public String getParent()

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

string parent = 6;

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

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

string parent = 6;

Returns
Type Description
ByteString

The bytes for parent.

getQuery()

public TextInput getQuery()

Required. The natural language text query for knowledge search.

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

Returns
Type Description
TextInput

The query.

getQueryBuilder()

public TextInput.Builder getQueryBuilder()

Required. The natural language text query for knowledge search.

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

Returns
Type Description
TextInput.Builder

getQueryOrBuilder()

public TextInputOrBuilder getQueryOrBuilder()

Required. The natural language text query for knowledge search.

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

Returns
Type Description
TextInputOrBuilder

getSessionId()

public String getSessionId()

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;

Returns
Type Description
String

The sessionId.

getSessionIdBytes()

public ByteString getSessionIdBytes()

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;

Returns
Type Description
ByteString

The bytes for sessionId.

hasQuery()

public boolean hasQuery()

Required. The natural language text query for knowledge search.

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

Returns
Type Description
boolean

Whether the query field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SearchKnowledgeRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeQuery(TextInput value)

public SearchKnowledgeRequest.Builder mergeQuery(TextInput value)

Required. The natural language text query for knowledge search.

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

Parameter
Name Description
value TextInput
Returns
Type Description
SearchKnowledgeRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SearchKnowledgeRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SearchKnowledgeRequest.Builder
Overrides

setConversation(String value)

public SearchKnowledgeRequest.Builder setConversation(String value)

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.resource_reference) = { ... }

Parameter
Name Description
value String

The conversation to set.

Returns
Type Description
SearchKnowledgeRequest.Builder

This builder for chaining.

setConversationBytes(ByteString value)

public SearchKnowledgeRequest.Builder setConversationBytes(ByteString value)

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.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for conversation to set.

Returns
Type Description
SearchKnowledgeRequest.Builder

This builder for chaining.

setConversationProfile(String value)

public SearchKnowledgeRequest.Builder setConversationProfile(String value)

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) = { ... }

Parameter
Name Description
value String

The conversationProfile to set.

Returns
Type Description
SearchKnowledgeRequest.Builder

This builder for chaining.

setConversationProfileBytes(ByteString value)

public SearchKnowledgeRequest.Builder setConversationProfileBytes(ByteString value)

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) = { ... }

Parameter
Name Description
value ByteString

The bytes for conversationProfile to set.

Returns
Type Description
SearchKnowledgeRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SearchKnowledgeRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SearchKnowledgeRequest.Builder
Overrides

setLatestMessage(String value)

public SearchKnowledgeRequest.Builder setLatestMessage(String value)

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.resource_reference) = { ... }

Parameter
Name Description
value String

The latestMessage to set.

Returns
Type Description
SearchKnowledgeRequest.Builder

This builder for chaining.

setLatestMessageBytes(ByteString value)

public SearchKnowledgeRequest.Builder setLatestMessageBytes(ByteString value)

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.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for latestMessage to set.

Returns
Type Description
SearchKnowledgeRequest.Builder

This builder for chaining.

setParent(String value)

public SearchKnowledgeRequest.Builder setParent(String value)

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

string parent = 6;

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
SearchKnowledgeRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public SearchKnowledgeRequest.Builder setParentBytes(ByteString value)

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

string parent = 6;

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
SearchKnowledgeRequest.Builder

This builder for chaining.

setQuery(TextInput value)

public SearchKnowledgeRequest.Builder setQuery(TextInput value)

Required. The natural language text query for knowledge search.

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

Parameter
Name Description
value TextInput
Returns
Type Description
SearchKnowledgeRequest.Builder

setQuery(TextInput.Builder builderForValue)

public SearchKnowledgeRequest.Builder setQuery(TextInput.Builder builderForValue)

Required. The natural language text query for knowledge search.

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

Parameter
Name Description
builderForValue TextInput.Builder
Returns
Type Description
SearchKnowledgeRequest.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SearchKnowledgeRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SearchKnowledgeRequest.Builder
Overrides

setSessionId(String value)

public SearchKnowledgeRequest.Builder setSessionId(String value)

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;

Parameter
Name Description
value String

The sessionId to set.

Returns
Type Description
SearchKnowledgeRequest.Builder

This builder for chaining.

setSessionIdBytes(ByteString value)

public SearchKnowledgeRequest.Builder setSessionIdBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for sessionId to set.

Returns
Type Description
SearchKnowledgeRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final SearchKnowledgeRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SearchKnowledgeRequest.Builder
Overrides