- 0.49.0 (latest)
- 0.48.0
- 0.47.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
public final class RankRequest extends GeneratedMessageV3 implements RankRequestOrBuilder
Request message for RankService.Rank method.
Protobuf type google.cloud.discoveryengine.v1.RankRequest
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > RankRequestImplements
RankRequestOrBuilderStatic Fields
IGNORE_RECORD_DETAILS_IN_RESPONSE_FIELD_NUMBER
public static final int IGNORE_RECORD_DETAILS_IN_RESPONSE_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
MODEL_FIELD_NUMBER
public static final int MODEL_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
QUERY_FIELD_NUMBER
public static final int QUERY_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
RANKING_CONFIG_FIELD_NUMBER
public static final int RANKING_CONFIG_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
RECORDS_FIELD_NUMBER
public static final int RECORDS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
TOP_N_FIELD_NUMBER
public static final int TOP_N_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
USER_LABELS_FIELD_NUMBER
public static final int USER_LABELS_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
Static Methods
getDefaultInstance()
public static RankRequest getDefaultInstance()
Returns | |
---|---|
Type | Description |
RankRequest |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
newBuilder()
public static RankRequest.Builder newBuilder()
Returns | |
---|---|
Type | Description |
RankRequest.Builder |
newBuilder(RankRequest prototype)
public static RankRequest.Builder newBuilder(RankRequest prototype)
Parameter | |
---|---|
Name | Description |
prototype |
RankRequest |
Returns | |
---|---|
Type | Description |
RankRequest.Builder |
parseDelimitedFrom(InputStream input)
public static RankRequest parseDelimitedFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input |
InputStream |
Returns | |
---|---|
Type | Description |
RankRequest |
Exceptions | |
---|---|
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static RankRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
RankRequest |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(byte[] data)
public static RankRequest parseFrom(byte[] data)
Parameter | |
---|---|
Name | Description |
data |
byte[] |
Returns | |
---|---|
Type | Description |
RankRequest |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static RankRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
byte[] |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
RankRequest |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static RankRequest parseFrom(ByteString data)
Parameter | |
---|---|
Name | Description |
data |
ByteString |
Returns | |
---|---|
Type | Description |
RankRequest |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static RankRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
ByteString |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
RankRequest |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static RankRequest parseFrom(CodedInputStream input)
Parameter | |
---|---|
Name | Description |
input |
CodedInputStream |
Returns | |
---|---|
Type | Description |
RankRequest |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static RankRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
RankRequest |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input)
public static RankRequest parseFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input |
InputStream |
Returns | |
---|---|
Type | Description |
RankRequest |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static RankRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
RankRequest |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static RankRequest parseFrom(ByteBuffer data)
Parameter | |
---|---|
Name | Description |
data |
ByteBuffer |
Returns | |
---|---|
Type | Description |
RankRequest |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static RankRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
ByteBuffer |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
RankRequest |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<RankRequest> parser()
Returns | |
---|---|
Type | Description |
Parser<RankRequest> |
Methods
containsUserLabels(String key)
public 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 |
equals(Object obj)
public boolean equals(Object obj)
Parameter | |
---|---|
Name | Description |
obj |
Object |
Returns | |
---|---|
Type | Description |
boolean |
getDefaultInstanceForType()
public RankRequest getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
RankRequest |
getIgnoreRecordDetailsInResponse()
public 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 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 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. |
getParserForType()
public Parser<RankRequest> getParserForType()
Returns | |
---|---|
Type | Description |
Parser<RankRequest> |
getQuery()
public String getQuery()
The query to use.
string query = 4;
Returns | |
---|---|
Type | Description |
String |
The query. |
getQueryBytes()
public ByteString getQueryBytes()
The query to use.
string query = 4;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for query. |
getRankingConfig()
public String getRankingConfig()
Required. The resource name of the rank service config, such as
projects/{project_num}/locations/{location}/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 ByteString getRankingConfigBytes()
Required. The resource name of the rank service config, such as
projects/{project_num}/locations/{location}/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 RankingRecord getRecords(int index)
Required. A list of records to rank. At most 200 records to rank.
repeated .google.cloud.discoveryengine.v1.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
RankingRecord |
getRecordsCount()
public int getRecordsCount()
Required. A list of records to rank. At most 200 records to rank.
repeated .google.cloud.discoveryengine.v1.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
int |
getRecordsList()
public List<RankingRecord> getRecordsList()
Required. A list of records to rank. At most 200 records to rank.
repeated .google.cloud.discoveryengine.v1.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
List<RankingRecord> |
getRecordsOrBuilder(int index)
public RankingRecordOrBuilder getRecordsOrBuilder(int index)
Required. A list of records to rank. At most 200 records to rank.
repeated .google.cloud.discoveryengine.v1.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
RankingRecordOrBuilder |
getRecordsOrBuilderList()
public List<? extends RankingRecordOrBuilder> getRecordsOrBuilderList()
Required. A list of records to rank. At most 200 records to rank.
repeated .google.cloud.discoveryengine.v1.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.discoveryengine.v1.RankingRecordOrBuilder> |
getSerializedSize()
public int getSerializedSize()
Returns | |
---|---|
Type | Description |
int |
getTopN()
public 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 Map<String,String> getUserLabels()
Use #getUserLabelsMap() instead.
Returns | |
---|---|
Type | Description |
Map<String,String> |
getUserLabelsCount()
public 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 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 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 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 |
hashCode()
public int hashCode()
Returns | |
---|---|
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter | |
---|---|
Name | Description |
number |
int |
Returns | |
---|---|
Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
newBuilderForType()
public RankRequest.Builder newBuilderForType()
Returns | |
---|---|
Type | Description |
RankRequest.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected RankRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter | |
---|---|
Name | Description |
parent |
BuilderParent |
Returns | |
---|---|
Type | Description |
RankRequest.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter | |
---|---|
Name | Description |
unused |
UnusedPrivateParameter |
Returns | |
---|---|
Type | Description |
Object |
toBuilder()
public RankRequest.Builder toBuilder()
Returns | |
---|---|
Type | Description |
RankRequest.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter | |
---|---|
Name | Description |
output |
CodedOutputStream |
Exceptions | |
---|---|
Type | Description |
IOException |