/// <summary>Snippet for EnableService</summary> public void EnableServiceRequestObject() { // Snippet: EnableService(EnableServiceRequest, CallSettings) // Create client ServiceUsageClient serviceUsageClient = ServiceUsageClient.Create(); // Initialize request argument(s) EnableServiceRequest request = new EnableServiceRequest { Name = "", }; // Make the request Operation <EnableServiceResponse, OperationMetadata> response = serviceUsageClient.EnableService(request); // Poll until the returned long-running operation is complete Operation <EnableServiceResponse, OperationMetadata> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result EnableServiceResponse 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 <EnableServiceResponse, OperationMetadata> retrievedResponse = serviceUsageClient.PollOnceEnableService(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result EnableServiceResponse retrievedResult = retrievedResponse.Result; } // End snippet }