Exemple #1
0
        internal AssociateCreatedArtifactResponse AssociateCreatedArtifact(AssociateCreatedArtifactRequest request)
        {
            var marshaller   = new AssociateCreatedArtifactRequestMarshaller();
            var unmarshaller = AssociateCreatedArtifactResponseUnmarshaller.Instance;

            return(Invoke <AssociateCreatedArtifactRequest, AssociateCreatedArtifactResponse>(request, marshaller, unmarshaller));
        }
Exemple #2
0
        public void AssociateCreatedArtifactMarshallTest()
        {
            var request    = InstantiateClassGenerator.Execute <AssociateCreatedArtifactRequest>();
            var marshaller = new AssociateCreatedArtifactRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            var jsonRequest     = UTF8Encoding.UTF8.GetString(internalRequest.Content);

            Comparer.CompareObjectToJson <AssociateCreatedArtifactRequest>(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("AssociateCreatedArtifact").ResponseStructure).Execute();

            webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString());
            UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse);
            var response = AssociateCreatedArtifactResponseUnmarshaller.Instance.Unmarshall(context)
                           as AssociateCreatedArtifactResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
Exemple #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the AssociateCreatedArtifact operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the AssociateCreatedArtifact 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/AssociateCreatedArtifact">REST API Reference for AssociateCreatedArtifact Operation</seealso>
        public Task <AssociateCreatedArtifactResponse> AssociateCreatedArtifactAsync(AssociateCreatedArtifactRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new AssociateCreatedArtifactRequestMarshaller();
            var unmarshaller = AssociateCreatedArtifactResponseUnmarshaller.Instance;

            return(InvokeAsync <AssociateCreatedArtifactRequest, AssociateCreatedArtifactResponse>(request, marshaller,
                                                                                                   unmarshaller, cancellationToken));
        }