Service Client: Google::Cloud::Retail::V2alpha::ConversationalSearchService::ConversationalSearchServiceClient

Client stub representing the remote ConversationalSearchService gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to retail.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Cloud::Retail::V2alpha::ConversationalSearchService - Compiled Protocol Buffers messages for google/cloud/retail/v2alpha/conversational_search_service.proto

SYNOPSIS

use Google::Cloud::Retail::V2alpha::ConversationalSearchService;

my $msg = Google::Cloud::Retail::V2alpha::ConversationalSearchService::ConversationalSearchRequest->new({
    placement => $placement,
    branch => $branch,
    query => $query,
    page_categories => $page_categories,
});

# Read or update a field
my $val = $msg->placement();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Retail::V2alpha::ConversationalSearchService::ConversationalSearchRequest->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/retail/v2alpha/conversational_search_service.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Retail::V2alpha::ConversationalSearchService::ConversationalSearchRequest

Request message for [ConversationalSearchService.ConversationalSearch][google.cloud.retail.v2alpha.ConversationalSearchService.ConversationalSearch] method.

Inherits from Protobuf::Message.

Accessors

  • $msg->placement() / $msg->placement($value)

    Type: String

    Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving config name and the set of models that will be used to make the search.

  • $msg->branch() / $msg->branch($value)

    Type: String

    Required. The branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`.

    Use "default_branch" as the branch ID or leave this field empty, to search products under the default branch.

  • $msg->query() / $msg->query($value)

    Type: String

    Optional. Raw search query to be searched for.

    If this field is empty, the request is considered a category browsing request.

  • $msg->page_categories() / $msg->page_categories($value)

    Type: String

    Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as [UserEvent.page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories];

    To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s).

    Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"].

  • $msg->conversation_id() / $msg->conversation_id($value)

    Type: String

    Optional. This field specifies the conversation id, which maintains the state of the conversation between client side and server side. Use the value from the previous [ConversationalSearchResponse.conversation_id][google.cloud.retail.v2alpha.ConversationalSearchResponse.conversation_id]. For the initial request, this should be empty.

  • $msg->search_params() / $msg->search_params($value)

    Type: Message (Google::Cloud::Retail::V2alpha::ConversationalSearchService::ConversationalSearchRequest::SearchParams)

    Optional. Search parameters.

  • $msg->visitor_id() / $msg->visitor_id($value)

    Type: String

    Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website.

    This should be the same identifier as [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id].

    The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

  • $msg->user_info() / $msg->user_info($value)

    Type: Message (Google::Cloud::Retail::V2alpha::Common::UserInfo)

    Optional. User information.

  • $msg->conversational_filtering_spec() / $msg->conversational_filtering_spec($value)

    Type: Message (Google::Cloud::Retail::V2alpha::ConversationalSearchService::ConversationalSearchRequest::ConversationalFilteringSpec)

    Optional. This field specifies all conversational filtering related parameters.

  • $msg->user_labels() / $msg->user_labels($value)

    Type: Message (Google::Cloud::Retail::V2alpha::ConversationalSearchService::ConversationalSearchRequest::UserLabelsEntry)

    Optional. The user labels applied to a resource must meet the following requirements:

    * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character.

    See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.

  • $msg->safety_settings() / $msg->safety_settings($value)

    Type: Message (Google::Cloud::Retail::V2alpha::Safety::SafetySetting)

    Optional. The safety settings to be applied to the generated content.

Google::Cloud::Retail::V2alpha::ConversationalSearchService::ConversationalSearchResponse

Response message for [ConversationalSearchService.ConversationalSearch][google.cloud.retail.v2alpha.ConversationalSearchService.ConversationalSearch] method.

Inherits from Protobuf::Message.

Accessors

  • $msg->user_query_types() / $msg->user_query_types($value)

    Type: String

    The types Retail classifies the search query as.

    Supported values are:

    - "ORDER_SUPPORT" - "SIMPLE_PRODUCT_SEARCH" - "INTENT_REFINEMENT" - "PRODUCT_DETAILS" - "PRODUCT_COMPARISON" - "DEALS_AND_COUPONS" - "STORE_RELEVANT" - "BLOCKLISTED" - "BEST_PRODUCT" - "RETAIL_SUPPORT" - "DISABLED" clang-format off clang-format on

  • $msg->conversational_text_response() / $msg->conversational_text_response($value)

    Type: String

    The conversational answer-based text response generated by the Server.

  • $msg->followup_question() / $msg->followup_question($value)

    Type: Message (Google::Cloud::Retail::V2alpha::ConversationalSearchService::ConversationalSearchResponse::FollowupQuestion)

    The conversational followup question generated for Intent refinement.

  • $msg->conversation_id() / $msg->conversation_id($value)

    Type: String

    Conversation UUID. This field will be stored in client side storage to maintain the conversation session with server and will be used for next search request's [ConversationalSearchRequest.conversation_id][google.cloud.retail.v2alpha.ConversationalSearchRequest.conversation_id] to restore conversation state in server.

  • $msg->refined_search() / $msg->refined_search($value)

    Type: Message (Google::Cloud::Retail::V2alpha::ConversationalSearchService::ConversationalSearchResponse::RefinedSearch)

    The proposed refined search queries. They can be used to fetch the relevant search results. When using CONVERSATIONAL_FILTER_ONLY mode, the refined_query from search response will be populated here.

  • $msg->conversational_filtering_result() / $msg->conversational_filtering_result($value)

    Type: Message (Google::Cloud::Retail::V2alpha::ConversationalSearchService::ConversationalSearchResponse::ConversationalFilteringResult)

    This field specifies all related information that is needed on client side for UI rendering of conversational filtering search.

  • $msg->state() / $msg->state($value)

    Type: Enum (Google::Cloud::Retail::V2alpha::ConversationalSearchResponse::State)

    Output only. The state of the response generation.

Enum: ConversationalSearchResponse::State

  • STATE_UNSPECIFIED => 0

  • STREAMING => 1

  • SUCCEEDED => 2

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Retail::V2alpha::ConversationalSearchService::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.