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

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

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

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

            return(response);
        }
Beispiel #2
0
        private static void UnmarshallResult(XmlUnmarshallerContext context, SetLoadBalancerPoliciesOfListenerResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return;
                }
            }



            return;
        }
Beispiel #3
0
        /// <summary>
        /// <para> Associates, updates, or disables a policy with a listener on the load balancer. Currently only zero (0) or one (1) policy can be
        /// associated with a listener. </para>
        /// </summary>
        ///
        /// <param name="setLoadBalancerPoliciesOfListenerRequest">Container for the necessary parameters to execute the
        ///           SetLoadBalancerPoliciesOfListener service method on AmazonElasticLoadBalancing.</param>
        ///
        /// <returns>The response from the SetLoadBalancerPoliciesOfListener service method, as returned by AmazonElasticLoadBalancing.</returns>
        ///
        /// <exception cref="PolicyNotFoundException"/>
        /// <exception cref="InvalidConfigurationRequestException"/>
        /// <exception cref="LoadBalancerNotFoundException"/>
        /// <exception cref="ListenerNotFoundException"/>
        public SetLoadBalancerPoliciesOfListenerResponse SetLoadBalancerPoliciesOfListener(SetLoadBalancerPoliciesOfListenerRequest setLoadBalancerPoliciesOfListenerRequest)
        {
            IRequest <SetLoadBalancerPoliciesOfListenerRequest> request  = new SetLoadBalancerPoliciesOfListenerRequestMarshaller().Marshall(setLoadBalancerPoliciesOfListenerRequest);
            SetLoadBalancerPoliciesOfListenerResponse           response = Invoke <SetLoadBalancerPoliciesOfListenerRequest, SetLoadBalancerPoliciesOfListenerResponse> (request, this.signer, SetLoadBalancerPoliciesOfListenerResponseUnmarshaller.GetInstance());

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

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


            return(response);
        }