400 lines
10 KiB
Java
400 lines
10 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.JsonValue;
|
|
import com.muse.dto.ToolGrantBudget;
|
|
import com.muse.dto.ToolGrantOutboundPolicy;
|
|
import com.muse.dto.ToolGrantScope;
|
|
import java.time.OffsetDateTime;
|
|
import java.util.UUID;
|
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
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;
|
|
|
|
/**
|
|
* ToolGrantSummary
|
|
*/
|
|
|
|
@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 ToolGrantSummary implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private UUID grantId;
|
|
|
|
private UUID agentId;
|
|
|
|
private @Nullable String agentName;
|
|
|
|
private String toolType;
|
|
|
|
private ToolGrantScope scope;
|
|
|
|
private ToolGrantBudget budget;
|
|
|
|
private ToolGrantOutboundPolicy outboundPolicy;
|
|
|
|
/**
|
|
* Gets or Sets status
|
|
*/
|
|
public enum StatusEnum {
|
|
PENDING("pending"),
|
|
|
|
APPROVED("approved"),
|
|
|
|
REJECTED("rejected"),
|
|
|
|
REVOKED("revoked");
|
|
|
|
private final String value;
|
|
|
|
StatusEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static StatusEnum fromValue(String value) {
|
|
for (StatusEnum b : StatusEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private StatusEnum status;
|
|
|
|
private @Nullable String approvedBy;
|
|
|
|
private @Nullable String securityApprovalId;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private OffsetDateTime createdAt;
|
|
|
|
public ToolGrantSummary() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public ToolGrantSummary(UUID grantId, UUID agentId, String toolType, ToolGrantScope scope, ToolGrantBudget budget, ToolGrantOutboundPolicy outboundPolicy, StatusEnum status, OffsetDateTime createdAt) {
|
|
this.grantId = grantId;
|
|
this.agentId = agentId;
|
|
this.toolType = toolType;
|
|
this.scope = scope;
|
|
this.budget = budget;
|
|
this.outboundPolicy = outboundPolicy;
|
|
this.status = status;
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
public ToolGrantSummary grantId(UUID grantId) {
|
|
this.grantId = grantId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get grantId
|
|
* @return grantId
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "grantId", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("grantId")
|
|
public UUID getGrantId() {
|
|
return grantId;
|
|
}
|
|
|
|
@JsonProperty("grantId")
|
|
public void setGrantId(UUID grantId) {
|
|
this.grantId = grantId;
|
|
}
|
|
|
|
public ToolGrantSummary agentId(UUID agentId) {
|
|
this.agentId = agentId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get agentId
|
|
* @return agentId
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "agentId", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("agentId")
|
|
public UUID getAgentId() {
|
|
return agentId;
|
|
}
|
|
|
|
@JsonProperty("agentId")
|
|
public void setAgentId(UUID agentId) {
|
|
this.agentId = agentId;
|
|
}
|
|
|
|
public ToolGrantSummary agentName(@Nullable String agentName) {
|
|
this.agentName = agentName;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get agentName
|
|
* @return agentName
|
|
*/
|
|
|
|
@Schema(name = "agentName", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("agentName")
|
|
public @Nullable String getAgentName() {
|
|
return agentName;
|
|
}
|
|
|
|
@JsonProperty("agentName")
|
|
public void setAgentName(@Nullable String agentName) {
|
|
this.agentName = agentName;
|
|
}
|
|
|
|
public ToolGrantSummary toolType(String toolType) {
|
|
this.toolType = toolType;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 工具类型
|
|
* @return toolType
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "toolType", description = "工具类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("toolType")
|
|
public String getToolType() {
|
|
return toolType;
|
|
}
|
|
|
|
@JsonProperty("toolType")
|
|
public void setToolType(String toolType) {
|
|
this.toolType = toolType;
|
|
}
|
|
|
|
public ToolGrantSummary scope(ToolGrantScope scope) {
|
|
this.scope = scope;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get scope
|
|
* @return scope
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "scope", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("scope")
|
|
public ToolGrantScope getScope() {
|
|
return scope;
|
|
}
|
|
|
|
@JsonProperty("scope")
|
|
public void setScope(ToolGrantScope scope) {
|
|
this.scope = scope;
|
|
}
|
|
|
|
public ToolGrantSummary budget(ToolGrantBudget budget) {
|
|
this.budget = budget;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get budget
|
|
* @return budget
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "budget", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("budget")
|
|
public ToolGrantBudget getBudget() {
|
|
return budget;
|
|
}
|
|
|
|
@JsonProperty("budget")
|
|
public void setBudget(ToolGrantBudget budget) {
|
|
this.budget = budget;
|
|
}
|
|
|
|
public ToolGrantSummary outboundPolicy(ToolGrantOutboundPolicy outboundPolicy) {
|
|
this.outboundPolicy = outboundPolicy;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get outboundPolicy
|
|
* @return outboundPolicy
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "outboundPolicy", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("outboundPolicy")
|
|
public ToolGrantOutboundPolicy getOutboundPolicy() {
|
|
return outboundPolicy;
|
|
}
|
|
|
|
@JsonProperty("outboundPolicy")
|
|
public void setOutboundPolicy(ToolGrantOutboundPolicy outboundPolicy) {
|
|
this.outboundPolicy = outboundPolicy;
|
|
}
|
|
|
|
public ToolGrantSummary status(StatusEnum status) {
|
|
this.status = status;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get status
|
|
* @return status
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("status")
|
|
public StatusEnum getStatus() {
|
|
return status;
|
|
}
|
|
|
|
@JsonProperty("status")
|
|
public void setStatus(StatusEnum status) {
|
|
this.status = status;
|
|
}
|
|
|
|
public ToolGrantSummary approvedBy(@Nullable String approvedBy) {
|
|
this.approvedBy = approvedBy;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 审批人
|
|
* @return approvedBy
|
|
*/
|
|
|
|
@Schema(name = "approvedBy", description = "审批人", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("approvedBy")
|
|
public @Nullable String getApprovedBy() {
|
|
return approvedBy;
|
|
}
|
|
|
|
@JsonProperty("approvedBy")
|
|
public void setApprovedBy(@Nullable String approvedBy) {
|
|
this.approvedBy = approvedBy;
|
|
}
|
|
|
|
public ToolGrantSummary securityApprovalId(@Nullable String securityApprovalId) {
|
|
this.securityApprovalId = securityApprovalId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Security facade 审批记录 ID
|
|
* @return securityApprovalId
|
|
*/
|
|
|
|
@Schema(name = "securityApprovalId", description = "Security facade 审批记录 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("securityApprovalId")
|
|
public @Nullable String getSecurityApprovalId() {
|
|
return securityApprovalId;
|
|
}
|
|
|
|
@JsonProperty("securityApprovalId")
|
|
public void setSecurityApprovalId(@Nullable String securityApprovalId) {
|
|
this.securityApprovalId = securityApprovalId;
|
|
}
|
|
|
|
public ToolGrantSummary createdAt(OffsetDateTime createdAt) {
|
|
this.createdAt = createdAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get createdAt
|
|
* @return createdAt
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "createdAt", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("createdAt")
|
|
public OffsetDateTime getCreatedAt() {
|
|
return createdAt;
|
|
}
|
|
|
|
@JsonProperty("createdAt")
|
|
public void setCreatedAt(OffsetDateTime createdAt) {
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
ToolGrantSummary toolGrantSummary = (ToolGrantSummary) o;
|
|
return Objects.equals(this.grantId, toolGrantSummary.grantId) &&
|
|
Objects.equals(this.agentId, toolGrantSummary.agentId) &&
|
|
Objects.equals(this.agentName, toolGrantSummary.agentName) &&
|
|
Objects.equals(this.toolType, toolGrantSummary.toolType) &&
|
|
Objects.equals(this.scope, toolGrantSummary.scope) &&
|
|
Objects.equals(this.budget, toolGrantSummary.budget) &&
|
|
Objects.equals(this.outboundPolicy, toolGrantSummary.outboundPolicy) &&
|
|
Objects.equals(this.status, toolGrantSummary.status) &&
|
|
Objects.equals(this.approvedBy, toolGrantSummary.approvedBy) &&
|
|
Objects.equals(this.securityApprovalId, toolGrantSummary.securityApprovalId) &&
|
|
Objects.equals(this.createdAt, toolGrantSummary.createdAt);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(grantId, agentId, agentName, toolType, scope, budget, outboundPolicy, status, approvedBy, securityApprovalId, createdAt);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class ToolGrantSummary {\n");
|
|
sb.append(" grantId: ").append(toIndentedString(grantId)).append("\n");
|
|
sb.append(" agentId: ").append(toIndentedString(agentId)).append("\n");
|
|
sb.append(" agentName: ").append(toIndentedString(agentName)).append("\n");
|
|
sb.append(" toolType: ").append(toIndentedString(toolType)).append("\n");
|
|
sb.append(" scope: ").append(toIndentedString(scope)).append("\n");
|
|
sb.append(" budget: ").append(toIndentedString(budget)).append("\n");
|
|
sb.append(" outboundPolicy: ").append(toIndentedString(outboundPolicy)).append("\n");
|
|
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
|
sb.append(" approvedBy: ").append(toIndentedString(approvedBy)).append("\n");
|
|
sb.append(" securityApprovalId: ").append(toIndentedString(securityApprovalId)).append("\n");
|
|
sb.append(" createdAt: ").append(toIndentedString(createdAt)).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 ");
|
|
}
|
|
}
|
|
|