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.GetLocalKnowledge200ResponseAllOfDataEntitiesInner; import com.muse.dto.GetLocalKnowledge200ResponseAllOfDataSourceBindingsInner; import java.util.ArrayList; import java.util.Arrays; import java.util.List; 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; /** * GetLocalKnowledge200ResponseAllOfData */ @JsonTypeName("getLocalKnowledge_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 GetLocalKnowledge200ResponseAllOfData implements Serializable { private static final long serialVersionUID = 1L; private @Nullable String workId; private @Nullable Integer entityCount; @Valid private List<@Valid GetLocalKnowledge200ResponseAllOfDataEntitiesInner> entities = new ArrayList<>(); @Valid private List<@Valid GetLocalKnowledge200ResponseAllOfDataSourceBindingsInner> sourceBindings = new ArrayList<>(); public GetLocalKnowledge200ResponseAllOfData workId(@Nullable String workId) { this.workId = workId; return this; } /** * Get workId * @return workId */ @Schema(name = "workId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("workId") public @Nullable String getWorkId() { return workId; } @JsonProperty("workId") public void setWorkId(@Nullable String workId) { this.workId = workId; } public GetLocalKnowledge200ResponseAllOfData entityCount(@Nullable Integer entityCount) { this.entityCount = entityCount; return this; } /** * Get entityCount * @return entityCount */ @Schema(name = "entityCount", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("entityCount") public @Nullable Integer getEntityCount() { return entityCount; } @JsonProperty("entityCount") public void setEntityCount(@Nullable Integer entityCount) { this.entityCount = entityCount; } public GetLocalKnowledge200ResponseAllOfData entities(List<@Valid GetLocalKnowledge200ResponseAllOfDataEntitiesInner> entities) { this.entities = entities; return this; } public GetLocalKnowledge200ResponseAllOfData addEntitiesItem(GetLocalKnowledge200ResponseAllOfDataEntitiesInner entitiesItem) { if (this.entities == null) { this.entities = new ArrayList<>(); } this.entities.add(entitiesItem); return this; } /** * Get entities * @return entities */ @Valid @Schema(name = "entities", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("entities") public List<@Valid GetLocalKnowledge200ResponseAllOfDataEntitiesInner> getEntities() { return entities; } @JsonProperty("entities") public void setEntities(List<@Valid GetLocalKnowledge200ResponseAllOfDataEntitiesInner> entities) { this.entities = entities; } public GetLocalKnowledge200ResponseAllOfData sourceBindings(List<@Valid GetLocalKnowledge200ResponseAllOfDataSourceBindingsInner> sourceBindings) { this.sourceBindings = sourceBindings; return this; } public GetLocalKnowledge200ResponseAllOfData addSourceBindingsItem(GetLocalKnowledge200ResponseAllOfDataSourceBindingsInner sourceBindingsItem) { if (this.sourceBindings == null) { this.sourceBindings = new ArrayList<>(); } this.sourceBindings.add(sourceBindingsItem); return this; } /** * Get sourceBindings * @return sourceBindings */ @Valid @Schema(name = "sourceBindings", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("sourceBindings") public List<@Valid GetLocalKnowledge200ResponseAllOfDataSourceBindingsInner> getSourceBindings() { return sourceBindings; } @JsonProperty("sourceBindings") public void setSourceBindings(List<@Valid GetLocalKnowledge200ResponseAllOfDataSourceBindingsInner> sourceBindings) { this.sourceBindings = sourceBindings; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GetLocalKnowledge200ResponseAllOfData getLocalKnowledge200ResponseAllOfData = (GetLocalKnowledge200ResponseAllOfData) o; return Objects.equals(this.workId, getLocalKnowledge200ResponseAllOfData.workId) && Objects.equals(this.entityCount, getLocalKnowledge200ResponseAllOfData.entityCount) && Objects.equals(this.entities, getLocalKnowledge200ResponseAllOfData.entities) && Objects.equals(this.sourceBindings, getLocalKnowledge200ResponseAllOfData.sourceBindings); } @Override public int hashCode() { return Objects.hash(workId, entityCount, entities, sourceBindings); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GetLocalKnowledge200ResponseAllOfData {\n"); sb.append(" workId: ").append(toIndentedString(workId)).append("\n"); sb.append(" entityCount: ").append(toIndentedString(entityCount)).append("\n"); sb.append(" entities: ").append(toIndentedString(entities)).append("\n"); sb.append(" sourceBindings: ").append(toIndentedString(sourceBindings)).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 "); } }