public sealed class CompletionSuggestion : IMessage<CompletionSuggestion>, IEquatable<CompletionSuggestion>, IDeepCloneable<CompletionSuggestion>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1 API class CompletionSuggestion.
Autocomplete suggestions that are imported from Customer.
If two suggestions have the same groupId, they will not be
returned together. Instead the one ranked higher will be returned. This can
be used to deduplicate semantically identical suggestions.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eCompletionSuggestion\u003c/code\u003e class for the Discovery Engine v1 API is 1.6.0, with previous versions from 1.5.0 down to 1.0.0-beta06 also available.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCompletionSuggestion\u003c/code\u003e is a class that represents autocomplete suggestions imported from customers and implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, and \u003ccode\u003eIDeepCloneable\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class \u003ccode\u003eCompletionSuggestion\u003c/code\u003e has properties such as \u003ccode\u003eAlternativePhrases\u003c/code\u003e, \u003ccode\u003eFrequency\u003c/code\u003e, \u003ccode\u003eGlobalScore\u003c/code\u003e, and \u003ccode\u003eSuggestion\u003c/code\u003e to manage various aspects of the suggestion data, including alternative phrases and ranking.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCompletionSuggestion\u003c/code\u003e provides constructors, a default and one that accepts another instance of the same class.\u003c/p\u003e\n"],["\u003cp\u003eTwo suggestions can be marked as belonging to the same group via the \u003ccode\u003eGroupId\u003c/code\u003e property, which will prevent both from being returned if they have the same group ID.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1 API - Class CompletionSuggestion (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.CompletionSuggestion)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.CompletionSuggestion)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.CompletionSuggestion)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.CompletionSuggestion)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.CompletionSuggestion)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.CompletionSuggestion)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.CompletionSuggestion)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.CompletionSuggestion)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.CompletionSuggestion)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.CompletionSuggestion) \n\n public sealed class CompletionSuggestion : IMessage\u003cCompletionSuggestion\u003e, IEquatable\u003cCompletionSuggestion\u003e, IDeepCloneable\u003cCompletionSuggestion\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1 API class CompletionSuggestion.\n\nAutocomplete suggestions that are imported from Customer. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e CompletionSuggestion \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CompletionSuggestion](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompletionSuggestion), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CompletionSuggestion](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompletionSuggestion), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CompletionSuggestion](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.CompletionSuggestion), [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### CompletionSuggestion()\n\n public CompletionSuggestion()\n\n### CompletionSuggestion(CompletionSuggestion)\n\n public CompletionSuggestion(CompletionSuggestion other)\n\nProperties\n----------\n\n### AlternativePhrases\n\n public RepeatedField\u003cstring\u003e AlternativePhrases { get; }\n\nAlternative matching phrases for this suggestion.\n\n### Frequency\n\n public long Frequency { get; set; }\n\nFrequency of this suggestion. Will be used to rank suggestions when score\nis not available.\n\n### GlobalScore\n\n public double GlobalScore { get; set; }\n\nGlobal score of this suggestion. Control how this suggestion would be\nscored / ranked.\n\n### GroupId\n\n public string GroupId { get; set; }\n\nIf two suggestions have the same groupId, they will not be\nreturned together. Instead the one ranked higher will be returned. This can\nbe used to deduplicate semantically identical suggestions.\n\n### GroupScore\n\n public double GroupScore { get; set; }\n\nThe score of this suggestion within its group.\n\n### HasFrequency\n\n public bool HasFrequency { get; }\n\nGets whether the \"frequency\" field is set\n\n### HasGlobalScore\n\n public bool HasGlobalScore { get; }\n\nGets whether the \"global_score\" field is set\n\n### LanguageCode\n\n public string LanguageCode { get; set; }\n\nBCP-47 language code of this suggestion.\n\n### RankingInfoCase\n\n public CompletionSuggestion.RankingInfoOneofCase RankingInfoCase { get; }\n\n### Suggestion\n\n public string Suggestion { get; set; }\n\nRequired. The suggestion text."]]