public static DescribeSecurityGroupAttributeResponse Unmarshall(UnmarshallerContext _ctx)
        {
            DescribeSecurityGroupAttributeResponse describeSecurityGroupAttributeResponse = new DescribeSecurityGroupAttributeResponse();

            describeSecurityGroupAttributeResponse.HttpResponse      = _ctx.HttpResponse;
            describeSecurityGroupAttributeResponse.RequestId         = _ctx.StringValue("DescribeSecurityGroupAttribute.RequestId");
            describeSecurityGroupAttributeResponse.RegionId          = _ctx.StringValue("DescribeSecurityGroupAttribute.RegionId");
            describeSecurityGroupAttributeResponse.SecurityGroupId   = _ctx.StringValue("DescribeSecurityGroupAttribute.SecurityGroupId");
            describeSecurityGroupAttributeResponse.Description       = _ctx.StringValue("DescribeSecurityGroupAttribute.Description");
            describeSecurityGroupAttributeResponse.SecurityGroupName = _ctx.StringValue("DescribeSecurityGroupAttribute.SecurityGroupName");
            describeSecurityGroupAttributeResponse.VpcId             = _ctx.StringValue("DescribeSecurityGroupAttribute.VpcId");
            describeSecurityGroupAttributeResponse.InnerAccessPolicy = _ctx.StringValue("DescribeSecurityGroupAttribute.InnerAccessPolicy");

            List <DescribeSecurityGroupAttributeResponse.DescribeSecurityGroupAttribute_Permission> describeSecurityGroupAttributeResponse_permissions = new List <DescribeSecurityGroupAttributeResponse.DescribeSecurityGroupAttribute_Permission>();

            for (int i = 0; i < _ctx.Length("DescribeSecurityGroupAttribute.Permissions.Length"); i++)
            {
                DescribeSecurityGroupAttributeResponse.DescribeSecurityGroupAttribute_Permission permission = new DescribeSecurityGroupAttributeResponse.DescribeSecurityGroupAttribute_Permission();
                permission.IpProtocol           = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].IpProtocol");
                permission.PortRange            = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].PortRange");
                permission.SourcePortRange      = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].SourcePortRange");
                permission.SourceGroupId        = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].SourceGroupId");
                permission.SourceGroupName      = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].SourceGroupName");
                permission.SourceCidrIp         = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].SourceCidrIp");
                permission.Ipv6SourceCidrIp     = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].Ipv6SourceCidrIp");
                permission.SourcePrefixListId   = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].SourcePrefixListId");
                permission.SourcePrefixListName = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].SourcePrefixListName");
                permission.Policy  = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].Policy");
                permission.NicType = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].NicType");
                permission.SourceGroupOwnerAccount = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].SourceGroupOwnerAccount");
                permission.DestGroupId             = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].DestGroupId");
                permission.DestGroupName           = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].DestGroupName");
                permission.DestCidrIp            = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].DestCidrIp");
                permission.Ipv6DestCidrIp        = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].Ipv6DestCidrIp");
                permission.DestPrefixListId      = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].DestPrefixListId");
                permission.DestPrefixListName    = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].DestPrefixListName");
                permission.DestGroupOwnerAccount = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].DestGroupOwnerAccount");
                permission.Priority    = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].Priority");
                permission.Direction   = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].Direction");
                permission.Description = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].Description");
                permission.CreateTime  = _ctx.StringValue("DescribeSecurityGroupAttribute.Permissions[" + i + "].CreateTime");

                describeSecurityGroupAttributeResponse_permissions.Add(permission);
            }
            describeSecurityGroupAttributeResponse.Permissions = describeSecurityGroupAttributeResponse_permissions;

            return(describeSecurityGroupAttributeResponse);
        }
        public static DescribeSecurityGroupAttributeResponse Unmarshall(UnmarshallerContext _ctx)
        {
            DescribeSecurityGroupAttributeResponse describeSecurityGroupAttributeResponse = new DescribeSecurityGroupAttributeResponse();

            describeSecurityGroupAttributeResponse.HttpResponse = _ctx.HttpResponse;
            describeSecurityGroupAttributeResponse.RequestId    = _ctx.StringValue("DescribeSecurityGroupAttribute.RequestId");

            List <DescribeSecurityGroupAttributeResponse.DescribeSecurityGroupAttribute_SecurityGroup> describeSecurityGroupAttributeResponse_availableGroupList = new List <DescribeSecurityGroupAttributeResponse.DescribeSecurityGroupAttribute_SecurityGroup>();

            for (int i = 0; i < _ctx.Length("DescribeSecurityGroupAttribute.AvailableGroupList.Length"); i++)
            {
                DescribeSecurityGroupAttributeResponse.DescribeSecurityGroupAttribute_SecurityGroup securityGroup = new DescribeSecurityGroupAttributeResponse.DescribeSecurityGroupAttribute_SecurityGroup();
                securityGroup.SecurityGroupId         = _ctx.StringValue("DescribeSecurityGroupAttribute.AvailableGroupList[" + i + "].SecurityGroupId");
                securityGroup.Description             = _ctx.StringValue("DescribeSecurityGroupAttribute.AvailableGroupList[" + i + "].Description");
                securityGroup.SecurityGroupName       = _ctx.StringValue("DescribeSecurityGroupAttribute.AvailableGroupList[" + i + "].SecurityGroupName");
                securityGroup.VpcId                   = _ctx.StringValue("DescribeSecurityGroupAttribute.AvailableGroupList[" + i + "].VpcId");
                securityGroup.CreationTime            = _ctx.StringValue("DescribeSecurityGroupAttribute.AvailableGroupList[" + i + "].CreationTime");
                securityGroup.AvailableInstanceAmount = _ctx.IntegerValue("DescribeSecurityGroupAttribute.AvailableGroupList[" + i + "].AvailableInstanceAmount");
                securityGroup.EcsCount                = _ctx.IntegerValue("DescribeSecurityGroupAttribute.AvailableGroupList[" + i + "].EcsCount");

                describeSecurityGroupAttributeResponse_availableGroupList.Add(securityGroup);
            }
            describeSecurityGroupAttributeResponse.AvailableGroupList = describeSecurityGroupAttributeResponse_availableGroupList;

            List <DescribeSecurityGroupAttributeResponse.DescribeSecurityGroupAttribute_SecurityGroupAttribute> describeSecurityGroupAttributeResponse_securityGroupAttributeList = new List <DescribeSecurityGroupAttributeResponse.DescribeSecurityGroupAttribute_SecurityGroupAttribute>();

            for (int i = 0; i < _ctx.Length("DescribeSecurityGroupAttribute.SecurityGroupAttributeList.Length"); i++)
            {
                DescribeSecurityGroupAttributeResponse.DescribeSecurityGroupAttribute_SecurityGroupAttribute securityGroupAttribute = new DescribeSecurityGroupAttributeResponse.DescribeSecurityGroupAttribute_SecurityGroupAttribute();
                securityGroupAttribute.BizType    = _ctx.StringValue("DescribeSecurityGroupAttribute.SecurityGroupAttributeList[" + i + "].BizType");
                securityGroupAttribute.BizContent = _ctx.StringValue("DescribeSecurityGroupAttribute.SecurityGroupAttributeList[" + i + "].BizContent");

                describeSecurityGroupAttributeResponse_securityGroupAttributeList.Add(securityGroupAttribute);
            }
            describeSecurityGroupAttributeResponse.SecurityGroupAttributeList = describeSecurityGroupAttributeResponse_securityGroupAttributeList;

            return(describeSecurityGroupAttributeResponse);
        }
