/// <summary>Snippet for CreateGlossaryAsync</summary> public async Task CreateGlossaryAsync() { // Snippet: CreateGlossaryAsync(LocationName,Glossary,CallSettings) // Additional: CreateGlossaryAsync(LocationName,Glossary,CancellationToken) // Create client TranslationServiceClient translationServiceClient = await TranslationServiceClient.CreateAsync(); // Initialize request argument(s) LocationName parent = new LocationName("[PROJECT]", "[LOCATION]"); Glossary glossary = new Glossary(); // Make the request Operation <Glossary, CreateGlossaryMetadata> response = await translationServiceClient.CreateGlossaryAsync(parent, glossary); // Poll until the returned long-running operation is complete Operation <Glossary, CreateGlossaryMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result Glossary 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 <Glossary, CreateGlossaryMetadata> retrievedResponse = await translationServiceClient.PollOnceCreateGlossaryAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Glossary retrievedResult = retrievedResponse.Result; } // End snippet }