Class CompleteQueryResponse.CompletionResult

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

public static final class CompleteQueryResponse.CompletionResult extends com.google.protobuf.GeneratedMessage implements CompleteQueryResponse.CompletionResultOrBuilder
 Resource that represents completion results.
 
Protobuf type google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult
See Also:
  • Field Details

    • SUGGESTION_FIELD_NUMBER

      public static final int SUGGESTION_FIELD_NUMBER
      See Also:
    • ATTRIBUTES_FIELD_NUMBER

      public static final int ATTRIBUTES_FIELD_NUMBER
      See Also:
    • FACETS_FIELD_NUMBER

      public static final int FACETS_FIELD_NUMBER
      See Also:
    • TOTAL_PRODUCT_COUNT_FIELD_NUMBER

      public static final int TOTAL_PRODUCT_COUNT_FIELD_NUMBER
      See Also:
  • 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
    • internalGetFieldAccessorTable

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

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static CompleteQueryResponse.CompletionResult parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CompleteQueryResponse.CompletionResult parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CompleteQueryResponse.CompletionResult parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CompleteQueryResponse.CompletionResult parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CompleteQueryResponse.CompletionResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CompleteQueryResponse.CompletionResult parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CompleteQueryResponse.CompletionResult parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CompleteQueryResponse.CompletionResult parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static CompleteQueryResponse.CompletionResult parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static CompleteQueryResponse.CompletionResult parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CompleteQueryResponse.CompletionResult parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CompleteQueryResponse.CompletionResult parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected CompleteQueryResponse.CompletionResult.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static CompleteQueryResponse.CompletionResult getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<CompleteQueryResponse.CompletionResult> parser()
    • getParserForType

      public com.google.protobuf.Parser<CompleteQueryResponse.CompletionResult> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

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