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 java.util.UUID; 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; /** * WithdrawAppealRequest */ @JsonTypeName("withdrawAppeal_request") @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 WithdrawAppealRequest implements Serializable { private static final long serialVersionUID = 1L; private String reason; private UUID commandId; /** * 期望当前申诉状态,避免盲撤回已终态申诉 */ public enum ExpectedStatusEnum { PENDING("pending"), REVIEWING("reviewing"), SUPPLEMENTING("supplementing"); private final String value; ExpectedStatusEnum(String value) { this.value = value; } @JsonValue public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } @JsonCreator public static ExpectedStatusEnum fromValue(String value) { for (ExpectedStatusEnum b : ExpectedStatusEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } private ExpectedStatusEnum expectedStatus; public WithdrawAppealRequest() { super(); } /** * Constructor with only required parameters */ public WithdrawAppealRequest(String reason, UUID commandId, ExpectedStatusEnum expectedStatus) { this.reason = reason; this.commandId = commandId; this.expectedStatus = expectedStatus; } public WithdrawAppealRequest 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 WithdrawAppealRequest commandId(UUID commandId) { this.commandId = commandId; return this; } /** * 幂等键 * @return commandId */ @NotNull @Valid @Schema(name = "commandId", description = "幂等键", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("commandId") public UUID getCommandId() { return commandId; } @JsonProperty("commandId") public void setCommandId(UUID commandId) { this.commandId = commandId; } public WithdrawAppealRequest expectedStatus(ExpectedStatusEnum expectedStatus) { this.expectedStatus = expectedStatus; return this; } /** * 期望当前申诉状态,避免盲撤回已终态申诉 * @return expectedStatus */ @NotNull @Schema(name = "expectedStatus", description = "期望当前申诉状态,避免盲撤回已终态申诉", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("expectedStatus") public ExpectedStatusEnum getExpectedStatus() { return expectedStatus; } @JsonProperty("expectedStatus") public void setExpectedStatus(ExpectedStatusEnum expectedStatus) { this.expectedStatus = expectedStatus; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } WithdrawAppealRequest withdrawAppealRequest = (WithdrawAppealRequest) o; return Objects.equals(this.reason, withdrawAppealRequest.reason) && Objects.equals(this.commandId, withdrawAppealRequest.commandId) && Objects.equals(this.expectedStatus, withdrawAppealRequest.expectedStatus); } @Override public int hashCode() { return Objects.hash(reason, commandId, expectedStatus); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WithdrawAppealRequest {\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n"); sb.append(" expectedStatus: ").append(toIndentedString(expectedStatus)).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 "); } }