示例#1
0
        public void ListTranscriptionJobsMarshallTest()
        {
            var request    = InstantiateClassGenerator.Execute <ListTranscriptionJobsRequest>();
            var marshaller = new ListTranscriptionJobsRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            var jsonRequest     = UTF8Encoding.UTF8.GetString(internalRequest.Content);

            Comparer.CompareObjectToJson <ListTranscriptionJobsRequest>(request, jsonRequest);

            var webResponse = new WebResponseData
            {
                Headers =
                {
                    { "x-amzn-RequestId", Guid.NewGuid().ToString() },
                    { "x-amz-crc32",      "0"                       }
                }
            };
            var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("ListTranscriptionJobs").ResponseStructure).Execute();

            webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString());
            UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse);
            var response = ListTranscriptionJobsResponseUnmarshaller.Instance.Unmarshall(context)
                           as ListTranscriptionJobsResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
示例#2
0
        /// <summary>
        /// Lists transcription jobs with the specified status.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the ListTranscriptionJobs service method.</param>
        ///
        /// <returns>The response from the ListTranscriptionJobs service method, as returned by TranscribeService.</returns>
        /// <exception cref="Amazon.TranscribeService.Model.BadRequestException">
        /// There is a problem with one of the input fields. Check the S3 bucket name, make sure
        /// that the job name is not a duplicate, and confirm that you are using the correct file
        /// format. Then resend your request.
        /// </exception>
        /// <exception cref="Amazon.TranscribeService.Model.InternalFailureException">
        /// There was an internal error. Check the error message and try your request again.
        /// </exception>
        /// <exception cref="Amazon.TranscribeService.Model.LimitExceededException">
        /// Either you have sent too many requests or your input file is longer than 2 hours.
        /// Wait before you resend your request, or use a smaller file and resend the request.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobs">REST API Reference for ListTranscriptionJobs Operation</seealso>
        public virtual ListTranscriptionJobsResponse ListTranscriptionJobs(ListTranscriptionJobsRequest request)
        {
            var marshaller   = new ListTranscriptionJobsRequestMarshaller();
            var unmarshaller = ListTranscriptionJobsResponseUnmarshaller.Instance;

            return(Invoke <ListTranscriptionJobsRequest, ListTranscriptionJobsResponse>(request, marshaller, unmarshaller));
        }
示例#3
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListTranscriptionJobs operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListTranscriptionJobs operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobs">REST API Reference for ListTranscriptionJobs Operation</seealso>
        public virtual Task <ListTranscriptionJobsResponse> ListTranscriptionJobsAsync(ListTranscriptionJobsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new ListTranscriptionJobsRequestMarshaller();
            var unmarshaller = ListTranscriptionJobsResponseUnmarshaller.Instance;

            return(InvokeAsync <ListTranscriptionJobsRequest, ListTranscriptionJobsResponse>(request, marshaller,
                                                                                             unmarshaller, cancellationToken));
        }
示例#4
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListTranscriptionJobs operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListTranscriptionJobs operation on AmazonTranscribeServiceClient.</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 EndListTranscriptionJobs
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobs">REST API Reference for ListTranscriptionJobs Operation</seealso>
        public virtual IAsyncResult BeginListTranscriptionJobs(ListTranscriptionJobsRequest request, AsyncCallback callback, object state)
        {
            var marshaller   = new ListTranscriptionJobsRequestMarshaller();
            var unmarshaller = ListTranscriptionJobsResponseUnmarshaller.Instance;

            return(BeginInvoke <ListTranscriptionJobsRequest>(request, marshaller, unmarshaller,
                                                              callback, state));
        }