com.aliyuncs.alb.transform.v20200616.GetLoadBalancerAttributeResponseUnmarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aliyun-java-sdk-alb Show documentation
Show all versions of aliyun-java-sdk-alb 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.alb.transform.v20200616;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.alb.model.v20200616.GetLoadBalancerAttributeResponse;
import com.aliyuncs.alb.model.v20200616.GetLoadBalancerAttributeResponse.AccessLogConfig;
import com.aliyuncs.alb.model.v20200616.GetLoadBalancerAttributeResponse.AssociatedResource;
import com.aliyuncs.alb.model.v20200616.GetLoadBalancerAttributeResponse.DeletionProtectionConfig;
import com.aliyuncs.alb.model.v20200616.GetLoadBalancerAttributeResponse.LoadBalancerBillingConfig;
import com.aliyuncs.alb.model.v20200616.GetLoadBalancerAttributeResponse.LoadBalancerOperationLock;
import com.aliyuncs.alb.model.v20200616.GetLoadBalancerAttributeResponse.ModificationProtectionConfig;
import com.aliyuncs.alb.model.v20200616.GetLoadBalancerAttributeResponse.Tag;
import com.aliyuncs.alb.model.v20200616.GetLoadBalancerAttributeResponse.ZoneMapping;
import com.aliyuncs.alb.model.v20200616.GetLoadBalancerAttributeResponse.ZoneMapping.LoadBalancerAddress;
import com.aliyuncs.transform.UnmarshallerContext;
public class GetLoadBalancerAttributeResponseUnmarshaller {
public static GetLoadBalancerAttributeResponse unmarshall(GetLoadBalancerAttributeResponse getLoadBalancerAttributeResponse, UnmarshallerContext _ctx) {
getLoadBalancerAttributeResponse.setRequestId(_ctx.stringValue("GetLoadBalancerAttributeResponse.RequestId"));
getLoadBalancerAttributeResponse.setAddressAllocatedMode(_ctx.stringValue("GetLoadBalancerAttributeResponse.AddressAllocatedMode"));
getLoadBalancerAttributeResponse.setAddressType(_ctx.stringValue("GetLoadBalancerAttributeResponse.AddressType"));
getLoadBalancerAttributeResponse.setBandwidthCapacity(_ctx.integerValue("GetLoadBalancerAttributeResponse.BandwidthCapacity"));
getLoadBalancerAttributeResponse.setBandwidthPackageId(_ctx.stringValue("GetLoadBalancerAttributeResponse.BandwidthPackageId"));
getLoadBalancerAttributeResponse.setCreateTime(_ctx.stringValue("GetLoadBalancerAttributeResponse.CreateTime"));
getLoadBalancerAttributeResponse.setDNSName(_ctx.stringValue("GetLoadBalancerAttributeResponse.DNSName"));
getLoadBalancerAttributeResponse.setLoadBalancerBussinessStatus(_ctx.stringValue("GetLoadBalancerAttributeResponse.LoadBalancerBussinessStatus"));
getLoadBalancerAttributeResponse.setLoadBalancerEdition(_ctx.stringValue("GetLoadBalancerAttributeResponse.LoadBalancerEdition"));
getLoadBalancerAttributeResponse.setLoadBalancerId(_ctx.stringValue("GetLoadBalancerAttributeResponse.LoadBalancerId"));
getLoadBalancerAttributeResponse.setLoadBalancerName(_ctx.stringValue("GetLoadBalancerAttributeResponse.LoadBalancerName"));
getLoadBalancerAttributeResponse.setServiceManagedEnabled(_ctx.booleanValue("GetLoadBalancerAttributeResponse.ServiceManagedEnabled"));
getLoadBalancerAttributeResponse.setServiceManagedMode(_ctx.stringValue("GetLoadBalancerAttributeResponse.ServiceManagedMode"));
getLoadBalancerAttributeResponse.setLoadBalancerStatus(_ctx.stringValue("GetLoadBalancerAttributeResponse.LoadBalancerStatus"));
getLoadBalancerAttributeResponse.setRegionId(_ctx.stringValue("GetLoadBalancerAttributeResponse.RegionId"));
getLoadBalancerAttributeResponse.setResourceGroupId(_ctx.stringValue("GetLoadBalancerAttributeResponse.ResourceGroupId"));
getLoadBalancerAttributeResponse.setVpcId(_ctx.stringValue("GetLoadBalancerAttributeResponse.VpcId"));
getLoadBalancerAttributeResponse.setConfigManagedEnabled(_ctx.booleanValue("GetLoadBalancerAttributeResponse.ConfigManagedEnabled"));
getLoadBalancerAttributeResponse.setAddressIpVersion(_ctx.stringValue("GetLoadBalancerAttributeResponse.AddressIpVersion"));
getLoadBalancerAttributeResponse.setIpv6AddressType(_ctx.stringValue("GetLoadBalancerAttributeResponse.Ipv6AddressType"));
getLoadBalancerAttributeResponse.setBackToOriginRouteEnabled(_ctx.booleanValue("GetLoadBalancerAttributeResponse.BackToOriginRouteEnabled"));
getLoadBalancerAttributeResponse.setLoadBalancerVersion(_ctx.stringValue("GetLoadBalancerAttributeResponse.LoadBalancerVersion"));
getLoadBalancerAttributeResponse.setSysSecurityGroupId(_ctx.stringValue("GetLoadBalancerAttributeResponse.SysSecurityGroupId"));
List featureLabels = new ArrayList();
for (int i = 0; i < _ctx.lengthValue("GetLoadBalancerAttributeResponse.FeatureLabels.Length"); i++) {
featureLabels.add(_ctx.stringValue("GetLoadBalancerAttributeResponse.FeatureLabels["+ i +"]"));
}
getLoadBalancerAttributeResponse.setFeatureLabels(featureLabels);
List securityGroupIds = new ArrayList();
for (int i = 0; i < _ctx.lengthValue("GetLoadBalancerAttributeResponse.SecurityGroupIds.Length"); i++) {
securityGroupIds.add(_ctx.stringValue("GetLoadBalancerAttributeResponse.SecurityGroupIds["+ i +"]"));
}
getLoadBalancerAttributeResponse.setSecurityGroupIds(securityGroupIds);
AccessLogConfig accessLogConfig = new AccessLogConfig();
accessLogConfig.setLogProject(_ctx.stringValue("GetLoadBalancerAttributeResponse.AccessLogConfig.LogProject"));
accessLogConfig.setLogStore(_ctx.stringValue("GetLoadBalancerAttributeResponse.AccessLogConfig.LogStore"));
getLoadBalancerAttributeResponse.setAccessLogConfig(accessLogConfig);
DeletionProtectionConfig deletionProtectionConfig = new DeletionProtectionConfig();
deletionProtectionConfig.setEnabled(_ctx.booleanValue("GetLoadBalancerAttributeResponse.DeletionProtectionConfig.Enabled"));
deletionProtectionConfig.setEnabledTime(_ctx.stringValue("GetLoadBalancerAttributeResponse.DeletionProtectionConfig.EnabledTime"));
getLoadBalancerAttributeResponse.setDeletionProtectionConfig(deletionProtectionConfig);
LoadBalancerBillingConfig loadBalancerBillingConfig = new LoadBalancerBillingConfig();
loadBalancerBillingConfig.setInternetBandwidth(_ctx.integerValue("GetLoadBalancerAttributeResponse.LoadBalancerBillingConfig.InternetBandwidth"));
loadBalancerBillingConfig.setInternetChargeType(_ctx.stringValue("GetLoadBalancerAttributeResponse.LoadBalancerBillingConfig.InternetChargeType"));
loadBalancerBillingConfig.setPayType(_ctx.stringValue("GetLoadBalancerAttributeResponse.LoadBalancerBillingConfig.PayType"));
getLoadBalancerAttributeResponse.setLoadBalancerBillingConfig(loadBalancerBillingConfig);
ModificationProtectionConfig modificationProtectionConfig = new ModificationProtectionConfig();
modificationProtectionConfig.setReason(_ctx.stringValue("GetLoadBalancerAttributeResponse.ModificationProtectionConfig.Reason"));
modificationProtectionConfig.setStatus(_ctx.stringValue("GetLoadBalancerAttributeResponse.ModificationProtectionConfig.Status"));
getLoadBalancerAttributeResponse.setModificationProtectionConfig(modificationProtectionConfig);
List loadBalancerOperationLocks = new ArrayList();
for (int i = 0; i < _ctx.lengthValue("GetLoadBalancerAttributeResponse.LoadBalancerOperationLocks.Length"); i++) {
LoadBalancerOperationLock loadBalancerOperationLock = new LoadBalancerOperationLock();
loadBalancerOperationLock.setLockReason(_ctx.stringValue("GetLoadBalancerAttributeResponse.LoadBalancerOperationLocks["+ i +"].LockReason"));
loadBalancerOperationLock.setLockType(_ctx.stringValue("GetLoadBalancerAttributeResponse.LoadBalancerOperationLocks["+ i +"].LockType"));
loadBalancerOperationLocks.add(loadBalancerOperationLock);
}
getLoadBalancerAttributeResponse.setLoadBalancerOperationLocks(loadBalancerOperationLocks);
List tags = new ArrayList();
for (int i = 0; i < _ctx.lengthValue("GetLoadBalancerAttributeResponse.Tags.Length"); i++) {
Tag tag = new Tag();
tag.setKey(_ctx.stringValue("GetLoadBalancerAttributeResponse.Tags["+ i +"].Key"));
tag.setValue(_ctx.stringValue("GetLoadBalancerAttributeResponse.Tags["+ i +"].Value"));
tags.add(tag);
}
getLoadBalancerAttributeResponse.setTags(tags);
List zoneMappings = new ArrayList();
for (int i = 0; i < _ctx.lengthValue("GetLoadBalancerAttributeResponse.ZoneMappings.Length"); i++) {
ZoneMapping zoneMapping = new ZoneMapping();
zoneMapping.setVSwitchId(_ctx.stringValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].VSwitchId"));
zoneMapping.setZoneId(_ctx.stringValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].ZoneId"));
zoneMapping.setAllocationId(_ctx.stringValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].AllocationId"));
zoneMapping.setEipType(_ctx.stringValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].EipType"));
zoneMapping.setStatus(_ctx.stringValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].Status"));
List loadBalancerAddresses = new ArrayList();
for (int j = 0; j < _ctx.lengthValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].LoadBalancerAddresses.Length"); j++) {
LoadBalancerAddress loadBalancerAddress = new LoadBalancerAddress();
loadBalancerAddress.setAddress(_ctx.stringValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].LoadBalancerAddresses["+ j +"].Address"));
loadBalancerAddress.setIpv6Address(_ctx.stringValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].LoadBalancerAddresses["+ j +"].Ipv6Address"));
loadBalancerAddress.setIntranetAddress(_ctx.stringValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].LoadBalancerAddresses["+ j +"].IntranetAddress"));
loadBalancerAddress.setAllocationId(_ctx.stringValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].LoadBalancerAddresses["+ j +"].AllocationId"));
loadBalancerAddress.setEipType(_ctx.stringValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].LoadBalancerAddresses["+ j +"].EipType"));
loadBalancerAddress.setIntranetAddressHcStatus(_ctx.stringValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].LoadBalancerAddresses["+ j +"].IntranetAddressHcStatus"));
loadBalancerAddress.setIpv6AddressHcStatus(_ctx.stringValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].LoadBalancerAddresses["+ j +"].Ipv6AddressHcStatus"));
List ipv4LocalAddresses = new ArrayList();
for (int k = 0; k < _ctx.lengthValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].LoadBalancerAddresses["+ j +"].Ipv4LocalAddresses.Length"); k++) {
ipv4LocalAddresses.add(_ctx.stringValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].LoadBalancerAddresses["+ j +"].Ipv4LocalAddresses["+ k +"]"));
}
loadBalancerAddress.setIpv4LocalAddresses(ipv4LocalAddresses);
List ipv6LocalAddresses = new ArrayList();
for (int k = 0; k < _ctx.lengthValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].LoadBalancerAddresses["+ j +"].Ipv6LocalAddresses.Length"); k++) {
ipv6LocalAddresses.add(_ctx.stringValue("GetLoadBalancerAttributeResponse.ZoneMappings["+ i +"].LoadBalancerAddresses["+ j +"].Ipv6LocalAddresses["+ k +"]"));
}
loadBalancerAddress.setIpv6LocalAddresses(ipv6LocalAddresses);
loadBalancerAddresses.add(loadBalancerAddress);
}
zoneMapping.setLoadBalancerAddresses(loadBalancerAddresses);
zoneMappings.add(zoneMapping);
}
getLoadBalancerAttributeResponse.setZoneMappings(zoneMappings);
List associatedResources = new ArrayList();
for (int i = 0; i < _ctx.lengthValue("GetLoadBalancerAttributeResponse.AssociatedResources.Length"); i++) {
AssociatedResource associatedResource = new AssociatedResource();
associatedResource.setAssociatedResourceType(_ctx.stringValue("GetLoadBalancerAttributeResponse.AssociatedResources["+ i +"].AssociatedResourceType"));
associatedResource.setAssociatedResourceId(_ctx.stringValue("GetLoadBalancerAttributeResponse.AssociatedResources["+ i +"].AssociatedResourceId"));
associatedResource.setPolicyId(_ctx.stringValue("GetLoadBalancerAttributeResponse.AssociatedResources["+ i +"].PolicyId"));
associatedResource.setStatus(_ctx.stringValue("GetLoadBalancerAttributeResponse.AssociatedResources["+ i +"].Status"));
associatedResource.setAssociatedMode(_ctx.stringValue("GetLoadBalancerAttributeResponse.AssociatedResources["+ i +"].AssociatedMode"));
associatedResources.add(associatedResource);
}
getLoadBalancerAttributeResponse.setAssociatedResources(associatedResources);
return getLoadBalancerAttributeResponse;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy