Synchronously creates a CompletionClient using the default credentials, endpoint and settings.
To specify custom credentials or other settings, use CompletionClientBuilder.
public static Task<CompletionClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a CompletionClient using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use CompletionClientBuilder.
Shuts down any channels automatically created by Create() and
CreateAsync(CancellationToken). Channels which weren't automatically created are not
affected.
A task representing the asynchronous shutdown operation.
Remarks
After calling this method, further calls to Create() and
CreateAsync(CancellationToken) will create new channels, which could in turn be shut down
by another call to this method.
[[["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\u003eCompletionClient\u003c/code\u003e for the Google Cloud Talent Solution v4 API is 2.7.0, with several previous versions available, ranging back to 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCompletionClient\u003c/code\u003e is an abstract class that serves as a wrapper for the auto-completion service, designed to offer a convenient way to interact with the Google Cloud Talent API's completion features.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCompletionClient\u003c/code\u003e offers methods to perform keyword suggestions, primarily through the \u003ccode\u003eCompleteQuery\u003c/code\u003e method, which is available in synchronous and asynchronous forms, allowing developers to get suggestions for their search bar.\u003c/p\u003e\n"],["\u003cp\u003eThis client, when created using default settings, automatically manages gRPC channels for communication with Google's servers, and these channels can be shut down via the \u003ccode\u003eShutdownDefaultChannelsAsync()\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCompletionClient\u003c/code\u003e is associated with default endpoints, which is "jobs.googleapis.com" on port 443, and default scopes, including \u003ca href=\"https://www.googleapis.com/auth/cloud-platform\"\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/a\u003e and \u003ca href=\"https://www.googleapis.com/auth/jobs\"\u003ehttps://www.googleapis.com/auth/jobs\u003c/a\u003e.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Talent Solution v4 API - Class CompletionClient (2.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.7.0 (latest)](/dotnet/docs/reference/Google.Cloud.Talent.V4/latest/Google.Cloud.Talent.V4.CompletionClient)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Talent.V4/2.6.0/Google.Cloud.Talent.V4.CompletionClient)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Talent.V4/2.5.0/Google.Cloud.Talent.V4.CompletionClient)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Talent.V4/2.4.0/Google.Cloud.Talent.V4.CompletionClient)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Talent.V4/2.3.0/Google.Cloud.Talent.V4.CompletionClient)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Talent.V4/2.2.0/Google.Cloud.Talent.V4.CompletionClient)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Talent.V4/2.1.0/Google.Cloud.Talent.V4.CompletionClient)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Talent.V4/2.0.0/Google.Cloud.Talent.V4.CompletionClient)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.Talent.V4/1.4.0/Google.Cloud.Talent.V4.CompletionClient)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Talent.V4/1.3.0/Google.Cloud.Talent.V4.CompletionClient)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Talent.V4/1.2.0/Google.Cloud.Talent.V4.CompletionClient)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Talent.V4/1.1.0/Google.Cloud.Talent.V4.CompletionClient)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Talent.V4/1.0.0/Google.Cloud.Talent.V4.CompletionClient) \n\n public abstract class CompletionClient\n\nReference documentation and code samples for the Google Cloud Talent Solution v4 API class CompletionClient.\n\nCompletion client wrapper, for convenient use. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e CompletionClient \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.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) \n\nDerived Types\n-------------\n\n[CompletionClientImpl](/dotnet/docs/reference/Google.Cloud.Talent.V4/latest/Google.Cloud.Talent.V4.CompletionClientImpl)\n\nNamespace\n---------\n\n[Google.Cloud.Talent.V4](/dotnet/docs/reference/Google.Cloud.Talent.V4/latest/Google.Cloud.Talent.V4)\n\nAssembly\n--------\n\nGoogle.Cloud.Talent.V4.dll\n\nRemarks\n-------\n\nA service handles auto completion.\n\nProperties\n----------\n\n### DefaultEndpoint\n\n public static string DefaultEndpoint { get; }\n\nThe default endpoint for the Completion service, which is a host of \"jobs.googleapis.com\" and a port of 443.\n\n### DefaultScopes\n\n public static IReadOnlyList\u003cstring\u003e DefaultScopes { get; }\n\nThe default Completion scopes.\n\n**Remarks** \nThe default Completion scopes are:\n\n- \u003chttps://www.googleapis.com/auth/cloud-platform\u003e\n- \u003chttps://www.googleapis.com/auth/jobs\u003e\n\n\u003cbr /\u003e\n\n### GrpcClient\n\n public virtual Completion.CompletionClient GrpcClient { get; }\n\nThe underlying gRPC Completion client\n\n### ServiceMetadata\n\n public static ServiceMetadata ServiceMetadata { get; }\n\nThe service metadata associated with this client type.\n\nMethods\n-------\n\n### CompleteQuery(CompleteQueryRequest, CallSettings)\n\n public virtual CompleteQueryResponse CompleteQuery(CompleteQueryRequest request, CallSettings callSettings = null)\n\nCompletes the specified prefix with keyword suggestions.\nIntended for use by a job search auto-complete search box.\n\n**Example** \n\n // Create client\n CompletionClient completionClient = CompletionClient.Create();\n // Initialize request argument(s)\n CompleteQueryRequest request = new CompleteQueryRequest\n {\n TenantAsTenantName = TenantName.FromProjectTenant(\"[PROJECT]\", \"[TENANT]\"),\n Query = \"\",\n LanguageCodes = { \"\", },\n PageSize = 0,\n CompanyAsCompanyName = CompanyName.FromProjectTenantCompany(\"[PROJECT]\", \"[TENANT]\", \"[COMPANY]\"),\n Scope = CompleteQueryRequest.Types.CompletionScope.Unspecified,\n Type = CompleteQueryRequest.Types.CompletionType.Unspecified,\n };\n // Make the request\n CompleteQueryResponse response = completionClient.CompleteQuery(request);\n\n### CompleteQueryAsync(CompleteQueryRequest, CallSettings)\n\n public virtual Task\u003cCompleteQueryResponse\u003e CompleteQueryAsync(CompleteQueryRequest request, CallSettings callSettings = null)\n\nCompletes the specified prefix with keyword suggestions.\nIntended for use by a job search auto-complete search box.\n\n**Example** \n\n // Create client\n CompletionClient completionClient = await CompletionClient.CreateAsync();\n // Initialize request argument(s)\n CompleteQueryRequest request = new CompleteQueryRequest\n {\n TenantAsTenantName = TenantName.FromProjectTenant(\"[PROJECT]\", \"[TENANT]\"),\n Query = \"\",\n LanguageCodes = { \"\", },\n PageSize = 0,\n CompanyAsCompanyName = CompanyName.FromProjectTenantCompany(\"[PROJECT]\", \"[TENANT]\", \"[COMPANY]\"),\n Scope = CompleteQueryRequest.Types.CompletionScope.Unspecified,\n Type = CompleteQueryRequest.Types.CompletionType.Unspecified,\n };\n // Make the request\n CompleteQueryResponse response = await completionClient.CompleteQueryAsync(request);\n\n### CompleteQueryAsync(CompleteQueryRequest, CancellationToken)\n\n public virtual Task\u003cCompleteQueryResponse\u003e CompleteQueryAsync(CompleteQueryRequest request, CancellationToken cancellationToken)\n\nCompletes the specified prefix with keyword suggestions.\nIntended for use by a job search auto-complete search box.\n\n**Example** \n\n // Create client\n CompletionClient completionClient = await CompletionClient.CreateAsync();\n // Initialize request argument(s)\n CompleteQueryRequest request = new CompleteQueryRequest\n {\n TenantAsTenantName = TenantName.FromProjectTenant(\"[PROJECT]\", \"[TENANT]\"),\n Query = \"\",\n LanguageCodes = { \"\", },\n PageSize = 0,\n CompanyAsCompanyName = CompanyName.FromProjectTenantCompany(\"[PROJECT]\", \"[TENANT]\", \"[COMPANY]\"),\n Scope = CompleteQueryRequest.Types.CompletionScope.Unspecified,\n Type = CompleteQueryRequest.Types.CompletionType.Unspecified,\n };\n // Make the request\n CompleteQueryResponse response = await completionClient.CompleteQueryAsync(request);\n\n### Create()\n\n public static CompletionClient Create()\n\nSynchronously creates a [CompletionClient](/dotnet/docs/reference/Google.Cloud.Talent.V4/latest/Google.Cloud.Talent.V4.CompletionClient) using the default credentials, endpoint and settings.\nTo specify custom credentials or other settings, use [CompletionClientBuilder](/dotnet/docs/reference/Google.Cloud.Talent.V4/latest/Google.Cloud.Talent.V4.CompletionClientBuilder).\n\n### CreateAsync(CancellationToken)\n\n public static Task\u003cCompletionClient\u003e CreateAsync(CancellationToken cancellationToken = default)\n\nAsynchronously creates a [CompletionClient](/dotnet/docs/reference/Google.Cloud.Talent.V4/latest/Google.Cloud.Talent.V4.CompletionClient) using the default credentials, endpoint and\nsettings. To specify custom credentials or other settings, use [CompletionClientBuilder](/dotnet/docs/reference/Google.Cloud.Talent.V4/latest/Google.Cloud.Talent.V4.CompletionClientBuilder).\n\n### ShutdownDefaultChannelsAsync()\n\n public static Task ShutdownDefaultChannelsAsync()\n\nShuts down any channels automatically created by [Create()](/dotnet/docs/reference/Google.Cloud.Talent.V4/latest/Google.Cloud.Talent.V4.CompletionClient#Google_Cloud_Talent_V4_CompletionClient_Create) and\n[CreateAsync(CancellationToken)](/dotnet/docs/reference/Google.Cloud.Talent.V4/latest/Google.Cloud.Talent.V4.CompletionClient#Google_Cloud_Talent_V4_CompletionClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not\naffected.\n\n**Remarks** \nAfter calling this method, further calls to [Create()](/dotnet/docs/reference/Google.Cloud.Talent.V4/latest/Google.Cloud.Talent.V4.CompletionClient#Google_Cloud_Talent_V4_CompletionClient_Create) and\n[CreateAsync(CancellationToken)](/dotnet/docs/reference/Google.Cloud.Talent.V4/latest/Google.Cloud.Talent.V4.CompletionClient#Google_Cloud_Talent_V4_CompletionClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down\nby another call to this method."]]