Exemplo n.º 1
0
        /// <summary>
        /// Sends user input to Amazon Lex V2. You can send text or speech. Clients use this API
        /// to send text and audio requests to Amazon Lex V2 at runtime. Amazon Lex V2 interprets
        /// the user input using the machine learning model built for the bot.
        ///
        ///
        /// <para>
        /// The following request fields must be compressed with gzip and then base64 encoded
        /// before you send them to Amazon Lex V2.
        /// </para>
        ///  <ul> <li>
        /// <para>
        /// requestAttributes
        /// </para>
        ///  </li> <li>
        /// <para>
        /// sessionState
        /// </para>
        ///  </li> </ul>
        /// <para>
        /// The following response fields are compressed using gzip and then base64 encoded by
        /// Amazon Lex V2. Before you can use these fields, you must decode and decompress them.
        ///
        /// </para>
        ///  <ul> <li>
        /// <para>
        /// inputTranscript
        /// </para>
        ///  </li> <li>
        /// <para>
        /// interpretations
        /// </para>
        ///  </li> <li>
        /// <para>
        /// messages
        /// </para>
        ///  </li> <li>
        /// <para>
        /// requestAttributes
        /// </para>
        ///  </li> <li>
        /// <para>
        /// sessionState
        /// </para>
        ///  </li> </ul>
        /// <para>
        /// The example contains a Java application that compresses and encodes a Java object
        /// to send to Amazon Lex V2, and a second that decodes and decompresses a response from
        /// Amazon Lex V2.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the RecognizeUtterance service method.</param>
        ///
        /// <returns>The response from the RecognizeUtterance service method, as returned by LexRuntimeV2.</returns>
        /// <exception cref="Amazon.LexRuntimeV2.Model.AccessDeniedException">
        ///
        /// </exception>
        /// <exception cref="Amazon.LexRuntimeV2.Model.BadGatewayException">
        ///
        /// </exception>
        /// <exception cref="Amazon.LexRuntimeV2.Model.ConflictException">
        ///
        /// </exception>
        /// <exception cref="Amazon.LexRuntimeV2.Model.DependencyFailedException">
        ///
        /// </exception>
        /// <exception cref="Amazon.LexRuntimeV2.Model.InternalServerException">
        ///
        /// </exception>
        /// <exception cref="Amazon.LexRuntimeV2.Model.ResourceNotFoundException">
        ///
        /// </exception>
        /// <exception cref="Amazon.LexRuntimeV2.Model.ThrottlingException">
        ///
        /// </exception>
        /// <exception cref="Amazon.LexRuntimeV2.Model.ValidationException">
        ///
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/runtime.lex.v2-2020-08-07/RecognizeUtterance">REST API Reference for RecognizeUtterance Operation</seealso>
        public virtual RecognizeUtteranceResponse RecognizeUtterance(RecognizeUtteranceRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = RecognizeUtteranceRequestMarshaller.Instance;
            options.ResponseUnmarshaller = RecognizeUtteranceResponseUnmarshaller.Instance;

            return(Invoke <RecognizeUtteranceResponse>(request, options));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initiates the asynchronous execution of the RecognizeUtterance operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the RecognizeUtterance operation on AmazonLexRuntimeV2Client.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndRecognizeUtterance
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/runtime.lex.v2-2020-08-07/RecognizeUtterance">REST API Reference for RecognizeUtterance Operation</seealso>
        public virtual IAsyncResult BeginRecognizeUtterance(RecognizeUtteranceRequest request, AsyncCallback callback, object state)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = RecognizeUtteranceRequestMarshaller.Instance;
            options.ResponseUnmarshaller = RecognizeUtteranceResponseUnmarshaller.Instance;

            return(BeginInvoke(request, options, callback, state));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Sends user input to Amazon Lex V2. You can send text or speech. Clients use this API
        /// to send text and audio requests to Amazon Lex V2 at runtime. Amazon Lex V2 interprets
        /// the user input using the machine learning model built for the bot.
        ///
        ///
        /// <para>
        /// The following request fields must be compressed with gzip and then base64 encoded
        /// before you send them to Amazon Lex V2.
        /// </para>
        ///  <ul> <li>
        /// <para>
        /// requestAttributes
        /// </para>
        ///  </li> <li>
        /// <para>
        /// sessionState
        /// </para>
        ///  </li> </ul>
        /// <para>
        /// The following response fields are compressed using gzip and then base64 encoded by
        /// Amazon Lex V2. Before you can use these fields, you must decode and decompress them.
        ///
        /// </para>
        ///  <ul> <li>
        /// <para>
        /// inputTranscript
        /// </para>
        ///  </li> <li>
        /// <para>
        /// interpretations
        /// </para>
        ///  </li> <li>
        /// <para>
        /// messages
        /// </para>
        ///  </li> <li>
        /// <para>
        /// requestAttributes
        /// </para>
        ///  </li> <li>
        /// <para>
        /// sessionState
        /// </para>
        ///  </li> </ul>
        /// <para>
        /// The example contains a Java application that compresses and encodes a Java object
        /// to send to Amazon Lex V2, and a second that decodes and decompresses a response from
        /// Amazon Lex V2.
        /// </para>
        ///
        /// <para>
        /// If the optional post-fulfillment response is specified, the messages are returned
        /// as follows. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/API_PostFulfillmentStatusSpecification.html">PostFulfillmentStatusSpecification</a>.
        /// </para>
        ///  <ul> <li>
        /// <para>
        ///  <b>Success message</b> - Returned if the Lambda function completes successfully and
        /// the intent state is fulfilled or ready fulfillment if the message is present.
        /// </para>
        ///  </li> <li>
        /// <para>
        ///  <b>Failed message</b> - The failed message is returned if the Lambda function throws
        /// an exception or if the Lambda function returns a failed intent state without a message.
        /// </para>
        ///  </li> <li>
        /// <para>
        ///  <b>Timeout message</b> - If you don't configure a timeout message and a timeout,
        /// and the Lambda function doesn't return within 30 seconds, the timeout message is returned.
        /// If you configure a timeout, the timeout message is returned when the period times
        /// out.
        /// </para>
        ///  </li> </ul>
        /// <para>
        /// For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/streaming-progress.html#progress-complete.html">Completion
        /// message</a>.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the RecognizeUtterance service method.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        ///
        /// <returns>The response from the RecognizeUtterance service method, as returned by LexRuntimeV2.</returns>
        /// <exception cref="Amazon.LexRuntimeV2.Model.AccessDeniedException">
        ///
        /// </exception>
        /// <exception cref="Amazon.LexRuntimeV2.Model.BadGatewayException">
        ///
        /// </exception>
        /// <exception cref="Amazon.LexRuntimeV2.Model.ConflictException">
        ///
        /// </exception>
        /// <exception cref="Amazon.LexRuntimeV2.Model.DependencyFailedException">
        ///
        /// </exception>
        /// <exception cref="Amazon.LexRuntimeV2.Model.InternalServerException">
        ///
        /// </exception>
        /// <exception cref="Amazon.LexRuntimeV2.Model.ResourceNotFoundException">
        ///
        /// </exception>
        /// <exception cref="Amazon.LexRuntimeV2.Model.ThrottlingException">
        ///
        /// </exception>
        /// <exception cref="Amazon.LexRuntimeV2.Model.ValidationException">
        ///
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/runtime.lex.v2-2020-08-07/RecognizeUtterance">REST API Reference for RecognizeUtterance Operation</seealso>
        public virtual Task <RecognizeUtteranceResponse> RecognizeUtteranceAsync(RecognizeUtteranceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = RecognizeUtteranceRequestMarshaller.Instance;
            options.ResponseUnmarshaller = RecognizeUtteranceResponseUnmarshaller.Instance;

            return(InvokeAsync <RecognizeUtteranceResponse>(request, options, cancellationToken));
        }