Skip to content

Commit

Permalink
Publish Api:GetNisNetworkRanking
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed Jul 4, 2024
1 parent 62280a5 commit de947b0
Show file tree
Hide file tree
Showing 8 changed files with 1,005 additions and 1 deletion.
4 changes: 4 additions & 0 deletions aliyun-java-sdk-nis/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2024-07-04 Version: 1.0.2
- Publish Api:GetNisNetworkRanking
- Publish Api:GetNisNetworkMetrics

2024-04-10 Version: 1.0.1
- Optimize GetInternetTuple API.
- Optimize CreateNetworkPath API.
Expand Down
2 changes: 1 addition & 1 deletion aliyun-java-sdk-nis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-nis</artifactId>
<packaging>jar</packaging>
<version>1.0.1</version>
<version>1.0.2</version>
<name>aliyun-java-sdk-nis</name>
<url>http://www.aliyun.com</url>
<description>Aliyun Open API SDK for Java
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
/*
* 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.nis.model.v20211216;

import com.aliyuncs.RpcAcsRequest;
import java.util.List;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import com.aliyuncs.http.MethodType;

/**
* @author auto create
* @version
*/
public class GetNisNetworkMetricsRequest extends RpcAcsRequest<GetNisNetworkMetricsResponse> {


private Boolean useCrossAccount;

private String scanBy;

private String metricName;

private Long endTime;

private Long beginTime;

private String resourceType;

private String regionNo;

private List<String> accountIdss;

@SerializedName("dimensions")
private List<Dimensions> dimensions;
public GetNisNetworkMetricsRequest() {
super("nis", "2021-12-16", "GetNisNetworkMetrics", "networkana");
setMethod(MethodType.POST);
}

public Boolean getUseCrossAccount() {
return this.useCrossAccount;
}

public void setUseCrossAccount(Boolean useCrossAccount) {
this.useCrossAccount = useCrossAccount;
if(useCrossAccount != null){
putQueryParameter("UseCrossAccount", useCrossAccount.toString());
}
}

public String getScanBy() {
return this.scanBy;
}

public void setScanBy(String scanBy) {
this.scanBy = scanBy;
if(scanBy != null){
putQueryParameter("ScanBy", scanBy);
}
}

public String getMetricName() {
return this.metricName;
}

public void setMetricName(String metricName) {
this.metricName = metricName;
if(metricName != null){
putQueryParameter("MetricName", metricName);
}
}

public Long getEndTime() {
return this.endTime;
}

public void setEndTime(Long endTime) {
this.endTime = endTime;
if(endTime != null){
putQueryParameter("EndTime", endTime.toString());
}
}

public Long getBeginTime() {
return this.beginTime;
}

public void setBeginTime(Long beginTime) {
this.beginTime = beginTime;
if(beginTime != null){
putQueryParameter("BeginTime", beginTime.toString());
}
}

public String getResourceType() {
return this.resourceType;
}

public void setResourceType(String resourceType) {
this.resourceType = resourceType;
if(resourceType != null){
putQueryParameter("ResourceType", resourceType);
}
}

public String getRegionNo() {
return this.regionNo;
}

public void setRegionNo(String regionNo) {
this.regionNo = regionNo;
if(regionNo != null){
putQueryParameter("RegionNo", regionNo);
}
}

public List<String> getAccountIdss() {
return this.accountIdss;
}

public void setAccountIdss(List<String> accountIdss) {
this.accountIdss = accountIdss;
if (accountIdss != null) {
for (int i = 0; i < accountIdss.size(); i++) {
putQueryParameter("AccountIds." + (i + 1) , accountIdss.get(i));
}
}
}

public List<Dimensions> getDimensions() {
return this.dimensions;
}

public void setDimensions(List<Dimensions> dimensions) {
this.dimensions = dimensions;
if (dimensions != null) {
putQueryParameter("Dimensions" , new Gson().toJson(dimensions));
}
}

public static class Dimensions {

@SerializedName("Name")
private String name;

@SerializedName("Value")
private String value;

public String getName() {
return this.name;
}

public void setName(String name) {
this.name = name;
}

public String getValue() {
return this.value;
}

public void setValue(String value) {
this.value = value;
}
}

@Override
public Class<GetNisNetworkMetricsResponse> getResponseClass() {
return GetNisNetworkMetricsResponse.class;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/*
* 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.nis.model.v20211216;

import java.util.List;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.nis.transform.v20211216.GetNisNetworkMetricsResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;

/**
* @author auto create
* @version
*/
public class GetNisNetworkMetricsResponse extends AcsResponse {

private String requestId;

private Data data;

public String getRequestId() {
return this.requestId;
}

public void setRequestId(String requestId) {
this.requestId = requestId;
}

public Data getData() {
return this.data;
}

public void setData(Data data) {
this.data = data;
}

public static class Data {

private String unit;

private List<MetricsItem> metrics;

public String getUnit() {
return this.unit;
}

public void setUnit(String unit) {
this.unit = unit;
}

public List<MetricsItem> getMetrics() {
return this.metrics;
}

public void setMetrics(List<MetricsItem> metrics) {
this.metrics = metrics;
}

public static class MetricsItem {

private Long timeStamp;

private Double value;

public Long getTimeStamp() {
return this.timeStamp;
}

public void setTimeStamp(Long timeStamp) {
this.timeStamp = timeStamp;
}

public Double getValue() {
return this.value;
}

public void setValue(Double value) {
this.value = value;
}
}
}

@Override
public GetNisNetworkMetricsResponse getInstance(UnmarshallerContext context) {
return GetNisNetworkMetricsResponseUnmarshaller.unmarshall(this, context);
}

@Override
public boolean checkShowJsonItemName() {
return false;
}
}
Loading

0 comments on commit de947b0

Please sign in to comment.