Exemplo n.º 1
0
        public static DescribeServiceResponse Unmarshall(UnmarshallerContext _ctx)
        {
            DescribeServiceResponse describeServiceResponse = new DescribeServiceResponse();

            describeServiceResponse.HttpResponse = _ctx.HttpResponse;
            describeServiceResponse.RequestId    = _ctx.StringValue("DescribeService.RequestId");

            List <DescribeServiceResponse.DescribeService_ProtectionLevel> describeServiceResponse_protectionLevels = new List <DescribeServiceResponse.DescribeService_ProtectionLevel>();

            for (int i = 0; i < _ctx.Length("DescribeService.ProtectionLevels.Length"); i++)
            {
                DescribeServiceResponse.DescribeService_ProtectionLevel protectionLevel = new DescribeServiceResponse.DescribeService_ProtectionLevel();
                protectionLevel.Type = _ctx.StringValue("DescribeService.ProtectionLevels[" + i + "].Type");

                describeServiceResponse_protectionLevels.Add(protectionLevel);
            }
            describeServiceResponse.ProtectionLevels = describeServiceResponse_protectionLevels;

            List <DescribeServiceResponse.DescribeService_KeySpec> describeServiceResponse_keySpecs = new List <DescribeServiceResponse.DescribeService_KeySpec>();

            for (int i = 0; i < _ctx.Length("DescribeService.KeySpecs.Length"); i++)
            {
                DescribeServiceResponse.DescribeService_KeySpec keySpec = new DescribeServiceResponse.DescribeService_KeySpec();
                keySpec.Name = _ctx.StringValue("DescribeService.KeySpecs[" + i + "].Name");

                List <string> keySpec_supportedProtectionLevels = new List <string>();
                for (int j = 0; j < _ctx.Length("DescribeService.KeySpecs[" + i + "].SupportedProtectionLevels.Length"); j++)
                {
                    keySpec_supportedProtectionLevels.Add(_ctx.StringValue("DescribeService.KeySpecs[" + i + "].SupportedProtectionLevels[" + j + "]"));
                }
                keySpec.SupportedProtectionLevels = keySpec_supportedProtectionLevels;

                List <string> keySpec_usages = new List <string>();
                for (int j = 0; j < _ctx.Length("DescribeService.KeySpecs[" + i + "].Usages.Length"); j++)
                {
                    keySpec_usages.Add(_ctx.StringValue("DescribeService.KeySpecs[" + i + "].Usages[" + j + "]"));
                }
                keySpec.Usages = keySpec_usages;

                describeServiceResponse_keySpecs.Add(keySpec);
            }
            describeServiceResponse.KeySpecs = describeServiceResponse_keySpecs;

            return(describeServiceResponse);
        }
        public static DescribeServiceResponse Unmarshall(UnmarshallerContext context)
        {
            DescribeServiceResponse describeServiceResponse = new DescribeServiceResponse();

            describeServiceResponse.HttpResponse = context.HttpResponse;
            describeServiceResponse.RequestId    = context.StringValue("DescribeService.RequestId");

            List <DescribeServiceResponse.DescribeService_ProtectionLevel> describeServiceResponse_protectionLevels = new List <DescribeServiceResponse.DescribeService_ProtectionLevel>();

            for (int i = 0; i < context.Length("DescribeService.ProtectionLevels.Length"); i++)
            {
                DescribeServiceResponse.DescribeService_ProtectionLevel protectionLevel = new DescribeServiceResponse.DescribeService_ProtectionLevel();
                protectionLevel.Type = context.StringValue("DescribeService.ProtectionLevels[" + i + "].Type");

                describeServiceResponse_protectionLevels.Add(protectionLevel);
            }
            describeServiceResponse.ProtectionLevels = describeServiceResponse_protectionLevels;

            return(describeServiceResponse);
        }