public void ListUserProfilesMarshallTest()
        {
            var request    = InstantiateClassGenerator.Execute <ListUserProfilesRequest>();
            var marshaller = new ListUserProfilesRequestMarshaller();

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

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

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

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
Example #2
0
        internal ListUserProfilesResponse ListUserProfiles(ListUserProfilesRequest request)
        {
            var marshaller   = new ListUserProfilesRequestMarshaller();
            var unmarshaller = ListUserProfilesResponseUnmarshaller.Instance;

            return(Invoke <ListUserProfilesRequest, ListUserProfilesResponse>(request, marshaller, unmarshaller));
        }
Example #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListUserProfiles operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListUserProfiles 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/codestar-2017-04-19/ListUserProfiles">REST API Reference for ListUserProfiles Operation</seealso>
        public Task <ListUserProfilesResponse> ListUserProfilesAsync(ListUserProfilesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new ListUserProfilesRequestMarshaller();
            var unmarshaller = ListUserProfilesResponseUnmarshaller.Instance;

            return(InvokeAsync <ListUserProfilesRequest, ListUserProfilesResponse>(request, marshaller,
                                                                                   unmarshaller, cancellationToken));
        }