internal NotifyApplicationStateResponse NotifyApplicationState(NotifyApplicationStateRequest request) { var marshaller = new NotifyApplicationStateRequestMarshaller(); var unmarshaller = NotifyApplicationStateResponseUnmarshaller.Instance; return(Invoke <NotifyApplicationStateRequest, NotifyApplicationStateResponse>(request, marshaller, unmarshaller)); }
public void NotifyApplicationStateMarshallTest() { var request = InstantiateClassGenerator.Execute <NotifyApplicationStateRequest>(); var marshaller = new NotifyApplicationStateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <NotifyApplicationStateRequest>(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("NotifyApplicationState").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = NotifyApplicationStateResponseUnmarshaller.Instance.Unmarshall(context) as NotifyApplicationStateResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the NotifyApplicationState operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the NotifyApplicationState 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/AWSMigrationHub-2017-05-31/NotifyApplicationState">REST API Reference for NotifyApplicationState Operation</seealso> public Task <NotifyApplicationStateResponse> NotifyApplicationStateAsync(NotifyApplicationStateRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new NotifyApplicationStateRequestMarshaller(); var unmarshaller = NotifyApplicationStateResponseUnmarshaller.Instance; return(InvokeAsync <NotifyApplicationStateRequest, NotifyApplicationStateResponse>(request, marshaller, unmarshaller, cancellationToken)); }