Class CompleteQueryResponse

  • All Implemented Interfaces:
    CompleteQueryResponseOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class CompleteQueryResponse
    extends com.google.protobuf.GeneratedMessageV3
    implements CompleteQueryResponseOrBuilder
     Response of the autocomplete query.
     
    Protobuf type google.cloud.retail.v2alpha.CompleteQueryResponse
    See Also:
    Serialized Form
    • Field Detail

      • COMPLETION_RESULTS_FIELD_NUMBER

        public static final int COMPLETION_RESULTS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ATTRIBUTION_TOKEN_FIELD_NUMBER

        public static final int ATTRIBUTION_TOKEN_FIELD_NUMBER
        See Also:
        Constant Field Values
      • RECENT_SEARCH_RESULTS_FIELD_NUMBER

        public static final int RECENT_SEARCH_RESULTS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ATTRIBUTE_RESULTS_FIELD_NUMBER

        public static final int ATTRIBUTE_RESULTS_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

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

        public List<CompleteQueryResponse.RecentSearchResult> getRecentSearchResultsList()
         Matched recent searches of this user. The maximum number of recent searches
         is 10. This field is a restricted feature. Contact Retail Search support
         team if you are interested in enabling it.
        
         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;
        Specified by:
        getRecentSearchResultsList in interface CompleteQueryResponseOrBuilder
      • getRecentSearchResultsOrBuilderList

        public List<? extends CompleteQueryResponse.RecentSearchResultOrBuilder> getRecentSearchResultsOrBuilderList()
         Matched recent searches of this user. The maximum number of recent searches
         is 10. This field is a restricted feature. Contact Retail Search support
         team if you are interested in enabling it.
        
         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;
        Specified by:
        getRecentSearchResultsOrBuilderList in interface CompleteQueryResponseOrBuilder
      • getRecentSearchResultsCount

        public int getRecentSearchResultsCount()
         Matched recent searches of this user. The maximum number of recent searches
         is 10. This field is a restricted feature. Contact Retail Search support
         team if you are interested in enabling it.
        
         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;
        Specified by:
        getRecentSearchResultsCount in interface CompleteQueryResponseOrBuilder
      • getRecentSearchResults

        public CompleteQueryResponse.RecentSearchResult getRecentSearchResults​(int index)
         Matched recent searches of this user. The maximum number of recent searches
         is 10. This field is a restricted feature. Contact Retail Search support
         team if you are interested in enabling it.
        
         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;
        Specified by:
        getRecentSearchResults in interface CompleteQueryResponseOrBuilder
      • getRecentSearchResultsOrBuilder

        public CompleteQueryResponse.RecentSearchResultOrBuilder getRecentSearchResultsOrBuilder​(int index)
         Matched recent searches of this user. The maximum number of recent searches
         is 10. This field is a restricted feature. Contact Retail Search support
         team if you are interested in enabling it.
        
         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;
        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
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • 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
      • newBuilderForType

        public CompleteQueryResponse.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • 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.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
      • getDefaultInstanceForType

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