168 lines
4.3 KiB
Java
168 lines
4.3 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;
|
|
|
|
/**
|
|
* ToolGrantScopeResourceRefsInner
|
|
*/
|
|
|
|
@JsonTypeName("ToolGrantScope_resourceRefs_inner")
|
|
@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 ToolGrantScopeResourceRefsInner implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* Gets or Sets resourceType
|
|
*/
|
|
public enum ResourceTypeEnum {
|
|
WORK("work"),
|
|
|
|
CHAPTER("chapter"),
|
|
|
|
BLOCK("block"),
|
|
|
|
KNOWLEDGE_BASE("knowledge_base"),
|
|
|
|
MARKET_ASSET("market_asset"),
|
|
|
|
ENDPOINT("endpoint");
|
|
|
|
private final String value;
|
|
|
|
ResourceTypeEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static ResourceTypeEnum fromValue(String value) {
|
|
for (ResourceTypeEnum b : ResourceTypeEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private ResourceTypeEnum resourceType;
|
|
|
|
private String resourceId;
|
|
|
|
public ToolGrantScopeResourceRefsInner() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public ToolGrantScopeResourceRefsInner(ResourceTypeEnum resourceType, String resourceId) {
|
|
this.resourceType = resourceType;
|
|
this.resourceId = resourceId;
|
|
}
|
|
|
|
public ToolGrantScopeResourceRefsInner resourceType(ResourceTypeEnum resourceType) {
|
|
this.resourceType = resourceType;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get resourceType
|
|
* @return resourceType
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "resourceType", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("resourceType")
|
|
public ResourceTypeEnum getResourceType() {
|
|
return resourceType;
|
|
}
|
|
|
|
@JsonProperty("resourceType")
|
|
public void setResourceType(ResourceTypeEnum resourceType) {
|
|
this.resourceType = resourceType;
|
|
}
|
|
|
|
public ToolGrantScopeResourceRefsInner resourceId(String resourceId) {
|
|
this.resourceId = resourceId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 资源 ID 或受控 endpoint key
|
|
* @return resourceId
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "resourceId", description = "资源 ID 或受控 endpoint key", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("resourceId")
|
|
public String getResourceId() {
|
|
return resourceId;
|
|
}
|
|
|
|
@JsonProperty("resourceId")
|
|
public void setResourceId(String resourceId) {
|
|
this.resourceId = resourceId;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
ToolGrantScopeResourceRefsInner toolGrantScopeResourceRefsInner = (ToolGrantScopeResourceRefsInner) o;
|
|
return Objects.equals(this.resourceType, toolGrantScopeResourceRefsInner.resourceType) &&
|
|
Objects.equals(this.resourceId, toolGrantScopeResourceRefsInner.resourceId);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(resourceType, resourceId);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class ToolGrantScopeResourceRefsInner {\n");
|
|
sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n");
|
|
sb.append(" resourceId: ").append(toIndentedString(resourceId)).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 ");
|
|
}
|
|
}
|
|
|