Пример #1
0
        /// <summary>
        /// Creates a new session or modifies an existing session with an Amazon Lex V2 bot. Use
        /// this operation to enable your application to set the state of the bot.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the PutSession service method.</param>
        ///
        /// <returns>The response from the PutSession 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/PutSession">REST API Reference for PutSession Operation</seealso>
        public virtual PutSessionResponse PutSession(PutSessionRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = PutSessionRequestMarshaller.Instance;
            options.ResponseUnmarshaller = PutSessionResponseUnmarshaller.Instance;

            return(Invoke <PutSessionResponse>(request, options));
        }
Пример #2
0
        /// <summary>
        /// Initiates the asynchronous execution of the PutSession operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the PutSession 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 EndPutSession
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/runtime.lex.v2-2020-08-07/PutSession">REST API Reference for PutSession Operation</seealso>
        public virtual IAsyncResult BeginPutSession(PutSessionRequest request, AsyncCallback callback, object state)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = PutSessionRequestMarshaller.Instance;
            options.ResponseUnmarshaller = PutSessionResponseUnmarshaller.Instance;

            return(BeginInvoke(request, options, callback, state));
        }
Пример #3
0
        /// <summary>
        /// Creates a new session or modifies an existing session with an Amazon Lex V2 bot. Use
        /// this operation to enable your application to set the state of the bot.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the PutSession 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 PutSession 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/PutSession">REST API Reference for PutSession Operation</seealso>
        public virtual Task <PutSessionResponse> PutSessionAsync(PutSessionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = PutSessionRequestMarshaller.Instance;
            options.ResponseUnmarshaller = PutSessionResponseUnmarshaller.Instance;

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