internal DescribeScalingActivitiesResponse DescribeScalingActivities(DescribeScalingActivitiesRequest request)
        {
            var marshaller   = new DescribeScalingActivitiesRequestMarshaller();
            var unmarshaller = DescribeScalingActivitiesResponseUnmarshaller.Instance;

            return(Invoke <DescribeScalingActivitiesRequest, DescribeScalingActivitiesResponse>(request, marshaller, unmarshaller));
        }
        /// <summary>
        /// <para> Returns the scaling activities for the specified Auto Scaling group. </para> <para> If the specified <i>ActivityIds</i> list is
        /// empty, all the activities from the past six weeks are returned. Activities are sorted by completion time. Activities still in progress
        /// appear first on the list. </para> <para> This action supports pagination. If the response includes a token, there are more records
        /// available. To get the additional records, repeat the request with the response token as the NextToken parameter. </para>
        /// </summary>
        ///
        /// <param name="describeScalingActivitiesRequest">Container for the necessary parameters to execute the DescribeScalingActivities service
        ///           method on AmazonAutoScaling.</param>
        ///
        /// <returns>The response from the DescribeScalingActivities service method, as returned by AmazonAutoScaling.</returns>
        ///
        /// <exception cref="InvalidNextTokenException"/>
        public DescribeScalingActivitiesResponse DescribeScalingActivities(DescribeScalingActivitiesRequest describeScalingActivitiesRequest)
        {
            IRequest <DescribeScalingActivitiesRequest> request  = new DescribeScalingActivitiesRequestMarshaller().Marshall(describeScalingActivitiesRequest);
            DescribeScalingActivitiesResponse           response = Invoke <DescribeScalingActivitiesRequest, DescribeScalingActivitiesResponse> (request, this.signer, DescribeScalingActivitiesResponseUnmarshaller.GetInstance());

            return(response);
        }
        public void DescribeScalingActivitiesMarshallTest()
        {
            var request    = InstantiateClassGenerator.Execute <DescribeScalingActivitiesRequest>();
            var marshaller = new DescribeScalingActivitiesRequestMarshaller();

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

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

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

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeScalingActivities operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DescribeScalingActivities 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/application-autoscaling-2016-02-06/DescribeScalingActivities">REST API Reference for DescribeScalingActivities Operation</seealso>
        public Task <DescribeScalingActivitiesResponse> DescribeScalingActivitiesAsync(DescribeScalingActivitiesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new DescribeScalingActivitiesRequestMarshaller();
            var unmarshaller = DescribeScalingActivitiesResponseUnmarshaller.Instance;

            return(InvokeAsync <DescribeScalingActivitiesRequest, DescribeScalingActivitiesResponse>(request, marshaller,
                                                                                                     unmarshaller, cancellationToken));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeScalingActivities operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DescribeScalingActivities operation on AmazonApplicationAutoScalingClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeScalingActivities
        ///         operation.</returns>
        public IAsyncResult BeginDescribeScalingActivities(DescribeScalingActivitiesRequest request, AsyncCallback callback, object state)
        {
            var marshaller   = new DescribeScalingActivitiesRequestMarshaller();
            var unmarshaller = DescribeScalingActivitiesResponseUnmarshaller.Instance;

            return(BeginInvoke <DescribeScalingActivitiesRequest>(request, marshaller, unmarshaller,
                                                                  callback, state));
        }
        public void DescribeScalingActivitiesMarshallTest()
        {
            var operation = service_model.FindOperation("DescribeScalingActivities");

            var request         = InstantiateClassGenerator.Execute <DescribeScalingActivitiesRequest>();
            var marshaller      = new DescribeScalingActivitiesRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var validator       = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);

            validator.Validate();


            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute();
            var context         = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null);
            var response        = DescribeScalingActivitiesResponseUnmarshaller.Instance.Unmarshall(context)
                                  as DescribeScalingActivitiesResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeScalingActivities operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeScalingActivities 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>
        public Task<DescribeScalingActivitiesResponse> DescribeScalingActivitiesAsync(DescribeScalingActivitiesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DescribeScalingActivitiesRequestMarshaller();
            var unmarshaller = DescribeScalingActivitiesResponseUnmarshaller.Instance;

            return InvokeAsync<DescribeScalingActivitiesRequest,DescribeScalingActivitiesResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        internal DescribeScalingActivitiesResponse DescribeScalingActivities(DescribeScalingActivitiesRequest request)
        {
            var marshaller = new DescribeScalingActivitiesRequestMarshaller();
            var unmarshaller = DescribeScalingActivitiesResponseUnmarshaller.Instance;

            return Invoke<DescribeScalingActivitiesRequest,DescribeScalingActivitiesResponse>(request, marshaller, unmarshaller);
        }
 IAsyncResult invokeDescribeScalingActivities(DescribeScalingActivitiesRequest describeScalingActivitiesRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new DescribeScalingActivitiesRequestMarshaller().Marshall(describeScalingActivitiesRequest);
     var unmarshaller = DescribeScalingActivitiesResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeScalingActivities operation.
        /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.DescribeScalingActivities"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeScalingActivities 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>
		public Task<DescribeScalingActivitiesResponse> DescribeScalingActivitiesAsync(DescribeScalingActivitiesRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DescribeScalingActivitiesRequestMarshaller();
            var unmarshaller = DescribeScalingActivitiesResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, DescribeScalingActivitiesRequest, DescribeScalingActivitiesResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeScalingActivities operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeScalingActivities operation on AmazonApplicationAutoScalingClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeScalingActivities
        ///         operation.</returns>
        public IAsyncResult BeginDescribeScalingActivities(DescribeScalingActivitiesRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new DescribeScalingActivitiesRequestMarshaller();
            var unmarshaller = DescribeScalingActivitiesResponseUnmarshaller.Instance;

            return BeginInvoke<DescribeScalingActivitiesRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
        public void DescribeScalingActivitiesMarshallTest()
        {
            var operation = service_model.FindOperation("DescribeScalingActivities");

            var request = InstantiateClassGenerator.Execute<DescribeScalingActivitiesRequest>();
            var marshaller = new DescribeScalingActivitiesRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);
            validator.Validate();


            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute();
            var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null);
            var response = DescribeScalingActivitiesResponseUnmarshaller.Instance.Unmarshall(context)
                as DescribeScalingActivitiesResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }
 /// <summary>
 /// <para> Returns the scaling activities for the specified Auto Scaling group. </para> <para> If the specified <c>ActivityIds</c> list is
 /// empty, all the activities from the past six weeks are returned. Activities are sorted by completion time. Activities still in progress
 /// appear first on the list. </para> <para> This action supports pagination. If the response includes a token, there are more records
 /// available. To get the additional records, repeat the request with the response token as the <c>NextToken</c> parameter. </para>
 /// </summary>
 /// 
 /// <param name="describeScalingActivitiesRequest">Container for the necessary parameters to execute the DescribeScalingActivities service
 ///           method on AmazonAutoScaling.</param>
 /// 
 /// <returns>The response from the DescribeScalingActivities service method, as returned by AmazonAutoScaling.</returns>
 /// 
 /// <exception cref="InvalidNextTokenException"/>
 public DescribeScalingActivitiesResponse DescribeScalingActivities(DescribeScalingActivitiesRequest describeScalingActivitiesRequest)
 {
     IRequest<DescribeScalingActivitiesRequest> request = new DescribeScalingActivitiesRequestMarshaller().Marshall(describeScalingActivitiesRequest);
     DescribeScalingActivitiesResponse response = Invoke<DescribeScalingActivitiesRequest, DescribeScalingActivitiesResponse> (request, this.signer, DescribeScalingActivitiesResponseUnmarshaller.GetInstance());
     return response;
 }
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeScalingActivities operation.
        /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.DescribeScalingActivities"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeScalingActivities 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>
		public async Task<DescribeScalingActivitiesResponse> DescribeScalingActivitiesAsync(DescribeScalingActivitiesRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DescribeScalingActivitiesRequestMarshaller();
            var unmarshaller = DescribeScalingActivitiesResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, DescribeScalingActivitiesRequest, DescribeScalingActivitiesResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
        public void DescribeScalingActivitiesMarshallTest()
        {
            var request = InstantiateClassGenerator.Execute<DescribeScalingActivitiesRequest>();
            var marshaller = new DescribeScalingActivitiesRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content);                        
            Comparer.CompareObjectToJson<DescribeScalingActivitiesRequest>(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("DescribeScalingActivities").ResponseStructure).Execute();
            webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString());
            UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse);
            var response = DescribeScalingActivitiesResponseUnmarshaller.Instance.Unmarshall(context)
                as DescribeScalingActivitiesResponse;
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }