Class CompleteQueryResponse

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

@Generated public final class CompleteQueryResponse extends com.google.protobuf.GeneratedMessage implements CompleteQueryResponseOrBuilder
 Response of the autocomplete query.
 
Protobuf type google.cloud.retail.v2alpha.CompleteQueryResponse
See Also:
  • Field Details

    • COMPLETION_RESULTS_FIELD_NUMBER

      public static final int COMPLETION_RESULTS_FIELD_NUMBER
      See Also:
    • ATTRIBUTION_TOKEN_FIELD_NUMBER

      public static final int ATTRIBUTION_TOKEN_FIELD_NUMBER
      See Also:
    • RECENT_SEARCH_RESULTS_FIELD_NUMBER

      public static final int RECENT_SEARCH_RESULTS_FIELD_NUMBER
      See Also:
    • ATTRIBUTE_RESULTS_FIELD_NUMBER

      public static final int ATTRIBUTE_RESULTS_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
    • getCompletionResultsList

      public List<CompleteQueryResponse.CompletionResult> getCompletionResultsList()
       Results of the matching suggestions. The result list is ordered and the
       first result is top suggestion.
       
      repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult completion_results = 1;
      Specified by:
      getCompletionResultsList in interface CompleteQueryResponseOrBuilder
    • getCompletionResultsOrBuilderList

      public List<? extends CompleteQueryResponse.CompletionResultOrBuilder> getCompletionResultsOrBuilderList()
       Results of the matching suggestions. The result list is ordered and the
       first result is top suggestion.
       
      repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult completion_results = 1;
      Specified by:
      getCompletionResultsOrBuilderList in interface CompleteQueryResponseOrBuilder
    • getCompletionResultsCount

      public int getCompletionResultsCount()
       Results of the matching suggestions. The result list is ordered and the
       first result is top suggestion.
       
      repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult completion_results = 1;
      Specified by:
      getCompletionResultsCount in interface CompleteQueryResponseOrBuilder
    • getCompletionResults

      public CompleteQueryResponse.CompletionResult getCompletionResults(int index)
       Results of the matching suggestions. The result list is ordered and the
       first result is top suggestion.
       
      repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult completion_results = 1;
      Specified by:
      getCompletionResults in interface CompleteQueryResponseOrBuilder
    • getCompletionResultsOrBuilder

      public CompleteQueryResponse.CompletionResultOrBuilder getCompletionResultsOrBuilder(int index)
       Results of the matching suggestions. The result list is ordered and the
       first result is top suggestion.
       
      repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult completion_results = 1;
      Specified by:
      getCompletionResultsOrBuilder in interface CompleteQueryResponseOrBuilder
    • getAttributionToken

      public String getAttributionToken()
       A unique complete token. This should be included in the
       [UserEvent.completion_detail][google.cloud.retail.v2alpha.UserEvent.completion_detail]
       for search events resulting from this completion, which enables accurate
       attribution of complete model performance.
       
      string attribution_token = 2;
      Specified by:
      getAttributionToken in interface CompleteQueryResponseOrBuilder
      Returns:
      The attributionToken.
    • getAttributionTokenBytes

      public com.google.protobuf.ByteString getAttributionTokenBytes()
       A unique complete token. This should be included in the
       [UserEvent.completion_detail][google.cloud.retail.v2alpha.UserEvent.completion_detail]
       for search events resulting from this completion, which enables accurate
       attribution of complete model performance.
       
      string attribution_token = 2;
      Specified by:
      getAttributionTokenBytes in interface CompleteQueryResponseOrBuilder
      Returns:
      The bytes for attributionToken.
    • getRecentSearchResultsList

      @Deprecated public List<CompleteQueryResponse.RecentSearchResult> getRecentSearchResultsList()
      Deprecated.
       Deprecated. Matched recent searches of this user. The maximum number of
       recent searches is 10. This field is a restricted feature. If you want to
       enable it, contact Retail Search support.
      
       This feature is only available when
       [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
       field is set and [UserEvent][google.cloud.retail.v2alpha.UserEvent] is
       imported. The recent searches satisfy the follow rules:
      
       * They are ordered from latest to oldest.
      
       * They are matched with
       [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query]
       case insensitively.
      
       * They are transformed to lower case.
      
       * They are UTF-8 safe.
      
       Recent searches are deduplicated. More recent searches will be reserved
       when duplication happens.
       
      repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true];
      Specified by:
      getRecentSearchResultsList in interface CompleteQueryResponseOrBuilder
    • getRecentSearchResultsOrBuilderList

      @Deprecated public List<? extends CompleteQueryResponse.RecentSearchResultOrBuilder> getRecentSearchResultsOrBuilderList()
      Deprecated.
       Deprecated. Matched recent searches of this user. The maximum number of
       recent searches is 10. This field is a restricted feature. If you want to
       enable it, contact Retail Search support.
      
       This feature is only available when
       [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
       field is set and [UserEvent][google.cloud.retail.v2alpha.UserEvent] is
       imported. The recent searches satisfy the follow rules:
      
       * They are ordered from latest to oldest.
      
       * They are matched with
       [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query]
       case insensitively.
      
       * They are transformed to lower case.
      
       * They are UTF-8 safe.
      
       Recent searches are deduplicated. More recent searches will be reserved
       when duplication happens.
       
      repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true];
      Specified by:
      getRecentSearchResultsOrBuilderList in interface CompleteQueryResponseOrBuilder
    • getRecentSearchResultsCount

      @Deprecated public int getRecentSearchResultsCount()
      Deprecated.
       Deprecated. Matched recent searches of this user. The maximum number of
       recent searches is 10. This field is a restricted feature. If you want to
       enable it, contact Retail Search support.
      
       This feature is only available when
       [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
       field is set and [UserEvent][google.cloud.retail.v2alpha.UserEvent] is
       imported. The recent searches satisfy the follow rules:
      
       * They are ordered from latest to oldest.
      
       * They are matched with
       [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query]
       case insensitively.
      
       * They are transformed to lower case.
      
       * They are UTF-8 safe.
      
       Recent searches are deduplicated. More recent searches will be reserved
       when duplication happens.
       
      repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true];
      Specified by:
      getRecentSearchResultsCount in interface CompleteQueryResponseOrBuilder
    • getRecentSearchResults

      @Deprecated public CompleteQueryResponse.RecentSearchResult getRecentSearchResults(int index)
      Deprecated.
       Deprecated. Matched recent searches of this user. The maximum number of
       recent searches is 10. This field is a restricted feature. If you want to
       enable it, contact Retail Search support.
      
       This feature is only available when
       [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
       field is set and [UserEvent][google.cloud.retail.v2alpha.UserEvent] is
       imported. The recent searches satisfy the follow rules:
      
       * They are ordered from latest to oldest.
      
       * They are matched with
       [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query]
       case insensitively.
      
       * They are transformed to lower case.
      
       * They are UTF-8 safe.
      
       Recent searches are deduplicated. More recent searches will be reserved
       when duplication happens.
       
      repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true];
      Specified by:
      getRecentSearchResults in interface CompleteQueryResponseOrBuilder
    • getRecentSearchResultsOrBuilder

      @Deprecated public CompleteQueryResponse.RecentSearchResultOrBuilder getRecentSearchResultsOrBuilder(int index)
      Deprecated.
       Deprecated. Matched recent searches of this user. The maximum number of
       recent searches is 10. This field is a restricted feature. If you want to
       enable it, contact Retail Search support.
      
       This feature is only available when
       [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]
       field is set and [UserEvent][google.cloud.retail.v2alpha.UserEvent] is
       imported. The recent searches satisfy the follow rules:
      
       * They are ordered from latest to oldest.
      
       * They are matched with
       [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query]
       case insensitively.
      
       * They are transformed to lower case.
      
       * They are UTF-8 safe.
      
       Recent searches are deduplicated. More recent searches will be reserved
       when duplication happens.
       
      repeated .google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult recent_search_results = 3 [deprecated = true];
      Specified by:
      getRecentSearchResultsOrBuilder in interface CompleteQueryResponseOrBuilder
    • getAttributeResultsCount

      public int getAttributeResultsCount()
      Description copied from interface: CompleteQueryResponseOrBuilder
       A map of matched attribute suggestions. This field is only available for
       `cloud-retail` dataset.
      
       Current supported keys:
      
       * `brands`
      
       * `categories`
       
      map<string, .google.cloud.retail.v2alpha.CompleteQueryResponse.AttributeResult> attribute_results = 4;
      Specified by:
      getAttributeResultsCount in interface CompleteQueryResponseOrBuilder
    • containsAttributeResults

      public boolean containsAttributeResults(String key)
       A map of matched attribute suggestions. This field is only available for
       `cloud-retail` dataset.
      
       Current supported keys:
      
       * `brands`
      
       * `categories`
       
      map<string, .google.cloud.retail.v2alpha.CompleteQueryResponse.AttributeResult> attribute_results = 4;
      Specified by:
      containsAttributeResults in interface CompleteQueryResponseOrBuilder
    • getAttributeResults

      Deprecated.
      Specified by:
      getAttributeResults in interface CompleteQueryResponseOrBuilder
    • getAttributeResultsMap

      public Map<String,CompleteQueryResponse.AttributeResult> getAttributeResultsMap()
       A map of matched attribute suggestions. This field is only available for
       `cloud-retail` dataset.
      
       Current supported keys:
      
       * `brands`
      
       * `categories`
       
      map<string, .google.cloud.retail.v2alpha.CompleteQueryResponse.AttributeResult> attribute_results = 4;
      Specified by:
      getAttributeResultsMap in interface CompleteQueryResponseOrBuilder
    • getAttributeResultsOrDefault

      public CompleteQueryResponse.AttributeResult getAttributeResultsOrDefault(String key, CompleteQueryResponse.AttributeResult defaultValue)
       A map of matched attribute suggestions. This field is only available for
       `cloud-retail` dataset.
      
       Current supported keys:
      
       * `brands`
      
       * `categories`
       
      map<string, .google.cloud.retail.v2alpha.CompleteQueryResponse.AttributeResult> attribute_results = 4;
      Specified by:
      getAttributeResultsOrDefault in interface CompleteQueryResponseOrBuilder
    • getAttributeResultsOrThrow

      public CompleteQueryResponse.AttributeResult getAttributeResultsOrThrow(String key)
       A map of matched attribute suggestions. This field is only available for
       `cloud-retail` dataset.
      
       Current supported keys:
      
       * `brands`
      
       * `categories`
       
      map<string, .google.cloud.retail.v2alpha.CompleteQueryResponse.AttributeResult> attribute_results = 4;
      Specified by:
      getAttributeResultsOrThrow in interface CompleteQueryResponseOrBuilder
    • 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 parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

      public static CompleteQueryResponse 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 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

      public CompleteQueryResponse.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static CompleteQueryResponse.Builder newBuilder()
    • newBuilder

      public static CompleteQueryResponse.Builder newBuilder(CompleteQueryResponse prototype)
    • toBuilder

      public CompleteQueryResponse.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

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

      public static CompleteQueryResponse getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<CompleteQueryResponse> 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 getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder