345 lines
9.2 KiB
Java
345 lines
9.2 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.net.URI;
|
|
import java.time.OffsetDateTime;
|
|
import java.util.UUID;
|
|
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;
|
|
|
|
/**
|
|
* Handoff 状态
|
|
*/
|
|
|
|
@Schema(name = "HandoffStatusResult", description = "Handoff 状态")
|
|
@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 HandoffStatusResult implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String handoffToken;
|
|
|
|
/**
|
|
* Gets or Sets status
|
|
*/
|
|
public enum StatusEnum {
|
|
PENDING("pending"),
|
|
|
|
OWNER_PRECHECK_CREATED("owner_precheck_created"),
|
|
|
|
COMPLETED("completed"),
|
|
|
|
EXPIRED("expired"),
|
|
|
|
CANCELLED("cancelled");
|
|
|
|
private final String value;
|
|
|
|
StatusEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static StatusEnum fromValue(String value) {
|
|
for (StatusEnum b : StatusEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private StatusEnum status;
|
|
|
|
private @Nullable String targetOwner;
|
|
|
|
private @Nullable String targetAction;
|
|
|
|
private @Nullable UUID assetId;
|
|
|
|
private @Nullable UUID targetWorkId;
|
|
|
|
private @Nullable URI returnUrl;
|
|
|
|
private @Nullable String ownerConfirmResult;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private @Nullable OffsetDateTime expiresAt;
|
|
|
|
public HandoffStatusResult() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public HandoffStatusResult(String handoffToken, StatusEnum status) {
|
|
this.handoffToken = handoffToken;
|
|
this.status = status;
|
|
}
|
|
|
|
public HandoffStatusResult handoffToken(String handoffToken) {
|
|
this.handoffToken = handoffToken;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get handoffToken
|
|
* @return handoffToken
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "handoffToken", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("handoffToken")
|
|
public String getHandoffToken() {
|
|
return handoffToken;
|
|
}
|
|
|
|
@JsonProperty("handoffToken")
|
|
public void setHandoffToken(String handoffToken) {
|
|
this.handoffToken = handoffToken;
|
|
}
|
|
|
|
public HandoffStatusResult status(StatusEnum status) {
|
|
this.status = status;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get status
|
|
* @return status
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("status")
|
|
public StatusEnum getStatus() {
|
|
return status;
|
|
}
|
|
|
|
@JsonProperty("status")
|
|
public void setStatus(StatusEnum status) {
|
|
this.status = status;
|
|
}
|
|
|
|
public HandoffStatusResult targetOwner(@Nullable String targetOwner) {
|
|
this.targetOwner = targetOwner;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get targetOwner
|
|
* @return targetOwner
|
|
*/
|
|
|
|
@Schema(name = "targetOwner", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("targetOwner")
|
|
public @Nullable String getTargetOwner() {
|
|
return targetOwner;
|
|
}
|
|
|
|
@JsonProperty("targetOwner")
|
|
public void setTargetOwner(@Nullable String targetOwner) {
|
|
this.targetOwner = targetOwner;
|
|
}
|
|
|
|
public HandoffStatusResult targetAction(@Nullable String targetAction) {
|
|
this.targetAction = targetAction;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get targetAction
|
|
* @return targetAction
|
|
*/
|
|
|
|
@Schema(name = "targetAction", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("targetAction")
|
|
public @Nullable String getTargetAction() {
|
|
return targetAction;
|
|
}
|
|
|
|
@JsonProperty("targetAction")
|
|
public void setTargetAction(@Nullable String targetAction) {
|
|
this.targetAction = targetAction;
|
|
}
|
|
|
|
public HandoffStatusResult assetId(@Nullable UUID assetId) {
|
|
this.assetId = assetId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get assetId
|
|
* @return assetId
|
|
*/
|
|
@Valid
|
|
@Schema(name = "assetId", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("assetId")
|
|
public @Nullable UUID getAssetId() {
|
|
return assetId;
|
|
}
|
|
|
|
@JsonProperty("assetId")
|
|
public void setAssetId(@Nullable UUID assetId) {
|
|
this.assetId = assetId;
|
|
}
|
|
|
|
public HandoffStatusResult targetWorkId(@Nullable UUID targetWorkId) {
|
|
this.targetWorkId = targetWorkId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get targetWorkId
|
|
* @return targetWorkId
|
|
*/
|
|
@Valid
|
|
@Schema(name = "targetWorkId", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("targetWorkId")
|
|
public @Nullable UUID getTargetWorkId() {
|
|
return targetWorkId;
|
|
}
|
|
|
|
@JsonProperty("targetWorkId")
|
|
public void setTargetWorkId(@Nullable UUID targetWorkId) {
|
|
this.targetWorkId = targetWorkId;
|
|
}
|
|
|
|
public HandoffStatusResult returnUrl(@Nullable URI returnUrl) {
|
|
this.returnUrl = returnUrl;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get returnUrl
|
|
* @return returnUrl
|
|
*/
|
|
@Valid
|
|
@Schema(name = "returnUrl", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("returnUrl")
|
|
public @Nullable URI getReturnUrl() {
|
|
return returnUrl;
|
|
}
|
|
|
|
@JsonProperty("returnUrl")
|
|
public void setReturnUrl(@Nullable URI returnUrl) {
|
|
this.returnUrl = returnUrl;
|
|
}
|
|
|
|
public HandoffStatusResult ownerConfirmResult(@Nullable String ownerConfirmResult) {
|
|
this.ownerConfirmResult = ownerConfirmResult;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 目标 owner 确认结果摘要
|
|
* @return ownerConfirmResult
|
|
*/
|
|
|
|
@Schema(name = "ownerConfirmResult", description = "目标 owner 确认结果摘要", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("ownerConfirmResult")
|
|
public @Nullable String getOwnerConfirmResult() {
|
|
return ownerConfirmResult;
|
|
}
|
|
|
|
@JsonProperty("ownerConfirmResult")
|
|
public void setOwnerConfirmResult(@Nullable String ownerConfirmResult) {
|
|
this.ownerConfirmResult = ownerConfirmResult;
|
|
}
|
|
|
|
public HandoffStatusResult expiresAt(@Nullable OffsetDateTime expiresAt) {
|
|
this.expiresAt = expiresAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get expiresAt
|
|
* @return expiresAt
|
|
*/
|
|
@Valid
|
|
@Schema(name = "expiresAt", 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;
|
|
}
|
|
HandoffStatusResult handoffStatusResult = (HandoffStatusResult) o;
|
|
return Objects.equals(this.handoffToken, handoffStatusResult.handoffToken) &&
|
|
Objects.equals(this.status, handoffStatusResult.status) &&
|
|
Objects.equals(this.targetOwner, handoffStatusResult.targetOwner) &&
|
|
Objects.equals(this.targetAction, handoffStatusResult.targetAction) &&
|
|
Objects.equals(this.assetId, handoffStatusResult.assetId) &&
|
|
Objects.equals(this.targetWorkId, handoffStatusResult.targetWorkId) &&
|
|
Objects.equals(this.returnUrl, handoffStatusResult.returnUrl) &&
|
|
Objects.equals(this.ownerConfirmResult, handoffStatusResult.ownerConfirmResult) &&
|
|
Objects.equals(this.expiresAt, handoffStatusResult.expiresAt);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(handoffToken, status, targetOwner, targetAction, assetId, targetWorkId, returnUrl, ownerConfirmResult, expiresAt);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class HandoffStatusResult {\n");
|
|
sb.append(" handoffToken: ").append(toIndentedString(handoffToken)).append("\n");
|
|
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
|
sb.append(" targetOwner: ").append(toIndentedString(targetOwner)).append("\n");
|
|
sb.append(" targetAction: ").append(toIndentedString(targetAction)).append("\n");
|
|
sb.append(" assetId: ").append(toIndentedString(assetId)).append("\n");
|
|
sb.append(" targetWorkId: ").append(toIndentedString(targetWorkId)).append("\n");
|
|
sb.append(" returnUrl: ").append(toIndentedString(returnUrl)).append("\n");
|
|
sb.append(" ownerConfirmResult: ").append(toIndentedString(ownerConfirmResult)).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 ");
|
|
}
|
|
}
|
|
|