/// <summary>Snippet for UpdateEnvironment</summary> public void UpdateEnvironment() { // Snippet: UpdateEnvironment(string, Environment, FieldMask, CallSettings) // Create client EnvironmentsClient environmentsClient = EnvironmentsClient.Create(); // Initialize request argument(s) string name = ""; gcoasv::Environment environment = new gcoasv::Environment(); FieldMask updateMask = new FieldMask(); // Make the request Operation <gcoasv::Environment, OperationMetadata> response = environmentsClient.UpdateEnvironment(name, environment, updateMask); // Poll until the returned long-running operation is complete Operation <gcoasv::Environment, OperationMetadata> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result gcoasv::Environment 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 <gcoasv::Environment, OperationMetadata> retrievedResponse = environmentsClient.PollOnceUpdateEnvironment(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result gcoasv::Environment retrievedResult = retrievedResponse.Result; } // End snippet }
/// <summary>Snippet for UpdateEnvironment</summary> public void UpdateEnvironmentRequestObject() { // Snippet: UpdateEnvironment(UpdateEnvironmentRequest, CallSettings) // Create client EnvironmentsClient environmentsClient = EnvironmentsClient.Create(); // Initialize request argument(s) UpdateEnvironmentRequest request = new UpdateEnvironmentRequest { Environment = new gcdv::Environment(), UpdateMask = new FieldMask(), AllowLoadToDraftAndDiscardChanges = false, }; // Make the request gcdv::Environment response = environmentsClient.UpdateEnvironment(request); // End snippet }