public void StartTranscriptionJobMarshallTest() { var request = InstantiateClassGenerator.Execute <StartTranscriptionJobRequest>(); var marshaller = new StartTranscriptionJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <StartTranscriptionJobRequest>(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("StartTranscriptionJob").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = StartTranscriptionJobResponseUnmarshaller.Instance.Unmarshall(context) as StartTranscriptionJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Starts an asynchronous job to transcribe speech to text. /// </summary> /// <param name="request">Container for the necessary parameters to execute the StartTranscriptionJob service method.</param> /// /// <returns>The response from the StartTranscriptionJob 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.ConflictException"> /// The <code>JobName</code> field is a duplicate of a previously entered job name. Resend /// your request with a different name. /// </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/StartTranscriptionJob">REST API Reference for StartTranscriptionJob Operation</seealso> public virtual StartTranscriptionJobResponse StartTranscriptionJob(StartTranscriptionJobRequest request) { var marshaller = new StartTranscriptionJobRequestMarshaller(); var unmarshaller = StartTranscriptionJobResponseUnmarshaller.Instance; return(Invoke <StartTranscriptionJobRequest, StartTranscriptionJobResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the StartTranscriptionJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the StartTranscriptionJob 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/StartTranscriptionJob">REST API Reference for StartTranscriptionJob Operation</seealso> public virtual Task <StartTranscriptionJobResponse> StartTranscriptionJobAsync(StartTranscriptionJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new StartTranscriptionJobRequestMarshaller(); var unmarshaller = StartTranscriptionJobResponseUnmarshaller.Instance; return(InvokeAsync <StartTranscriptionJobRequest, StartTranscriptionJobResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the StartTranscriptionJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the StartTranscriptionJob 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 EndStartTranscriptionJob /// operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/StartTranscriptionJob">REST API Reference for StartTranscriptionJob Operation</seealso> public virtual IAsyncResult BeginStartTranscriptionJob(StartTranscriptionJobRequest request, AsyncCallback callback, object state) { var marshaller = new StartTranscriptionJobRequestMarshaller(); var unmarshaller = StartTranscriptionJobResponseUnmarshaller.Instance; return(BeginInvoke <StartTranscriptionJobRequest>(request, marshaller, unmarshaller, callback, state)); }