Class SearchKnowledgeRequest.Builder

  • All Implemented Interfaces:
    SearchKnowledgeRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    SearchKnowledgeRequest

    public static final class SearchKnowledgeRequest.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<SearchKnowledgeRequest.Builder>
    implements SearchKnowledgeRequestOrBuilder
     The request message for
     [Conversations.SearchKnowledge][google.cloud.dialogflow.v2beta1.Conversations.SearchKnowledge].
     
    Protobuf type google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<SearchKnowledgeRequest.Builder>
      • clear

        public SearchKnowledgeRequest.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<SearchKnowledgeRequest.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<SearchKnowledgeRequest.Builder>
      • getDefaultInstanceForType

        public SearchKnowledgeRequest getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public SearchKnowledgeRequest build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public SearchKnowledgeRequest buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public SearchKnowledgeRequest.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<SearchKnowledgeRequest.Builder>
      • clearField

        public SearchKnowledgeRequest.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<SearchKnowledgeRequest.Builder>
      • clearOneof

        public SearchKnowledgeRequest.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<SearchKnowledgeRequest.Builder>
      • setRepeatedField

        public SearchKnowledgeRequest.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                               int index,
                                                               Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<SearchKnowledgeRequest.Builder>
      • addRepeatedField

        public SearchKnowledgeRequest.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                               Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<SearchKnowledgeRequest.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<SearchKnowledgeRequest.Builder>
      • mergeFrom

        public SearchKnowledgeRequest.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                 throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SearchKnowledgeRequest.Builder>
        Throws:
        IOException
      • 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;
        Specified by:
        getParent in interface SearchKnowledgeRequestOrBuilder
        Returns:
        The parent.
      • getParentBytes

        public com.google.protobuf.ByteString getParentBytes()
         The parent resource contains the conversation profile
         Format: 'projects/<Project ID>' or `projects/<Project
         ID>/locations/<Location ID>`.
         
        string parent = 6;
        Specified by:
        getParentBytes in interface SearchKnowledgeRequestOrBuilder
        Returns:
        The bytes for parent.
      • setParent

        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;
        Parameters:
        value - The parent to set.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • setParentBytes

        public SearchKnowledgeRequest.Builder setParentBytes​(com.google.protobuf.ByteString value)
         The parent resource contains the conversation profile
         Format: 'projects/<Project ID>' or `projects/<Project
         ID>/locations/<Location ID>`.
         
        string parent = 6;
        Parameters:
        value - The bytes for parent to set.
        Returns:
        This builder for chaining.
      • 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];
        Specified by:
        hasQuery in interface SearchKnowledgeRequestOrBuilder
        Returns:
        Whether the query field is set.
      • 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];
        Specified by:
        getQuery in interface SearchKnowledgeRequestOrBuilder
        Returns:
        The query.
      • setQuery

        public SearchKnowledgeRequest.Builder setQuery​(TextInput value)
         Required. The natural language text query for knowledge search.
         
        .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED];
      • setQuery

        public SearchKnowledgeRequest.Builder setQuery​(TextInput.Builder builderForValue)
         Required. The natural language text query for knowledge search.
         
        .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED];
      • mergeQuery

        public SearchKnowledgeRequest.Builder mergeQuery​(TextInput value)
         Required. The natural language text query for knowledge search.
         
        .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED];
      • clearQuery

        public SearchKnowledgeRequest.Builder clearQuery()
         Required. The natural language text query for knowledge search.
         
        .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED];
      • getQueryBuilder

        public TextInput.Builder getQueryBuilder()
         Required. The natural language text query for knowledge search.
         
        .google.cloud.dialogflow.v2beta1.TextInput query = 1 [(.google.api.field_behavior) = REQUIRED];
      • 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) = { ... }
        Specified by:
        getConversationProfile in interface SearchKnowledgeRequestOrBuilder
        Returns:
        The conversationProfile.
      • getConversationProfileBytes

        public com.google.protobuf.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) = { ... }
        Specified by:
        getConversationProfileBytes in interface SearchKnowledgeRequestOrBuilder
        Returns:
        The bytes for conversationProfile.
      • setConversationProfile

        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) = { ... }
        Parameters:
        value - The conversationProfile to set.
        Returns:
        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:
        This builder for chaining.
      • setConversationProfileBytes

        public SearchKnowledgeRequest.Builder setConversationProfileBytes​(com.google.protobuf.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) = { ... }
        Parameters:
        value - The bytes for conversationProfile to set.
        Returns:
        This builder for chaining.
      • 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;
        Specified by:
        getSessionId in interface SearchKnowledgeRequestOrBuilder
        Returns:
        The sessionId.
      • getSessionIdBytes

        public com.google.protobuf.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;
        Specified by:
        getSessionIdBytes in interface SearchKnowledgeRequestOrBuilder
        Returns:
        The bytes for sessionId.
      • setSessionId

        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;
        Parameters:
        value - The sessionId to set.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • setSessionIdBytes

        public SearchKnowledgeRequest.Builder setSessionIdBytes​(com.google.protobuf.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;
        Parameters:
        value - The bytes for sessionId to set.
        Returns:
        This builder for chaining.
      • 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) = { ... }
        Specified by:
        getConversation in interface SearchKnowledgeRequestOrBuilder
        Returns:
        The conversation.
      • getConversationBytes

        public com.google.protobuf.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) = { ... }
        Specified by:
        getConversationBytes in interface SearchKnowledgeRequestOrBuilder
        Returns:
        The bytes for conversation.
      • setConversation

        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) = { ... }
        Parameters:
        value - The conversation to set.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • setConversationBytes

        public SearchKnowledgeRequest.Builder setConversationBytes​(com.google.protobuf.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) = { ... }
        Parameters:
        value - The bytes for conversation to set.
        Returns:
        This builder for chaining.
      • 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) = { ... }
        Specified by:
        getLatestMessage in interface SearchKnowledgeRequestOrBuilder
        Returns:
        The latestMessage.
      • getLatestMessageBytes

        public com.google.protobuf.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) = { ... }
        Specified by:
        getLatestMessageBytes in interface SearchKnowledgeRequestOrBuilder
        Returns:
        The bytes for latestMessage.
      • setLatestMessage

        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) = { ... }
        Parameters:
        value - The latestMessage to set.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • setLatestMessageBytes

        public SearchKnowledgeRequest.Builder setLatestMessageBytes​(com.google.protobuf.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) = { ... }
        Parameters:
        value - The bytes for latestMessage to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final SearchKnowledgeRequest.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SearchKnowledgeRequest.Builder>
      • mergeUnknownFields

        public final SearchKnowledgeRequest.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SearchKnowledgeRequest.Builder>