Class RankRequest
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.discoveryengine.v1beta.RankRequest
- All Implemented Interfaces:
RankRequestOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class RankRequest
extends com.google.protobuf.GeneratedMessage
implements RankRequestOrBuilder
Request message for [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank] method.Protobuf type
google.cloud.discoveryengine.v1beta.RankRequest- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRequest message for [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank] method.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsUserLabels(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 64booleanstatic RankRequeststatic final com.google.protobuf.Descriptors.DescriptorbooleanIf true, the response will contain only record ID and score.getModel()The identifier of the model to use.com.google.protobuf.ByteStringThe identifier of the model to use.com.google.protobuf.Parser<RankRequest>getQuery()The query to use.com.google.protobuf.ByteStringThe query to use.Required.com.google.protobuf.ByteStringRequired.getRecords(int index) Required.intRequired.Required.getRecordsOrBuilder(int index) Required.List<? extends RankingRecordOrBuilder>Required.intintgetTopN()The number of results to return.Deprecated.intThe user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64getUserLabelsOrDefault(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 64The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64inthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) final booleanstatic RankRequest.Builderstatic RankRequest.BuildernewBuilder(RankRequest prototype) protected RankRequest.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static RankRequestparseDelimitedFrom(InputStream input) static RankRequestparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RankRequestparseFrom(byte[] data) static RankRequestparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RankRequestparseFrom(com.google.protobuf.ByteString data) static RankRequestparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RankRequestparseFrom(com.google.protobuf.CodedInputStream input) static RankRequestparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RankRequestparseFrom(InputStream input) static RankRequestparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RankRequestparseFrom(ByteBuffer data) static RankRequestparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<RankRequest>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
RANKING_CONFIG_FIELD_NUMBER
public static final int RANKING_CONFIG_FIELD_NUMBER- See Also:
-
MODEL_FIELD_NUMBER
public static final int MODEL_FIELD_NUMBER- See Also:
-
TOP_N_FIELD_NUMBER
public static final int TOP_N_FIELD_NUMBER- See Also:
-
QUERY_FIELD_NUMBER
public static final int QUERY_FIELD_NUMBER- See Also:
-
RECORDS_FIELD_NUMBER
public static final int RECORDS_FIELD_NUMBER- See Also:
-
IGNORE_RECORD_DETAILS_IN_RESPONSE_FIELD_NUMBER
public static final int IGNORE_RECORD_DETAILS_IN_RESPONSE_FIELD_NUMBER- See Also:
-
USER_LABELS_FIELD_NUMBER
public static final int USER_LABELS_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
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) = { ... }- Specified by:
getRankingConfigin interfaceRankRequestOrBuilder- Returns:
- The rankingConfig.
-
getRankingConfigBytes
public com.google.protobuf.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) = { ... }- Specified by:
getRankingConfigBytesin interfaceRankRequestOrBuilder- Returns:
- The bytes for rankingConfig.
-
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;- Specified by:
getModelin interfaceRankRequestOrBuilder- Returns:
- The model.
-
getModelBytes
public 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;- Specified by:
getModelBytesin interfaceRankRequestOrBuilder- Returns:
- The bytes for model.
-
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;- Specified by:
getTopNin interfaceRankRequestOrBuilder- Returns:
- The topN.
-
getQuery
The query to use.
string query = 4;- Specified by:
getQueryin interfaceRankRequestOrBuilder- Returns:
- The query.
-
getQueryBytes
public com.google.protobuf.ByteString getQueryBytes()The query to use.
string query = 4;- Specified by:
getQueryBytesin interfaceRankRequestOrBuilder- Returns:
- The bytes for query.
-
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];- Specified by:
getRecordsListin interfaceRankRequestOrBuilder
-
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];- Specified by:
getRecordsOrBuilderListin interfaceRankRequestOrBuilder
-
getRecordsCount
public 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];- Specified by:
getRecordsCountin interfaceRankRequestOrBuilder
-
getRecords
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];- Specified by:
getRecordsin interfaceRankRequestOrBuilder
-
getRecordsOrBuilder
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];- Specified by:
getRecordsOrBuilderin interfaceRankRequestOrBuilder
-
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;- Specified by:
getIgnoreRecordDetailsInResponsein interfaceRankRequestOrBuilder- Returns:
- The ignoreRecordDetailsInResponse.
-
getUserLabelsCount
public int getUserLabelsCount()Description copied from interface: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;- Specified by:
getUserLabelsCountin interfaceRankRequestOrBuilder
-
containsUserLabels
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;- Specified by:
containsUserLabelsin interfaceRankRequestOrBuilder
-
getUserLabels
Deprecated.UsegetUserLabelsMap()instead.- Specified by:
getUserLabelsin interfaceRankRequestOrBuilder
-
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;- Specified by:
getUserLabelsMapin interfaceRankRequestOrBuilder
-
getUserLabelsOrDefault
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;- Specified by:
getUserLabelsOrDefaultin interfaceRankRequestOrBuilder
-
getUserLabelsOrThrow
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;- Specified by:
getUserLabelsOrThrowin interfaceRankRequestOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static RankRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RankRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RankRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RankRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RankRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RankRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static RankRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static RankRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static RankRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected RankRequest.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-