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.muse.dto.GetEntity200ResponseAllOfDataRelationsInner; import com.muse.dto.GetEntity200ResponseAllOfDataSourceRefsInner; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; 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; /** * GetEntity200ResponseAllOfData */ @JsonTypeName("getEntity_200_response_allOf_data") @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 GetEntity200ResponseAllOfData implements Serializable { private static final long serialVersionUID = 1L; private @Nullable UUID entityId; private @Nullable String name; private @Nullable String type; private @Nullable String status; private @Nullable String description; @Valid private Map attributes = new HashMap<>(); @Valid private List<@Valid GetEntity200ResponseAllOfDataSourceRefsInner> sourceRefs = new ArrayList<>(); @Valid private List<@Valid GetEntity200ResponseAllOfDataRelationsInner> relations = new ArrayList<>(); @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime createdAt; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime updatedAt; public GetEntity200ResponseAllOfData entityId(@Nullable UUID entityId) { this.entityId = entityId; return this; } /** * Get entityId * @return entityId */ @Valid @Schema(name = "entityId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("entityId") public @Nullable UUID getEntityId() { return entityId; } @JsonProperty("entityId") public void setEntityId(@Nullable UUID entityId) { this.entityId = entityId; } public GetEntity200ResponseAllOfData 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 GetEntity200ResponseAllOfData type(@Nullable String type) { this.type = type; return this; } /** * Get type * @return type */ @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public @Nullable String getType() { return type; } @JsonProperty("type") public void setType(@Nullable String type) { this.type = type; } public GetEntity200ResponseAllOfData status(@Nullable String status) { this.status = status; return this; } /** * Get status * @return status */ @Schema(name = "status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("status") public @Nullable String getStatus() { return status; } @JsonProperty("status") public void setStatus(@Nullable String status) { this.status = status; } public GetEntity200ResponseAllOfData 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 GetEntity200ResponseAllOfData attributes(Map attributes) { this.attributes = attributes; return this; } public GetEntity200ResponseAllOfData putAttributesItem(String key, Object attributesItem) { if (this.attributes == null) { this.attributes = new HashMap<>(); } this.attributes.put(key, attributesItem); return this; } /** * 自定义属性键值对 * @return attributes */ @Schema(name = "attributes", description = "自定义属性键值对", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attributes") public Map getAttributes() { return attributes; } @JsonProperty("attributes") public void setAttributes(Map attributes) { this.attributes = attributes; } public GetEntity200ResponseAllOfData sourceRefs(List<@Valid GetEntity200ResponseAllOfDataSourceRefsInner> sourceRefs) { this.sourceRefs = sourceRefs; return this; } public GetEntity200ResponseAllOfData addSourceRefsItem(GetEntity200ResponseAllOfDataSourceRefsInner sourceRefsItem) { if (this.sourceRefs == null) { this.sourceRefs = new ArrayList<>(); } this.sourceRefs.add(sourceRefsItem); return this; } /** * Get sourceRefs * @return sourceRefs */ @Valid @Schema(name = "sourceRefs", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("sourceRefs") public List<@Valid GetEntity200ResponseAllOfDataSourceRefsInner> getSourceRefs() { return sourceRefs; } @JsonProperty("sourceRefs") public void setSourceRefs(List<@Valid GetEntity200ResponseAllOfDataSourceRefsInner> sourceRefs) { this.sourceRefs = sourceRefs; } public GetEntity200ResponseAllOfData relations(List<@Valid GetEntity200ResponseAllOfDataRelationsInner> relations) { this.relations = relations; return this; } public GetEntity200ResponseAllOfData addRelationsItem(GetEntity200ResponseAllOfDataRelationsInner relationsItem) { if (this.relations == null) { this.relations = new ArrayList<>(); } this.relations.add(relationsItem); return this; } /** * Get relations * @return relations */ @Valid @Schema(name = "relations", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("relations") public List<@Valid GetEntity200ResponseAllOfDataRelationsInner> getRelations() { return relations; } @JsonProperty("relations") public void setRelations(List<@Valid GetEntity200ResponseAllOfDataRelationsInner> relations) { this.relations = relations; } public GetEntity200ResponseAllOfData createdAt(@Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } /** * Get createdAt * @return createdAt */ @Valid @Schema(name = "createdAt", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("createdAt") public @Nullable OffsetDateTime getCreatedAt() { return createdAt; } @JsonProperty("createdAt") public void setCreatedAt(@Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; } public GetEntity200ResponseAllOfData updatedAt(@Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } /** * Get updatedAt * @return updatedAt */ @Valid @Schema(name = "updatedAt", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("updatedAt") public @Nullable OffsetDateTime getUpdatedAt() { return updatedAt; } @JsonProperty("updatedAt") public void setUpdatedAt(@Nullable OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GetEntity200ResponseAllOfData getEntity200ResponseAllOfData = (GetEntity200ResponseAllOfData) o; return Objects.equals(this.entityId, getEntity200ResponseAllOfData.entityId) && Objects.equals(this.name, getEntity200ResponseAllOfData.name) && Objects.equals(this.type, getEntity200ResponseAllOfData.type) && Objects.equals(this.status, getEntity200ResponseAllOfData.status) && Objects.equals(this.description, getEntity200ResponseAllOfData.description) && Objects.equals(this.attributes, getEntity200ResponseAllOfData.attributes) && Objects.equals(this.sourceRefs, getEntity200ResponseAllOfData.sourceRefs) && Objects.equals(this.relations, getEntity200ResponseAllOfData.relations) && Objects.equals(this.createdAt, getEntity200ResponseAllOfData.createdAt) && Objects.equals(this.updatedAt, getEntity200ResponseAllOfData.updatedAt); } @Override public int hashCode() { return Objects.hash(entityId, name, type, status, description, attributes, sourceRefs, relations, createdAt, updatedAt); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GetEntity200ResponseAllOfData {\n"); sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" sourceRefs: ").append(toIndentedString(sourceRefs)).append("\n"); sb.append(" relations: ").append(toIndentedString(relations)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 "); } }