Exemple #3
0
        public static DescribeSecurityGroupAttributeResponse Unmarshall(UnmarshallerContext context)
        {
            DescribeSecurityGroupAttributeResponse describeSecurityGroupAttributeResponse = new DescribeSecurityGroupAttributeResponse()
            {
                HttpResponse      = context.HttpResponse,
                RequestId         = context.StringValue("DescribeSecurityGroupAttribute.RequestId"),
                RegionId          = context.StringValue("DescribeSecurityGroupAttribute.RegionId"),
                SecurityGroupId   = context.StringValue("DescribeSecurityGroupAttribute.SecurityGroupId"),
                Description       = context.StringValue("DescribeSecurityGroupAttribute.Description"),
                SecurityGroupName = context.StringValue("DescribeSecurityGroupAttribute.SecurityGroupName"),
                VpcId             = context.StringValue("DescribeSecurityGroupAttribute.VpcId")
            };
            List <DescribeSecurityGroupAttributeResponse.Permission> permissions = new List <DescribeSecurityGroupAttributeResponse.Permission>();

            for (int i = 0; i < context.Length("DescribeSecurityGroupAttribute.Permissions.Length"); i++)
            {
                DescribeSecurityGroupAttributeResponse.Permission permission = new DescribeSecurityGroupAttributeResponse.Permission()
                {
                    IpProtocol              = context.StringValue($"DescribeSecurityGroupAttribute.Permissions[{i}].IpProtocol"),
                    PortRange               = context.StringValue($"DescribeSecurityGroupAttribute.Permissions[{i}].PortRange"),
                    SourceGroupId           = context.StringValue($"DescribeSecurityGroupAttribute.Permissions[{i}].SourceGroupId"),
                    SourceCidrIp            = context.StringValue($"DescribeSecurityGroupAttribute.Permissions[{i}].SourceCidrIp"),
                    Policy                  = context.StringValue($"DescribeSecurityGroupAttribute.Permissions[{i}].Policy"),
                    NicType                 = context.StringValue($"DescribeSecurityGroupAttribute.Permissions[{i}].NicType"),
                    SourceGroupOwnerAccount = context.StringValue($"DescribeSecurityGroupAttribute.Permissions[{i}].SourceGroupOwnerAccount"),
                    DestGroupId             = context.StringValue($"DescribeSecurityGroupAttribute.Permissions[{i}].DestGroupId"),
                    DestCidrIp              = context.StringValue($"DescribeSecurityGroupAttribute.Permissions[{i}].DestCidrIp"),
                    DestGroupOwnerAccount   = context.StringValue($"DescribeSecurityGroupAttribute.Permissions[{i}].DestGroupOwnerAccount"),
                    Priority                = context.StringValue($"DescribeSecurityGroupAttribute.Permissions[{i}].Priority"),
                    Direction               = context.StringValue($"DescribeSecurityGroupAttribute.Permissions[{i}].Direction")
                };
                permissions.Add(permission);
            }
            describeSecurityGroupAttributeResponse.Permissions = permissions;

            return(describeSecurityGroupAttributeResponse);
        }