/// <summary>Snippet for DeleteWorkflowAsync</summary>
        public async Task DeleteWorkflowResourceNamesAsync()
        {
            // Snippet: DeleteWorkflowAsync(WorkflowName, CallSettings)
            // Additional: DeleteWorkflowAsync(WorkflowName, CancellationToken)
            // Create client
            WorkflowsClient workflowsClient = await WorkflowsClient.CreateAsync();

            // Initialize request argument(s)
            WorkflowName name = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
            // Make the request
            Operation <Empty, OperationMetadata> response = await workflowsClient.DeleteWorkflowAsync(name);

            // Poll until the returned long-running operation is complete
            Operation <Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();

            // Retrieve the operation result
            Empty 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 <Empty, OperationMetadata> retrievedResponse = await workflowsClient.PollOnceDeleteWorkflowAsync(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Empty retrievedResult = retrievedResponse.Result;
            }
            // End snippet
        }
        /// <summary>Snippet for DeleteWorkflow</summary>
        public void DeleteWorkflowRequestObject()
        {
            // Snippet: DeleteWorkflow(DeleteWorkflowRequest, CallSettings)
            // Create client
            WorkflowsClient workflowsClient = WorkflowsClient.Create();
            // Initialize request argument(s)
            DeleteWorkflowRequest request = new DeleteWorkflowRequest
            {
                WorkflowName = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]"),
            };
            // Make the request
            Operation <Empty, OperationMetadata> response = workflowsClient.DeleteWorkflow(request);

            // Poll until the returned long-running operation is complete
            Operation <Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            Empty 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 <Empty, OperationMetadata> retrievedResponse = workflowsClient.PollOnceDeleteWorkflow(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Empty retrievedResult = retrievedResponse.Result;
            }
            // End snippet
        }
 /// <summary>Snippet for GetWorkflow</summary>
 public void GetWorkflowResourceNames()
 {
     // Snippet: GetWorkflow(WorkflowName, CallSettings)
     // Create client
     WorkflowsClient workflowsClient = WorkflowsClient.Create();
     // Initialize request argument(s)
     WorkflowName name = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
     // Make the request
     Workflow response = workflowsClient.GetWorkflow(name);
     // End snippet
 }
 /// <summary>Snippet for CreateExecution</summary>
 public void CreateExecutionResourceNames()
 {
     // Snippet: CreateExecution(WorkflowName, Execution, CallSettings)
     // Create client
     ExecutionsClient executionsClient = ExecutionsClient.Create();
     // Initialize request argument(s)
     WorkflowName parent    = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
     Execution    execution = new Execution();
     // Make the request
     Execution response = executionsClient.CreateExecution(parent, execution);
     // End snippet
 }
        /// <summary>Snippet for GetWorkflowAsync</summary>
        public async Task GetWorkflowResourceNamesAsync()
        {
            // Snippet: GetWorkflowAsync(WorkflowName, CallSettings)
            // Additional: GetWorkflowAsync(WorkflowName, CancellationToken)
            // Create client
            WorkflowsClient workflowsClient = await WorkflowsClient.CreateAsync();

            // Initialize request argument(s)
            WorkflowName name = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
            // Make the request
            Workflow response = await workflowsClient.GetWorkflowAsync(name);

            // End snippet
        }
 /// <summary>Snippet for GetWorkflow</summary>
 public void GetWorkflowRequestObject()
 {
     // Snippet: GetWorkflow(GetWorkflowRequest, CallSettings)
     // Create client
     WorkflowsClient workflowsClient = WorkflowsClient.Create();
     // Initialize request argument(s)
     GetWorkflowRequest request = new GetWorkflowRequest
     {
         WorkflowName = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]"),
     };
     // Make the request
     Workflow response = workflowsClient.GetWorkflow(request);
     // End snippet
 }
        /// <summary>Snippet for ListExecutionsAsync</summary>
        public async Task ListExecutionsRequestObjectAsync()
        {
            // Snippet: ListExecutionsAsync(ListExecutionsRequest, CallSettings)
            // Create client
            ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();

            // Initialize request argument(s)
            ListExecutionsRequest request = new ListExecutionsRequest
            {
                ParentAsWorkflowName = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]"),
                View = ExecutionView.Unspecified,
            };
            // Make the request
            PagedAsyncEnumerable <ListExecutionsResponse, Execution> response = executionsClient.ListExecutionsAsync(request);

            // Iterate over all response items, lazily performing RPCs as required
            await response.ForEachAsync((Execution item) =>
            {
                // Do something with each item
                Console.WriteLine(item);
            });

            // Or iterate over pages (of server-defined size), performing one RPC per page
            await response.AsRawResponses().ForEachAsync((ListExecutionsResponse page) =>
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (Execution item in page)
                {
                    // Do something with each item
                    Console.WriteLine(item);
                }
            });

            // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
            int pageSize = 10;
            Page <Execution> singlePage = await response.ReadPageAsync(pageSize);

            // Do something with the page of items
            Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
            foreach (Execution item in singlePage)
            {
                // Do something with each item
                Console.WriteLine(item);
            }
            // Store the pageToken, for when the next page is required.
            string nextPageToken = singlePage.NextPageToken;
            // End snippet
        }
        /// <summary>Snippet for CreateExecutionAsync</summary>
        public async Task CreateExecutionResourceNamesAsync()
        {
            // Snippet: CreateExecutionAsync(WorkflowName, Execution, CallSettings)
            // Additional: CreateExecutionAsync(WorkflowName, Execution, CancellationToken)
            // Create client
            ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();

            // Initialize request argument(s)
            WorkflowName parent    = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
            Execution    execution = new Execution();
            // Make the request
            Execution response = await executionsClient.CreateExecutionAsync(parent, execution);

            // End snippet
        }
 /// <summary>Snippet for CreateExecution</summary>
 public void CreateExecutionRequestObject()
 {
     // Snippet: CreateExecution(CreateExecutionRequest, CallSettings)
     // Create client
     ExecutionsClient executionsClient = ExecutionsClient.Create();
     // Initialize request argument(s)
     CreateExecutionRequest request = new CreateExecutionRequest
     {
         ParentAsWorkflowName = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]"),
         Execution            = new Execution(),
     };
     // Make the request
     Execution response = executionsClient.CreateExecution(request);
     // End snippet
 }
        /// <summary>Snippet for CreateExecutionAsync</summary>
        public async Task CreateExecutionRequestObjectAsync()
        {
            // Snippet: CreateExecutionAsync(CreateExecutionRequest, CallSettings)
            // Additional: CreateExecutionAsync(CreateExecutionRequest, CancellationToken)
            // Create client
            ExecutionsClient executionsClient = await ExecutionsClient.CreateAsync();

            // Initialize request argument(s)
            CreateExecutionRequest request = new CreateExecutionRequest
            {
                ParentAsWorkflowName = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]"),
                Execution            = new Execution(),
            };
            // Make the request
            Execution response = await executionsClient.CreateExecutionAsync(request);

            // End snippet
        }
        /// <summary>Snippet for ListExecutions</summary>
        public void ListExecutionsResourceNames()
        {
            // Snippet: ListExecutions(WorkflowName, string, int?, CallSettings)
            // Create client
            ExecutionsClient executionsClient = ExecutionsClient.Create();
            // Initialize request argument(s)
            WorkflowName parent = WorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
            // Make the request
            PagedEnumerable <ListExecutionsResponse, Execution> response = executionsClient.ListExecutions(parent);

            // Iterate over all response items, lazily performing RPCs as required
            foreach (Execution item in response)
            {
                // Do something with each item
                Console.WriteLine(item);
            }

            // Or iterate over pages (of server-defined size), performing one RPC per page
            foreach (ListExecutionsResponse page in response.AsRawResponses())
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (Execution item in page)
                {
                    // Do something with each item
                    Console.WriteLine(item);
                }
            }

            // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
            int pageSize = 10;
            Page <Execution> singlePage = response.ReadPage(pageSize);

            // Do something with the page of items
            Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
            foreach (Execution item in singlePage)
            {
                // Do something with each item
                Console.WriteLine(item);
            }
            // Store the pageToken, for when the next page is required.
            string nextPageToken = singlePage.NextPageToken;
            // End snippet
        }