212 lines
6.2 KiB
Java
212 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 com.muse.dto.QuotaAdjustmentRequestAdjustmentsInner;
|
||
import java.util.ArrayList;
|
||
import java.util.Arrays;
|
||
import java.util.List;
|
||
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 = "QuotaAdjustmentRequest", 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 QuotaAdjustmentRequest implements Serializable {
|
||
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
private String commandId;
|
||
|
||
@Valid
|
||
private List<@Valid QuotaAdjustmentRequestAdjustmentsInner> adjustments = new ArrayList<>();
|
||
|
||
private String reason;
|
||
|
||
private @Nullable String correlationId;
|
||
|
||
private @Nullable String approvalRef;
|
||
|
||
public QuotaAdjustmentRequest() {
|
||
super();
|
||
}
|
||
|
||
/**
|
||
* Constructor with only required parameters
|
||
*/
|
||
public QuotaAdjustmentRequest(String commandId, List<@Valid QuotaAdjustmentRequestAdjustmentsInner> adjustments, String reason) {
|
||
this.commandId = commandId;
|
||
this.adjustments = adjustments;
|
||
this.reason = reason;
|
||
}
|
||
|
||
public QuotaAdjustmentRequest 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 QuotaAdjustmentRequest adjustments(List<@Valid QuotaAdjustmentRequestAdjustmentsInner> adjustments) {
|
||
this.adjustments = adjustments;
|
||
return this;
|
||
}
|
||
|
||
public QuotaAdjustmentRequest addAdjustmentsItem(QuotaAdjustmentRequestAdjustmentsInner adjustmentsItem) {
|
||
if (this.adjustments == null) {
|
||
this.adjustments = new ArrayList<>();
|
||
}
|
||
this.adjustments.add(adjustmentsItem);
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 调整项列表
|
||
* @return adjustments
|
||
*/
|
||
@NotNull @Valid
|
||
@Schema(name = "adjustments", description = "调整项列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
||
@JsonProperty("adjustments")
|
||
public List<@Valid QuotaAdjustmentRequestAdjustmentsInner> getAdjustments() {
|
||
return adjustments;
|
||
}
|
||
|
||
@JsonProperty("adjustments")
|
||
public void setAdjustments(List<@Valid QuotaAdjustmentRequestAdjustmentsInner> adjustments) {
|
||
this.adjustments = adjustments;
|
||
}
|
||
|
||
public QuotaAdjustmentRequest 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 QuotaAdjustmentRequest correlationId(@Nullable String correlationId) {
|
||
this.correlationId = correlationId;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 关联的外部调用 ID(New-API 回填时使用)
|
||
* @return correlationId
|
||
*/
|
||
|
||
@Schema(name = "correlationId", description = "关联的外部调用 ID(New-API 回填时使用)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("correlationId")
|
||
public @Nullable String getCorrelationId() {
|
||
return correlationId;
|
||
}
|
||
|
||
@JsonProperty("correlationId")
|
||
public void setCorrelationId(@Nullable String correlationId) {
|
||
this.correlationId = correlationId;
|
||
}
|
||
|
||
public QuotaAdjustmentRequest approvalRef(@Nullable String approvalRef) {
|
||
this.approvalRef = approvalRef;
|
||
return this;
|
||
}
|
||
|
||
/**
|
||
* 审批引用(需要复核时使用)
|
||
* @return approvalRef
|
||
*/
|
||
|
||
@Schema(name = "approvalRef", description = "审批引用(需要复核时使用)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||
@JsonProperty("approvalRef")
|
||
public @Nullable String getApprovalRef() {
|
||
return approvalRef;
|
||
}
|
||
|
||
@JsonProperty("approvalRef")
|
||
public void setApprovalRef(@Nullable String approvalRef) {
|
||
this.approvalRef = approvalRef;
|
||
}
|
||
|
||
@Override
|
||
public boolean equals(Object o) {
|
||
if (this == o) {
|
||
return true;
|
||
}
|
||
if (o == null || getClass() != o.getClass()) {
|
||
return false;
|
||
}
|
||
QuotaAdjustmentRequest quotaAdjustmentRequest = (QuotaAdjustmentRequest) o;
|
||
return Objects.equals(this.commandId, quotaAdjustmentRequest.commandId) &&
|
||
Objects.equals(this.adjustments, quotaAdjustmentRequest.adjustments) &&
|
||
Objects.equals(this.reason, quotaAdjustmentRequest.reason) &&
|
||
Objects.equals(this.correlationId, quotaAdjustmentRequest.correlationId) &&
|
||
Objects.equals(this.approvalRef, quotaAdjustmentRequest.approvalRef);
|
||
}
|
||
|
||
@Override
|
||
public int hashCode() {
|
||
return Objects.hash(commandId, adjustments, reason, correlationId, approvalRef);
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
StringBuilder sb = new StringBuilder();
|
||
sb.append("class QuotaAdjustmentRequest {\n");
|
||
sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n");
|
||
sb.append(" adjustments: ").append(toIndentedString(adjustments)).append("\n");
|
||
sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
|
||
sb.append(" correlationId: ").append(toIndentedString(correlationId)).append("\n");
|
||
sb.append(" approvalRef: ").append(toIndentedString(approvalRef)).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 ");
|
||
}
|
||
}
|
||
|