Exemple #1
0
        /// <summary>Snippet for DeleteTransitionRouteGroupAsync</summary>
        public async Task DeleteTransitionRouteGroupResourceNamesAsync()
        {
            // Snippet: DeleteTransitionRouteGroupAsync(TransitionRouteGroupName, CallSettings)
            // Additional: DeleteTransitionRouteGroupAsync(TransitionRouteGroupName, CancellationToken)
            // Create client
            TransitionRouteGroupsClient transitionRouteGroupsClient = await TransitionRouteGroupsClient.CreateAsync();

            // Initialize request argument(s)
            TransitionRouteGroupName name = TransitionRouteGroupName.FromProjectLocationAgentFlowTransitionRouteGroup("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]");
            // Make the request
            await transitionRouteGroupsClient.DeleteTransitionRouteGroupAsync(name);

            // End snippet
        }
Exemple #2
0
        /// <summary>Snippet for DeleteTransitionRouteGroupAsync</summary>
        public async Task DeleteTransitionRouteGroupAsync()
        {
            // Snippet: DeleteTransitionRouteGroupAsync(string, CallSettings)
            // Additional: DeleteTransitionRouteGroupAsync(string, CancellationToken)
            // Create client
            TransitionRouteGroupsClient transitionRouteGroupsClient = await TransitionRouteGroupsClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]/transitionRouteGroups/[TRANSITION_ROUTE_GROUP]";
            // Make the request
            await transitionRouteGroupsClient.DeleteTransitionRouteGroupAsync(name);

            // End snippet
        }
