com.aliyuncs.sae.transform.v20190506.DeleteWebApplicationRevisionResponseUnmarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aliyun-java-sdk-sae Show documentation
Show all versions of aliyun-java-sdk-sae Show documentation
Aliyun Open API SDK for Java
Copyright (C) Alibaba Cloud Computing
All rights reserved.
版权所有 (C)阿里云计算有限公司
http://www.aliyun.com
The newest version!
/*
* 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.sae.transform.v20190506;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.ContainersItem;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.ContainersItem.MetricsCollectConfig;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.ContainersItem.Resources;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.ContainersItem.SLSCollectConfigs;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.ContainersItem.SLSCollectConfigs.CollectConfigsItem;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.ContainersItem.StartupProbe;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.ContainersItem.StartupProbe.ProbeHandler;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.ContainersItem.StartupProbe.ProbeHandler.HttpGet;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.ContainersItem.StartupProbe.ProbeHandler.HttpGet.HttpHeadersItem;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.ContainersItem.StartupProbe.ProbeHandler.TcpSocket;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.ContainersItem.WebNASConfig;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.ContainersItem.WebNASConfig.Item;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.ContainersItem.WebOSSConfig;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.ContainersItem.WebOSSConfig.Item2;
import com.aliyuncs.sae.model.v20190506.DeleteWebApplicationRevisionResponse.Data.RevisionConfig.WebNetworkConfig;
import java.util.Map;
import com.aliyuncs.transform.UnmarshallerContext;
public class DeleteWebApplicationRevisionResponseUnmarshaller {
public static DeleteWebApplicationRevisionResponse unmarshall(DeleteWebApplicationRevisionResponse deleteWebApplicationRevisionResponse, UnmarshallerContext _ctx) {
deleteWebApplicationRevisionResponse.setRequestId(_ctx.stringValue("DeleteWebApplicationRevisionResponse.RequestId"));
deleteWebApplicationRevisionResponse.setCode(_ctx.integerValue("DeleteWebApplicationRevisionResponse.Code"));
deleteWebApplicationRevisionResponse.setMessage(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Message"));
deleteWebApplicationRevisionResponse.setSuccess(_ctx.booleanValue("DeleteWebApplicationRevisionResponse.Success"));
Data data = new Data();
data.setCreatedTime(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.CreatedTime"));
data.setDescription(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.Description"));
data.setRevisionId(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionId"));
data.setWeight(_ctx.floatValue("DeleteWebApplicationRevisionResponse.Data.Weight"));
RevisionConfig revisionConfig = new RevisionConfig();
revisionConfig.setEnableArmsMetrics(_ctx.booleanValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.EnableArmsMetrics"));
WebNetworkConfig webNetworkConfig = new WebNetworkConfig();
webNetworkConfig.setInternetAccess(_ctx.booleanValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.WebNetworkConfig.InternetAccess"));
webNetworkConfig.setSecurityGroupId(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.WebNetworkConfig.SecurityGroupId"));
List vSwitchIds = new ArrayList();
for (int i = 0; i < _ctx.lengthValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.WebNetworkConfig.VSwitchIds.Length"); i++) {
vSwitchIds.add(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.WebNetworkConfig.VSwitchIds["+ i +"]"));
}
webNetworkConfig.setVSwitchIds(vSwitchIds);
revisionConfig.setWebNetworkConfig(webNetworkConfig);
List containers = new ArrayList();
for (int i = 0; i < _ctx.lengthValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers.Length"); i++) {
ContainersItem containersItem = new ContainersItem();
containersItem.setArgs(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].Args"));
containersItem.setCommand(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].Command"));
containersItem.setEnvironmentVariables(_ctx.mapValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].EnvironmentVariables"));
containersItem.setImage(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].Image"));
containersItem.setPort(_ctx.integerValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].Port"));
containersItem.setRequestConcurrency(_ctx.integerValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].RequestConcurrency"));
containersItem.setRequestTimeout(_ctx.integerValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].RequestTimeout"));
WebNASConfig webNASConfig = new WebNASConfig();
List- mountPoints = new ArrayList
- ();
for (int j = 0; j < _ctx.lengthValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].WebNASConfig.MountPoints.Length"); j++) {
Item item = new Item();
item.setMountDir(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].WebNASConfig.MountPoints["+ j +"].MountDir"));
item.setNasAddr(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].WebNASConfig.MountPoints["+ j +"].NasAddr"));
item.setNasPath(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].WebNASConfig.MountPoints["+ j +"].NasPath"));
mountPoints.add(item);
}
webNASConfig.setMountPoints(mountPoints);
containersItem.setWebNASConfig(webNASConfig);
WebOSSConfig webOSSConfig = new WebOSSConfig();
List
mountPoints1 = new ArrayList();
for (int j = 0; j < _ctx.lengthValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].WebOSSConfig.MountPoints.Length"); j++) {
Item2 item2 = new Item2();
item2.setBucketName(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].WebOSSConfig.MountPoints["+ j +"].BucketName"));
item2.setBucketPath(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].WebOSSConfig.MountPoints["+ j +"].BucketPath"));
item2.setMountDir(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].WebOSSConfig.MountPoints["+ j +"].MountDir"));
item2.setReadOnly(_ctx.booleanValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].WebOSSConfig.MountPoints["+ j +"].ReadOnly"));
mountPoints1.add(item2);
}
webOSSConfig.setMountPoints1(mountPoints1);
containersItem.setWebOSSConfig(webOSSConfig);
Resources resources = new Resources();
resources.setCpu(_ctx.integerValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].Resources.Cpu"));
resources.setMemory(_ctx.integerValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].Resources.Memory"));
containersItem.setResources(resources);
StartupProbe startupProbe = new StartupProbe();
startupProbe.setFailureThreshold(_ctx.integerValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].StartupProbe.FailureThreshold"));
startupProbe.setInitialDelaySeconds(_ctx.integerValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].StartupProbe.InitialDelaySeconds"));
startupProbe.setPeriodSeconds(_ctx.integerValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].StartupProbe.PeriodSeconds"));
startupProbe.setTimeoutSeconds(_ctx.integerValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].StartupProbe.TimeoutSeconds"));
ProbeHandler probeHandler = new ProbeHandler();
HttpGet httpGet = new HttpGet();
httpGet.setHost(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].StartupProbe.ProbeHandler.HttpGet.Host"));
httpGet.setPath(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].StartupProbe.ProbeHandler.HttpGet.Path"));
httpGet.setPort(_ctx.integerValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].StartupProbe.ProbeHandler.HttpGet.Port"));
httpGet.setScheme(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].StartupProbe.ProbeHandler.HttpGet.Scheme"));
List httpHeaders = new ArrayList();
for (int j = 0; j < _ctx.lengthValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].StartupProbe.ProbeHandler.HttpGet.HttpHeaders.Length"); j++) {
HttpHeadersItem httpHeadersItem = new HttpHeadersItem();
httpHeadersItem.setName(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].StartupProbe.ProbeHandler.HttpGet.HttpHeaders["+ j +"].name"));
httpHeadersItem.setValue(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].StartupProbe.ProbeHandler.HttpGet.HttpHeaders["+ j +"].value"));
httpHeaders.add(httpHeadersItem);
}
httpGet.setHttpHeaders(httpHeaders);
probeHandler.setHttpGet(httpGet);
TcpSocket tcpSocket = new TcpSocket();
tcpSocket.setHost(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].StartupProbe.ProbeHandler.TcpSocket.Host"));
tcpSocket.setPort(_ctx.integerValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].StartupProbe.ProbeHandler.TcpSocket.Port"));
probeHandler.setTcpSocket(tcpSocket);
startupProbe.setProbeHandler(probeHandler);
containersItem.setStartupProbe(startupProbe);
SLSCollectConfigs sLSCollectConfigs = new SLSCollectConfigs();
List collectConfigs = new ArrayList();
for (int j = 0; j < _ctx.lengthValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].SLSCollectConfigs.CollectConfigs.Length"); j++) {
CollectConfigsItem collectConfigsItem = new CollectConfigsItem();
collectConfigsItem.setLogPath(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].SLSCollectConfigs.CollectConfigs["+ j +"].LogPath"));
collectConfigsItem.setLogType(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].SLSCollectConfigs.CollectConfigs["+ j +"].LogType"));
collectConfigsItem.setLogstoreName(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].SLSCollectConfigs.CollectConfigs["+ j +"].LogstoreName"));
collectConfigsItem.setLogtailName(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].SLSCollectConfigs.CollectConfigs["+ j +"].LogtailName"));
collectConfigsItem.setMachineGroup(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].SLSCollectConfigs.CollectConfigs["+ j +"].MachineGroup"));
collectConfigsItem.setProjectName(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].SLSCollectConfigs.CollectConfigs["+ j +"].ProjectName"));
collectConfigs.add(collectConfigsItem);
}
sLSCollectConfigs.setCollectConfigs(collectConfigs);
containersItem.setSLSCollectConfigs(sLSCollectConfigs);
MetricsCollectConfig metricsCollectConfig = new MetricsCollectConfig();
metricsCollectConfig.setLogstoreName(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].MetricsCollectConfig.LogstoreName"));
metricsCollectConfig.setProjectName(_ctx.stringValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].MetricsCollectConfig.ProjectName"));
metricsCollectConfig.setEnablePushToUserSLS(_ctx.booleanValue("DeleteWebApplicationRevisionResponse.Data.RevisionConfig.Containers["+ i +"].MetricsCollectConfig.EnablePushToUserSLS"));
containersItem.setMetricsCollectConfig(metricsCollectConfig);
containers.add(containersItem);
}
revisionConfig.setContainers(containers);
data.setRevisionConfig(revisionConfig);
deleteWebApplicationRevisionResponse.setData(data);
return deleteWebApplicationRevisionResponse;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy