/// <summary>Snippet for CreateSpecialistPoolAsync</summary> public async Task CreateSpecialistPoolRequestObjectAsync() { // Snippet: CreateSpecialistPoolAsync(CreateSpecialistPoolRequest, CallSettings) // Additional: CreateSpecialistPoolAsync(CreateSpecialistPoolRequest, CancellationToken) // Create client SpecialistPoolServiceClient specialistPoolServiceClient = await SpecialistPoolServiceClient.CreateAsync(); // Initialize request argument(s) CreateSpecialistPoolRequest request = new CreateSpecialistPoolRequest { ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), SpecialistPool = new SpecialistPool(), }; // Make the request Operation <SpecialistPool, CreateSpecialistPoolOperationMetadata> response = await specialistPoolServiceClient.CreateSpecialistPoolAsync(request); // Poll until the returned long-running operation is complete Operation <SpecialistPool, CreateSpecialistPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result SpecialistPool result = completedResponse.Result; // Or get the name of the operation string operationName = response.Name; // This name can be stored, then the long-running operation retrieved later by name Operation <SpecialistPool, CreateSpecialistPoolOperationMetadata> retrievedResponse = await specialistPoolServiceClient.PollOnceCreateSpecialistPoolAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result SpecialistPool retrievedResult = retrievedResponse.Result; } // End snippet }