package com.muse.dto; import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.muse.dto.UsageSummaryByDateInner; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.springframework.lang.Nullable; import java.io.Serializable; import java.time.OffsetDateTime; import jakarta.validation.Valid; import jakarta.validation.constraints.*; import io.swagger.v3.oas.annotations.media.Schema; import java.util.*; import jakarta.annotation.Generated; /** * UsageSummary */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-05-24T14:16:55.032756+08:00[Asia/Shanghai]", comments = "Generator version: 7.22.0") public class UsageSummary implements Serializable { private static final long serialVersionUID = 1L; private @Nullable Integer totalTokens; private @Nullable Integer totalGenerations; private @Nullable Object byModel; @Valid private List<@Valid UsageSummaryByDateInner> byDate = new ArrayList<>(); public UsageSummary totalTokens(@Nullable Integer totalTokens) { this.totalTokens = totalTokens; return this; } /** * Get totalTokens * @return totalTokens */ @Schema(name = "totalTokens", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("totalTokens") public @Nullable Integer getTotalTokens() { return totalTokens; } @JsonProperty("totalTokens") public void setTotalTokens(@Nullable Integer totalTokens) { this.totalTokens = totalTokens; } public UsageSummary totalGenerations(@Nullable Integer totalGenerations) { this.totalGenerations = totalGenerations; return this; } /** * Get totalGenerations * @return totalGenerations */ @Schema(name = "totalGenerations", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("totalGenerations") public @Nullable Integer getTotalGenerations() { return totalGenerations; } @JsonProperty("totalGenerations") public void setTotalGenerations(@Nullable Integer totalGenerations) { this.totalGenerations = totalGenerations; } public UsageSummary byModel(@Nullable Object byModel) { this.byModel = byModel; return this; } /** * 按模型的用量分布 * @return byModel */ @Schema(name = "byModel", description = "按模型的用量分布", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("byModel") public @Nullable Object getByModel() { return byModel; } @JsonProperty("byModel") public void setByModel(@Nullable Object byModel) { this.byModel = byModel; } public UsageSummary byDate(List<@Valid UsageSummaryByDateInner> byDate) { this.byDate = byDate; return this; } public UsageSummary addByDateItem(UsageSummaryByDateInner byDateItem) { if (this.byDate == null) { this.byDate = new ArrayList<>(); } this.byDate.add(byDateItem); return this; } /** * Get byDate * @return byDate */ @Valid @Schema(name = "byDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("byDate") public List<@Valid UsageSummaryByDateInner> getByDate() { return byDate; } @JsonProperty("byDate") public void setByDate(List<@Valid UsageSummaryByDateInner> byDate) { this.byDate = byDate; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } UsageSummary usageSummary = (UsageSummary) o; return Objects.equals(this.totalTokens, usageSummary.totalTokens) && Objects.equals(this.totalGenerations, usageSummary.totalGenerations) && Objects.equals(this.byModel, usageSummary.byModel) && Objects.equals(this.byDate, usageSummary.byDate); } @Override public int hashCode() { return Objects.hash(totalTokens, totalGenerations, byModel, byDate); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageSummary {\n"); sb.append(" totalTokens: ").append(toIndentedString(totalTokens)).append("\n"); sb.append(" totalGenerations: ").append(toIndentedString(totalGenerations)).append("\n"); sb.append(" byModel: ").append(toIndentedString(byModel)).append("\n"); sb.append(" byDate: ").append(toIndentedString(byDate)).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(@Nullable Object o) { return o == null ? "null" : o.toString().replace("\n", "\n "); } }