internal virtual ListTestCasesResponse ListTestCases(ListTestCasesRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListTestCasesRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListTestCasesResponseUnmarshaller.Instance;

            return(Invoke <ListTestCasesResponse>(request, options));
        }
        /// <summary>
        /// Lists all the test cases in the test suite.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the ListTestCases service method.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        ///
        /// <returns>The response from the ListTestCases service method, as returned by IoTDeviceAdvisor.</returns>
        /// <exception cref="Amazon.IoTDeviceAdvisor.Model.InternalServerException">
        /// Sends Internal Failure Exception.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/iotdeviceadvisor-2020-09-18/ListTestCases">REST API Reference for ListTestCases Operation</seealso>
        public virtual Task <ListTestCasesResponse> ListTestCasesAsync(ListTestCasesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListTestCasesRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListTestCasesResponseUnmarshaller.Instance;

            return(InvokeAsync <ListTestCasesResponse>(request, options, cancellationToken));
        }
Exemple #3
0
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonIoTDeviceAdvisorConfig config = new AmazonIoTDeviceAdvisorConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonIoTDeviceAdvisorClient client = new AmazonIoTDeviceAdvisorClient(creds, config);

            ListTestCasesResponse resp = new ListTestCasesResponse();

            do
            {
                ListTestCasesRequest req = new ListTestCasesRequest
                {
                    NextToken = resp.NextToken
                    ,
                    MaxResults = maxItems
                };

                resp = client.ListTestCases(req);
                CheckError(resp.HttpStatusCode, "200");

                foreach (var obj in resp.Categories)
                {
                    AddObject(obj);
                }

                foreach (var obj in resp.RootGroupConfiguration)
                {
                    AddObject(obj);
                }

                foreach (var obj in resp.GroupConfiguration)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }