예제 #1
0
        public void BatchDeleteBuildsMarshallTest()
        {
            var request    = InstantiateClassGenerator.Execute <BatchDeleteBuildsRequest>();
            var marshaller = new BatchDeleteBuildsRequestMarshaller();

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

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

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

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
예제 #2
0
        internal virtual BatchDeleteBuildsResponse BatchDeleteBuilds(BatchDeleteBuildsRequest request)
        {
            var marshaller   = new BatchDeleteBuildsRequestMarshaller();
            var unmarshaller = BatchDeleteBuildsResponseUnmarshaller.Instance;

            return(Invoke <BatchDeleteBuildsRequest, BatchDeleteBuildsResponse>(request, marshaller, unmarshaller));
        }
예제 #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the BatchDeleteBuilds operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the BatchDeleteBuilds 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/codebuild-2016-10-06/BatchDeleteBuilds">REST API Reference for BatchDeleteBuilds Operation</seealso>
        public virtual Task <BatchDeleteBuildsResponse> BatchDeleteBuildsAsync(BatchDeleteBuildsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new BatchDeleteBuildsRequestMarshaller();
            var unmarshaller = BatchDeleteBuildsResponseUnmarshaller.Instance;

            return(InvokeAsync <BatchDeleteBuildsRequest, BatchDeleteBuildsResponse>(request, marshaller,
                                                                                     unmarshaller, cancellationToken));
        }