206 lines
5.8 KiB
Java
206 lines
5.8 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 com.fasterxml.jackson.annotation.JsonValue;
|
|
import java.time.OffsetDateTime;
|
|
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;
|
|
|
|
/**
|
|
* 权益摘要
|
|
*/
|
|
|
|
@Schema(name = "CurrentUserSummary_entitlementSummary", description = "权益摘要")
|
|
@JsonTypeName("CurrentUserSummary_entitlementSummary")
|
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-05-24T16:47:40.290595+08:00[Asia/Shanghai]", comments = "Generator version: 7.22.0")
|
|
public class CurrentUserSummaryEntitlementSummary implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private @Nullable String planName;
|
|
|
|
private @Nullable Integer remainingQuota;
|
|
|
|
/**
|
|
* 配额状态
|
|
*/
|
|
public enum QuotaStatusEnum {
|
|
NORMAL("normal"),
|
|
|
|
LOW("low"),
|
|
|
|
EXHAUSTED("exhausted"),
|
|
|
|
EXPIRED("expired");
|
|
|
|
private final String value;
|
|
|
|
QuotaStatusEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static QuotaStatusEnum fromValue(String value) {
|
|
for (QuotaStatusEnum b : QuotaStatusEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private @Nullable QuotaStatusEnum quotaStatus;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private @Nullable OffsetDateTime expiresAt;
|
|
|
|
public CurrentUserSummaryEntitlementSummary planName(@Nullable String planName) {
|
|
this.planName = planName;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 当前套餐名
|
|
* @return planName
|
|
*/
|
|
|
|
@Schema(name = "planName", description = "当前套餐名", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("planName")
|
|
public @Nullable String getPlanName() {
|
|
return planName;
|
|
}
|
|
|
|
@JsonProperty("planName")
|
|
public void setPlanName(@Nullable String planName) {
|
|
this.planName = planName;
|
|
}
|
|
|
|
public CurrentUserSummaryEntitlementSummary remainingQuota(@Nullable Integer remainingQuota) {
|
|
this.remainingQuota = remainingQuota;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 剩余配额
|
|
* @return remainingQuota
|
|
*/
|
|
|
|
@Schema(name = "remainingQuota", description = "剩余配额", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("remainingQuota")
|
|
public @Nullable Integer getRemainingQuota() {
|
|
return remainingQuota;
|
|
}
|
|
|
|
@JsonProperty("remainingQuota")
|
|
public void setRemainingQuota(@Nullable Integer remainingQuota) {
|
|
this.remainingQuota = remainingQuota;
|
|
}
|
|
|
|
public CurrentUserSummaryEntitlementSummary quotaStatus(@Nullable QuotaStatusEnum quotaStatus) {
|
|
this.quotaStatus = quotaStatus;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 配额状态
|
|
* @return quotaStatus
|
|
*/
|
|
|
|
@Schema(name = "quotaStatus", description = "配额状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("quotaStatus")
|
|
public @Nullable QuotaStatusEnum getQuotaStatus() {
|
|
return quotaStatus;
|
|
}
|
|
|
|
@JsonProperty("quotaStatus")
|
|
public void setQuotaStatus(@Nullable QuotaStatusEnum quotaStatus) {
|
|
this.quotaStatus = quotaStatus;
|
|
}
|
|
|
|
public CurrentUserSummaryEntitlementSummary expiresAt(@Nullable OffsetDateTime expiresAt) {
|
|
this.expiresAt = expiresAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 权益到期时间
|
|
* @return expiresAt
|
|
*/
|
|
@Valid
|
|
@Schema(name = "expiresAt", description = "权益到期时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("expiresAt")
|
|
public @Nullable OffsetDateTime getExpiresAt() {
|
|
return expiresAt;
|
|
}
|
|
|
|
@JsonProperty("expiresAt")
|
|
public void setExpiresAt(@Nullable OffsetDateTime expiresAt) {
|
|
this.expiresAt = expiresAt;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
CurrentUserSummaryEntitlementSummary currentUserSummaryEntitlementSummary = (CurrentUserSummaryEntitlementSummary) o;
|
|
return Objects.equals(this.planName, currentUserSummaryEntitlementSummary.planName) &&
|
|
Objects.equals(this.remainingQuota, currentUserSummaryEntitlementSummary.remainingQuota) &&
|
|
Objects.equals(this.quotaStatus, currentUserSummaryEntitlementSummary.quotaStatus) &&
|
|
Objects.equals(this.expiresAt, currentUserSummaryEntitlementSummary.expiresAt);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(planName, remainingQuota, quotaStatus, expiresAt);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class CurrentUserSummaryEntitlementSummary {\n");
|
|
sb.append(" planName: ").append(toIndentedString(planName)).append("\n");
|
|
sb.append(" remainingQuota: ").append(toIndentedString(remainingQuota)).append("\n");
|
|
sb.append(" quotaStatus: ").append(toIndentedString(quotaStatus)).append("\n");
|
|
sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).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 ");
|
|
}
|
|
}
|
|
|