com.aliyuncs.sas.transform.v20181203.DescribeGroupedInstancesResponseUnmarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aliyun-java-sdk-sas Show documentation
Show all versions of aliyun-java-sdk-sas Show documentation
Aliyun Open API SDK for Java
Copyright (C) Alibaba Cloud Computing
All rights reserved.
版权所有 (C)阿里云计算有限公司
http://www.aliyun.com
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.sas.transform.v20181203;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.sas.model.v20181203.DescribeGroupedInstancesResponse;
import com.aliyuncs.sas.model.v20181203.DescribeGroupedInstancesResponse.Instance;
import com.aliyuncs.sas.model.v20181203.DescribeGroupedInstancesResponse.PageInfo;
import com.aliyuncs.transform.UnmarshallerContext;
public class DescribeGroupedInstancesResponseUnmarshaller {
public static DescribeGroupedInstancesResponse unmarshall(DescribeGroupedInstancesResponse describeGroupedInstancesResponse, UnmarshallerContext _ctx) {
describeGroupedInstancesResponse.setRequestId(_ctx.stringValue("DescribeGroupedInstancesResponse.RequestId"));
PageInfo pageInfo = new PageInfo();
pageInfo.setCurrentPage(_ctx.integerValue("DescribeGroupedInstancesResponse.PageInfo.CurrentPage"));
pageInfo.setPageSize(_ctx.integerValue("DescribeGroupedInstancesResponse.PageInfo.PageSize"));
pageInfo.setTotalCount(_ctx.integerValue("DescribeGroupedInstancesResponse.PageInfo.TotalCount"));
pageInfo.setCount(_ctx.integerValue("DescribeGroupedInstancesResponse.PageInfo.Count"));
describeGroupedInstancesResponse.setPageInfo(pageInfo);
List instances = new ArrayList();
for (int i = 0; i < _ctx.lengthValue("DescribeGroupedInstancesResponse.Instances.Length"); i++) {
Instance instance = new Instance();
instance.setAsapVulInstanceCount(_ctx.longValue("DescribeGroupedInstancesResponse.Instances["+ i +"].AsapVulInstanceCount"));
instance.setUnProtectedInstanceCount(_ctx.stringValue("DescribeGroupedInstancesResponse.Instances["+ i +"].UnProtectedInstanceCount"));
instance.setFieldAliasName(_ctx.stringValue("DescribeGroupedInstancesResponse.Instances["+ i +"].FieldAliasName"));
instance.setInstanceCount(_ctx.stringValue("DescribeGroupedInstancesResponse.Instances["+ i +"].InstanceCount"));
instance.setFieldId(_ctx.longValue("DescribeGroupedInstancesResponse.Instances["+ i +"].FieldId"));
instance.setRiskInstanceCount(_ctx.stringValue("DescribeGroupedInstancesResponse.Instances["+ i +"].RiskInstanceCount"));
instance.setGroupFlag(_ctx.integerValue("DescribeGroupedInstancesResponse.Instances["+ i +"].GroupFlag"));
instance.setAuthVersionCheckCount(_ctx.integerValue("DescribeGroupedInstancesResponse.Instances["+ i +"].AuthVersionCheckCount"));
List groupPath = new ArrayList();
for (int j = 0; j < _ctx.lengthValue("DescribeGroupedInstancesResponse.Instances["+ i +"].GroupPath.Length"); j++) {
groupPath.add(_ctx.stringValue("DescribeGroupedInstancesResponse.Instances["+ i +"].GroupPath["+ j +"]"));
}
instance.setGroupPath(groupPath);
instances.add(instance);
}
describeGroupedInstancesResponse.setInstances(instances);
return describeGroupedInstancesResponse;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy