201 lines
6.4 KiB
Java
201 lines
6.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 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 = "FunctionChainActivateRequest", 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 FunctionChainActivateRequest implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String commandId;
|
|
|
|
private String reason;
|
|
|
|
private String impactPreviewId;
|
|
|
|
private String validationResultId;
|
|
|
|
private Integer expectedActiveVersion;
|
|
|
|
public FunctionChainActivateRequest() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public FunctionChainActivateRequest(String commandId, String reason, String impactPreviewId, String validationResultId, Integer expectedActiveVersion) {
|
|
this.commandId = commandId;
|
|
this.reason = reason;
|
|
this.impactPreviewId = impactPreviewId;
|
|
this.validationResultId = validationResultId;
|
|
this.expectedActiveVersion = expectedActiveVersion;
|
|
}
|
|
|
|
public FunctionChainActivateRequest commandId(String commandId) {
|
|
this.commandId = commandId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 幂等键
|
|
* @return commandId
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "commandId", description = "幂等键", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("commandId")
|
|
public String getCommandId() {
|
|
return commandId;
|
|
}
|
|
|
|
@JsonProperty("commandId")
|
|
public void setCommandId(String commandId) {
|
|
this.commandId = commandId;
|
|
}
|
|
|
|
public FunctionChainActivateRequest reason(String reason) {
|
|
this.reason = reason;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 激活理由
|
|
* @return reason
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "reason", description = "激活理由", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("reason")
|
|
public String getReason() {
|
|
return reason;
|
|
}
|
|
|
|
@JsonProperty("reason")
|
|
public void setReason(String reason) {
|
|
this.reason = reason;
|
|
}
|
|
|
|
public FunctionChainActivateRequest impactPreviewId(String impactPreviewId) {
|
|
this.impactPreviewId = impactPreviewId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 影响预览引用 ID
|
|
* @return impactPreviewId
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "impactPreviewId", description = "影响预览引用 ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("impactPreviewId")
|
|
public String getImpactPreviewId() {
|
|
return impactPreviewId;
|
|
}
|
|
|
|
@JsonProperty("impactPreviewId")
|
|
public void setImpactPreviewId(String impactPreviewId) {
|
|
this.impactPreviewId = impactPreviewId;
|
|
}
|
|
|
|
public FunctionChainActivateRequest validationResultId(String validationResultId) {
|
|
this.validationResultId = validationResultId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 激活前校验结果引用 ID
|
|
* @return validationResultId
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "validationResultId", description = "激活前校验结果引用 ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("validationResultId")
|
|
public String getValidationResultId() {
|
|
return validationResultId;
|
|
}
|
|
|
|
@JsonProperty("validationResultId")
|
|
public void setValidationResultId(String validationResultId) {
|
|
this.validationResultId = validationResultId;
|
|
}
|
|
|
|
public FunctionChainActivateRequest expectedActiveVersion(Integer expectedActiveVersion) {
|
|
this.expectedActiveVersion = expectedActiveVersion;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 期望当前激活版本,乐观锁
|
|
* @return expectedActiveVersion
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "expectedActiveVersion", description = "期望当前激活版本,乐观锁", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("expectedActiveVersion")
|
|
public Integer getExpectedActiveVersion() {
|
|
return expectedActiveVersion;
|
|
}
|
|
|
|
@JsonProperty("expectedActiveVersion")
|
|
public void setExpectedActiveVersion(Integer expectedActiveVersion) {
|
|
this.expectedActiveVersion = expectedActiveVersion;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
FunctionChainActivateRequest functionChainActivateRequest = (FunctionChainActivateRequest) o;
|
|
return Objects.equals(this.commandId, functionChainActivateRequest.commandId) &&
|
|
Objects.equals(this.reason, functionChainActivateRequest.reason) &&
|
|
Objects.equals(this.impactPreviewId, functionChainActivateRequest.impactPreviewId) &&
|
|
Objects.equals(this.validationResultId, functionChainActivateRequest.validationResultId) &&
|
|
Objects.equals(this.expectedActiveVersion, functionChainActivateRequest.expectedActiveVersion);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(commandId, reason, impactPreviewId, validationResultId, expectedActiveVersion);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class FunctionChainActivateRequest {\n");
|
|
sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n");
|
|
sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
|
|
sb.append(" impactPreviewId: ").append(toIndentedString(impactPreviewId)).append("\n");
|
|
sb.append(" validationResultId: ").append(toIndentedString(validationResultId)).append("\n");
|
|
sb.append(" expectedActiveVersion: ").append(toIndentedString(expectedActiveVersion)).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 ");
|
|
}
|
|
}
|
|
|