public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonCodeStarNotificationsConfig config = new AmazonCodeStarNotificationsConfig();

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

            ListEventTypesResponse resp = new ListEventTypesResponse();

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

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

                foreach (var obj in resp.EventTypes)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
        /// <summary>
        /// Returns information about the event types available for configuring notifications.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the ListEventTypes 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 ListEventTypes service method, as returned by CodeStarNotifications.</returns>
        /// <exception cref="Amazon.CodeStarNotifications.Model.InvalidNextTokenException">
        /// The value for the enumeration token used in the request to return the next batch of
        /// the results is not valid.
        /// </exception>
        /// <exception cref="Amazon.CodeStarNotifications.Model.ValidationException">
        /// One or more parameter values are not valid.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/ListEventTypes">REST API Reference for ListEventTypes Operation</seealso>
        public virtual Task <ListEventTypesResponse> ListEventTypesAsync(ListEventTypesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListEventTypesRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListEventTypesResponseUnmarshaller.Instance;

            return(InvokeAsync <ListEventTypesResponse>(request, options, cancellationToken));
        }
        internal virtual ListEventTypesResponse ListEventTypes(ListEventTypesRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListEventTypesRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListEventTypesResponseUnmarshaller.Instance;

            return(Invoke <ListEventTypesResponse>(request, options));
        }