Пример #1
0
        /// <summary>Snippet for CreateFlowAsync</summary>
        public async Task CreateFlowAsync()
        {
            // Snippet: CreateFlowAsync(string, Flow, CallSettings)
            // Additional: CreateFlowAsync(string, Flow, CancellationToken)
            // Create client
            FlowsClient flowsClient = await FlowsClient.CreateAsync();

            // Initialize request argument(s)
            string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
            Flow   flow   = new Flow();
            // Make the request
            Flow response = await flowsClient.CreateFlowAsync(parent, flow);

            // End snippet
        }
Пример #2
0
        /// <summary>Snippet for CreateFlowAsync</summary>
        public async Task CreateFlowResourceNamesAsync()
        {
            // Snippet: CreateFlowAsync(AgentName, Flow, CallSettings)
            // Additional: CreateFlowAsync(AgentName, Flow, CancellationToken)
            // Create client
            FlowsClient flowsClient = await FlowsClient.CreateAsync();

            // Initialize request argument(s)
            AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
            Flow      flow   = new Flow();
            // Make the request
            Flow response = await flowsClient.CreateFlowAsync(parent, flow);

            // End snippet
        }
Пример #3
0
        /// <summary>Snippet for CreateFlowAsync</summary>
        public async Task CreateFlowRequestObjectAsync()
        {
            // Snippet: CreateFlowAsync(CreateFlowRequest, CallSettings)
            // Additional: CreateFlowAsync(CreateFlowRequest, CancellationToken)
            // Create client
            FlowsClient flowsClient = await FlowsClient.CreateAsync();

            // Initialize request argument(s)
            CreateFlowRequest request = new CreateFlowRequest
            {
                ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
                Flow         = new Flow(),
                LanguageCode = "",
            };
            // Make the request
            Flow response = await flowsClient.CreateFlowAsync(request);

            // End snippet
        }