Class SearchRequest.Builder

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

    public static final class SearchRequest.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<SearchRequest.Builder>
    implements SearchRequestOrBuilder
     Request message for
     [EnterpriseKnowledgeGraphService.Search][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.Search].
     
    Protobuf type google.cloud.enterpriseknowledgegraph.v1.SearchRequest
    • 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<SearchRequest.Builder>
      • clear

        public SearchRequest.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<SearchRequest.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<SearchRequest.Builder>
      • getDefaultInstanceForType

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

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

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

        public SearchRequest.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<SearchRequest.Builder>
      • setField

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

        public SearchRequest.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<SearchRequest.Builder>
      • clearOneof

        public SearchRequest.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<SearchRequest.Builder>
      • setRepeatedField

        public SearchRequest.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<SearchRequest.Builder>
      • addRepeatedField

        public SearchRequest.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<SearchRequest.Builder>
      • mergeFrom

        public SearchRequest.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SearchRequest.Builder>
      • isInitialized

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

        public SearchRequest.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<SearchRequest.Builder>
        Throws:
        IOException
      • getParent

        public String getParent()
         Required. The name of the Entity's parent resource.
         Format:
         `projects/{project}/locations/{location}`
         
        string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Specified by:
        getParent in interface SearchRequestOrBuilder
        Returns:
        The parent.
      • getParentBytes

        public com.google.protobuf.ByteString getParentBytes()
         Required. The name of the Entity's parent resource.
         Format:
         `projects/{project}/locations/{location}`
         
        string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Specified by:
        getParentBytes in interface SearchRequestOrBuilder
        Returns:
        The bytes for parent.
      • setParent

        public SearchRequest.Builder setParent​(String value)
         Required. The name of the Entity's parent resource.
         Format:
         `projects/{project}/locations/{location}`
         
        string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Parameters:
        value - The parent to set.
        Returns:
        This builder for chaining.
      • clearParent

        public SearchRequest.Builder clearParent()
         Required. The name of the Entity's parent resource.
         Format:
         `projects/{project}/locations/{location}`
         
        string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Returns:
        This builder for chaining.
      • setParentBytes

        public SearchRequest.Builder setParentBytes​(com.google.protobuf.ByteString value)
         Required. The name of the Entity's parent resource.
         Format:
         `projects/{project}/locations/{location}`
         
        string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Parameters:
        value - The bytes for parent to set.
        Returns:
        This builder for chaining.
      • getQuery

        public String getQuery()
         Required. The literal query string for search.
         
        string query = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getQuery in interface SearchRequestOrBuilder
        Returns:
        The query.
      • getQueryBytes

        public com.google.protobuf.ByteString getQueryBytes()
         Required. The literal query string for search.
         
        string query = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getQueryBytes in interface SearchRequestOrBuilder
        Returns:
        The bytes for query.
      • setQuery

        public SearchRequest.Builder setQuery​(String value)
         Required. The literal query string for search.
         
        string query = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The query to set.
        Returns:
        This builder for chaining.
      • clearQuery

        public SearchRequest.Builder clearQuery()
         Required. The literal query string for search.
         
        string query = 2 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setQueryBytes

        public SearchRequest.Builder setQueryBytes​(com.google.protobuf.ByteString value)
         Required. The literal query string for search.
         
        string query = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for query to set.
        Returns:
        This builder for chaining.
      • getLanguagesList

        public com.google.protobuf.ProtocolStringList getLanguagesList()
         The list of language codes (defined in ISO 693) to run the query with,
         e.g. 'en'.
         
        repeated string languages = 3;
        Specified by:
        getLanguagesList in interface SearchRequestOrBuilder
        Returns:
        A list containing the languages.
      • getLanguagesCount

        public int getLanguagesCount()
         The list of language codes (defined in ISO 693) to run the query with,
         e.g. 'en'.
         
        repeated string languages = 3;
        Specified by:
        getLanguagesCount in interface SearchRequestOrBuilder
        Returns:
        The count of languages.
      • getLanguages

        public String getLanguages​(int index)
         The list of language codes (defined in ISO 693) to run the query with,
         e.g. 'en'.
         
        repeated string languages = 3;
        Specified by:
        getLanguages in interface SearchRequestOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The languages at the given index.
      • getLanguagesBytes

        public com.google.protobuf.ByteString getLanguagesBytes​(int index)
         The list of language codes (defined in ISO 693) to run the query with,
         e.g. 'en'.
         
        repeated string languages = 3;
        Specified by:
        getLanguagesBytes in interface SearchRequestOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the languages at the given index.
      • setLanguages

        public SearchRequest.Builder setLanguages​(int index,
                                                  String value)
         The list of language codes (defined in ISO 693) to run the query with,
         e.g. 'en'.
         
        repeated string languages = 3;
        Parameters:
        index - The index to set the value at.
        value - The languages to set.
        Returns:
        This builder for chaining.
      • addLanguages

        public SearchRequest.Builder addLanguages​(String value)
         The list of language codes (defined in ISO 693) to run the query with,
         e.g. 'en'.
         
        repeated string languages = 3;
        Parameters:
        value - The languages to add.
        Returns:
        This builder for chaining.
      • addAllLanguages

        public SearchRequest.Builder addAllLanguages​(Iterable<String> values)
         The list of language codes (defined in ISO 693) to run the query with,
         e.g. 'en'.
         
        repeated string languages = 3;
        Parameters:
        values - The languages to add.
        Returns:
        This builder for chaining.
      • clearLanguages

        public SearchRequest.Builder clearLanguages()
         The list of language codes (defined in ISO 693) to run the query with,
         e.g. 'en'.
         
        repeated string languages = 3;
        Returns:
        This builder for chaining.
      • addLanguagesBytes

        public SearchRequest.Builder addLanguagesBytes​(com.google.protobuf.ByteString value)
         The list of language codes (defined in ISO 693) to run the query with,
         e.g. 'en'.
         
        repeated string languages = 3;
        Parameters:
        value - The bytes of the languages to add.
        Returns:
        This builder for chaining.
      • getTypesList

        public com.google.protobuf.ProtocolStringList getTypesList()
         Restricts returned entities with these types, e.g. Person
         (as defined in http://schema.org/Person). If multiple types are specified,
         returned entities will contain one or more of these types.
         
        repeated string types = 4;
        Specified by:
        getTypesList in interface SearchRequestOrBuilder
        Returns:
        A list containing the types.
      • getTypesCount

        public int getTypesCount()
         Restricts returned entities with these types, e.g. Person
         (as defined in http://schema.org/Person). If multiple types are specified,
         returned entities will contain one or more of these types.
         
        repeated string types = 4;
        Specified by:
        getTypesCount in interface SearchRequestOrBuilder
        Returns:
        The count of types.
      • getTypes

        public String getTypes​(int index)
         Restricts returned entities with these types, e.g. Person
         (as defined in http://schema.org/Person). If multiple types are specified,
         returned entities will contain one or more of these types.
         
        repeated string types = 4;
        Specified by:
        getTypes in interface SearchRequestOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The types at the given index.
      • getTypesBytes

        public com.google.protobuf.ByteString getTypesBytes​(int index)
         Restricts returned entities with these types, e.g. Person
         (as defined in http://schema.org/Person). If multiple types are specified,
         returned entities will contain one or more of these types.
         
        repeated string types = 4;
        Specified by:
        getTypesBytes in interface SearchRequestOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the types at the given index.
      • setTypes

        public SearchRequest.Builder setTypes​(int index,
                                              String value)
         Restricts returned entities with these types, e.g. Person
         (as defined in http://schema.org/Person). If multiple types are specified,
         returned entities will contain one or more of these types.
         
        repeated string types = 4;
        Parameters:
        index - The index to set the value at.
        value - The types to set.
        Returns:
        This builder for chaining.
      • addTypes

        public SearchRequest.Builder addTypes​(String value)
         Restricts returned entities with these types, e.g. Person
         (as defined in http://schema.org/Person). If multiple types are specified,
         returned entities will contain one or more of these types.
         
        repeated string types = 4;
        Parameters:
        value - The types to add.
        Returns:
        This builder for chaining.
      • addAllTypes

        public SearchRequest.Builder addAllTypes​(Iterable<String> values)
         Restricts returned entities with these types, e.g. Person
         (as defined in http://schema.org/Person). If multiple types are specified,
         returned entities will contain one or more of these types.
         
        repeated string types = 4;
        Parameters:
        values - The types to add.
        Returns:
        This builder for chaining.
      • clearTypes

        public SearchRequest.Builder clearTypes()
         Restricts returned entities with these types, e.g. Person
         (as defined in http://schema.org/Person). If multiple types are specified,
         returned entities will contain one or more of these types.
         
        repeated string types = 4;
        Returns:
        This builder for chaining.
      • addTypesBytes

        public SearchRequest.Builder addTypesBytes​(com.google.protobuf.ByteString value)
         Restricts returned entities with these types, e.g. Person
         (as defined in http://schema.org/Person). If multiple types are specified,
         returned entities will contain one or more of these types.
         
        repeated string types = 4;
        Parameters:
        value - The bytes of the types to add.
        Returns:
        This builder for chaining.
      • hasLimit

        public boolean hasLimit()
         Limits the number of entities to be returned.
         
        .google.protobuf.Int32Value limit = 6;
        Specified by:
        hasLimit in interface SearchRequestOrBuilder
        Returns:
        Whether the limit field is set.
      • getLimit

        public com.google.protobuf.Int32Value getLimit()
         Limits the number of entities to be returned.
         
        .google.protobuf.Int32Value limit = 6;
        Specified by:
        getLimit in interface SearchRequestOrBuilder
        Returns:
        The limit.
      • setLimit

        public SearchRequest.Builder setLimit​(com.google.protobuf.Int32Value value)
         Limits the number of entities to be returned.
         
        .google.protobuf.Int32Value limit = 6;
      • setLimit

        public SearchRequest.Builder setLimit​(com.google.protobuf.Int32Value.Builder builderForValue)
         Limits the number of entities to be returned.
         
        .google.protobuf.Int32Value limit = 6;
      • mergeLimit

        public SearchRequest.Builder mergeLimit​(com.google.protobuf.Int32Value value)
         Limits the number of entities to be returned.
         
        .google.protobuf.Int32Value limit = 6;
      • clearLimit

        public SearchRequest.Builder clearLimit()
         Limits the number of entities to be returned.
         
        .google.protobuf.Int32Value limit = 6;
      • getLimitBuilder

        public com.google.protobuf.Int32Value.Builder getLimitBuilder()
         Limits the number of entities to be returned.
         
        .google.protobuf.Int32Value limit = 6;
      • getLimitOrBuilder

        public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder()
         Limits the number of entities to be returned.
         
        .google.protobuf.Int32Value limit = 6;
        Specified by:
        getLimitOrBuilder in interface SearchRequestOrBuilder
      • setUnknownFields

        public final SearchRequest.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<SearchRequest.Builder>
      • mergeUnknownFields

        public final SearchRequest.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<SearchRequest.Builder>