261 lines
7.0 KiB
Java
261 lines
7.0 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 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;
|
|
|
|
/**
|
|
* UpdateGlobalKnowledgeBaseRequest
|
|
*/
|
|
|
|
@JsonTypeName("updateGlobalKnowledgeBase_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 UpdateGlobalKnowledgeBaseRequest implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private @Nullable String name;
|
|
|
|
private @Nullable String description;
|
|
|
|
private @Nullable String category;
|
|
|
|
/**
|
|
* Gets or Sets visibilityScope
|
|
*/
|
|
public enum VisibilityScopeEnum {
|
|
ALL("all"),
|
|
|
|
ROLE_BASED("role_based"),
|
|
|
|
CUSTOM("custom");
|
|
|
|
private final String value;
|
|
|
|
VisibilityScopeEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static VisibilityScopeEnum fromValue(String value) {
|
|
for (VisibilityScopeEnum b : VisibilityScopeEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private @Nullable VisibilityScopeEnum visibilityScope;
|
|
|
|
private @Nullable String disableReason;
|
|
|
|
private String commandId;
|
|
|
|
public UpdateGlobalKnowledgeBaseRequest() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public UpdateGlobalKnowledgeBaseRequest(String commandId) {
|
|
this.commandId = commandId;
|
|
}
|
|
|
|
public UpdateGlobalKnowledgeBaseRequest name(@Nullable String name) {
|
|
this.name = name;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get name
|
|
* @return name
|
|
*/
|
|
|
|
@Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("name")
|
|
public @Nullable String getName() {
|
|
return name;
|
|
}
|
|
|
|
@JsonProperty("name")
|
|
public void setName(@Nullable String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public UpdateGlobalKnowledgeBaseRequest description(@Nullable String description) {
|
|
this.description = description;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get description
|
|
* @return description
|
|
*/
|
|
|
|
@Schema(name = "description", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("description")
|
|
public @Nullable String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
@JsonProperty("description")
|
|
public void setDescription(@Nullable String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
public UpdateGlobalKnowledgeBaseRequest category(@Nullable String category) {
|
|
this.category = category;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get category
|
|
* @return category
|
|
*/
|
|
|
|
@Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("category")
|
|
public @Nullable String getCategory() {
|
|
return category;
|
|
}
|
|
|
|
@JsonProperty("category")
|
|
public void setCategory(@Nullable String category) {
|
|
this.category = category;
|
|
}
|
|
|
|
public UpdateGlobalKnowledgeBaseRequest visibilityScope(@Nullable VisibilityScopeEnum visibilityScope) {
|
|
this.visibilityScope = visibilityScope;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get visibilityScope
|
|
* @return visibilityScope
|
|
*/
|
|
|
|
@Schema(name = "visibilityScope", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("visibilityScope")
|
|
public @Nullable VisibilityScopeEnum getVisibilityScope() {
|
|
return visibilityScope;
|
|
}
|
|
|
|
@JsonProperty("visibilityScope")
|
|
public void setVisibilityScope(@Nullable VisibilityScopeEnum visibilityScope) {
|
|
this.visibilityScope = visibilityScope;
|
|
}
|
|
|
|
public UpdateGlobalKnowledgeBaseRequest disableReason(@Nullable String disableReason) {
|
|
this.disableReason = disableReason;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 停用时必填原因
|
|
* @return disableReason
|
|
*/
|
|
|
|
@Schema(name = "disableReason", description = "停用时必填原因", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("disableReason")
|
|
public @Nullable String getDisableReason() {
|
|
return disableReason;
|
|
}
|
|
|
|
@JsonProperty("disableReason")
|
|
public void setDisableReason(@Nullable String disableReason) {
|
|
this.disableReason = disableReason;
|
|
}
|
|
|
|
public UpdateGlobalKnowledgeBaseRequest 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;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
UpdateGlobalKnowledgeBaseRequest updateGlobalKnowledgeBaseRequest = (UpdateGlobalKnowledgeBaseRequest) o;
|
|
return Objects.equals(this.name, updateGlobalKnowledgeBaseRequest.name) &&
|
|
Objects.equals(this.description, updateGlobalKnowledgeBaseRequest.description) &&
|
|
Objects.equals(this.category, updateGlobalKnowledgeBaseRequest.category) &&
|
|
Objects.equals(this.visibilityScope, updateGlobalKnowledgeBaseRequest.visibilityScope) &&
|
|
Objects.equals(this.disableReason, updateGlobalKnowledgeBaseRequest.disableReason) &&
|
|
Objects.equals(this.commandId, updateGlobalKnowledgeBaseRequest.commandId);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(name, description, category, visibilityScope, disableReason, commandId);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class UpdateGlobalKnowledgeBaseRequest {\n");
|
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
|
sb.append(" description: ").append(toIndentedString(description)).append("\n");
|
|
sb.append(" category: ").append(toIndentedString(category)).append("\n");
|
|
sb.append(" visibilityScope: ").append(toIndentedString(visibilityScope)).append("\n");
|
|
sb.append(" disableReason: ").append(toIndentedString(disableReason)).append("\n");
|
|
sb.append(" commandId: ").append(toIndentedString(commandId)).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 ");
|
|
}
|
|
}
|
|
|