public void CancelJobMarshallTest() { var operation = service_model.FindOperation("CancelJob"); var request = InstantiateClassGenerator.Execute<CancelJobRequest>(); var marshaller = new CancelJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); RequestValidator.Validate("CancelJob", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString()); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CancelJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CancelJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the CancelJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CancelJob operation on AmazonSnowballClient.</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 EndCancelJob /// operation.</returns> public IAsyncResult BeginCancelJob(CancelJobRequest request, AsyncCallback callback, object state) { var marshaller = new CancelJobRequestMarshaller(); var unmarshaller = CancelJobResponseUnmarshaller.Instance; return(BeginInvoke <CancelJobRequest>(request, marshaller, unmarshaller, callback, state)); }
/// <summary> /// Initiates the asynchronous execution of the CancelJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CancelJob 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 virtual Task <CancelJobResponse> CancelJobAsync(CancelJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CancelJobRequestMarshaller(); var unmarshaller = CancelJobResponseUnmarshaller.Instance; return(InvokeAsync <CancelJobRequest, CancelJobResponse>(request, marshaller, unmarshaller, cancellationToken)); }
IAsyncResult invokeCancelJob(CancelJobRequest cancelJobRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CancelJobRequestMarshaller().Marshall(cancelJobRequest); var unmarshaller = CancelJobResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return(result); }
public void CancelJobMarshallTest() { var operation = service_model.FindOperation("CancelJob"); var request = InstantiateClassGenerator.Execute <CancelJobRequest>(); var marshaller = new CancelJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelJob", request, internalRequest, service_model); }
public void CancelJobMarshallTest() { var operation = service_model.FindOperation("CancelJob"); var request = InstantiateClassGenerator.Execute<CancelJobRequest>(); var marshaller = new CancelJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = CancelJobResponseUnmarshaller.Instance.Unmarshall(context) as CancelJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void CancelJobMarshallTest() { var operation = service_model.FindOperation("CancelJob"); var request = InstantiateClassGenerator.Execute <CancelJobRequest>(); var marshaller = new CancelJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = CancelJobResponseUnmarshaller.Instance.Unmarshall(context) as CancelJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the CancelJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CancelJob 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<CancelJobResponse> CancelJobAsync(CancelJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CancelJobRequestMarshaller(); var unmarshaller = CancelJobResponseUnmarshaller.Instance; return InvokeAsync<CancelJobRequest,CancelJobResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal CancelJobResponse CancelJob(CancelJobRequest request) { var marshaller = new CancelJobRequestMarshaller(); var unmarshaller = CancelJobResponseUnmarshaller.Instance; return Invoke<CancelJobRequest,CancelJobResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CancelJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CancelJob 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 EndCancelJob /// operation.</returns> public IAsyncResult BeginCancelJob(CancelJobRequest request, AsyncCallback callback, object state) { var marshaller = new CancelJobRequestMarshaller(); var unmarshaller = CancelJobResponseUnmarshaller.Instance; return BeginInvoke<CancelJobRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the CancelJob operation. /// <seealso cref="Amazon.ImportExport.IAmazonImportExport.CancelJob"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CancelJob 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<CancelJobResponse> CancelJobAsync(CancelJobRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CancelJobRequestMarshaller(); var unmarshaller = CancelJobResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CancelJobRequest, CancelJobResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
IAsyncResult invokeCancelJob(CancelJobRequest cancelJobRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CancelJobRequestMarshaller().Marshall(cancelJobRequest); var unmarshaller = CancelJobResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para> This operation cancels a specified job. Only the job owner can /// cancel it. The operation fails if the job has already started or is /// complete. </para> /// </summary> /// /// <param name="cancelJobRequest">Container for the necessary parameters /// to execute the CancelJob service method on AmazonImportExport.</param> /// /// <returns>The response from the CancelJob service method, as returned /// by AmazonImportExport.</returns> /// /// <exception cref="CanceledJobIdException"/> /// <exception cref="ExpiredJobIdException"/> /// <exception cref="InvalidAccessKeyIdException"/> /// <exception cref="InvalidJobIdException"/> /// <exception cref="UnableToCancelJobIdException"/> public CancelJobResponse CancelJob(CancelJobRequest cancelJobRequest) { IRequest<CancelJobRequest> request = new CancelJobRequestMarshaller().Marshall(cancelJobRequest); CancelJobResponse response = Invoke<CancelJobRequest, CancelJobResponse> (request, this.signer, CancelJobResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// Initiates the asynchronous execution of the CancelJob operation. /// <seealso cref="Amazon.ImportExport.IAmazonImportExport.CancelJob"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CancelJob 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 async Task<CancelJobResponse> CancelJobAsync(CancelJobRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CancelJobRequestMarshaller(); var unmarshaller = CancelJobResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CancelJobRequest, CancelJobResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
IAsyncResult invokeCancelJob(CancelJobRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new CancelJobRequestMarshaller(); var unmarshaller = CancelJobResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }