public MapField<string, string> UserLabels { get; }
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eRankRequest\u003c/code\u003e class in the Discovery Engine v1 API is 1.6.0, with several prior versions available for reference.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eRankRequest\u003c/code\u003e is a message type used to send requests to the \u003ccode\u003eRankService.Rank\u003c/code\u003e method for ranking a list of records.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, all within the \u003ccode\u003eGoogle.Protobuf\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of \u003ccode\u003eRankRequest\u003c/code\u003e include \u003ccode\u003eModel\u003c/code\u003e, \u003ccode\u003eQuery\u003c/code\u003e, \u003ccode\u003eRankingConfig\u003c/code\u003e, \u003ccode\u003eRecords\u003c/code\u003e and the ability to ignore record details in response with the \u003ccode\u003eIgnoreRecordDetailsInResponse\u003c/code\u003e boolean property.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRankRequest\u003c/code\u003e class allows for specifying user-defined labels through the \u003ccode\u003eUserLabels\u003c/code\u003e property, which must follow the defined key-value pair rules.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1 API - Class RankRequest (1.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.9.0 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.RankRequest)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.RankRequest)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.RankRequest)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.RankRequest)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.RankRequest)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.RankRequest)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.RankRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.RankRequest)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.RankRequest)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.RankRequest) \n\n public sealed class RankRequest : IMessage\u003cRankRequest\u003e, IEquatable\u003cRankRequest\u003e, IDeepCloneable\u003cRankRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1 API class RankRequest.\n\nRequest message for\n\\[RankService.Rank\\]\\[google.cloud.discoveryengine.v1.RankService.Rank\\] method. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e RankRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RankRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.RankRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RankRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.RankRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RankRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.RankRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.DiscoveryEngine.V1](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1.dll\n\nConstructors\n------------\n\n### RankRequest()\n\n public RankRequest()\n\n### RankRequest(RankRequest)\n\n public RankRequest(RankRequest other)\n\nProperties\n----------\n\n### IgnoreRecordDetailsInResponse\n\n public bool IgnoreRecordDetailsInResponse { get; set; }\n\nIf true, the response will contain only record ID and score. By default, it\nis false, the response will contain record details.\n\n### Model\n\n public string Model { get; set; }\n\nThe identifier of the model to use. It is one of:\n\n- `semantic-ranker-512@latest`: Semantic ranking model with maximum input token size 512.\n\nIt is set to `semantic-ranker-512@latest` by default if unspecified.\n\n### Query\n\n public string Query { get; set; }\n\nThe query to use.\n\n### RankingConfig\n\n public string RankingConfig { get; set; }\n\nRequired. The resource name of the rank service config, such as\n`projects/{project_num}/locations/{location}/rankingConfigs/default_ranking_config`.\n\n### RankingConfigAsRankingConfigName\n\n public RankingConfigName RankingConfigAsRankingConfigName { get; set; }\n\n[RankingConfigName](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.RankingConfigName)-typed view over the [RankingConfig](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.RankRequest#Google_Cloud_DiscoveryEngine_V1_RankRequest_RankingConfig) resource name property.\n\n### Records\n\n public RepeatedField\u003cRankingRecord\u003e Records { get; }\n\nRequired. A list of records to rank. At most 200 records to rank.\n\n### TopN\n\n public int TopN { get; set; }\n\nThe number of results to return. If this is unset or no bigger than zero,\nreturns all results.\n\n### UserLabels\n\n public MapField\u003cstring, string\u003e UserLabels { get; }\n\nThe user labels applied to a resource must meet the following requirements:\n\n- Each resource can have multiple labels, up to a maximum of 64.\n- Each label must be a key-value pair.\n- 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.\n- 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.\n- The key portion of a label must be unique. However, you can use the same key with multiple resources.\n- Keys must start with a lowercase letter or international character.\n\nSee [Google Cloud\nDocument](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)\nfor more details."]]