216 lines
5.9 KiB
Java
216 lines
5.9 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.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;
|
|
|
|
/**
|
|
* 用户端 New-API 网关用户绑定摘要
|
|
*/
|
|
|
|
@Schema(name = "AppNewApiBindingSummary", description = "用户端 New-API 网关用户绑定摘要")
|
|
@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 AppNewApiBindingSummary implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* 绑定状态
|
|
*/
|
|
public enum BindingStatusEnum {
|
|
BOUND("bound"),
|
|
|
|
UNBOUND("unbound"),
|
|
|
|
SYNC_FAILED("sync_failed"),
|
|
|
|
PENDING("pending");
|
|
|
|
private final String value;
|
|
|
|
BindingStatusEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static BindingStatusEnum fromValue(String value) {
|
|
for (BindingStatusEnum b : BindingStatusEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private BindingStatusEnum bindingStatus;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private @Nullable OffsetDateTime boundAt;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private @Nullable OffsetDateTime lastSyncAt;
|
|
|
|
private @Nullable Boolean canRecheck;
|
|
|
|
public AppNewApiBindingSummary() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public AppNewApiBindingSummary(BindingStatusEnum bindingStatus) {
|
|
this.bindingStatus = bindingStatus;
|
|
}
|
|
|
|
public AppNewApiBindingSummary bindingStatus(BindingStatusEnum bindingStatus) {
|
|
this.bindingStatus = bindingStatus;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 绑定状态
|
|
* @return bindingStatus
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "bindingStatus", description = "绑定状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("bindingStatus")
|
|
public BindingStatusEnum getBindingStatus() {
|
|
return bindingStatus;
|
|
}
|
|
|
|
@JsonProperty("bindingStatus")
|
|
public void setBindingStatus(BindingStatusEnum bindingStatus) {
|
|
this.bindingStatus = bindingStatus;
|
|
}
|
|
|
|
public AppNewApiBindingSummary boundAt(@Nullable OffsetDateTime boundAt) {
|
|
this.boundAt = boundAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 绑定时间
|
|
* @return boundAt
|
|
*/
|
|
@Valid
|
|
@Schema(name = "boundAt", description = "绑定时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("boundAt")
|
|
public @Nullable OffsetDateTime getBoundAt() {
|
|
return boundAt;
|
|
}
|
|
|
|
@JsonProperty("boundAt")
|
|
public void setBoundAt(@Nullable OffsetDateTime boundAt) {
|
|
this.boundAt = boundAt;
|
|
}
|
|
|
|
public AppNewApiBindingSummary lastSyncAt(@Nullable OffsetDateTime lastSyncAt) {
|
|
this.lastSyncAt = lastSyncAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 最近同步时间
|
|
* @return lastSyncAt
|
|
*/
|
|
@Valid
|
|
@Schema(name = "lastSyncAt", description = "最近同步时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("lastSyncAt")
|
|
public @Nullable OffsetDateTime getLastSyncAt() {
|
|
return lastSyncAt;
|
|
}
|
|
|
|
@JsonProperty("lastSyncAt")
|
|
public void setLastSyncAt(@Nullable OffsetDateTime lastSyncAt) {
|
|
this.lastSyncAt = lastSyncAt;
|
|
}
|
|
|
|
public AppNewApiBindingSummary canRecheck(@Nullable Boolean canRecheck) {
|
|
this.canRecheck = canRecheck;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 是否可以发起重验
|
|
* @return canRecheck
|
|
*/
|
|
|
|
@Schema(name = "canRecheck", description = "是否可以发起重验", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("canRecheck")
|
|
public @Nullable Boolean getCanRecheck() {
|
|
return canRecheck;
|
|
}
|
|
|
|
@JsonProperty("canRecheck")
|
|
public void setCanRecheck(@Nullable Boolean canRecheck) {
|
|
this.canRecheck = canRecheck;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
AppNewApiBindingSummary appNewApiBindingSummary = (AppNewApiBindingSummary) o;
|
|
return Objects.equals(this.bindingStatus, appNewApiBindingSummary.bindingStatus) &&
|
|
Objects.equals(this.boundAt, appNewApiBindingSummary.boundAt) &&
|
|
Objects.equals(this.lastSyncAt, appNewApiBindingSummary.lastSyncAt) &&
|
|
Objects.equals(this.canRecheck, appNewApiBindingSummary.canRecheck);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(bindingStatus, boundAt, lastSyncAt, canRecheck);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class AppNewApiBindingSummary {\n");
|
|
sb.append(" bindingStatus: ").append(toIndentedString(bindingStatus)).append("\n");
|
|
sb.append(" boundAt: ").append(toIndentedString(boundAt)).append("\n");
|
|
sb.append(" lastSyncAt: ").append(toIndentedString(lastSyncAt)).append("\n");
|
|
sb.append(" canRecheck: ").append(toIndentedString(canRecheck)).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 ");
|
|
}
|
|
}
|
|
|