231 lines
5.7 KiB
Java
231 lines
5.7 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.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;
|
|
|
|
/**
|
|
* AdminPreviewGovernanceImpactRequest
|
|
*/
|
|
|
|
@JsonTypeName("adminPreviewGovernanceImpact_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 AdminPreviewGovernanceImpactRequest implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private UUID commandId;
|
|
|
|
/**
|
|
* 拟执行的治理动作类型
|
|
*/
|
|
public enum ActionTypeEnum {
|
|
DELIST("delist"),
|
|
|
|
RECALL("recall"),
|
|
|
|
REVOKE_LICENSE("revoke_license"),
|
|
|
|
STOP_GENERATION("stop_generation");
|
|
|
|
private final String value;
|
|
|
|
ActionTypeEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static ActionTypeEnum fromValue(String value) {
|
|
for (ActionTypeEnum b : ActionTypeEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private ActionTypeEnum actionType;
|
|
|
|
/**
|
|
* 治理范围
|
|
*/
|
|
public enum ScopeEnum {
|
|
STOP_NEW_ACQUIRE("stop_new_acquire"),
|
|
|
|
STOP_NEW_INSTALL("stop_new_install"),
|
|
|
|
STOP_NEW_BIND("stop_new_bind"),
|
|
|
|
STOP_GENERATION("stop_generation"),
|
|
|
|
FULL_RECALL("full_recall");
|
|
|
|
private final String value;
|
|
|
|
ScopeEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static ScopeEnum fromValue(String value) {
|
|
for (ScopeEnum b : ScopeEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private @Nullable ScopeEnum scope;
|
|
|
|
public AdminPreviewGovernanceImpactRequest() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public AdminPreviewGovernanceImpactRequest(UUID commandId, ActionTypeEnum actionType) {
|
|
this.commandId = commandId;
|
|
this.actionType = actionType;
|
|
}
|
|
|
|
public AdminPreviewGovernanceImpactRequest 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 AdminPreviewGovernanceImpactRequest actionType(ActionTypeEnum actionType) {
|
|
this.actionType = actionType;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 拟执行的治理动作类型
|
|
* @return actionType
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "actionType", description = "拟执行的治理动作类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("actionType")
|
|
public ActionTypeEnum getActionType() {
|
|
return actionType;
|
|
}
|
|
|
|
@JsonProperty("actionType")
|
|
public void setActionType(ActionTypeEnum actionType) {
|
|
this.actionType = actionType;
|
|
}
|
|
|
|
public AdminPreviewGovernanceImpactRequest scope(@Nullable ScopeEnum scope) {
|
|
this.scope = scope;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 治理范围
|
|
* @return scope
|
|
*/
|
|
|
|
@Schema(name = "scope", description = "治理范围", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("scope")
|
|
public @Nullable ScopeEnum getScope() {
|
|
return scope;
|
|
}
|
|
|
|
@JsonProperty("scope")
|
|
public void setScope(@Nullable ScopeEnum scope) {
|
|
this.scope = scope;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
AdminPreviewGovernanceImpactRequest adminPreviewGovernanceImpactRequest = (AdminPreviewGovernanceImpactRequest) o;
|
|
return Objects.equals(this.commandId, adminPreviewGovernanceImpactRequest.commandId) &&
|
|
Objects.equals(this.actionType, adminPreviewGovernanceImpactRequest.actionType) &&
|
|
Objects.equals(this.scope, adminPreviewGovernanceImpactRequest.scope);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(commandId, actionType, scope);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class AdminPreviewGovernanceImpactRequest {\n");
|
|
sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n");
|
|
sb.append(" actionType: ").append(toIndentedString(actionType)).append("\n");
|
|
sb.append(" scope: ").append(toIndentedString(scope)).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 ");
|
|
}
|
|
}
|
|
|