Exemple #1
0
        /// <summary>Snippet for GetIntentAsync</summary>
        public async Task GetIntentAsync1()
        {
            // Snippet: GetIntentAsync(IntentName,CallSettings)
            // Additional: GetIntentAsync(IntentName,CancellationToken)
            // Create client
            IntentsClient intentsClient = await IntentsClient.CreateAsync();

            // Initialize request argument(s)
            IntentName name = new IntentName("[PROJECT]", "[INTENT]");
            // Make the request
            Intent response = await intentsClient.GetIntentAsync(name);

            // End snippet
        }
        /// <summary>Snippet for GetIntentAsync</summary>
        public async Task GetIntentAsync()
        {
            // Snippet: GetIntentAsync(string, CallSettings)
            // Additional: GetIntentAsync(string, CancellationToken)
            // Create client
            IntentsClient intentsClient = await IntentsClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/intents/[INTENT]";
            // Make the request
            Intent response = await intentsClient.GetIntentAsync(name);

            // End snippet
        }
        /// <summary>Snippet for GetIntentAsync</summary>
        public async Task GetIntentResourceNamesAsync()
        {
            // Snippet: GetIntentAsync(IntentName, CallSettings)
            // Additional: GetIntentAsync(IntentName, CancellationToken)
            // Create client
            IntentsClient intentsClient = await IntentsClient.CreateAsync();

            // Initialize request argument(s)
            IntentName name = IntentName.FromProjectLocationAgentIntent("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
            // Make the request
            Intent response = await intentsClient.GetIntentAsync(name);

            // End snippet
        }
Exemple #4
0
        /// <summary>Snippet for GetIntentAsync</summary>
        public async Task GetIntentAsync_RequestObject()
        {
            // Snippet: GetIntentAsync(GetIntentRequest,CallSettings)
            // Additional: GetIntentAsync(GetIntentRequest,CancellationToken)
            // Create client
            IntentsClient intentsClient = await IntentsClient.CreateAsync();

            // Initialize request argument(s)
            GetIntentRequest request = new GetIntentRequest
            {
                IntentName = new IntentName("[PROJECT]", "[INTENT]"),
            };
            // Make the request
            Intent response = await intentsClient.GetIntentAsync(request);

            // End snippet
        }
        /// <summary>Snippet for GetIntentAsync</summary>
        public async Task GetIntentRequestObjectAsync()
        {
            // Snippet: GetIntentAsync(GetIntentRequest, CallSettings)
            // Additional: GetIntentAsync(GetIntentRequest, CancellationToken)
            // Create client
            IntentsClient intentsClient = await IntentsClient.CreateAsync();

            // Initialize request argument(s)
            GetIntentRequest request = new GetIntentRequest
            {
                IntentName   = IntentName.FromProjectLocationAgentIntent("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]"),
                LanguageCode = "",
            };
            // Make the request
            Intent response = await intentsClient.GetIntentAsync(request);

            // End snippet
        }