oh-my-muse/docs/api-contracts/generated/java/com/muse/dto/SavePlanningItemRequest.java

250 lines
8.0 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.muse.dto.SavePlanningItemRequestSourceSnapshot;
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 = "SavePlanningItemRequest", 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 SavePlanningItemRequest implements Serializable {
private static final long serialVersionUID = 1L;
private String commandId;
private Object content;
private Integer expectedRevision;
private @Nullable Integer expectedSchemaVersion;
private @Nullable Integer expectedProjectionVersion;
private @Nullable SavePlanningItemRequestSourceSnapshot sourceSnapshot;
private @Nullable String auditReason;
public SavePlanningItemRequest() {
super();
}
/**
* Constructor with only required parameters
*/
public SavePlanningItemRequest(String commandId, Object content, Integer expectedRevision) {
this.commandId = commandId;
this.content = content;
this.expectedRevision = expectedRevision;
}
public SavePlanningItemRequest 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 SavePlanningItemRequest content(Object content) {
this.content = content;
return this;
}
/**
* 规划项内容(结构化 JSON)
* @return content
*/
@NotNull
@Schema(name = "content", description = "规划项内容(结构化 JSON)", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("content")
public Object getContent() {
return content;
}
@JsonProperty("content")
public void setContent(Object content) {
this.content = content;
}
public SavePlanningItemRequest expectedRevision(Integer expectedRevision) {
this.expectedRevision = expectedRevision;
return this;
}
/**
* 目标规划 section 的当前 revision
* @return expectedRevision
*/
@NotNull
@Schema(name = "expectedRevision", description = "目标规划 section 的当前 revision", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("expectedRevision")
public Integer getExpectedRevision() {
return expectedRevision;
}
@JsonProperty("expectedRevision")
public void setExpectedRevision(Integer expectedRevision) {
this.expectedRevision = expectedRevision;
}
public SavePlanningItemRequest expectedSchemaVersion(@Nullable Integer expectedSchemaVersion) {
this.expectedSchemaVersion = expectedSchemaVersion;
return this;
}
/**
* 调用方持有的 MetaSchema 版本(涉及动态字段时必须)
* @return expectedSchemaVersion
*/
@Schema(name = "expectedSchemaVersion", description = "调用方持有的 MetaSchema 版本(涉及动态字段时必须)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("expectedSchemaVersion")
public @Nullable Integer getExpectedSchemaVersion() {
return expectedSchemaVersion;
}
@JsonProperty("expectedSchemaVersion")
public void setExpectedSchemaVersion(@Nullable Integer expectedSchemaVersion) {
this.expectedSchemaVersion = expectedSchemaVersion;
}
public SavePlanningItemRequest expectedProjectionVersion(@Nullable Integer expectedProjectionVersion) {
this.expectedProjectionVersion = expectedProjectionVersion;
return this;
}
/**
* 调用方持有的投影版本(涉及动态字段时必须)
* @return expectedProjectionVersion
*/
@Schema(name = "expectedProjectionVersion", description = "调用方持有的投影版本(涉及动态字段时必须)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("expectedProjectionVersion")
public @Nullable Integer getExpectedProjectionVersion() {
return expectedProjectionVersion;
}
@JsonProperty("expectedProjectionVersion")
public void setExpectedProjectionVersion(@Nullable Integer expectedProjectionVersion) {
this.expectedProjectionVersion = expectedProjectionVersion;
}
public SavePlanningItemRequest sourceSnapshot(@Nullable SavePlanningItemRequestSourceSnapshot sourceSnapshot) {
this.sourceSnapshot = sourceSnapshot;
return this;
}
/**
* Get sourceSnapshot
* @return sourceSnapshot
*/
@Valid
@Schema(name = "sourceSnapshot", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("sourceSnapshot")
public @Nullable SavePlanningItemRequestSourceSnapshot getSourceSnapshot() {
return sourceSnapshot;
}
@JsonProperty("sourceSnapshot")
public void setSourceSnapshot(@Nullable SavePlanningItemRequestSourceSnapshot sourceSnapshot) {
this.sourceSnapshot = sourceSnapshot;
}
public SavePlanningItemRequest auditReason(@Nullable String auditReason) {
this.auditReason = auditReason;
return this;
}
/**
* 用户保存或覆盖原因
* @return auditReason
*/
@Schema(name = "auditReason", description = "用户保存或覆盖原因", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("auditReason")
public @Nullable String getAuditReason() {
return auditReason;
}
@JsonProperty("auditReason")
public void setAuditReason(@Nullable String auditReason) {
this.auditReason = auditReason;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SavePlanningItemRequest savePlanningItemRequest = (SavePlanningItemRequest) o;
return Objects.equals(this.commandId, savePlanningItemRequest.commandId) &&
Objects.equals(this.content, savePlanningItemRequest.content) &&
Objects.equals(this.expectedRevision, savePlanningItemRequest.expectedRevision) &&
Objects.equals(this.expectedSchemaVersion, savePlanningItemRequest.expectedSchemaVersion) &&
Objects.equals(this.expectedProjectionVersion, savePlanningItemRequest.expectedProjectionVersion) &&
Objects.equals(this.sourceSnapshot, savePlanningItemRequest.sourceSnapshot) &&
Objects.equals(this.auditReason, savePlanningItemRequest.auditReason);
}
@Override
public int hashCode() {
return Objects.hash(commandId, content, expectedRevision, expectedSchemaVersion, expectedProjectionVersion, sourceSnapshot, auditReason);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SavePlanningItemRequest {\n");
sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n");
sb.append(" content: ").append(toIndentedString(content)).append("\n");
sb.append(" expectedRevision: ").append(toIndentedString(expectedRevision)).append("\n");
sb.append(" expectedSchemaVersion: ").append(toIndentedString(expectedSchemaVersion)).append("\n");
sb.append(" expectedProjectionVersion: ").append(toIndentedString(expectedProjectionVersion)).append("\n");
sb.append(" sourceSnapshot: ").append(toIndentedString(sourceSnapshot)).append("\n");
sb.append(" auditReason: ").append(toIndentedString(auditReason)).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 ");
}
}