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

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("gatewayArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.GatewayArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("gatewayId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.GatewayId = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
        public static CreateGatewayResponse Unmarshall(UnmarshallerContext _ctx)
        {
            CreateGatewayResponse createGatewayResponse = new CreateGatewayResponse();

            createGatewayResponse.HttpResponse = _ctx.HttpResponse;
            createGatewayResponse.RequestId    = _ctx.StringValue("CreateGateway.RequestId");
            createGatewayResponse.Success      = _ctx.BooleanValue("CreateGateway.Success");
            createGatewayResponse.Code         = _ctx.StringValue("CreateGateway.Code");
            createGatewayResponse.ErrorMsg     = _ctx.StringValue("CreateGateway.ErrorMsg");
            createGatewayResponse.Data         = _ctx.StringValue("CreateGateway.Data");

            return(createGatewayResponse);
        }
        public static CreateGatewayResponse Unmarshall(UnmarshallerContext _ctx)
        {
            CreateGatewayResponse createGatewayResponse = new CreateGatewayResponse();

            createGatewayResponse.HttpResponse = _ctx.HttpResponse;
            createGatewayResponse.RequestId    = _ctx.StringValue("CreateGateway.RequestId");
            createGatewayResponse.Success      = _ctx.BooleanValue("CreateGateway.Success");
            createGatewayResponse.Code         = _ctx.StringValue("CreateGateway.Code");
            createGatewayResponse.Message      = _ctx.StringValue("CreateGateway.Message");
            createGatewayResponse.GatewayId    = _ctx.StringValue("CreateGateway.GatewayId");
            createGatewayResponse.BuyURL       = _ctx.StringValue("CreateGateway.BuyURL");

            return(createGatewayResponse);
        }