234 lines
6.7 KiB
Java
234 lines
6.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 com.fasterxml.jackson.annotation.JsonValue;
|
|
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 = "MetaProjectionDetail_sourceSnapshot", description = "来源对象、来源版本、授权快照和来源状态摘要")
|
|
@JsonTypeName("MetaProjectionDetail_sourceSnapshot")
|
|
@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 MetaProjectionDetailSourceSnapshot implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private @Nullable String sourceType;
|
|
|
|
private @Nullable String sourceId;
|
|
|
|
private @Nullable Integer sourceVersion;
|
|
|
|
private @Nullable String authorizationSnapshotId;
|
|
|
|
/**
|
|
* Gets or Sets sourceStatus
|
|
*/
|
|
public enum SourceStatusEnum {
|
|
ACTIVE("active"),
|
|
|
|
STALE("stale"),
|
|
|
|
REVOKED("revoked"),
|
|
|
|
RECALLED("recalled"),
|
|
|
|
BLOCKED("blocked"),
|
|
|
|
OWNER_MISSING("owner_missing"),
|
|
|
|
UNAUTHORIZED("unauthorized");
|
|
|
|
private final String value;
|
|
|
|
SourceStatusEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static SourceStatusEnum fromValue(String value) {
|
|
for (SourceStatusEnum b : SourceStatusEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private @Nullable SourceStatusEnum sourceStatus;
|
|
|
|
public MetaProjectionDetailSourceSnapshot sourceType(@Nullable String sourceType) {
|
|
this.sourceType = sourceType;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get sourceType
|
|
* @return sourceType
|
|
*/
|
|
|
|
@Schema(name = "sourceType", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("sourceType")
|
|
public @Nullable String getSourceType() {
|
|
return sourceType;
|
|
}
|
|
|
|
@JsonProperty("sourceType")
|
|
public void setSourceType(@Nullable String sourceType) {
|
|
this.sourceType = sourceType;
|
|
}
|
|
|
|
public MetaProjectionDetailSourceSnapshot sourceId(@Nullable String sourceId) {
|
|
this.sourceId = sourceId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get sourceId
|
|
* @return sourceId
|
|
*/
|
|
|
|
@Schema(name = "sourceId", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("sourceId")
|
|
public @Nullable String getSourceId() {
|
|
return sourceId;
|
|
}
|
|
|
|
@JsonProperty("sourceId")
|
|
public void setSourceId(@Nullable String sourceId) {
|
|
this.sourceId = sourceId;
|
|
}
|
|
|
|
public MetaProjectionDetailSourceSnapshot sourceVersion(@Nullable Integer sourceVersion) {
|
|
this.sourceVersion = sourceVersion;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get sourceVersion
|
|
* @return sourceVersion
|
|
*/
|
|
|
|
@Schema(name = "sourceVersion", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("sourceVersion")
|
|
public @Nullable Integer getSourceVersion() {
|
|
return sourceVersion;
|
|
}
|
|
|
|
@JsonProperty("sourceVersion")
|
|
public void setSourceVersion(@Nullable Integer sourceVersion) {
|
|
this.sourceVersion = sourceVersion;
|
|
}
|
|
|
|
public MetaProjectionDetailSourceSnapshot authorizationSnapshotId(@Nullable String authorizationSnapshotId) {
|
|
this.authorizationSnapshotId = authorizationSnapshotId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get authorizationSnapshotId
|
|
* @return authorizationSnapshotId
|
|
*/
|
|
|
|
@Schema(name = "authorizationSnapshotId", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("authorizationSnapshotId")
|
|
public @Nullable String getAuthorizationSnapshotId() {
|
|
return authorizationSnapshotId;
|
|
}
|
|
|
|
@JsonProperty("authorizationSnapshotId")
|
|
public void setAuthorizationSnapshotId(@Nullable String authorizationSnapshotId) {
|
|
this.authorizationSnapshotId = authorizationSnapshotId;
|
|
}
|
|
|
|
public MetaProjectionDetailSourceSnapshot sourceStatus(@Nullable SourceStatusEnum sourceStatus) {
|
|
this.sourceStatus = sourceStatus;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get sourceStatus
|
|
* @return sourceStatus
|
|
*/
|
|
|
|
@Schema(name = "sourceStatus", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("sourceStatus")
|
|
public @Nullable SourceStatusEnum getSourceStatus() {
|
|
return sourceStatus;
|
|
}
|
|
|
|
@JsonProperty("sourceStatus")
|
|
public void setSourceStatus(@Nullable SourceStatusEnum sourceStatus) {
|
|
this.sourceStatus = sourceStatus;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
MetaProjectionDetailSourceSnapshot metaProjectionDetailSourceSnapshot = (MetaProjectionDetailSourceSnapshot) o;
|
|
return Objects.equals(this.sourceType, metaProjectionDetailSourceSnapshot.sourceType) &&
|
|
Objects.equals(this.sourceId, metaProjectionDetailSourceSnapshot.sourceId) &&
|
|
Objects.equals(this.sourceVersion, metaProjectionDetailSourceSnapshot.sourceVersion) &&
|
|
Objects.equals(this.authorizationSnapshotId, metaProjectionDetailSourceSnapshot.authorizationSnapshotId) &&
|
|
Objects.equals(this.sourceStatus, metaProjectionDetailSourceSnapshot.sourceStatus);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(sourceType, sourceId, sourceVersion, authorizationSnapshotId, sourceStatus);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class MetaProjectionDetailSourceSnapshot {\n");
|
|
sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n");
|
|
sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n");
|
|
sb.append(" sourceVersion: ").append(toIndentedString(sourceVersion)).append("\n");
|
|
sb.append(" authorizationSnapshotId: ").append(toIndentedString(authorizationSnapshotId)).append("\n");
|
|
sb.append(" sourceStatus: ").append(toIndentedString(sourceStatus)).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 ");
|
|
}
|
|
}
|
|
|