使用 openapi-generator-cli 7.22.0 + spring generator 生成 包含:Block/Chapter/Work/Candidate/Generation/Entitlement/Quota 等
140 lines
3.7 KiB
Java
140 lines
3.7 KiB
Java
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.fasterxml.jackson.annotation.JsonTypeName;
|
|
import java.time.LocalDate;
|
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
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;
|
|
|
|
/**
|
|
* UsageSummaryByDateInner
|
|
*/
|
|
|
|
@JsonTypeName("UsageSummary_byDate_inner")
|
|
@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 UsageSummaryByDateInner implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
|
|
private @Nullable LocalDate date;
|
|
|
|
private @Nullable Integer tokens;
|
|
|
|
private @Nullable Integer generations;
|
|
|
|
public UsageSummaryByDateInner date(@Nullable LocalDate date) {
|
|
this.date = date;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get date
|
|
* @return date
|
|
*/
|
|
@Valid
|
|
@Schema(name = "date", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("date")
|
|
public @Nullable LocalDate getDate() {
|
|
return date;
|
|
}
|
|
|
|
@JsonProperty("date")
|
|
public void setDate(@Nullable LocalDate date) {
|
|
this.date = date;
|
|
}
|
|
|
|
public UsageSummaryByDateInner tokens(@Nullable Integer tokens) {
|
|
this.tokens = tokens;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get tokens
|
|
* @return tokens
|
|
*/
|
|
|
|
@Schema(name = "tokens", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("tokens")
|
|
public @Nullable Integer getTokens() {
|
|
return tokens;
|
|
}
|
|
|
|
@JsonProperty("tokens")
|
|
public void setTokens(@Nullable Integer tokens) {
|
|
this.tokens = tokens;
|
|
}
|
|
|
|
public UsageSummaryByDateInner generations(@Nullable Integer generations) {
|
|
this.generations = generations;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get generations
|
|
* @return generations
|
|
*/
|
|
|
|
@Schema(name = "generations", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("generations")
|
|
public @Nullable Integer getGenerations() {
|
|
return generations;
|
|
}
|
|
|
|
@JsonProperty("generations")
|
|
public void setGenerations(@Nullable Integer generations) {
|
|
this.generations = generations;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
UsageSummaryByDateInner usageSummaryByDateInner = (UsageSummaryByDateInner) o;
|
|
return Objects.equals(this.date, usageSummaryByDateInner.date) &&
|
|
Objects.equals(this.tokens, usageSummaryByDateInner.tokens) &&
|
|
Objects.equals(this.generations, usageSummaryByDateInner.generations);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(date, tokens, generations);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class UsageSummaryByDateInner {\n");
|
|
sb.append(" date: ").append(toIndentedString(date)).append("\n");
|
|
sb.append(" tokens: ").append(toIndentedString(tokens)).append("\n");
|
|
sb.append(" generations: ").append(toIndentedString(generations)).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 ");
|
|
}
|
|
}
|
|
|