250 lines
7.4 KiB
Java
250 lines
7.4 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.muse.dto.Entitlement;
|
|
import com.muse.dto.Quota;
|
|
import java.time.OffsetDateTime;
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
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 = "AdminUserEntitlementDetail", description = "管理端用户权益和配额详情")
|
|
@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 AdminUserEntitlementDetail implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String userId;
|
|
|
|
@Valid
|
|
private List<@Valid Entitlement> entitlements = new ArrayList<>();
|
|
|
|
@Valid
|
|
private List<@Valid Quota> quotas = new ArrayList<>();
|
|
|
|
private @Nullable String entitlementSource;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private @Nullable OffsetDateTime lastModifiedAt;
|
|
|
|
private @Nullable String lastModifiedBy;
|
|
|
|
public AdminUserEntitlementDetail() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public AdminUserEntitlementDetail(String userId, List<@Valid Entitlement> entitlements, List<@Valid Quota> quotas) {
|
|
this.userId = userId;
|
|
this.entitlements = entitlements;
|
|
this.quotas = quotas;
|
|
}
|
|
|
|
public AdminUserEntitlementDetail userId(String userId) {
|
|
this.userId = userId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 用户 ID
|
|
* @return userId
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "userId", description = "用户 ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("userId")
|
|
public String getUserId() {
|
|
return userId;
|
|
}
|
|
|
|
@JsonProperty("userId")
|
|
public void setUserId(String userId) {
|
|
this.userId = userId;
|
|
}
|
|
|
|
public AdminUserEntitlementDetail entitlements(List<@Valid Entitlement> entitlements) {
|
|
this.entitlements = entitlements;
|
|
return this;
|
|
}
|
|
|
|
public AdminUserEntitlementDetail addEntitlementsItem(Entitlement entitlementsItem) {
|
|
if (this.entitlements == null) {
|
|
this.entitlements = new ArrayList<>();
|
|
}
|
|
this.entitlements.add(entitlementsItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 权益列表
|
|
* @return entitlements
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "entitlements", description = "权益列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("entitlements")
|
|
public List<@Valid Entitlement> getEntitlements() {
|
|
return entitlements;
|
|
}
|
|
|
|
@JsonProperty("entitlements")
|
|
public void setEntitlements(List<@Valid Entitlement> entitlements) {
|
|
this.entitlements = entitlements;
|
|
}
|
|
|
|
public AdminUserEntitlementDetail quotas(List<@Valid Quota> quotas) {
|
|
this.quotas = quotas;
|
|
return this;
|
|
}
|
|
|
|
public AdminUserEntitlementDetail addQuotasItem(Quota quotasItem) {
|
|
if (this.quotas == null) {
|
|
this.quotas = new ArrayList<>();
|
|
}
|
|
this.quotas.add(quotasItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 配额列表
|
|
* @return quotas
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "quotas", description = "配额列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("quotas")
|
|
public List<@Valid Quota> getQuotas() {
|
|
return quotas;
|
|
}
|
|
|
|
@JsonProperty("quotas")
|
|
public void setQuotas(List<@Valid Quota> quotas) {
|
|
this.quotas = quotas;
|
|
}
|
|
|
|
public AdminUserEntitlementDetail entitlementSource(@Nullable String entitlementSource) {
|
|
this.entitlementSource = entitlementSource;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 权益来源说明
|
|
* @return entitlementSource
|
|
*/
|
|
|
|
@Schema(name = "entitlementSource", description = "权益来源说明", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("entitlementSource")
|
|
public @Nullable String getEntitlementSource() {
|
|
return entitlementSource;
|
|
}
|
|
|
|
@JsonProperty("entitlementSource")
|
|
public void setEntitlementSource(@Nullable String entitlementSource) {
|
|
this.entitlementSource = entitlementSource;
|
|
}
|
|
|
|
public AdminUserEntitlementDetail lastModifiedAt(@Nullable OffsetDateTime lastModifiedAt) {
|
|
this.lastModifiedAt = lastModifiedAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 最近权益变更时间
|
|
* @return lastModifiedAt
|
|
*/
|
|
@Valid
|
|
@Schema(name = "lastModifiedAt", description = "最近权益变更时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("lastModifiedAt")
|
|
public @Nullable OffsetDateTime getLastModifiedAt() {
|
|
return lastModifiedAt;
|
|
}
|
|
|
|
@JsonProperty("lastModifiedAt")
|
|
public void setLastModifiedAt(@Nullable OffsetDateTime lastModifiedAt) {
|
|
this.lastModifiedAt = lastModifiedAt;
|
|
}
|
|
|
|
public AdminUserEntitlementDetail lastModifiedBy(@Nullable String lastModifiedBy) {
|
|
this.lastModifiedBy = lastModifiedBy;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 最近变更操作者摘要(脱敏)
|
|
* @return lastModifiedBy
|
|
*/
|
|
|
|
@Schema(name = "lastModifiedBy", description = "最近变更操作者摘要(脱敏)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("lastModifiedBy")
|
|
public @Nullable String getLastModifiedBy() {
|
|
return lastModifiedBy;
|
|
}
|
|
|
|
@JsonProperty("lastModifiedBy")
|
|
public void setLastModifiedBy(@Nullable String lastModifiedBy) {
|
|
this.lastModifiedBy = lastModifiedBy;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
AdminUserEntitlementDetail adminUserEntitlementDetail = (AdminUserEntitlementDetail) o;
|
|
return Objects.equals(this.userId, adminUserEntitlementDetail.userId) &&
|
|
Objects.equals(this.entitlements, adminUserEntitlementDetail.entitlements) &&
|
|
Objects.equals(this.quotas, adminUserEntitlementDetail.quotas) &&
|
|
Objects.equals(this.entitlementSource, adminUserEntitlementDetail.entitlementSource) &&
|
|
Objects.equals(this.lastModifiedAt, adminUserEntitlementDetail.lastModifiedAt) &&
|
|
Objects.equals(this.lastModifiedBy, adminUserEntitlementDetail.lastModifiedBy);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(userId, entitlements, quotas, entitlementSource, lastModifiedAt, lastModifiedBy);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class AdminUserEntitlementDetail {\n");
|
|
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
|
|
sb.append(" entitlements: ").append(toIndentedString(entitlements)).append("\n");
|
|
sb.append(" quotas: ").append(toIndentedString(quotas)).append("\n");
|
|
sb.append(" entitlementSource: ").append(toIndentedString(entitlementSource)).append("\n");
|
|
sb.append(" lastModifiedAt: ").append(toIndentedString(lastModifiedAt)).append("\n");
|
|
sb.append(" lastModifiedBy: ").append(toIndentedString(lastModifiedBy)).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 ");
|
|
}
|
|
}
|
|
|