Skip to content

Commit

Permalink
Add UsageMetric.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed Jun 30, 2024
1 parent b8babba commit 6abf2bb
Show file tree
Hide file tree
Showing 20 changed files with 794 additions and 17 deletions.
3 changes: 3 additions & 0 deletions aliyun-java-sdk-quotas/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-06-30 Version: 1.0.3
- Add UsageMetric.

2023-09-18 Version: 1.0.2
Support QuotaApplications For Template.

Expand Down
2 changes: 1 addition & 1 deletion aliyun-java-sdk-quotas/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-quotas</artifactId>
<packaging>jar</packaging>
<version>1.0.2</version>
<version>1.0.3</version>
<name>aliyun-java-sdk-quotas</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
Expand Up @@ -29,6 +29,8 @@ public class CreateQuotaApplicationsForTemplateResponse extends AcsResponse {

private String batchQuotaApplicationId;

private List<FailResultsItem> failResults;

private List<String> aliyunUids;

public String getRequestId() {
Expand All @@ -47,6 +49,14 @@ public void setBatchQuotaApplicationId(String batchQuotaApplicationId) {
this.batchQuotaApplicationId = batchQuotaApplicationId;
}

public List<FailResultsItem> getFailResults() {
return this.failResults;
}

public void setFailResults(List<FailResultsItem> failResults) {
this.failResults = failResults;
}

public List<String> getAliyunUids() {
return this.aliyunUids;
}
Expand All @@ -55,6 +65,29 @@ public void setAliyunUids(List<String> aliyunUids) {
this.aliyunUids = aliyunUids;
}

public static class FailResultsItem {

private String aliyunUid;

private String reason;

public String getAliyunUid() {
return this.aliyunUid;
}

public void setAliyunUid(String aliyunUid) {
this.aliyunUid = aliyunUid;
}

public String getReason() {
return this.reason;
}

public void setReason(String reason) {
this.reason = reason;
}
}

@Override
public CreateQuotaApplicationsForTemplateResponse getInstance(UnmarshallerContext context) {
return CreateQuotaApplicationsForTemplateResponseUnmarshaller.unmarshall(this, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public static class Quota {

private String applyReasonTips;

private Boolean globalQuota;

private List<QuotaItemsItem> quotaItems;

private List<Float> applicableRange;
Expand All @@ -92,6 +94,8 @@ public static class Quota {

private Period period;

private UsageMetric usageMetric;

public String getQuotaUnit() {
return this.quotaUnit;
}
Expand Down Expand Up @@ -236,6 +240,14 @@ public void setApplyReasonTips(String applyReasonTips) {
this.applyReasonTips = applyReasonTips;
}

public Boolean getGlobalQuota() {
return this.globalQuota;
}

public void setGlobalQuota(Boolean globalQuota) {
this.globalQuota = globalQuota;
}

public List<QuotaItemsItem> getQuotaItems() {
return this.quotaItems;
}
Expand Down Expand Up @@ -268,6 +280,14 @@ public void setPeriod(Period period) {
this.period = period;
}

public UsageMetric getUsageMetric() {
return this.usageMetric;
}

public void setUsageMetric(UsageMetric usageMetric) {
this.usageMetric = usageMetric;
}

public static class QuotaItemsItem {

private String type;
Expand Down Expand Up @@ -333,6 +353,39 @@ public void setPeriodUnit(String periodUnit) {
this.periodUnit = periodUnit;
}
}

public static class UsageMetric {

private String metricNamespace;

private String metricName;

private Map<Object,Object> metricDimensions;

public String getMetricNamespace() {
return this.metricNamespace;
}

public void setMetricNamespace(String metricNamespace) {
this.metricNamespace = metricNamespace;
}

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

public void setMetricName(String metricName) {
this.metricName = metricName;
}

public Map<Object,Object> getMetricDimensions() {
return this.metricDimensions;
}

public void setMetricDimensions(Map<Object,Object> metricDimensions) {
this.metricDimensions = metricDimensions;
}
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* 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.quotas.model.v20200510;

import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.quotas.Endpoint;

/**
* @author auto create
* @version
*/
public class GetQuotaApplicationApprovalRequest extends RpcAcsRequest<GetQuotaApplicationApprovalResponse> {


private String applicationId;
public GetQuotaApplicationApprovalRequest() {
super("quotas", "2020-05-10", "GetQuotaApplicationApproval", "quotas");
setMethod(MethodType.POST);
try {
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
} catch (Exception e) {}
}

public String getApplicationId() {
return this.applicationId;
}

public void setApplicationId(String applicationId) {
this.applicationId = applicationId;
if(applicationId != null){
putBodyParameter("ApplicationId", applicationId);
}
}

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

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

import java.util.List;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.quotas.transform.v20200510.GetQuotaApplicationApprovalResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;

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

private String requestId;

private Integer httpStatusCode;

private String dynamicCode;

private String dynamicMessage;

private String errorMsg;

private String errorCode;

private Boolean success;

private Boolean allowRetry;

private List<String> errorArgs;

private Module module;

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

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

public Integer getHttpStatusCode() {
return this.httpStatusCode;
}

public void setHttpStatusCode(Integer httpStatusCode) {
this.httpStatusCode = httpStatusCode;
}

public String getDynamicCode() {
return this.dynamicCode;
}

public void setDynamicCode(String dynamicCode) {
this.dynamicCode = dynamicCode;
}

public String getDynamicMessage() {
return this.dynamicMessage;
}

public void setDynamicMessage(String dynamicMessage) {
this.dynamicMessage = dynamicMessage;
}

public String getErrorMsg() {
return this.errorMsg;
}

public void setErrorMsg(String errorMsg) {
this.errorMsg = errorMsg;
}

public String getErrorCode() {
return this.errorCode;
}

public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}

public Boolean getSuccess() {
return this.success;
}

public void setSuccess(Boolean success) {
this.success = success;
}

public Boolean getAllowRetry() {
return this.allowRetry;
}

public void setAllowRetry(Boolean allowRetry) {
this.allowRetry = allowRetry;
}

public List<String> getErrorArgs() {
return this.errorArgs;
}

public void setErrorArgs(List<String> errorArgs) {
this.errorArgs = errorArgs;
}

public Module getModule() {
return this.module;
}

public void setModule(Module module) {
this.module = module;
}

public static class Module {

private Integer approvalHours;

private Boolean supportReminder;

private String unsupportReminderReason;

private Integer reminderIntervalHours;

public Integer getApprovalHours() {
return this.approvalHours;
}

public void setApprovalHours(Integer approvalHours) {
this.approvalHours = approvalHours;
}

public Boolean getSupportReminder() {
return this.supportReminder;
}

public void setSupportReminder(Boolean supportReminder) {
this.supportReminder = supportReminder;
}

public String getUnsupportReminderReason() {
return this.unsupportReminderReason;
}

public void setUnsupportReminderReason(String unsupportReminderReason) {
this.unsupportReminderReason = unsupportReminderReason;
}

public Integer getReminderIntervalHours() {
return this.reminderIntervalHours;
}

public void setReminderIntervalHours(Integer reminderIntervalHours) {
this.reminderIntervalHours = reminderIntervalHours;
}
}

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

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

0 comments on commit 6abf2bb

Please sign in to comment.