public void CreateJobMarshallTest() { var request = InstantiateClassGenerator.Execute <CreateJobRequest>(); var marshaller = new CreateJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <CreateJobRequest>(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("CreateJob").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = CreateJobResponseUnmarshaller.Instance.Unmarshall(context) as CreateJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void CreateJobMarshallTest() { var operation = service_model.FindOperation("CreateJob"); var request = InstantiateClassGenerator.Execute<CreateJobRequest>(); var marshaller = new CreateJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); RequestValidator.Validate("CreateJob", 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 = CreateJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// <para> When you create a job, Elastic Transcoder returns JSON data that includes the values that you specified plus information about the /// job that is created. </para> <para>If you have specified more than one output for your jobs (for example, one output for the Kindle Fire and /// another output for the Apple iPhone 4s), you currently must use the Elastic Transcoder API to list the jobs (as opposed to the AWS /// Console).</para> /// </summary> /// /// <param name="createJobRequest">Container for the necessary parameters to execute the CreateJob service method on /// AmazonElasticTranscoder.</param> /// /// <returns>The response from the CreateJob 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.LimitExceededException" /> /// <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 <CreateJobResponse> CreateJobAsync(CreateJobRequest createJobRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateJobRequestMarshaller(); var unmarshaller = CreateJobResponseUnmarshaller.GetInstance(); return(Invoke <IRequest, CreateJobRequest, CreateJobResponse>(createJobRequest, marshaller, unmarshaller, signer, cancellationToken)); }
/// <summary> /// <para> This operation initiates the process of scheduling an upload or /// download of your data. You include in the request a manifest that /// describes the data transfer specifics. The response to the request /// includes a job ID, which you can use in other operations, a signature /// that you use to identify your storage device, and the address where /// you should ship your storage device. </para> /// </summary> /// /// <param name="createJobRequest">Container for the necessary parameters /// to execute the CreateJob service method on AmazonImportExport.</param> /// /// <returns>The response from the CreateJob service method, as returned /// by AmazonImportExport.</returns> /// /// <exception cref="MalformedManifestException"/> /// <exception cref="InvalidAddressException"/> /// <exception cref="BucketPermissionException"/> /// <exception cref="InvalidParameterException"/> /// <exception cref="MultipleRegionsException"/> /// <exception cref="MissingParameterException"/> /// <exception cref="InvalidFileSystemException"/> /// <exception cref="MissingCustomsException"/> /// <exception cref="NoSuchBucketException"/> /// <exception cref="InvalidAccessKeyIdException"/> /// <exception cref="InvalidManifestFieldException"/> /// <exception cref="InvalidCustomsException"/> /// <exception cref="MissingManifestFieldException"/> /// <exception cref="CreateJobQuotaExceededException"/> public CreateJobResponse CreateJob(CreateJobRequest createJobRequest) { IRequest <CreateJobRequest> request = new CreateJobRequestMarshaller().Marshall(createJobRequest); CreateJobResponse response = Invoke <CreateJobRequest, CreateJobResponse> (request, this.signer, CreateJobResponseUnmarshaller.GetInstance()); return(response); }
internal CreateJobResponse CreateJob(CreateJobRequest request) { var marshaller = new CreateJobRequestMarshaller(); var unmarshaller = CreateJobResponseUnmarshaller.Instance; return(Invoke <CreateJobRequest, CreateJobResponse>(request, marshaller, unmarshaller)); }
public void CreateJobMarshallTest() { var operation = service_model.FindOperation("CreateJob"); var request = InstantiateClassGenerator.Execute <CreateJobRequest>(); var marshaller = new CreateJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateJob", 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["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the CreateJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateJob 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 <CreateJobResponse> CreateJobAsync(CreateJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateJobRequestMarshaller(); var unmarshaller = CreateJobResponseUnmarshaller.Instance; return(InvokeAsync <CreateJobRequest, CreateJobResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the CreateJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateJob 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 EndCreateJob /// operation.</returns> public IAsyncResult BeginCreateJob(CreateJobRequest request, AsyncCallback callback, object state) { var marshaller = new CreateJobRequestMarshaller(); var unmarshaller = CreateJobResponseUnmarshaller.Instance; return(BeginInvoke <CreateJobRequest>(request, marshaller, unmarshaller, callback, state)); }
IAsyncResult invokeCreateJob(CreateJobRequest createJobRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreateJobRequestMarshaller().Marshall(createJobRequest); var unmarshaller = CreateJobResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return(result); }
public void CreateJobMarshallTest() { var operation = service_model.FindOperation("CreateJob"); var request = InstantiateClassGenerator.Execute<CreateJobRequest>(); var marshaller = new CreateJobRequestMarshaller(); 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 = CreateJobResponseUnmarshaller.Instance.Unmarshall(context) as CreateJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void CreateJobMarshallTest() { var operation = service_model.FindOperation("CreateJob"); var request = InstantiateClassGenerator.Execute <CreateJobRequest>(); var marshaller = new CreateJobRequestMarshaller(); 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 = CreateJobResponseUnmarshaller.Instance.Unmarshall(context) as CreateJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// <para> This operation initiates the process of scheduling an upload or /// download of your data. You include in the request a manifest that /// describes the data transfer specifics. The response to the request /// includes a job ID, which you can use in other operations, a signature /// that you use to identify your storage device, and the address where /// you should ship your storage device. </para> /// </summary> /// /// <param name="createJobRequest">Container for the necessary parameters /// to execute the CreateJob service method on AmazonImportExport.</param> /// /// <returns>The response from the CreateJob service method, as returned /// by AmazonImportExport.</returns> /// /// <exception cref="MalformedManifestException"/> /// <exception cref="InvalidAddressException"/> /// <exception cref="BucketPermissionException"/> /// <exception cref="InvalidParameterException"/> /// <exception cref="MultipleRegionsException"/> /// <exception cref="MissingParameterException"/> /// <exception cref="InvalidFileSystemException"/> /// <exception cref="MissingCustomsException"/> /// <exception cref="NoSuchBucketException"/> /// <exception cref="InvalidAccessKeyIdException"/> /// <exception cref="InvalidManifestFieldException"/> /// <exception cref="InvalidCustomsException"/> /// <exception cref="MissingManifestFieldException"/> /// <exception cref="CreateJobQuotaExceededException"/> public CreateJobResponse CreateJob(CreateJobRequest createJobRequest) { IRequest<CreateJobRequest> request = new CreateJobRequestMarshaller().Marshall(createJobRequest); CreateJobResponse response = Invoke<CreateJobRequest, CreateJobResponse> (request, this.signer, CreateJobResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// Initiates the asynchronous execution of the CreateJob operation. /// <seealso cref="Amazon.ImportExport.IAmazonImportExport.CreateJob"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateJob 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<CreateJobResponse> CreateJobAsync(CreateJobRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateJobRequestMarshaller(); var unmarshaller = CreateJobResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CreateJobRequest, CreateJobResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
internal CreateJobResponse CreateJob(CreateJobRequest request) { var marshaller = new CreateJobRequestMarshaller(); var unmarshaller = CreateJobResponseUnmarshaller.Instance; return Invoke<CreateJobRequest,CreateJobResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CreateJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateJob 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 EndCreateJob /// operation.</returns> public IAsyncResult BeginCreateJob(CreateJobRequest request, AsyncCallback callback, object state) { var marshaller = new CreateJobRequestMarshaller(); var unmarshaller = CreateJobResponseUnmarshaller.Instance; return BeginInvoke<CreateJobRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the CreateJob operation. /// <seealso cref="Amazon.ImportExport.IAmazonImportExport.CreateJob"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateJob 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<CreateJobResponse> CreateJobAsync(CreateJobRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateJobRequestMarshaller(); var unmarshaller = CreateJobResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CreateJobRequest, CreateJobResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
IAsyncResult invokeCreateJob(CreateJobRequest createJobRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreateJobRequestMarshaller().Marshall(createJobRequest); var unmarshaller = CreateJobResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the CreateJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateJob 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<CreateJobResponse> CreateJobAsync(CreateJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateJobRequestMarshaller(); var unmarshaller = CreateJobResponseUnmarshaller.Instance; return InvokeAsync<CreateJobRequest,CreateJobResponse>(request, marshaller, unmarshaller, cancellationToken); }
IAsyncResult invokeCreateJob(CreateJobRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new CreateJobRequestMarshaller(); var unmarshaller = CreateJobResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }