/// <summary> /// Sends user input to Amazon Lex V2. Client applications use this API to send requests /// to Amazon Lex V2 at runtime. Amazon Lex V2 then interprets the user input using the /// machine learning model that it build for the bot. /// /// /// <para> /// In response, Amazon Lex V2 returns the next message to convey to the user and an optional /// response card to display. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the RecognizeText service method.</param> /// /// <returns>The response from the RecognizeText 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/RecognizeText">REST API Reference for RecognizeText Operation</seealso> public virtual RecognizeTextResponse RecognizeText(RecognizeTextRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = RecognizeTextRequestMarshaller.Instance; options.ResponseUnmarshaller = RecognizeTextResponseUnmarshaller.Instance; return(Invoke <RecognizeTextResponse>(request, options)); }
/// <summary> /// Initiates the asynchronous execution of the RecognizeText operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RecognizeText 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 EndRecognizeText /// operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/runtime.lex.v2-2020-08-07/RecognizeText">REST API Reference for RecognizeText Operation</seealso> public virtual IAsyncResult BeginRecognizeText(RecognizeTextRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = RecognizeTextRequestMarshaller.Instance; options.ResponseUnmarshaller = RecognizeTextResponseUnmarshaller.Instance; return(BeginInvoke(request, options, callback, state)); }
/// <summary> /// Sends user input to Amazon Lex V2. Client applications use this API to send requests /// to Amazon Lex V2 at runtime. Amazon Lex V2 then interprets the user input using the /// machine learning model that it build for the bot. /// /// /// <para> /// In response, Amazon Lex V2 returns the next message to convey to the user and an optional /// response card to display. /// </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 RecognizeText 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 RecognizeText 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/RecognizeText">REST API Reference for RecognizeText Operation</seealso> public virtual Task <RecognizeTextResponse> RecognizeTextAsync(RecognizeTextRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = RecognizeTextRequestMarshaller.Instance; options.ResponseUnmarshaller = RecognizeTextResponseUnmarshaller.Instance; return(InvokeAsync <RecognizeTextResponse>(request, options, cancellationToken)); }