Interface RankRequestOrBuilder (0.41.0)

public interface RankRequestOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

containsUserLabels(String key)

public abstract boolean containsUserLabels(String key)

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 for more details.

map<string, string> user_labels = 7;

Parameter
Name Description
key String
Returns
Type Description
boolean

getIgnoreRecordDetailsInResponse()

public abstract boolean getIgnoreRecordDetailsInResponse()

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

bool ignore_record_details_in_response = 6;

Returns
Type Description
boolean

The ignoreRecordDetailsInResponse.

getModel()

public abstract String getModel()

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.

string model = 2;

Returns
Type Description
String

The model.

getModelBytes()

public abstract ByteString getModelBytes()

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.

string model = 2;

Returns
Type Description
ByteString

The bytes for model.

getQuery()

public abstract String getQuery()

The query to use.

string query = 4;

Returns
Type Description
String

The query.

getQueryBytes()

public abstract ByteString getQueryBytes()

The query to use.

string query = 4;

Returns
Type Description
ByteString

The bytes for query.

getRankingConfig()

public abstract String getRankingConfig()

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

string ranking_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The rankingConfig.

getRankingConfigBytes()

public abstract ByteString getRankingConfigBytes()

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

string ranking_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for rankingConfig.

getRecords(int index)

public abstract RankingRecord getRecords(int index)

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

repeated .google.cloud.discoveryengine.v1beta.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
RankingRecord

getRecordsCount()

public abstract int getRecordsCount()

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

repeated .google.cloud.discoveryengine.v1beta.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getRecordsList()

public abstract List<RankingRecord> getRecordsList()

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

repeated .google.cloud.discoveryengine.v1beta.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<RankingRecord>

getRecordsOrBuilder(int index)

public abstract RankingRecordOrBuilder getRecordsOrBuilder(int index)

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

repeated .google.cloud.discoveryengine.v1beta.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
RankingRecordOrBuilder

getRecordsOrBuilderList()

public abstract List<? extends RankingRecordOrBuilder> getRecordsOrBuilderList()

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

repeated .google.cloud.discoveryengine.v1beta.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1beta.RankingRecordOrBuilder>

getTopN()

public abstract int getTopN()

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

int32 top_n = 3;

Returns
Type Description
int

The topN.

getUserLabels() (deprecated)

public abstract Map<String,String> getUserLabels()

Use #getUserLabelsMap() instead.

Returns
Type Description
Map<String,String>

getUserLabelsCount()

public abstract int getUserLabelsCount()

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 for more details.

map<string, string> user_labels = 7;

Returns
Type Description
int

getUserLabelsMap()

public abstract Map<String,String> getUserLabelsMap()

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 for more details.

map<string, string> user_labels = 7;

Returns
Type Description
Map<String,String>

getUserLabelsOrDefault(String key, String defaultValue)

public abstract String getUserLabelsOrDefault(String key, String defaultValue)

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 for more details.

map<string, string> user_labels = 7;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getUserLabelsOrThrow(String key)

public abstract String getUserLabelsOrThrow(String key)

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 for more details.

map<string, string> user_labels = 7;

Parameter
Name Description
key String
Returns
Type Description
String