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 Classes
    Modifier and Type
    Class
    Description
    static final class 
    Request 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.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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
     
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    boolean
    If true, the response will contain only record ID and score.
    The identifier of the model to use.
    com.google.protobuf.ByteString
    The identifier of the model to use.
    com.google.protobuf.Parser<RankRequest>
     
    The query to use.
    com.google.protobuf.ByteString
    The query to use.
    Required.
    com.google.protobuf.ByteString
    Required.
    getRecords(int index)
    Required.
    int
    Required.
    Required.
    Required.
    Required.
    int
     
    int
    The number of results to return.
    Deprecated.
    int
    The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64
    The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64
    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
    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
     
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    protected com.google.protobuf.MapFieldReflectionAccessor
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<RankRequest>
     
     
    void
    writeTo(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, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods 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:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • 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) = { ... }
      Specified by:
      getRankingConfig in interface RankRequestOrBuilder
      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:
      getRankingConfigBytes in interface RankRequestOrBuilder
      Returns:
      The bytes for rankingConfig.
    • 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;
      Specified by:
      getModel in interface RankRequestOrBuilder
      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:
      getModelBytes in interface RankRequestOrBuilder
      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:
      getTopN in interface RankRequestOrBuilder
      Returns:
      The topN.
    • getQuery

      public String getQuery()
       The query to use.
       
      string query = 4;
      Specified by:
      getQuery in interface RankRequestOrBuilder
      Returns:
      The query.
    • getQueryBytes

      public com.google.protobuf.ByteString getQueryBytes()
       The query to use.
       
      string query = 4;
      Specified by:
      getQueryBytes in interface RankRequestOrBuilder
      Returns:
      The bytes for query.
    • getRecordsList

      public 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];
      Specified by:
      getRecordsList in interface RankRequestOrBuilder
    • getRecordsOrBuilderList

      public 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];
      Specified by:
      getRecordsOrBuilderList in interface RankRequestOrBuilder
    • 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:
      getRecordsCount in interface RankRequestOrBuilder
    • getRecords

      public 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];
      Specified by:
      getRecords in interface RankRequestOrBuilder
    • getRecordsOrBuilder

      public 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];
      Specified by:
      getRecordsOrBuilder in interface RankRequestOrBuilder
    • 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:
      getIgnoreRecordDetailsInResponse in interface RankRequestOrBuilder
      Returns:
      The ignoreRecordDetailsInResponse.
    • getUserLabelsCount

      public int getUserLabelsCount()
      Description copied from interface: RankRequestOrBuilder
       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:
      getUserLabelsCount in interface RankRequestOrBuilder
    • containsUserLabels

      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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
       for more details.
       
      map<string, string> user_labels = 7;
      Specified by:
      containsUserLabels in interface RankRequestOrBuilder
    • getUserLabels

      @Deprecated public Map<String,String> getUserLabels()
      Deprecated.
      Use getUserLabelsMap() instead.
      Specified by:
      getUserLabels in interface RankRequestOrBuilder
    • 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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
       for more details.
       
      map<string, string> user_labels = 7;
      Specified by:
      getUserLabelsMap in interface RankRequestOrBuilder
    • getUserLabelsOrDefault

      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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
       for more details.
       
      map<string, string> user_labels = 7;
      Specified by:
      getUserLabelsOrDefault in interface RankRequestOrBuilder
    • getUserLabelsOrThrow

      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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
       for more details.
       
      map<string, string> user_labels = 7;
      Specified by:
      getUserLabelsOrThrow in interface RankRequestOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.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

      public static RankRequest parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RankRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static RankRequest parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static RankRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RankRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RankRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public RankRequest.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static RankRequest.Builder newBuilder()
    • newBuilder

      public static RankRequest.Builder newBuilder(RankRequest prototype)
    • toBuilder

      public RankRequest.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected RankRequest.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static RankRequest getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<RankRequest> parser()
    • getParserForType

      public com.google.protobuf.Parser<RankRequest> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public RankRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder