Example #1
0
        public static DescribeNetworkQuotasResponse Unmarshall(UnmarshallerContext context)
        {
            DescribeNetworkQuotasResponse describeNetworkQuotasResponse = new DescribeNetworkQuotasResponse();

            describeNetworkQuotasResponse.HttpResponse = context.HttpResponse;
            describeNetworkQuotasResponse.RequestId    = context.StringValue("DescribeNetworkQuotas.RequestId");
            describeNetworkQuotasResponse.Product      = context.StringValue("DescribeNetworkQuotas.Product");
            describeNetworkQuotasResponse.RegionId     = context.StringValue("DescribeNetworkQuotas.RegionId");
            describeNetworkQuotasResponse.Quota        = context.StringValue("DescribeNetworkQuotas.Quota");

            return(describeNetworkQuotasResponse);
        }
        public static DescribeNetworkQuotasResponse Unmarshall(UnmarshallerContext context)
        {
            DescribeNetworkQuotasResponse describeNetworkQuotasResponse = new DescribeNetworkQuotasResponse();

            describeNetworkQuotasResponse.HttpResponse = context.HttpResponse;
            describeNetworkQuotasResponse.RequestId    = context.StringValue("DescribeNetworkQuotas.RequestId");
            describeNetworkQuotasResponse.TotalCount   = context.IntegerValue("DescribeNetworkQuotas.TotalCount");

            List <DescribeNetworkQuotasResponse.DescribeNetworkQuotas_NetworkQuota> describeNetworkQuotasResponse_networkQuotas = new List <DescribeNetworkQuotasResponse.DescribeNetworkQuotas_NetworkQuota>();

            for (int i = 0; i < context.Length("DescribeNetworkQuotas.NetworkQuotas.Length"); i++)
            {
                DescribeNetworkQuotasResponse.DescribeNetworkQuotas_NetworkQuota networkQuota = new DescribeNetworkQuotasResponse.DescribeNetworkQuotas_NetworkQuota();
                networkQuota.Product      = context.StringValue("DescribeNetworkQuotas.NetworkQuotas[" + i + "].Product");
                networkQuota.ResourceType = context.StringValue("DescribeNetworkQuotas.NetworkQuotas[" + i + "].ResourceType");

                List <DescribeNetworkQuotasResponse.DescribeNetworkQuotas_NetworkQuota.DescribeNetworkQuotas_Privilege> networkQuota_privileges = new List <DescribeNetworkQuotasResponse.DescribeNetworkQuotas_NetworkQuota.DescribeNetworkQuotas_Privilege>();
                for (int j = 0; j < context.Length("DescribeNetworkQuotas.NetworkQuotas[" + i + "].Privileges.Length"); j++)
                {
                    DescribeNetworkQuotasResponse.DescribeNetworkQuotas_NetworkQuota.DescribeNetworkQuotas_Privilege privilege = new DescribeNetworkQuotasResponse.DescribeNetworkQuotas_NetworkQuota.DescribeNetworkQuotas_Privilege();
                    privilege.Privilege     = context.StringValue("DescribeNetworkQuotas.NetworkQuotas[" + i + "].Privileges[" + j + "].Privilege");
                    privilege.Description   = context.StringValue("DescribeNetworkQuotas.NetworkQuotas[" + i + "].Privileges[" + j + "].Description");
                    privilege.Enabled       = context.BooleanValue("DescribeNetworkQuotas.NetworkQuotas[" + i + "].Privileges[" + j + "].Enabled");
                    privilege.DescriptionCn = context.StringValue("DescribeNetworkQuotas.NetworkQuotas[" + i + "].Privileges[" + j + "].DescriptionCn");

                    networkQuota_privileges.Add(privilege);
                }
                networkQuota.Privileges = networkQuota_privileges;

                List <DescribeNetworkQuotasResponse.DescribeNetworkQuotas_NetworkQuota.DescribeNetworkQuotas_NetworkQuotaInfo> networkQuota_networkQuotaInfos = new List <DescribeNetworkQuotasResponse.DescribeNetworkQuotas_NetworkQuota.DescribeNetworkQuotas_NetworkQuotaInfo>();
                for (int j = 0; j < context.Length("DescribeNetworkQuotas.NetworkQuotas[" + i + "].NetworkQuotaInfos.Length"); j++)
                {
                    DescribeNetworkQuotasResponse.DescribeNetworkQuotas_NetworkQuota.DescribeNetworkQuotas_NetworkQuotaInfo networkQuotaInfo = new DescribeNetworkQuotasResponse.DescribeNetworkQuotas_NetworkQuota.DescribeNetworkQuotas_NetworkQuotaInfo();
                    networkQuotaInfo.QuotaName          = context.StringValue("DescribeNetworkQuotas.NetworkQuotas[" + i + "].NetworkQuotaInfos[" + j + "].QuotaName");
                    networkQuotaInfo.QuotaDescription   = context.StringValue("DescribeNetworkQuotas.NetworkQuotas[" + i + "].NetworkQuotaInfos[" + j + "].QuotaDescription");
                    networkQuotaInfo.QuotaQuantity      = context.StringValue("DescribeNetworkQuotas.NetworkQuotas[" + i + "].NetworkQuotaInfos[" + j + "].QuotaQuantity");
                    networkQuotaInfo.InstanceQuantity   = context.StringValue("DescribeNetworkQuotas.NetworkQuotas[" + i + "].NetworkQuotaInfos[" + j + "].InstanceQuantity");
                    networkQuotaInfo.CanExceptional     = context.StringValue("DescribeNetworkQuotas.NetworkQuotas[" + i + "].NetworkQuotaInfos[" + j + "].CanExceptional");
                    networkQuotaInfo.QuotaDescriptionCn = context.StringValue("DescribeNetworkQuotas.NetworkQuotas[" + i + "].NetworkQuotaInfos[" + j + "].QuotaDescriptionCn");
                    networkQuotaInfo.Sequence           = context.StringValue("DescribeNetworkQuotas.NetworkQuotas[" + i + "].NetworkQuotaInfos[" + j + "].Sequence");

                    networkQuota_networkQuotaInfos.Add(networkQuotaInfo);
                }
                networkQuota.NetworkQuotaInfos = networkQuota_networkQuotaInfos;

                describeNetworkQuotasResponse_networkQuotas.Add(networkQuota);
            }
            describeNetworkQuotasResponse.NetworkQuotas = describeNetworkQuotasResponse_networkQuotas;

            return(describeNetworkQuotasResponse);
        }