
com.huaweicloud.sdk.functiongraph.v2.model.ListStatisticsResponse Maven / Gradle / Ivy
package com.huaweicloud.sdk.functiongraph.v2.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.huaweicloud.sdk.core.SdkResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;
/** Response Object */
public class ListStatisticsResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "count")
private List count = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "gbs")
private List gbs = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "statistics")
private ListFunctionStatisticsResponseBody statistics;
public ListStatisticsResponse withCount(List count) {
this.count = count;
return this;
}
public ListStatisticsResponse addCountItem(MonthUsed countItem) {
if (this.count == null) {
this.count = new ArrayList<>();
}
this.count.add(countItem);
return this;
}
public ListStatisticsResponse withCount(Consumer> countSetter) {
if (this.count == null) {
this.count = new ArrayList<>();
}
countSetter.accept(this.count);
return this;
}
/** 月度调用次数
*
* @return count */
public List getCount() {
return count;
}
public void setCount(List count) {
this.count = count;
}
public ListStatisticsResponse withGbs(List gbs) {
this.gbs = gbs;
return this;
}
public ListStatisticsResponse addGbsItem(MonthUsed gbsItem) {
if (this.gbs == null) {
this.gbs = new ArrayList<>();
}
this.gbs.add(gbsItem);
return this;
}
public ListStatisticsResponse withGbs(Consumer> gbsSetter) {
if (this.gbs == null) {
this.gbs = new ArrayList<>();
}
gbsSetter.accept(this.gbs);
return this;
}
/** 月度资源用量
*
* @return gbs */
public List getGbs() {
return gbs;
}
public void setGbs(List gbs) {
this.gbs = gbs;
}
public ListStatisticsResponse withStatistics(ListFunctionStatisticsResponseBody statistics) {
this.statistics = statistics;
return this;
}
public ListStatisticsResponse withStatistics(Consumer statisticsSetter) {
if (this.statistics == null) {
this.statistics = new ListFunctionStatisticsResponseBody();
statisticsSetter.accept(this.statistics);
}
return this;
}
/** Get statistics
*
* @return statistics */
public ListFunctionStatisticsResponseBody getStatistics() {
return statistics;
}
public void setStatistics(ListFunctionStatisticsResponseBody statistics) {
this.statistics = statistics;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ListStatisticsResponse listStatisticsResponse = (ListStatisticsResponse) o;
return Objects.equals(this.count, listStatisticsResponse.count)
&& Objects.equals(this.gbs, listStatisticsResponse.gbs)
&& Objects.equals(this.statistics, listStatisticsResponse.statistics);
}
@Override
public int hashCode() {
return Objects.hash(count, gbs, statistics);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ListStatisticsResponse {\n");
sb.append(" count: ").append(toIndentedString(count)).append("\n");
sb.append(" gbs: ").append(toIndentedString(gbs)).append("\n");
sb.append(" statistics: ").append(toIndentedString(statistics)).append("\n");
sb.append("}");
return sb.toString();
}
/** Convert the given object to string with each line indented by 4 spaces (except the first line). */
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy