public void StartLifecyclePolicyPreviewMarshallTest() { var request = InstantiateClassGenerator.Execute <StartLifecyclePolicyPreviewRequest>(); var marshaller = new StartLifecyclePolicyPreviewRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <StartLifecyclePolicyPreviewRequest>(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("StartLifecyclePolicyPreview").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = StartLifecyclePolicyPreviewResponseUnmarshaller.Instance.Unmarshall(context) as StartLifecyclePolicyPreviewResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
internal virtual StartLifecyclePolicyPreviewResponse StartLifecyclePolicyPreview(StartLifecyclePolicyPreviewRequest request) { var marshaller = new StartLifecyclePolicyPreviewRequestMarshaller(); var unmarshaller = StartLifecyclePolicyPreviewResponseUnmarshaller.Instance; return(Invoke <StartLifecyclePolicyPreviewRequest, StartLifecyclePolicyPreviewResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the StartLifecyclePolicyPreview operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the StartLifecyclePolicyPreview 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/ecr-2015-09-21/StartLifecyclePolicyPreview">REST API Reference for StartLifecyclePolicyPreview Operation</seealso> public virtual Task <StartLifecyclePolicyPreviewResponse> StartLifecyclePolicyPreviewAsync(StartLifecyclePolicyPreviewRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new StartLifecyclePolicyPreviewRequestMarshaller(); var unmarshaller = StartLifecyclePolicyPreviewResponseUnmarshaller.Instance; return(InvokeAsync <StartLifecyclePolicyPreviewRequest, StartLifecyclePolicyPreviewResponse>(request, marshaller, unmarshaller, cancellationToken)); }