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 \u003ccode\u003eCompletionClient\u003c/code\u003e class, part of the Google Cloud Talent Solution v4beta1 API, offers methods for handling job search auto-completion.\u003c/p\u003e\n"],["\u003cp\u003eIt provides synchronous and asynchronous methods, \u003ccode\u003eCompleteQuery\u003c/code\u003e and \u003ccode\u003eCompleteQueryAsync\u003c/code\u003e, to complete a given prefix with keyword suggestions via \u003ccode\u003eCompleteQueryRequest\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCompletionClient\u003c/code\u003e includes methods \u003ccode\u003eCreate\u003c/code\u003e and \u003ccode\u003eCreateAsync\u003c/code\u003e to instantiate the client using default settings or with custom configurations, with an option for asynchronous channel shutdown.\u003c/p\u003e\n"],["\u003cp\u003eThe class exposes properties like \u003ccode\u003eDefaultEndpoint\u003c/code\u003e and \u003ccode\u003eDefaultScopes\u003c/code\u003e, defining the service's default communication settings and access scopes, which include cloud platform and job-specific permissions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGrpcClient\u003c/code\u003e and \u003ccode\u003eServiceMetadata\u003c/code\u003e properties provide access to the underlying gRPC client and service-specific metadata respectively.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Talent Solution v4beta1 API - Class CompletionClient (3.0.0-beta06)\n\nVersion latestkeyboard_arrow_down\n\n- [3.0.0-beta06 (latest)](/dotnet/docs/reference/Google.Cloud.Talent.V4Beta1/latest/Google.Cloud.Talent.V4Beta1.CompletionClient)\n- [3.0.0-beta05](/dotnet/docs/reference/Google.Cloud.Talent.V4Beta1/3.0.0-beta05/Google.Cloud.Talent.V4Beta1.CompletionClient)\n- [2.0.0-beta07](/dotnet/docs/reference/Google.Cloud.Talent.V4Beta1/2.0.0-beta07/Google.Cloud.Talent.V4Beta1.CompletionClient) \n\n public abstract class CompletionClient\n\nReference documentation and code samples for the Google Cloud Talent Solution v4beta1 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.V4Beta1/latest/Google.Cloud.Talent.V4Beta1.CompletionClientImpl)\n\nNamespace\n---------\n\n[Google.Cloud.Talent.V4Beta1](/dotnet/docs/reference/Google.Cloud.Talent.V4Beta1/latest/Google.Cloud.Talent.V4Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.Talent.V4Beta1.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 ParentAsTenantName = 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 ParentAsTenantName = 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 ParentAsTenantName = 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.V4Beta1/latest/Google.Cloud.Talent.V4Beta1.CompletionClient) using the default credentials, endpoint and settings.\nTo specify custom credentials or other settings, use [CompletionClientBuilder](/dotnet/docs/reference/Google.Cloud.Talent.V4Beta1/latest/Google.Cloud.Talent.V4Beta1.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.V4Beta1/latest/Google.Cloud.Talent.V4Beta1.CompletionClient) using the default credentials, endpoint and\nsettings. To specify custom credentials or other settings, use [CompletionClientBuilder](/dotnet/docs/reference/Google.Cloud.Talent.V4Beta1/latest/Google.Cloud.Talent.V4Beta1.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.V4Beta1/latest/Google.Cloud.Talent.V4Beta1.CompletionClient#Google_Cloud_Talent_V4Beta1_CompletionClient_Create) and\n[CreateAsync(CancellationToken)](/dotnet/docs/reference/Google.Cloud.Talent.V4Beta1/latest/Google.Cloud.Talent.V4Beta1.CompletionClient#Google_Cloud_Talent_V4Beta1_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.V4Beta1/latest/Google.Cloud.Talent.V4Beta1.CompletionClient#Google_Cloud_Talent_V4Beta1_CompletionClient_Create) and\n[CreateAsync(CancellationToken)](/dotnet/docs/reference/Google.Cloud.Talent.V4Beta1/latest/Google.Cloud.Talent.V4Beta1.CompletionClient#Google_Cloud_Talent_V4Beta1_CompletionClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down\nby another call to this method."]]