예제 #1
0
        public static CreateVServerGroupResponse Unmarshall(UnmarshallerContext context)
        {
            CreateVServerGroupResponse createVServerGroupResponse = new CreateVServerGroupResponse();

            createVServerGroupResponse.HttpResponse   = context.HttpResponse;
            createVServerGroupResponse.RequestId      = context.StringValue("CreateVServerGroup.RequestId");
            createVServerGroupResponse.VServerGroupId = context.StringValue("CreateVServerGroup.VServerGroupId");

            List <CreateVServerGroupResponse.CreateVServerGroup_BackendServer> createVServerGroupResponse_backendServers = new List <CreateVServerGroupResponse.CreateVServerGroup_BackendServer>();

            for (int i = 0; i < context.Length("CreateVServerGroup.BackendServers.Length"); i++)
            {
                CreateVServerGroupResponse.CreateVServerGroup_BackendServer backendServer = new CreateVServerGroupResponse.CreateVServerGroup_BackendServer();
                backendServer.ServerId       = context.StringValue("CreateVServerGroup.BackendServers[" + i + "].ServerId");
                backendServer.Port           = context.IntegerValue("CreateVServerGroup.BackendServers[" + i + "].Port");
                backendServer.Weight         = context.IntegerValue("CreateVServerGroup.BackendServers[" + i + "].Weight");
                backendServer.Type           = context.StringValue("CreateVServerGroup.BackendServers[" + i + "].Type");
                backendServer.ServerIp       = context.StringValue("CreateVServerGroup.BackendServers[" + i + "].ServerIp");
                backendServer.VpcId          = context.StringValue("CreateVServerGroup.BackendServers[" + i + "].VpcId");
                backendServer.VbrId          = context.StringValue("CreateVServerGroup.BackendServers[" + i + "].VbrId");
                backendServer.ServerRegionId = context.StringValue("CreateVServerGroup.BackendServers[" + i + "].ServerRegionId");
                backendServer.Description    = context.StringValue("CreateVServerGroup.BackendServers[" + i + "].Description");

                createVServerGroupResponse_backendServers.Add(backendServer);
            }
            createVServerGroupResponse.BackendServers = createVServerGroupResponse_backendServers;

            return(createVServerGroupResponse);
        }
예제 #2
0
        public static CreateVServerGroupResponse Unmarshall(UnmarshallerContext context)
        {
            CreateVServerGroupResponse createVServerGroupResponse = new CreateVServerGroupResponse()
            {
                HttpResponse   = context.HttpResponse,
                RequestId      = context.StringValue("CreateVServerGroup.RequestId"),
                VServerGroupId = context.StringValue("CreateVServerGroup.VServerGroupId")
            };
            List <CreateVServerGroupResponse.BackendServer> backendServers = new List <CreateVServerGroupResponse.BackendServer>();

            for (int i = 0; i < context.Length("CreateVServerGroup.BackendServers.Length"); i++)
            {
                CreateVServerGroupResponse.BackendServer backendServer = new CreateVServerGroupResponse.BackendServer()
                {
                    ServerId = context.StringValue($"CreateVServerGroup.BackendServers[{i}].ServerId"),
                    Port     = context.IntegerValue($"CreateVServerGroup.BackendServers[{i}].Port"),
                    Weight   = context.IntegerValue($"CreateVServerGroup.BackendServers[{i}].Weight")
                };
                backendServers.Add(backendServer);
            }
            createVServerGroupResponse.BackendServers = backendServers;

            return(createVServerGroupResponse);
        }