Service Client: Google::Cloud::Discoveryengine::V1alpha::RankService::RankServiceClient

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

target

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

credentials

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

NAME

Google::Cloud::Discoveryengine::V1alpha::RankService - Compiled Protocol Buffers messages for google/cloud/discoveryengine/v1alpha/rank_service.proto

SYNOPSIS

use Google::Cloud::Discoveryengine::V1alpha::RankService;

my $msg = Google::Cloud::Discoveryengine::V1alpha::RankService::RankingRecord->new({
    id => $id,
    title => $title,
    content => $content,
    score => $score,
});

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

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Discoveryengine::V1alpha::RankService::RankingRecord->parse($bytes);

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

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/discoveryengine/v1alpha/rank_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::Discoveryengine::V1alpha::RankService::RankingRecord

Record message for [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    The unique ID to represent the record.

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

    Type: String

    The title of the record. Empty by default. At least one of [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content] should be set otherwise an INVALID_ARGUMENT error is thrown.

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

    Type: String

    The content of the record. Empty by default. At least one of [title][google.cloud.discoveryengine.v1alpha.RankingRecord.title] or [content][google.cloud.discoveryengine.v1alpha.RankingRecord.content] should be set otherwise an INVALID_ARGUMENT error is thrown.

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

    Type: Float

    The score of this record based on the given query and selected model.

Google::Cloud::Discoveryengine::V1alpha::RankService::RankRequest

Request message for [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. The resource name of the rank service config, such as `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.

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

    Type: String

    The identifier of the model to use. It is one of:

    * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input token size 512.

    It is set to `semantic-ranker-512@latest` by default if unspecified.

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

    Type: Int32

    The number of results to return. If this is unset or no bigger than zero, returns all results.

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

    Type: String

    The query to use.

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

    Type: Message (Google::Cloud::Discoveryengine::V1alpha::RankService::RankingRecord)

    Required. A list of records to rank. At most 200 records to rank.

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

    Type: Bool

    If true, the response will contain only record ID and score. By default, it is false, the response will contain record details.

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

    Type: Message (Google::Cloud::Discoveryengine::V1alpha::RankService::RankRequest::UserLabelsEntry)

    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.

Google::Cloud::Discoveryengine::V1alpha::RankService::RankResponse

Response message for [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] method.

Inherits from Protobuf::Message.

Accessors

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Discoveryengine::V1alpha::RankService::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.