Exemple #3
0
        /// <summary>Snippet for ListTransitionRouteGroupsAsync</summary>
        public async Task ListTransitionRouteGroupsRequestObjectAsync()
        {
            // Snippet: ListTransitionRouteGroupsAsync(ListTransitionRouteGroupsRequest, CallSettings)
            // Create client
            TransitionRouteGroupsClient transitionRouteGroupsClient = await TransitionRouteGroupsClient.CreateAsync();

            // Initialize request argument(s)
            ListTransitionRouteGroupsRequest request = new ListTransitionRouteGroupsRequest
            {
                ParentAsFlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
                LanguageCode     = "",
            };
            // Make the request
            PagedAsyncEnumerable <ListTransitionRouteGroupsResponse, TransitionRouteGroup> response = transitionRouteGroupsClient.ListTransitionRouteGroupsAsync(request);

            // Iterate over all response items, lazily performing RPCs as required
            await response.ForEachAsync((TransitionRouteGroup 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((ListTransitionRouteGroupsResponse page) =>
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (TransitionRouteGroup 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 <TransitionRouteGroup> 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 (TransitionRouteGroup 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
        }
Exemple #4
0
        /// <summary>Snippet for UpdateTransitionRouteGroupAsync</summary>
        public async Task UpdateTransitionRouteGroupAsync()
        {
            // Snippet: UpdateTransitionRouteGroupAsync(TransitionRouteGroup, FieldMask, CallSettings)
            // Additional: UpdateTransitionRouteGroupAsync(TransitionRouteGroup, FieldMask, CancellationToken)
            // Create client
            TransitionRouteGroupsClient transitionRouteGroupsClient = await TransitionRouteGroupsClient.CreateAsync();

            // Initialize request argument(s)
            TransitionRouteGroup transitionRouteGroup = new TransitionRouteGroup();
            FieldMask            updateMask           = new FieldMask();
            // Make the request
            TransitionRouteGroup response = await transitionRouteGroupsClient.UpdateTransitionRouteGroupAsync(transitionRouteGroup, updateMask);

            // End snippet
        }
Exemple #5
0
        /// <summary>Snippet for CreateTransitionRouteGroupAsync</summary>
        public async Task CreateTransitionRouteGroupResourceNamesAsync()
        {
            // Snippet: CreateTransitionRouteGroupAsync(FlowName, TransitionRouteGroup, CallSettings)
            // Additional: CreateTransitionRouteGroupAsync(FlowName, TransitionRouteGroup, CancellationToken)
            // Create client
            TransitionRouteGroupsClient transitionRouteGroupsClient = await TransitionRouteGroupsClient.CreateAsync();

            // Initialize request argument(s)
            FlowName             parent = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
            TransitionRouteGroup transitionRouteGroup = new TransitionRouteGroup();
            // Make the request
            TransitionRouteGroup response = await transitionRouteGroupsClient.CreateTransitionRouteGroupAsync(parent, transitionRouteGroup);

            // End snippet
        }
Exemple #6
0
        /// <summary>Snippet for CreateTransitionRouteGroupAsync</summary>
        public async Task CreateTransitionRouteGroupAsync()
        {
            // Snippet: CreateTransitionRouteGroupAsync(string, TransitionRouteGroup, CallSettings)
            // Additional: CreateTransitionRouteGroupAsync(string, TransitionRouteGroup, CancellationToken)
            // Create client
            TransitionRouteGroupsClient transitionRouteGroupsClient = await TransitionRouteGroupsClient.CreateAsync();

            // Initialize request argument(s)
            string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
            TransitionRouteGroup transitionRouteGroup = new TransitionRouteGroup();
            // Make the request
            TransitionRouteGroup response = await transitionRouteGroupsClient.CreateTransitionRouteGroupAsync(parent, transitionRouteGroup);

            // End snippet
        }
Exemple #7
0
        /// <summary>Snippet for GetTransitionRouteGroupAsync</summary>
        public async Task GetTransitionRouteGroupRequestObjectAsync()
        {
            // Snippet: GetTransitionRouteGroupAsync(GetTransitionRouteGroupRequest, CallSettings)
            // Additional: GetTransitionRouteGroupAsync(GetTransitionRouteGroupRequest, CancellationToken)
            // Create client
            TransitionRouteGroupsClient transitionRouteGroupsClient = await TransitionRouteGroupsClient.CreateAsync();

            // Initialize request argument(s)
            GetTransitionRouteGroupRequest request = new GetTransitionRouteGroupRequest
            {
                TransitionRouteGroupName = TransitionRouteGroupName.FromProjectLocationAgentFlowTransitionRouteGroup("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]"),
                LanguageCode             = "",
            };
            // Make the request
            TransitionRouteGroup response = await transitionRouteGroupsClient.GetTransitionRouteGroupAsync(request);

            // End snippet
        }
Exemple #8
0
        /// <summary>Snippet for UpdateTransitionRouteGroupAsync</summary>
        public async Task UpdateTransitionRouteGroupRequestObjectAsync()
        {
            // Snippet: UpdateTransitionRouteGroupAsync(UpdateTransitionRouteGroupRequest, CallSettings)
            // Additional: UpdateTransitionRouteGroupAsync(UpdateTransitionRouteGroupRequest, CancellationToken)
            // Create client
            TransitionRouteGroupsClient transitionRouteGroupsClient = await TransitionRouteGroupsClient.CreateAsync();

            // Initialize request argument(s)
            UpdateTransitionRouteGroupRequest request = new UpdateTransitionRouteGroupRequest
            {
                TransitionRouteGroup = new TransitionRouteGroup(),
                UpdateMask           = new FieldMask(),
                LanguageCode         = "",
            };
            // Make the request
            TransitionRouteGroup response = await transitionRouteGroupsClient.UpdateTransitionRouteGroupAsync(request);

            // End snippet
        }
Exemple #9
0
        /// <summary>Snippet for CreateTransitionRouteGroupAsync</summary>
        public async Task CreateTransitionRouteGroupRequestObjectAsync()
        {
            // Snippet: CreateTransitionRouteGroupAsync(CreateTransitionRouteGroupRequest, CallSettings)
            // Additional: CreateTransitionRouteGroupAsync(CreateTransitionRouteGroupRequest, CancellationToken)
            // Create client
            TransitionRouteGroupsClient transitionRouteGroupsClient = await TransitionRouteGroupsClient.CreateAsync();

            // Initialize request argument(s)
            CreateTransitionRouteGroupRequest request = new CreateTransitionRouteGroupRequest
            {
                ParentAsFlowName     = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
                TransitionRouteGroup = new TransitionRouteGroup(),
                LanguageCode         = "",
            };
            // Make the request
            TransitionRouteGroup response = await transitionRouteGroupsClient.CreateTransitionRouteGroupAsync(request);

            // End snippet
        }