public void UpdateJobMarshallTest() { var request = InstantiateClassGenerator.Execute <UpdateJobRequest>(); var marshaller = new UpdateJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <UpdateJobRequest>(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("UpdateJob").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = UpdateJobResponseUnmarshaller.Instance.Unmarshall(context) as UpdateJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
internal UpdateJobResponse UpdateJob(UpdateJobRequest request) { var marshaller = new UpdateJobRequestMarshaller(); var unmarshaller = UpdateJobResponseUnmarshaller.Instance; return(Invoke <UpdateJobRequest, UpdateJobResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the UpdateJob operation. /// <seealso cref="Amazon.ImportExport.IAmazonImportExport.UpdateJob"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateJob 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 <UpdateJobResponse> UpdateJobAsync(UpdateJobRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateJobRequestMarshaller(); var unmarshaller = UpdateJobResponseUnmarshaller.GetInstance(); return(Invoke <IRequest, UpdateJobRequest, UpdateJobResponse>(request, marshaller, unmarshaller, signer, cancellationToken)); }
/// <summary> /// <para> You use this operation to change the parameters specified in /// the original manifest file by supplying a new manifest file. The /// manifest file attached to this request replaces the original manifest /// file. You can only use the operation after a CreateJob request but /// before the data transfer starts and you can only use it on jobs you /// own. </para> /// </summary> /// /// <param name="updateJobRequest">Container for the necessary parameters /// to execute the UpdateJob service method on AmazonImportExport.</param> /// /// <returns>The response from the UpdateJob service method, as returned /// by AmazonImportExport.</returns> /// /// <exception cref="MalformedManifestException"/> /// <exception cref="BucketPermissionException"/> /// <exception cref="InvalidAddressException"/> /// <exception cref="InvalidParameterException"/> /// <exception cref="UnableToUpdateJobIdException"/> /// <exception cref="MultipleRegionsException"/> /// <exception cref="MissingParameterException"/> /// <exception cref="InvalidFileSystemException"/> /// <exception cref="CanceledJobIdException"/> /// <exception cref="MissingCustomsException"/> /// <exception cref="NoSuchBucketException"/> /// <exception cref="ExpiredJobIdException"/> /// <exception cref="InvalidAccessKeyIdException"/> /// <exception cref="InvalidCustomsException"/> /// <exception cref="InvalidManifestFieldException"/> /// <exception cref="MissingManifestFieldException"/> /// <exception cref="InvalidJobIdException"/> public UpdateJobResponse UpdateJob(UpdateJobRequest updateJobRequest) { IRequest <UpdateJobRequest> request = new UpdateJobRequestMarshaller().Marshall(updateJobRequest); UpdateJobResponse response = Invoke <UpdateJobRequest, UpdateJobResponse> (request, this.signer, UpdateJobResponseUnmarshaller.GetInstance()); return(response); }
/// <summary> /// Initiates the asynchronous execution of the UpdateJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateJob 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 <UpdateJobResponse> UpdateJobAsync(UpdateJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateJobRequestMarshaller(); var unmarshaller = UpdateJobResponseUnmarshaller.Instance; return(InvokeAsync <UpdateJobRequest, UpdateJobResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the UpdateJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateJob 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 EndUpdateJob /// operation.</returns> public IAsyncResult BeginUpdateJob(UpdateJobRequest request, AsyncCallback callback, object state) { var marshaller = new UpdateJobRequestMarshaller(); var unmarshaller = UpdateJobResponseUnmarshaller.Instance; return(BeginInvoke <UpdateJobRequest>(request, marshaller, unmarshaller, callback, state)); }
IAsyncResult invokeUpdateJob(UpdateJobRequest updateJobRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new UpdateJobRequestMarshaller().Marshall(updateJobRequest); var unmarshaller = UpdateJobResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return(result); }
public void UpdateJobMarshallTest() { var operation = service_model.FindOperation("UpdateJob"); var request = InstantiateClassGenerator.Execute <UpdateJobRequest>(); var marshaller = new UpdateJobRequestMarshaller(); 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 = UpdateJobResponseUnmarshaller.Instance.Unmarshall(context) as UpdateJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the UpdateJob operation. /// <seealso cref="Amazon.ImportExport.IAmazonImportExport.UpdateJob"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateJob 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<UpdateJobResponse> UpdateJobAsync(UpdateJobRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateJobRequestMarshaller(); var unmarshaller = UpdateJobResponseUnmarshaller.GetInstance(); return Invoke<IRequest, UpdateJobRequest, UpdateJobResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
IAsyncResult invokeUpdateJob(UpdateJobRequest updateJobRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new UpdateJobRequestMarshaller().Marshall(updateJobRequest); var unmarshaller = UpdateJobResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the UpdateJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateJob 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<UpdateJobResponse> UpdateJobAsync(UpdateJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateJobRequestMarshaller(); var unmarshaller = UpdateJobResponseUnmarshaller.Instance; return InvokeAsync<UpdateJobRequest,UpdateJobResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal UpdateJobResponse UpdateJob(UpdateJobRequest request) { var marshaller = new UpdateJobRequestMarshaller(); var unmarshaller = UpdateJobResponseUnmarshaller.Instance; return Invoke<UpdateJobRequest,UpdateJobResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the UpdateJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateJob operation on AmazonImportExportClient.</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 EndUpdateJob /// operation.</returns> public IAsyncResult BeginUpdateJob(UpdateJobRequest request, AsyncCallback callback, object state) { var marshaller = new UpdateJobRequestMarshaller(); var unmarshaller = UpdateJobResponseUnmarshaller.Instance; return BeginInvoke<UpdateJobRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// <para> You use this operation to change the parameters specified in /// the original manifest file by supplying a new manifest file. The /// manifest file attached to this request replaces the original manifest /// file. You can only use the operation after a CreateJob request but /// before the data transfer starts and you can only use it on jobs you /// own. </para> /// </summary> /// /// <param name="updateJobRequest">Container for the necessary parameters /// to execute the UpdateJob service method on AmazonImportExport.</param> /// /// <returns>The response from the UpdateJob service method, as returned /// by AmazonImportExport.</returns> /// /// <exception cref="MalformedManifestException"/> /// <exception cref="BucketPermissionException"/> /// <exception cref="InvalidAddressException"/> /// <exception cref="InvalidParameterException"/> /// <exception cref="UnableToUpdateJobIdException"/> /// <exception cref="MultipleRegionsException"/> /// <exception cref="MissingParameterException"/> /// <exception cref="InvalidFileSystemException"/> /// <exception cref="CanceledJobIdException"/> /// <exception cref="MissingCustomsException"/> /// <exception cref="NoSuchBucketException"/> /// <exception cref="ExpiredJobIdException"/> /// <exception cref="InvalidAccessKeyIdException"/> /// <exception cref="InvalidCustomsException"/> /// <exception cref="InvalidManifestFieldException"/> /// <exception cref="MissingManifestFieldException"/> /// <exception cref="InvalidJobIdException"/> public UpdateJobResponse UpdateJob(UpdateJobRequest updateJobRequest) { IRequest<UpdateJobRequest> request = new UpdateJobRequestMarshaller().Marshall(updateJobRequest); UpdateJobResponse response = Invoke<UpdateJobRequest, UpdateJobResponse> (request, this.signer, UpdateJobResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// Initiates the asynchronous execution of the UpdateJob operation. /// <seealso cref="Amazon.ImportExport.IAmazonImportExport.UpdateJob"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateJob 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<UpdateJobResponse> UpdateJobAsync(UpdateJobRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateJobRequestMarshaller(); var unmarshaller = UpdateJobResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, UpdateJobRequest, UpdateJobResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
public void UpdateJobMarshallTest() { var operation = service_model.FindOperation("UpdateJob"); var request = InstantiateClassGenerator.Execute<UpdateJobRequest>(); var marshaller = new UpdateJobRequestMarshaller(); 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 = UpdateJobResponseUnmarshaller.Instance.Unmarshall(context) as UpdateJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }