public static DescribeDBInstancePerformanceResponse Unmarshall(UnmarshallerContext context)
        {
            DescribeDBInstancePerformanceResponse describeDBInstancePerformanceResponse = new DescribeDBInstancePerformanceResponse();

            describeDBInstancePerformanceResponse.HttpResponse = context.HttpResponse;
            describeDBInstancePerformanceResponse.RequestId = context.StringValue("DescribeDBInstancePerformance.RequestId");
            describeDBInstancePerformanceResponse.DBInstanceId = context.StringValue("DescribeDBInstancePerformance.DBInstanceId");
            describeDBInstancePerformanceResponse.Engine = context.StringValue("DescribeDBInstancePerformance.Engine");
            describeDBInstancePerformanceResponse.StartTime = context.StringValue("DescribeDBInstancePerformance.StartTime");
            describeDBInstancePerformanceResponse.EndTime = context.StringValue("DescribeDBInstancePerformance.EndTime");

            List<DescribeDBInstancePerformanceResponse.PerformanceKey> performanceKeys = new List<DescribeDBInstancePerformanceResponse.PerformanceKey>();
            for (int i = 0; i < context.Length("DescribeDBInstancePerformance.PerformanceKeys.Length"); i++) {
                DescribeDBInstancePerformanceResponse.PerformanceKey performanceKey = new DescribeDBInstancePerformanceResponse.PerformanceKey();
                performanceKey.Key = context.StringValue("DescribeDBInstancePerformance.PerformanceKeys["+ i +"].Key");
                performanceKey.Unit = context.StringValue("DescribeDBInstancePerformance.PerformanceKeys["+ i +"].Unit");
                performanceKey.ValueFormat = context.StringValue("DescribeDBInstancePerformance.PerformanceKeys["+ i +"].ValueFormat");

                List<DescribeDBInstancePerformanceResponse.PerformanceKey.PerformanceValue> values = new List<DescribeDBInstancePerformanceResponse.PerformanceKey.PerformanceValue>();
                for (int j = 0; j < context.Length("DescribeDBInstancePerformance.PerformanceKeys["+ i +"].Values.Length"); j++) {
                    DescribeDBInstancePerformanceResponse.PerformanceKey.PerformanceValue performanceValue = new DescribeDBInstancePerformanceResponse.PerformanceKey.PerformanceValue();
                    performanceValue.Value = context.StringValue("DescribeDBInstancePerformance.PerformanceKeys["+ i +"].Values["+ j +"].Value");
                    performanceValue.Date = context.StringValue("DescribeDBInstancePerformance.PerformanceKeys["+ i +"].Values["+ j +"].Date");

                    values.Add(performanceValue);
                }
                performanceKey.Values = values;

                performanceKeys.Add(performanceKey);
            }
            describeDBInstancePerformanceResponse.PerformanceKeys = performanceKeys;

            return describeDBInstancePerformanceResponse;
        }
Пример #2
0
        public static DescribeDBInstancePerformanceResponse Unmarshall(UnmarshallerContext context)
        {
            DescribeDBInstancePerformanceResponse describeDBInstancePerformanceResponse = new DescribeDBInstancePerformanceResponse();

            describeDBInstancePerformanceResponse.HttpResponse = context.HttpResponse;
            describeDBInstancePerformanceResponse.RequestId    = context.StringValue("DescribeDBInstancePerformance.RequestId");
            describeDBInstancePerformanceResponse.DBInstanceId = context.StringValue("DescribeDBInstancePerformance.DBInstanceId");
            describeDBInstancePerformanceResponse.Engine       = context.StringValue("DescribeDBInstancePerformance.Engine");
            describeDBInstancePerformanceResponse.StartTime    = context.StringValue("DescribeDBInstancePerformance.StartTime");
            describeDBInstancePerformanceResponse.EndTime      = context.StringValue("DescribeDBInstancePerformance.EndTime");

            List <DescribeDBInstancePerformanceResponse.PerformanceKey> performanceKeys = new List <DescribeDBInstancePerformanceResponse.PerformanceKey>();

            for (int i = 0; i < context.Length("DescribeDBInstancePerformance.PerformanceKeys.Length"); i++)
            {
                DescribeDBInstancePerformanceResponse.PerformanceKey performanceKey = new DescribeDBInstancePerformanceResponse.PerformanceKey();
                performanceKey.Key         = context.StringValue("DescribeDBInstancePerformance.PerformanceKeys[" + i + "].Key");
                performanceKey.Unit        = context.StringValue("DescribeDBInstancePerformance.PerformanceKeys[" + i + "].Unit");
                performanceKey.ValueFormat = context.StringValue("DescribeDBInstancePerformance.PerformanceKeys[" + i + "].ValueFormat");

                List <DescribeDBInstancePerformanceResponse.PerformanceKey.PerformanceValue> values = new List <DescribeDBInstancePerformanceResponse.PerformanceKey.PerformanceValue>();
                for (int j = 0; j < context.Length("DescribeDBInstancePerformance.PerformanceKeys[" + i + "].Values.Length"); j++)
                {
                    DescribeDBInstancePerformanceResponse.PerformanceKey.PerformanceValue performanceValue = new DescribeDBInstancePerformanceResponse.PerformanceKey.PerformanceValue();
                    performanceValue.Value = context.StringValue("DescribeDBInstancePerformance.PerformanceKeys[" + i + "].Values[" + j + "].Value");
                    performanceValue.Date  = context.StringValue("DescribeDBInstancePerformance.PerformanceKeys[" + i + "].Values[" + j + "].Date");

                    values.Add(performanceValue);
                }
                performanceKey.Values = values;

                performanceKeys.Add(performanceKey);
            }
            describeDBInstancePerformanceResponse.PerformanceKeys = performanceKeys;

            return(describeDBInstancePerformanceResponse);
        }