204 lines
6.2 KiB
Java
204 lines
6.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 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 = "HandoffCreateResult", 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 HandoffCreateResult implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String handoffToken;
|
|
|
|
private URI targetPage;
|
|
|
|
private @Nullable UUID authorizationSummaryId;
|
|
|
|
private @Nullable UUID authorizationSnapshotId;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private OffsetDateTime expiresAt;
|
|
|
|
public HandoffCreateResult() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public HandoffCreateResult(String handoffToken, URI targetPage, OffsetDateTime expiresAt) {
|
|
this.handoffToken = handoffToken;
|
|
this.targetPage = targetPage;
|
|
this.expiresAt = expiresAt;
|
|
}
|
|
|
|
public HandoffCreateResult handoffToken(String handoffToken) {
|
|
this.handoffToken = handoffToken;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 一次性 handoff token
|
|
* @return handoffToken
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "handoffToken", description = "一次性 handoff token", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("handoffToken")
|
|
public String getHandoffToken() {
|
|
return handoffToken;
|
|
}
|
|
|
|
@JsonProperty("handoffToken")
|
|
public void setHandoffToken(String handoffToken) {
|
|
this.handoffToken = handoffToken;
|
|
}
|
|
|
|
public HandoffCreateResult targetPage(URI targetPage) {
|
|
this.targetPage = targetPage;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 目标 owner 空间落地页 URL
|
|
* @return targetPage
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "targetPage", description = "目标 owner 空间落地页 URL", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("targetPage")
|
|
public URI getTargetPage() {
|
|
return targetPage;
|
|
}
|
|
|
|
@JsonProperty("targetPage")
|
|
public void setTargetPage(URI targetPage) {
|
|
this.targetPage = targetPage;
|
|
}
|
|
|
|
public HandoffCreateResult authorizationSummaryId(@Nullable UUID authorizationSummaryId) {
|
|
this.authorizationSummaryId = authorizationSummaryId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 关联的来源侧授权摘要 ID
|
|
* @return authorizationSummaryId
|
|
*/
|
|
@Valid
|
|
@Schema(name = "authorizationSummaryId", description = "关联的来源侧授权摘要 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("authorizationSummaryId")
|
|
public @Nullable UUID getAuthorizationSummaryId() {
|
|
return authorizationSummaryId;
|
|
}
|
|
|
|
@JsonProperty("authorizationSummaryId")
|
|
public void setAuthorizationSummaryId(@Nullable UUID authorizationSummaryId) {
|
|
this.authorizationSummaryId = authorizationSummaryId;
|
|
}
|
|
|
|
public HandoffCreateResult authorizationSnapshotId(@Nullable UUID authorizationSnapshotId) {
|
|
this.authorizationSnapshotId = authorizationSnapshotId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 关联的来源授权快照 ID
|
|
* @return authorizationSnapshotId
|
|
*/
|
|
@Valid
|
|
@Schema(name = "authorizationSnapshotId", description = "关联的来源授权快照 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("authorizationSnapshotId")
|
|
public @Nullable UUID getAuthorizationSnapshotId() {
|
|
return authorizationSnapshotId;
|
|
}
|
|
|
|
@JsonProperty("authorizationSnapshotId")
|
|
public void setAuthorizationSnapshotId(@Nullable UUID authorizationSnapshotId) {
|
|
this.authorizationSnapshotId = authorizationSnapshotId;
|
|
}
|
|
|
|
public HandoffCreateResult expiresAt(OffsetDateTime expiresAt) {
|
|
this.expiresAt = expiresAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* token 过期时间
|
|
* @return expiresAt
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "expiresAt", description = "token 过期时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("expiresAt")
|
|
public OffsetDateTime getExpiresAt() {
|
|
return expiresAt;
|
|
}
|
|
|
|
@JsonProperty("expiresAt")
|
|
public void setExpiresAt(OffsetDateTime expiresAt) {
|
|
this.expiresAt = expiresAt;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
HandoffCreateResult handoffCreateResult = (HandoffCreateResult) o;
|
|
return Objects.equals(this.handoffToken, handoffCreateResult.handoffToken) &&
|
|
Objects.equals(this.targetPage, handoffCreateResult.targetPage) &&
|
|
Objects.equals(this.authorizationSummaryId, handoffCreateResult.authorizationSummaryId) &&
|
|
Objects.equals(this.authorizationSnapshotId, handoffCreateResult.authorizationSnapshotId) &&
|
|
Objects.equals(this.expiresAt, handoffCreateResult.expiresAt);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(handoffToken, targetPage, authorizationSummaryId, authorizationSnapshotId, expiresAt);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class HandoffCreateResult {\n");
|
|
sb.append(" handoffToken: ").append(toIndentedString(handoffToken)).append("\n");
|
|
sb.append(" targetPage: ").append(toIndentedString(targetPage)).append("\n");
|
|
sb.append(" authorizationSummaryId: ").append(toIndentedString(authorizationSummaryId)).append("\n");
|
|
sb.append(" authorizationSnapshotId: ").append(toIndentedString(authorizationSnapshotId)).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 ");
|
|
}
|
|
}
|
|
|