diff --git a/aliyun-java-sdk-ddosdiversion/ChangeLog.txt b/aliyun-java-sdk-ddosdiversion/ChangeLog.txt new file mode 100644 index 0000000000..0b52ecfbd5 --- /dev/null +++ b/aliyun-java-sdk-ddosdiversion/ChangeLog.txt @@ -0,0 +1,3 @@ +2023-12-08 Version: 1.0.0 +- Sdk version release. + diff --git a/aliyun-java-sdk-ddosdiversion/pom.xml b/aliyun-java-sdk-ddosdiversion/pom.xml new file mode 100644 index 0000000000..381e7c421a --- /dev/null +++ b/aliyun-java-sdk-ddosdiversion/pom.xml @@ -0,0 +1,119 @@ + + + 4.0.0 + com.aliyun + aliyun-java-sdk-ddosdiversion + jar + 1.0.0 + aliyun-java-sdk-ddosdiversion + http://www.aliyun.com + Aliyun Open API SDK for Java +Copyright (C) Alibaba Cloud Computing +All rights reserved. +版权所有 (C)阿里云计算有限公司 +http://www.aliyun.com + + + sonatype-nexus-snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + com.aliyun + aliyun-java-sdk-core + true + [4.4.9,5.0.0) + + + com.google.code.gson + gson + 2.8.9 + + + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + scm:git:git://github.com/aliyun/aliyun-openapi-java-sdk.git + scm:git:git@github.com:aliyun/aliyun-openapi-java-sdk.git + https://github.com/aliyun/aliyun-openapi-java-sdk + + + + aliyunproducts + Aliyun SDK + aliyunsdk@aliyun.com + + + + + + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + UTF-8 + + + + org.apache.maven.plugins + maven-jar-plugin + 2.3.2 + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.10 + + -Dfile.encoding=UTF-8 + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.0 + + UTF-8 + none + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + sonatype-nexus-staging + https://s01.oss.sonatype.org/ + true + + + + + \ No newline at end of file diff --git a/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/ConfigNetStatusRequest.java b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/ConfigNetStatusRequest.java new file mode 100644 index 0000000000..8668712c0e --- /dev/null +++ b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/ConfigNetStatusRequest.java @@ -0,0 +1,106 @@ +/* + * 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.ddosdiversion.model.v20230701; + +import com.aliyuncs.RpcAcsRequest; +import java.util.List; +import com.aliyuncs.http.MethodType; + +/** + * @author auto create + * @version + */ +public class ConfigNetStatusRequest extends RpcAcsRequest { + + + private List regions; + + private List subNets; + + private String net; + + private String saleId; + + private String status; + public ConfigNetStatusRequest() { + super("DdosDiversion", "2023-07-01", "ConfigNetStatus"); + setMethod(MethodType.POST); + } + + public List getRegions() { + return this.regions; + } + + public void setRegions(List regions) { + this.regions = regions; + if (regions != null) { + for (int depth1 = 0; depth1 < regions.size(); depth1++) { + putQueryParameter("Regions." + (depth1 + 1) , regions.get(depth1)); + } + } + } + + public List getSubNets() { + return this.subNets; + } + + public void setSubNets(List subNets) { + this.subNets = subNets; + if (subNets != null) { + for (int depth1 = 0; depth1 < subNets.size(); depth1++) { + putQueryParameter("SubNets." + (depth1 + 1) , subNets.get(depth1)); + } + } + } + + public String getNet() { + return this.net; + } + + public void setNet(String net) { + this.net = net; + if(net != null){ + putQueryParameter("Net", net); + } + } + + public String getSaleId() { + return this.saleId; + } + + public void setSaleId(String saleId) { + this.saleId = saleId; + if(saleId != null){ + putQueryParameter("SaleId", saleId); + } + } + + public String getStatus() { + return this.status; + } + + public void setStatus(String status) { + this.status = status; + if(status != null){ + putQueryParameter("Status", status); + } + } + + @Override + public Class getResponseClass() { + return ConfigNetStatusResponse.class; + } + +} diff --git a/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/ConfigNetStatusResponse.java b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/ConfigNetStatusResponse.java new file mode 100644 index 0000000000..3ffa6ee75d --- /dev/null +++ b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/ConfigNetStatusResponse.java @@ -0,0 +1,66 @@ +/* + * 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.ddosdiversion.model.v20230701; + +import com.aliyuncs.AcsResponse; +import com.aliyuncs.ddosdiversion.transform.v20230701.ConfigNetStatusResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + +/** + * @author auto create + * @version + */ +public class ConfigNetStatusResponse extends AcsResponse { + + private Long code; + + private String requestId; + + private String message; + + public Long getCode() { + return this.code; + } + + public void setCode(Long code) { + this.code = code; + } + + public String getRequestId() { + return this.requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public ConfigNetStatusResponse getInstance(UnmarshallerContext context) { + return ConfigNetStatusResponseUnmarshaller.unmarshall(this, context); + } + + @Override + public boolean checkShowJsonItemName() { + return false; + } +} diff --git a/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/ListInstanceRequest.java b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/ListInstanceRequest.java new file mode 100644 index 0000000000..1655e6ee9d --- /dev/null +++ b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/ListInstanceRequest.java @@ -0,0 +1,101 @@ +/* + * 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.ddosdiversion.model.v20230701; + +import com.aliyuncs.RpcAcsRequest; +import com.aliyuncs.http.MethodType; + +/** + * @author auto create + * @version + */ +public class ListInstanceRequest extends RpcAcsRequest { + + + private Long num; + + private String saleId; + + private String name; + + private Long page; + + private String status; + public ListInstanceRequest() { + super("DdosDiversion", "2023-07-01", "ListInstance"); + setMethod(MethodType.POST); + } + + public Long getNum() { + return this.num; + } + + public void setNum(Long num) { + this.num = num; + if(num != null){ + putQueryParameter("Num", num.toString()); + } + } + + public String getSaleId() { + return this.saleId; + } + + public void setSaleId(String saleId) { + this.saleId = saleId; + if(saleId != null){ + putQueryParameter("SaleId", saleId); + } + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + if(name != null){ + putQueryParameter("Name", name); + } + } + + public Long getPage() { + return this.page; + } + + public void setPage(Long page) { + this.page = page; + if(page != null){ + putQueryParameter("Page", page.toString()); + } + } + + public String getStatus() { + return this.status; + } + + public void setStatus(String status) { + this.status = status; + if(status != null){ + putQueryParameter("Status", status); + } + } + + @Override + public Class getResponseClass() { + return ListInstanceResponse.class; + } + +} diff --git a/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/ListInstanceResponse.java b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/ListInstanceResponse.java new file mode 100644 index 0000000000..9065f4e867 --- /dev/null +++ b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/ListInstanceResponse.java @@ -0,0 +1,356 @@ +/* + * 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.ddosdiversion.model.v20230701; + +import java.util.List; +import com.aliyuncs.AcsResponse; +import com.aliyuncs.ddosdiversion.transform.v20230701.ListInstanceResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + +/** + * @author auto create + * @version + */ +public class ListInstanceResponse extends AcsResponse { + + private Long code; + + private String requestId; + + private String message; + + private List data; + + public Long getCode() { + return this.code; + } + + public void setCode(Long code) { + this.code = code; + } + + public String getRequestId() { + return this.requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public List getData() { + return this.data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataItem { + + private Long total; + + private Long page; + + private Long num; + + private List instances; + + public Long getTotal() { + return this.total; + } + + public void setTotal(Long total) { + this.total = total; + } + + public Long getPage() { + return this.page; + } + + public void setPage(Long page) { + this.page = page; + } + + public Long getNum() { + return this.num; + } + + public void setNum(Long num) { + this.num = num; + } + + public List getInstances() { + return this.instances; + } + + public void setInstances(List instances) { + this.instances = instances; + } + + public static class Data { + + private String userId; + + private String saleId; + + private String instanceId; + + private String name; + + private String status; + + private String comment; + + private String message; + + private String gmtExpire; + + private String gmtCreate; + + private String gmtModify; + + private Spec spec; + + public String getUserId() { + return this.userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getSaleId() { + return this.saleId; + } + + public void setSaleId(String saleId) { + this.saleId = saleId; + } + + public String getInstanceId() { + return this.instanceId; + } + + public void setInstanceId(String instanceId) { + this.instanceId = instanceId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStatus() { + return this.status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getComment() { + return this.comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public String getGmtExpire() { + return this.gmtExpire; + } + + public void setGmtExpire(String gmtExpire) { + this.gmtExpire = gmtExpire; + } + + public String getGmtCreate() { + return this.gmtCreate; + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getGmtModify() { + return this.gmtModify; + } + + public void setGmtModify(String gmtModify) { + this.gmtModify = gmtModify; + } + + public Spec getSpec() { + return this.spec; + } + + public void setSpec(Spec spec) { + this.spec = spec; + } + + public static class Spec { + + private String idcNumbers; + + private String normalBandwidth; + + private String ipSubnetNums; + + private String coverage; + + private String edition; + + private String mitigationCapacity; + + private String mitigationNums; + + private String diversionType; + + private String mitigationAnalysis; + + private String mitigationAnalysisCapacity; + + private String initialInstallation; + + private String initialQty; + + public String getIdcNumbers() { + return this.idcNumbers; + } + + public void setIdcNumbers(String idcNumbers) { + this.idcNumbers = idcNumbers; + } + + public String getNormalBandwidth() { + return this.normalBandwidth; + } + + public void setNormalBandwidth(String normalBandwidth) { + this.normalBandwidth = normalBandwidth; + } + + public String getIpSubnetNums() { + return this.ipSubnetNums; + } + + public void setIpSubnetNums(String ipSubnetNums) { + this.ipSubnetNums = ipSubnetNums; + } + + public String getCoverage() { + return this.coverage; + } + + public void setCoverage(String coverage) { + this.coverage = coverage; + } + + public String getEdition() { + return this.edition; + } + + public void setEdition(String edition) { + this.edition = edition; + } + + public String getMitigationCapacity() { + return this.mitigationCapacity; + } + + public void setMitigationCapacity(String mitigationCapacity) { + this.mitigationCapacity = mitigationCapacity; + } + + public String getMitigationNums() { + return this.mitigationNums; + } + + public void setMitigationNums(String mitigationNums) { + this.mitigationNums = mitigationNums; + } + + public String getDiversionType() { + return this.diversionType; + } + + public void setDiversionType(String diversionType) { + this.diversionType = diversionType; + } + + public String getMitigationAnalysis() { + return this.mitigationAnalysis; + } + + public void setMitigationAnalysis(String mitigationAnalysis) { + this.mitigationAnalysis = mitigationAnalysis; + } + + public String getMitigationAnalysisCapacity() { + return this.mitigationAnalysisCapacity; + } + + public void setMitigationAnalysisCapacity(String mitigationAnalysisCapacity) { + this.mitigationAnalysisCapacity = mitigationAnalysisCapacity; + } + + public String getInitialInstallation() { + return this.initialInstallation; + } + + public void setInitialInstallation(String initialInstallation) { + this.initialInstallation = initialInstallation; + } + + public String getInitialQty() { + return this.initialQty; + } + + public void setInitialQty(String initialQty) { + this.initialQty = initialQty; + } + } + } + } + + @Override + public ListInstanceResponse getInstance(UnmarshallerContext context) { + return ListInstanceResponseUnmarshaller.unmarshall(this, context); + } + + @Override + public boolean checkShowJsonItemName() { + return false; + } +} diff --git a/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/QueryNetListRequest.java b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/QueryNetListRequest.java new file mode 100644 index 0000000000..ac46af4e50 --- /dev/null +++ b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/QueryNetListRequest.java @@ -0,0 +1,114 @@ +/* + * 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.ddosdiversion.model.v20230701; + +import com.aliyuncs.RpcAcsRequest; +import com.aliyuncs.http.MethodType; + +/** + * @author auto create + * @version + */ +public class QueryNetListRequest extends RpcAcsRequest { + + + private Long num; + + private String mainNet; + + private String mode; + + private String net; + + private String saleId; + + private Long page; + public QueryNetListRequest() { + super("DdosDiversion", "2023-07-01", "QueryNetList"); + setMethod(MethodType.POST); + } + + public Long getNum() { + return this.num; + } + + public void setNum(Long num) { + this.num = num; + if(num != null){ + putQueryParameter("Num", num.toString()); + } + } + + public String getMainNet() { + return this.mainNet; + } + + public void setMainNet(String mainNet) { + this.mainNet = mainNet; + if(mainNet != null){ + putQueryParameter("MainNet", mainNet); + } + } + + public String getMode() { + return this.mode; + } + + public void setMode(String mode) { + this.mode = mode; + if(mode != null){ + putQueryParameter("Mode", mode); + } + } + + public String getNet() { + return this.net; + } + + public void setNet(String net) { + this.net = net; + if(net != null){ + putQueryParameter("Net", net); + } + } + + public String getSaleId() { + return this.saleId; + } + + public void setSaleId(String saleId) { + this.saleId = saleId; + if(saleId != null){ + putQueryParameter("SaleId", saleId); + } + } + + public Long getPage() { + return this.page; + } + + public void setPage(Long page) { + this.page = page; + if(page != null){ + putQueryParameter("Page", page.toString()); + } + } + + @Override + public Class getResponseClass() { + return QueryNetListResponse.class; + } + +} diff --git a/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/QueryNetListResponse.java b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/QueryNetListResponse.java new file mode 100644 index 0000000000..1847405d8b --- /dev/null +++ b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/model/v20230701/QueryNetListResponse.java @@ -0,0 +1,368 @@ +/* + * 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.ddosdiversion.model.v20230701; + +import java.util.List; +import com.aliyuncs.AcsResponse; +import com.aliyuncs.ddosdiversion.transform.v20230701.QueryNetListResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + +/** + * @author auto create + * @version + */ +public class QueryNetListResponse extends AcsResponse { + + private Long code; + + private String requestId; + + private String message; + + private List data; + + public Long getCode() { + return this.code; + } + + public void setCode(Long code) { + this.code = code; + } + + public String getRequestId() { + return this.requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public List getData() { + return this.data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataItem { + + private Long total; + + private Long page; + + private Long num; + + private List nets; + + public Long getTotal() { + return this.total; + } + + public void setTotal(Long total) { + this.total = total; + } + + public Long getPage() { + return this.page; + } + + public void setPage(Long page) { + this.page = page; + } + + public Long getNum() { + return this.num; + } + + public void setNum(Long num) { + this.num = num; + } + + public List getNets() { + return this.nets; + } + + public void setNets(List nets) { + this.nets = nets; + } + + public static class Data { + + private String userId; + + private String saleId; + + private String upstreamType; + + private String net; + + private String netType; + + private String mode; + + private Integer declaredState; + + private String gmtCreate; + + private String gmtModify; + + private Long netExtend; + + private Long fwdEffect; + + private String netMain; + + private List declared; + + private DDoSDefense dDoSDefense; + + public String getUserId() { + return this.userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getSaleId() { + return this.saleId; + } + + public void setSaleId(String saleId) { + this.saleId = saleId; + } + + public String getUpstreamType() { + return this.upstreamType; + } + + public void setUpstreamType(String upstreamType) { + this.upstreamType = upstreamType; + } + + public String getNet() { + return this.net; + } + + public void setNet(String net) { + this.net = net; + } + + public String getNetType() { + return this.netType; + } + + public void setNetType(String netType) { + this.netType = netType; + } + + public String getMode() { + return this.mode; + } + + public void setMode(String mode) { + this.mode = mode; + } + + public Integer getDeclaredState() { + return this.declaredState; + } + + public void setDeclaredState(Integer declaredState) { + this.declaredState = declaredState; + } + + public String getGmtCreate() { + return this.gmtCreate; + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getGmtModify() { + return this.gmtModify; + } + + public void setGmtModify(String gmtModify) { + this.gmtModify = gmtModify; + } + + public Long getNetExtend() { + return this.netExtend; + } + + public void setNetExtend(Long netExtend) { + this.netExtend = netExtend; + } + + public Long getFwdEffect() { + return this.fwdEffect; + } + + public void setFwdEffect(Long fwdEffect) { + this.fwdEffect = fwdEffect; + } + + public String getNetMain() { + return this.netMain; + } + + public void setNetMain(String netMain) { + this.netMain = netMain; + } + + public List getDeclared() { + return this.declared; + } + + public void setDeclared(List declared) { + this.declared = declared; + } + + public DDoSDefense getDDoSDefense() { + return this.dDoSDefense; + } + + public void setDDoSDefense(DDoSDefense dDoSDefense) { + this.dDoSDefense = dDoSDefense; + } + + public static class DeclaredItem { + + private String region; + + private String declared; + + public String getRegion() { + return this.region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getDeclared() { + return this.declared; + } + + public void setDeclared(String declared) { + this.declared = declared; + } + } + + public static class DDoSDefense { + + private DjPolicy djPolicy; + + private CleanTh cleanTh; + + private HoleTh holeTh; + + public DjPolicy getDjPolicy() { + return this.djPolicy; + } + + public void setDjPolicy(DjPolicy djPolicy) { + this.djPolicy = djPolicy; + } + + public CleanTh getCleanTh() { + return this.cleanTh; + } + + public void setCleanTh(CleanTh cleanTh) { + this.cleanTh = cleanTh; + } + + public HoleTh getHoleTh() { + return this.holeTh; + } + + public void setHoleTh(HoleTh holeTh) { + this.holeTh = holeTh; + } + + public static class DjPolicy { + + private String policyName; + + public String getPolicyName() { + return this.policyName; + } + + public void setPolicyName(String policyName) { + this.policyName = policyName; + } + } + + public static class CleanTh { + + private Integer mbps; + + private Integer pps; + + public Integer getMbps() { + return this.mbps; + } + + public void setMbps(Integer mbps) { + this.mbps = mbps; + } + + public Integer getPps() { + return this.pps; + } + + public void setPps(Integer pps) { + this.pps = pps; + } + } + + public static class HoleTh { + + private Integer threshMbps; + + public Integer getThreshMbps() { + return this.threshMbps; + } + + public void setThreshMbps(Integer threshMbps) { + this.threshMbps = threshMbps; + } + } + } + } + } + + @Override + public QueryNetListResponse getInstance(UnmarshallerContext context) { + return QueryNetListResponseUnmarshaller.unmarshall(this, context); + } + + @Override + public boolean checkShowJsonItemName() { + return false; + } +} diff --git a/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/transform/v20230701/ConfigNetStatusResponseUnmarshaller.java b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/transform/v20230701/ConfigNetStatusResponseUnmarshaller.java new file mode 100644 index 0000000000..2384150df0 --- /dev/null +++ b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/transform/v20230701/ConfigNetStatusResponseUnmarshaller.java @@ -0,0 +1,31 @@ +/* + * 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.ddosdiversion.transform.v20230701; + +import com.aliyuncs.ddosdiversion.model.v20230701.ConfigNetStatusResponse; +import com.aliyuncs.transform.UnmarshallerContext; + + +public class ConfigNetStatusResponseUnmarshaller { + + public static ConfigNetStatusResponse unmarshall(ConfigNetStatusResponse configNetStatusResponse, UnmarshallerContext _ctx) { + + configNetStatusResponse.setRequestId(_ctx.stringValue("ConfigNetStatusResponse.RequestId")); + configNetStatusResponse.setCode(_ctx.longValue("ConfigNetStatusResponse.Code")); + configNetStatusResponse.setMessage(_ctx.stringValue("ConfigNetStatusResponse.Message")); + + return configNetStatusResponse; + } +} \ No newline at end of file diff --git a/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/transform/v20230701/ListInstanceResponseUnmarshaller.java b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/transform/v20230701/ListInstanceResponseUnmarshaller.java new file mode 100644 index 0000000000..9ba85251e7 --- /dev/null +++ b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/transform/v20230701/ListInstanceResponseUnmarshaller.java @@ -0,0 +1,81 @@ +/* + * 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.ddosdiversion.transform.v20230701; + +import java.util.ArrayList; +import java.util.List; + +import com.aliyuncs.ddosdiversion.model.v20230701.ListInstanceResponse; +import com.aliyuncs.ddosdiversion.model.v20230701.ListInstanceResponse.DataItem; +import com.aliyuncs.ddosdiversion.model.v20230701.ListInstanceResponse.DataItem.Data; +import com.aliyuncs.ddosdiversion.model.v20230701.ListInstanceResponse.DataItem.Data.Spec; +import com.aliyuncs.transform.UnmarshallerContext; + + +public class ListInstanceResponseUnmarshaller { + + public static ListInstanceResponse unmarshall(ListInstanceResponse listInstanceResponse, UnmarshallerContext _ctx) { + + listInstanceResponse.setRequestId(_ctx.stringValue("ListInstanceResponse.RequestId")); + listInstanceResponse.setCode(_ctx.longValue("ListInstanceResponse.Code")); + listInstanceResponse.setMessage(_ctx.stringValue("ListInstanceResponse.Message")); + + List data = new ArrayList(); + for (int i = 0; i < _ctx.lengthValue("ListInstanceResponse.Data.Length"); i++) { + DataItem dataItem = new DataItem(); + dataItem.setTotal(_ctx.longValue("ListInstanceResponse.Data["+ i +"].Total")); + dataItem.setPage(_ctx.longValue("ListInstanceResponse.Data["+ i +"].Page")); + dataItem.setNum(_ctx.longValue("ListInstanceResponse.Data["+ i +"].Num")); + + List instances = new ArrayList(); + for (int j = 0; j < _ctx.lengthValue("ListInstanceResponse.Data["+ i +"].Instances.Length"); j++) { + Data data2 = new Data(); + data2.setUserId(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].UserId")); + data2.setSaleId(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].SaleId")); + data2.setInstanceId(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].InstanceId")); + data2.setName(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Name")); + data2.setStatus(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Status")); + data2.setComment(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Comment")); + data2.setMessage(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Message")); + data2.setGmtExpire(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].GmtExpire")); + data2.setGmtCreate(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].GmtCreate")); + data2.setGmtModify(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].GmtModify")); + + Spec spec = new Spec(); + spec.setIdcNumbers(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Spec.IdcNumbers")); + spec.setNormalBandwidth(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Spec.NormalBandwidth")); + spec.setIpSubnetNums(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Spec.IpSubnetNums")); + spec.setCoverage(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Spec.Coverage")); + spec.setEdition(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Spec.Edition")); + spec.setMitigationCapacity(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Spec.MitigationCapacity")); + spec.setMitigationNums(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Spec.MitigationNums")); + spec.setDiversionType(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Spec.DiversionType")); + spec.setMitigationAnalysis(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Spec.MitigationAnalysis")); + spec.setMitigationAnalysisCapacity(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Spec.MitigationAnalysisCapacity")); + spec.setInitialInstallation(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Spec.InitialInstallation")); + spec.setInitialQty(_ctx.stringValue("ListInstanceResponse.Data["+ i +"].Instances["+ j +"].Spec.InitialQty")); + data2.setSpec(spec); + + instances.add(data2); + } + dataItem.setInstances(instances); + + data.add(dataItem); + } + listInstanceResponse.setData(data); + + return listInstanceResponse; + } +} \ No newline at end of file diff --git a/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/transform/v20230701/QueryNetListResponseUnmarshaller.java b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/transform/v20230701/QueryNetListResponseUnmarshaller.java new file mode 100644 index 0000000000..fc60765703 --- /dev/null +++ b/aliyun-java-sdk-ddosdiversion/src/main/java/com/aliyuncs/ddosdiversion/transform/v20230701/QueryNetListResponseUnmarshaller.java @@ -0,0 +1,98 @@ +/* + * 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.ddosdiversion.transform.v20230701; + +import java.util.ArrayList; +import java.util.List; + +import com.aliyuncs.ddosdiversion.model.v20230701.QueryNetListResponse; +import com.aliyuncs.ddosdiversion.model.v20230701.QueryNetListResponse.DataItem; +import com.aliyuncs.ddosdiversion.model.v20230701.QueryNetListResponse.DataItem.Data; +import com.aliyuncs.ddosdiversion.model.v20230701.QueryNetListResponse.DataItem.Data.DDoSDefense; +import com.aliyuncs.ddosdiversion.model.v20230701.QueryNetListResponse.DataItem.Data.DDoSDefense.CleanTh; +import com.aliyuncs.ddosdiversion.model.v20230701.QueryNetListResponse.DataItem.Data.DDoSDefense.DjPolicy; +import com.aliyuncs.ddosdiversion.model.v20230701.QueryNetListResponse.DataItem.Data.DDoSDefense.HoleTh; +import com.aliyuncs.ddosdiversion.model.v20230701.QueryNetListResponse.DataItem.Data.DeclaredItem; +import com.aliyuncs.transform.UnmarshallerContext; + + +public class QueryNetListResponseUnmarshaller { + + public static QueryNetListResponse unmarshall(QueryNetListResponse queryNetListResponse, UnmarshallerContext _ctx) { + + queryNetListResponse.setRequestId(_ctx.stringValue("QueryNetListResponse.RequestId")); + queryNetListResponse.setCode(_ctx.longValue("QueryNetListResponse.Code")); + queryNetListResponse.setMessage(_ctx.stringValue("QueryNetListResponse.Message")); + + List data = new ArrayList(); + for (int i = 0; i < _ctx.lengthValue("QueryNetListResponse.Data.Length"); i++) { + DataItem dataItem = new DataItem(); + dataItem.setTotal(_ctx.longValue("QueryNetListResponse.Data["+ i +"].Total")); + dataItem.setPage(_ctx.longValue("QueryNetListResponse.Data["+ i +"].Page")); + dataItem.setNum(_ctx.longValue("QueryNetListResponse.Data["+ i +"].Num")); + + List nets = new ArrayList(); + for (int j = 0; j < _ctx.lengthValue("QueryNetListResponse.Data["+ i +"].Nets.Length"); j++) { + Data data2 = new Data(); + data2.setUserId(_ctx.stringValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].UserId")); + data2.setSaleId(_ctx.stringValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].SaleId")); + data2.setUpstreamType(_ctx.stringValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].UpstreamType")); + data2.setNet(_ctx.stringValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].Net")); + data2.setNetType(_ctx.stringValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].NetType")); + data2.setMode(_ctx.stringValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].Mode")); + data2.setDeclaredState(_ctx.integerValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].DeclaredState")); + data2.setGmtCreate(_ctx.stringValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].GmtCreate")); + data2.setGmtModify(_ctx.stringValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].GmtModify")); + data2.setNetExtend(_ctx.longValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].NetExtend")); + data2.setFwdEffect(_ctx.longValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].FwdEffect")); + data2.setNetMain(_ctx.stringValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].NetMain")); + + DDoSDefense dDoSDefense = new DDoSDefense(); + + DjPolicy djPolicy = new DjPolicy(); + djPolicy.setPolicyName(_ctx.stringValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].DDoSDefense.DjPolicy.PolicyName")); + dDoSDefense.setDjPolicy(djPolicy); + + CleanTh cleanTh = new CleanTh(); + cleanTh.setMbps(_ctx.integerValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].DDoSDefense.CleanTh.Mbps")); + cleanTh.setPps(_ctx.integerValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].DDoSDefense.CleanTh.Pps")); + dDoSDefense.setCleanTh(cleanTh); + + HoleTh holeTh = new HoleTh(); + holeTh.setThreshMbps(_ctx.integerValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].DDoSDefense.HoleTh.ThreshMbps")); + dDoSDefense.setHoleTh(holeTh); + data2.setDDoSDefense(dDoSDefense); + + List declared = new ArrayList(); + for (int k = 0; k < _ctx.lengthValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].Declared.Length"); k++) { + DeclaredItem declaredItem = new DeclaredItem(); + declaredItem.setRegion(_ctx.stringValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].Declared["+ k +"].Region")); + declaredItem.setDeclared(_ctx.stringValue("QueryNetListResponse.Data["+ i +"].Nets["+ j +"].Declared["+ k +"].Declared")); + + declared.add(declaredItem); + } + data2.setDeclared(declared); + + nets.add(data2); + } + dataItem.setNets(nets); + + data.add(dataItem); + } + queryNetListResponse.setData(data); + + return queryNetListResponse; + } +} \ No newline at end of file