public final class RankRequest extends com.google.protobuf.GeneratedMessageV3 implements RankRequestOrBuilder
Request message for [RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank] method.Protobuf type
google.cloud.discoveryengine.v1alpha.RankRequest| Modifier and Type | Class and Description |
|---|---|
static class |
RankRequest.Builder
Request message for
[RankService.Rank][google.cloud.discoveryengine.v1alpha.RankService.Rank]
method.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
IGNORE_RECORD_DETAILS_IN_RESPONSE_FIELD_NUMBER |
static int |
MODEL_FIELD_NUMBER |
static int |
QUERY_FIELD_NUMBER |
static int |
RANKING_CONFIG_FIELD_NUMBER |
static int |
RECORDS_FIELD_NUMBER |
static int |
TOP_N_FIELD_NUMBER |
static int |
USER_LABELS_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
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
|
boolean |
equals(Object obj) |
static RankRequest |
getDefaultInstance() |
RankRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
boolean |
getIgnoreRecordDetailsInResponse()
If true, the response will contain only record ID and score.
|
String |
getModel()
The identifier of the model to use.
|
com.google.protobuf.ByteString |
getModelBytes()
The identifier of the model to use.
|
com.google.protobuf.Parser<RankRequest> |
getParserForType() |
String |
getQuery()
The query to use.
|
com.google.protobuf.ByteString |
getQueryBytes()
The query to use.
|
String |
getRankingConfig()
Required.
|
com.google.protobuf.ByteString |
getRankingConfigBytes()
Required.
|
RankingRecord |
getRecords(int index)
Required.
|
int |
getRecordsCount()
Required.
|
List<RankingRecord> |
getRecordsList()
Required.
|
RankingRecordOrBuilder |
getRecordsOrBuilder(int index)
Required.
|
List<? extends RankingRecordOrBuilder> |
getRecordsOrBuilderList()
Required.
|
int |
getSerializedSize() |
int |
getTopN()
The number of results to return.
|
Map<String,String> |
getUserLabels()
Deprecated.
|
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
|
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
|
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
|
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
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapFieldReflectionAccessor |
internalGetMapFieldReflection(int number) |
boolean |
isInitialized() |
static RankRequest.Builder |
newBuilder() |
static RankRequest.Builder |
newBuilder(RankRequest prototype) |
RankRequest.Builder |
newBuilderForType() |
protected RankRequest.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static RankRequest |
parseDelimitedFrom(InputStream input) |
static RankRequest |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RankRequest |
parseFrom(byte[] data) |
static RankRequest |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RankRequest |
parseFrom(ByteBuffer data) |
static RankRequest |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RankRequest |
parseFrom(com.google.protobuf.ByteString data) |
static RankRequest |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RankRequest |
parseFrom(com.google.protobuf.CodedInputStream input) |
static RankRequest |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RankRequest |
parseFrom(InputStream input) |
static RankRequest |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<RankRequest> |
parser() |
RankRequest.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int RANKING_CONFIG_FIELD_NUMBER
public static final int MODEL_FIELD_NUMBER
public static final int TOP_N_FIELD_NUMBER
public static final int QUERY_FIELD_NUMBER
public static final int RECORDS_FIELD_NUMBER
public static final int IGNORE_RECORD_DETAILS_IN_RESPONSE_FIELD_NUMBER
public static final int USER_LABELS_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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) = { ... }
getRankingConfig in interface RankRequestOrBuilderpublic com.google.protobuf.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) = { ... }
getRankingConfigBytes in interface RankRequestOrBuilderpublic 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;getModel in interface RankRequestOrBuilderpublic com.google.protobuf.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;getModelBytes in interface RankRequestOrBuilderpublic int getTopN()
The number of results to return. If this is unset or no bigger than zero, returns all results.
int32 top_n = 3;getTopN in interface RankRequestOrBuilderpublic String getQuery()
The query to use.
string query = 4;getQuery in interface RankRequestOrBuilderpublic com.google.protobuf.ByteString getQueryBytes()
The query to use.
string query = 4;getQueryBytes in interface RankRequestOrBuilderpublic List<RankingRecord> getRecordsList()
Required. A list of records to rank. At most 200 records to rank.
repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];
getRecordsList in interface RankRequestOrBuilderpublic List<? extends RankingRecordOrBuilder> getRecordsOrBuilderList()
Required. A list of records to rank. At most 200 records to rank.
repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];
getRecordsOrBuilderList in interface RankRequestOrBuilderpublic int getRecordsCount()
Required. A list of records to rank. At most 200 records to rank.
repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];
getRecordsCount in interface RankRequestOrBuilderpublic RankingRecord getRecords(int index)
Required. A list of records to rank. At most 200 records to rank.
repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];
getRecords in interface RankRequestOrBuilderpublic RankingRecordOrBuilder getRecordsOrBuilder(int index)
Required. A list of records to rank. At most 200 records to rank.
repeated .google.cloud.discoveryengine.v1alpha.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED];
getRecordsOrBuilder in interface RankRequestOrBuilderpublic 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;getIgnoreRecordDetailsInResponse in interface RankRequestOrBuilderpublic int getUserLabelsCount()
RankRequestOrBuilderThe 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.
map<string, string> user_labels = 7;getUserLabelsCount in interface RankRequestOrBuilderpublic 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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
map<string, string> user_labels = 7;containsUserLabels in interface RankRequestOrBuilder@Deprecated public Map<String,String> getUserLabels()
getUserLabelsMap() instead.getUserLabels in interface RankRequestOrBuilderpublic 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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
map<string, string> user_labels = 7;getUserLabelsMap in interface RankRequestOrBuilderpublic 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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
map<string, string> user_labels = 7;getUserLabelsOrDefault in interface RankRequestOrBuilderpublic 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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
map<string, string> user_labels = 7;getUserLabelsOrThrow in interface RankRequestOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static RankRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RankRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RankRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RankRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RankRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RankRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RankRequest parseFrom(InputStream input) throws IOException
IOExceptionpublic static RankRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RankRequest parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static RankRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RankRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static RankRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic RankRequest.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static RankRequest.Builder newBuilder()
public static RankRequest.Builder newBuilder(RankRequest prototype)
public RankRequest.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected RankRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static RankRequest getDefaultInstance()
public static com.google.protobuf.Parser<RankRequest> parser()
public com.google.protobuf.Parser<RankRequest> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public RankRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024 Google LLC. All rights reserved.