Container for the parameters to the ReadJob operation. The ReadJob operation returns detailed information about a job.
Inheritance: AmazonElasticTranscoderRequest
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.ElasticTranscoder.Model.ReadJobRequest();

            if (cmdletContext.Id != null)
            {
                request.Id = cmdletContext.Id;
            }

            CmdletOutput output;

            // issue call
            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            try
            {
                var    response       = CallAWSServiceOperation(client, request);
                object pipelineOutput = null;
                pipelineOutput = cmdletContext.Select(response, this);
                output         = new CmdletOutput
                {
                    PipelineOutput  = pipelineOutput,
                    ServiceResponse = response
                };
            }
            catch (Exception e)
            {
                output = new CmdletOutput {
                    ErrorResponse = e
                };
            }

            return(output);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ReadJob operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ReadJob 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>
        public Task<ReadJobResponse> ReadJobAsync(ReadJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ReadJobRequestMarshaller();
            var unmarshaller = ReadJobResponseUnmarshaller.Instance;

            return InvokeAsync<ReadJobRequest,ReadJobResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        internal ReadJobResponse ReadJob(ReadJobRequest request)
        {
            var marshaller = new ReadJobRequestMarshaller();
            var unmarshaller = ReadJobResponseUnmarshaller.Instance;

            return Invoke<ReadJobRequest,ReadJobResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ReadJob operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ReadJob operation on AmazonElasticTranscoderClient.</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 EndReadJob
        ///         operation.</returns>
        public IAsyncResult BeginReadJob(ReadJobRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new ReadJobRequestMarshaller();
            var unmarshaller = ReadJobResponseUnmarshaller.Instance;

            return BeginInvoke<ReadJobRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 /// <summary>
 /// Initiates the asynchronous execution of the ReadJob operation.
 /// <seealso cref="Amazon.ElasticTranscoder.IAmazonElasticTranscoder.ReadJob"/>
 /// </summary>
 /// 
 /// <param name="readJobRequest">Container for the necessary parameters to execute the ReadJob operation on AmazonElasticTranscoder.</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 EndReadJob
 ///         operation.</returns>
 public IAsyncResult BeginReadJob(ReadJobRequest readJobRequest, AsyncCallback callback, object state)
 {
     return invokeReadJob(readJobRequest, callback, state, false);
 }
 /// <summary>
 /// <para>The ReadJob operation returns detailed information about a job.</para>
 /// </summary>
 /// 
 /// <param name="readJobRequest">Container for the necessary parameters to execute the ReadJob service method on
 ///          AmazonElasticTranscoder.</param>
 /// 
 /// <returns>The response from the ReadJob service method, as returned by AmazonElasticTranscoder.</returns>
 /// 
 /// <exception cref="ResourceNotFoundException"/>
 /// <exception cref="AccessDeniedException"/>
 /// <exception cref="InternalServiceException"/>
 /// <exception cref="ValidationException"/>
 /// <exception cref="IncompatibleVersionException"/>
 public ReadJobResponse ReadJob(ReadJobRequest readJobRequest)
 {
     IAsyncResult asyncResult = invokeReadJob(readJobRequest, null, null, true);
     return EndReadJob(asyncResult);
 }
 IAsyncResult invokeReadJob(ReadJobRequest readJobRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new ReadJobRequestMarshaller().Marshall(readJobRequest);
     var unmarshaller = ReadJobResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
Esempio n. 8
0
        /// <summary>
        /// <para>The ReadJob operation returns detailed information about a job.</para>
        /// </summary>
        /// 
        /// <param name="readJobRequest">Container for the necessary parameters to execute the ReadJob service method on
        /// AmazonElasticTranscoder.</param>
        /// 
        /// <returns>The response from the ReadJob service method, as returned by AmazonElasticTranscoder.</returns>
        /// 
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.ResourceNotFoundException" />
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.AccessDeniedException" />
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.InternalServiceException" />
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.ValidationException" />
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.IncompatibleVersionException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public Task<ReadJobResponse> ReadJobAsync(ReadJobRequest readJobRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ReadJobRequestMarshaller();
            var unmarshaller = ReadJobResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, ReadJobRequest, ReadJobResponse>(readJobRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
Esempio n. 9
0
		internal ReadJobResponse ReadJob(ReadJobRequest request)
        {
            var task = ReadJobAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
 private Amazon.ElasticTranscoder.Model.ReadJobResponse CallAWSServiceOperation(IAmazonElasticTranscoder client, Amazon.ElasticTranscoder.Model.ReadJobRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Elastic Transcoder", "ReadJob");
     try
     {
         #if DESKTOP
         return(client.ReadJob(request));
         #elif CORECLR
         return(client.ReadJobAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }
        /// <summary>
        /// <para>The ReadJob operation returns detailed information about a job.</para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ReadJob service method on
        /// AmazonElasticTranscoder.</param>
        /// 
        /// <returns>The response from the ReadJob service method, as returned by AmazonElasticTranscoder.</returns>
        /// 
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.ResourceNotFoundException" />
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.AccessDeniedException" />
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.InternalServiceException" />
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.ValidationException" />
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.IncompatibleVersionException" />
		public ReadJobResponse ReadJob(ReadJobRequest request)
        {
            var task = ReadJobAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
        /// <summary>
        /// <para>The ReadJob operation returns detailed information about a job.</para>
        /// </summary>
        /// 
        /// <param name="readJobRequest">Container for the necessary parameters to execute the ReadJob service method on
        /// AmazonElasticTranscoder.</param>
        /// 
        /// <returns>The response from the ReadJob service method, as returned by AmazonElasticTranscoder.</returns>
        /// 
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.ResourceNotFoundException" />
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.AccessDeniedException" />
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.InternalServiceException" />
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.ValidationException" />
        /// <exception cref="T:Amazon.ElasticTranscoder.Model.IncompatibleVersionException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public async Task<ReadJobResponse> ReadJobAsync(ReadJobRequest readJobRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ReadJobRequestMarshaller();
            var unmarshaller = ReadJobResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, ReadJobRequest, ReadJobResponse>(readJobRequest, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
        IAsyncResult invokeReadJob(ReadJobRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new ReadJobRequestMarshaller();
            var unmarshaller = ReadJobResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }