/// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            CreateAutoScalingGroupResponse response = new CreateAutoScalingGroupResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.IsStartElement)
                {
                    if (context.TestExpression("CreateAutoScalingGroupResult", 2))
                    {
                        UnmarshallResult(context, response);
                        continue;
                    }

                    if (context.TestExpression("ResponseMetadata", 2))
                    {
                        response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
                    }
                }
            }

            return(response);
        }
        /// <summary>
        /// <para> Creates a new Auto Scaling group with the specified name. Once the creation request is completed, the AutoScalingGroup is ready to be
        /// used in other calls. </para> <para><b>NOTE:</b> The Auto Scaling group name must be unique within the scope of your AWS account, and under
        /// the quota of Auto Scaling groups allowed for your account. </para>
        /// </summary>
        ///
        /// <param name="createAutoScalingGroupRequest">Container for the necessary parameters to execute the CreateAutoScalingGroup service method on
        ///           AmazonAutoScaling.</param>
        ///
        /// <exception cref="LimitExceededException"/>
        /// <exception cref="AlreadyExistsException"/>
        public CreateAutoScalingGroupResponse CreateAutoScalingGroup(CreateAutoScalingGroupRequest createAutoScalingGroupRequest)
        {
            IRequest <CreateAutoScalingGroupRequest> request  = new CreateAutoScalingGroupRequestMarshaller().Marshall(createAutoScalingGroupRequest);
            CreateAutoScalingGroupResponse           response = Invoke <CreateAutoScalingGroupRequest, CreateAutoScalingGroupResponse> (request, this.signer, CreateAutoScalingGroupResponseUnmarshaller.GetInstance());

            return(response);
        }
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            CreateAutoScalingGroupResponse response = new CreateAutoScalingGroupResponse();

            while (context.Read())
            {
                if (context.IsStartElement)
                {
                    if (context.TestExpression("ResponseMetadata", 2))
                    {
                        response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context);
                    }
                }
            }


            return(response);
        }
        private static void UnmarshallResult(XmlUnmarshallerContext context, CreateAutoScalingGroupResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.ReadAtDepth(originalDepth))
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                }
            }

            return;
        }