Class CompleteQueryResponse.CompletionResult.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CompleteQueryResponse.CompletionResult.Builder>
com.google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult.Builder
All Implemented Interfaces:
CompleteQueryResponse.CompletionResultOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CompleteQueryResponse.CompletionResult

public static final class CompleteQueryResponse.CompletionResult.Builder extends com.google.protobuf.GeneratedMessage.Builder<CompleteQueryResponse.CompletionResult.Builder> implements CompleteQueryResponse.CompletionResultOrBuilder
 Resource that represents completion results.
 
Protobuf type google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<CompleteQueryResponse.CompletionResult.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<CompleteQueryResponse.CompletionResult.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<CompleteQueryResponse.CompletionResult.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.GeneratedMessage.Builder<CompleteQueryResponse.CompletionResult.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.GeneratedMessage.Builder<CompleteQueryResponse.CompletionResult.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

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

    • isInitialized

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

      public CompleteQueryResponse.CompletionResult.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<CompleteQueryResponse.CompletionResult.Builder>
      Throws:
      IOException
    • getSuggestion

      public String getSuggestion()
       The suggestion for the query.
       
      string suggestion = 1;
      Specified by:
      getSuggestion in interface CompleteQueryResponse.CompletionResultOrBuilder
      Returns:
      The suggestion.
    • getSuggestionBytes

      public com.google.protobuf.ByteString getSuggestionBytes()
       The suggestion for the query.
       
      string suggestion = 1;
      Specified by:
      getSuggestionBytes in interface CompleteQueryResponse.CompletionResultOrBuilder
      Returns:
      The bytes for suggestion.
    • setSuggestion

       The suggestion for the query.
       
      string suggestion = 1;
      Parameters:
      value - The suggestion to set.
      Returns:
      This builder for chaining.
    • clearSuggestion

       The suggestion for the query.
       
      string suggestion = 1;
      Returns:
      This builder for chaining.
    • setSuggestionBytes

      public CompleteQueryResponse.CompletionResult.Builder setSuggestionBytes(com.google.protobuf.ByteString value)
       The suggestion for the query.
       
      string suggestion = 1;
      Parameters:
      value - The bytes for suggestion to set.
      Returns:
      This builder for chaining.
    • getAttributesCount

      public int getAttributesCount()
      Description copied from interface: CompleteQueryResponse.CompletionResultOrBuilder
       Custom attributes for the suggestion term.
      
       * For `user-data`, the attributes are additional custom attributes
       ingested through BigQuery.
      
       * For `cloud-retail`, the attributes are product attributes generated
       by Cloud Retail. It requires
       [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details]
       is imported properly.
       
      map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2;
      Specified by:
      getAttributesCount in interface CompleteQueryResponse.CompletionResultOrBuilder
    • containsAttributes

      public boolean containsAttributes(String key)
       Custom attributes for the suggestion term.
      
       * For `user-data`, the attributes are additional custom attributes
       ingested through BigQuery.
      
       * For `cloud-retail`, the attributes are product attributes generated
       by Cloud Retail. It requires
       [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details]
       is imported properly.
       
      map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2;
      Specified by:
      containsAttributes in interface CompleteQueryResponse.CompletionResultOrBuilder
    • getAttributes

      @Deprecated public Map<String,CustomAttribute> getAttributes()
      Deprecated.
      Use getAttributesMap() instead.
      Specified by:
      getAttributes in interface CompleteQueryResponse.CompletionResultOrBuilder
    • getAttributesMap

      public Map<String,CustomAttribute> getAttributesMap()
       Custom attributes for the suggestion term.
      
       * For `user-data`, the attributes are additional custom attributes
       ingested through BigQuery.
      
       * For `cloud-retail`, the attributes are product attributes generated
       by Cloud Retail. It requires
       [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details]
       is imported properly.
       
      map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2;
      Specified by:
      getAttributesMap in interface CompleteQueryResponse.CompletionResultOrBuilder
    • getAttributesOrDefault

      public CustomAttribute getAttributesOrDefault(String key, CustomAttribute defaultValue)
       Custom attributes for the suggestion term.
      
       * For `user-data`, the attributes are additional custom attributes
       ingested through BigQuery.
      
       * For `cloud-retail`, the attributes are product attributes generated
       by Cloud Retail. It requires
       [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details]
       is imported properly.
       
      map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2;
      Specified by:
      getAttributesOrDefault in interface CompleteQueryResponse.CompletionResultOrBuilder
    • getAttributesOrThrow

      public CustomAttribute getAttributesOrThrow(String key)
       Custom attributes for the suggestion term.
      
       * For `user-data`, the attributes are additional custom attributes
       ingested through BigQuery.
      
       * For `cloud-retail`, the attributes are product attributes generated
       by Cloud Retail. It requires
       [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details]
       is imported properly.
       
      map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2;
      Specified by:
      getAttributesOrThrow in interface CompleteQueryResponse.CompletionResultOrBuilder
    • clearAttributes

    • removeAttributes

       Custom attributes for the suggestion term.
      
       * For `user-data`, the attributes are additional custom attributes
       ingested through BigQuery.
      
       * For `cloud-retail`, the attributes are product attributes generated
       by Cloud Retail. It requires
       [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details]
       is imported properly.
       
      map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2;
    • getMutableAttributes

      @Deprecated public Map<String,CustomAttribute> getMutableAttributes()
      Deprecated.
      Use alternate mutation accessors instead.
    • putAttributes

       Custom attributes for the suggestion term.
      
       * For `user-data`, the attributes are additional custom attributes
       ingested through BigQuery.
      
       * For `cloud-retail`, the attributes are product attributes generated
       by Cloud Retail. It requires
       [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details]
       is imported properly.
       
      map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2;
    • putAllAttributes

       Custom attributes for the suggestion term.
      
       * For `user-data`, the attributes are additional custom attributes
       ingested through BigQuery.
      
       * For `cloud-retail`, the attributes are product attributes generated
       by Cloud Retail. It requires
       [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details]
       is imported properly.
       
      map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2;
    • putAttributesBuilderIfAbsent

      public CustomAttribute.Builder putAttributesBuilderIfAbsent(String key)
       Custom attributes for the suggestion term.
      
       * For `user-data`, the attributes are additional custom attributes
       ingested through BigQuery.
      
       * For `cloud-retail`, the attributes are product attributes generated
       by Cloud Retail. It requires
       [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details]
       is imported properly.
       
      map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2;
    • getFacetsList

      public List<SearchResponse.Facet> getFacetsList()
       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
      Specified by:
      getFacetsList in interface CompleteQueryResponse.CompletionResultOrBuilder
    • getFacetsCount

      public int getFacetsCount()
       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
      Specified by:
      getFacetsCount in interface CompleteQueryResponse.CompletionResultOrBuilder
    • getFacets

      public SearchResponse.Facet getFacets(int index)
       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
      Specified by:
      getFacets in interface CompleteQueryResponse.CompletionResultOrBuilder
    • setFacets

       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
    • setFacets

      public CompleteQueryResponse.CompletionResult.Builder setFacets(int index, SearchResponse.Facet.Builder builderForValue)
       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
    • addFacets

       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
    • addFacets

       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
    • addFacets

       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
    • addFacets

      public CompleteQueryResponse.CompletionResult.Builder addFacets(int index, SearchResponse.Facet.Builder builderForValue)
       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
    • addAllFacets

       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
    • clearFacets

       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
    • removeFacets

      public CompleteQueryResponse.CompletionResult.Builder removeFacets(int index)
       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
    • getFacetsBuilder

      public SearchResponse.Facet.Builder getFacetsBuilder(int index)
       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
    • getFacetsOrBuilder

      public SearchResponse.FacetOrBuilder getFacetsOrBuilder(int index)
       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
      Specified by:
      getFacetsOrBuilder in interface CompleteQueryResponse.CompletionResultOrBuilder
    • getFacetsOrBuilderList

      public List<? extends SearchResponse.FacetOrBuilder> getFacetsOrBuilderList()
       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
      Specified by:
      getFacetsOrBuilderList in interface CompleteQueryResponse.CompletionResultOrBuilder
    • addFacetsBuilder

      public SearchResponse.Facet.Builder addFacetsBuilder()
       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
    • addFacetsBuilder

      public SearchResponse.Facet.Builder addFacetsBuilder(int index)
       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
    • getFacetsBuilderList

      public List<SearchResponse.Facet.Builder> getFacetsBuilderList()
       Facet information for the suggestion term. Gives the number of items
       resulting from a search with this suggestion term for each facet.
      
       This is an experimental feature for limited customers. If you want to
       receive this facet information, reach out to the Retail support team.
       
      repeated .google.cloud.retail.v2alpha.SearchResponse.Facet facets = 3;
    • getTotalProductCount

      public int getTotalProductCount()
       Total number of products associated with a search with this suggestion.
      
       This is an experimental feature for limited customers. If you want to
       receive this product count information, reach out to the Retail support
       team.
       
      int32 total_product_count = 4;
      Specified by:
      getTotalProductCount in interface CompleteQueryResponse.CompletionResultOrBuilder
      Returns:
      The totalProductCount.
    • setTotalProductCount

      public CompleteQueryResponse.CompletionResult.Builder setTotalProductCount(int value)
       Total number of products associated with a search with this suggestion.
      
       This is an experimental feature for limited customers. If you want to
       receive this product count information, reach out to the Retail support
       team.
       
      int32 total_product_count = 4;
      Parameters:
      value - The totalProductCount to set.
      Returns:
      This builder for chaining.
    • clearTotalProductCount

      public CompleteQueryResponse.CompletionResult.Builder clearTotalProductCount()
       Total number of products associated with a search with this suggestion.
      
       This is an experimental feature for limited customers. If you want to
       receive this product count information, reach out to the Retail support
       team.
       
      int32 total_product_count = 4;
      Returns:
      This builder for chaining.