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 java.time.OffsetDateTime; 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; /** * 来源谱系信息 */ @Schema(name = "SourceAttribution_lineage", description = "来源谱系信息") @JsonTypeName("SourceAttribution_lineage") @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 SourceAttributionLineage implements Serializable { private static final long serialVersionUID = 1L; private @Nullable String parentSuggestionId; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private @Nullable OffsetDateTime acceptedAt; /** * Gets or Sets acceptMode */ public enum AcceptModeEnum { ACCEPT_AS_IS("accept_as_is"), MERGE_AFTER_EDIT("merge_after_edit"); private final String value; AcceptModeEnum(String value) { this.value = value; } @JsonValue public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } @JsonCreator public static AcceptModeEnum fromValue(String value) { for (AcceptModeEnum b : AcceptModeEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } private @Nullable AcceptModeEnum acceptMode; public SourceAttributionLineage parentSuggestionId(@Nullable String parentSuggestionId) { this.parentSuggestionId = parentSuggestionId; return this; } /** * 关联的 AI 候选 ID * @return parentSuggestionId */ @Schema(name = "parentSuggestionId", description = "关联的 AI 候选 ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("parentSuggestionId") public @Nullable String getParentSuggestionId() { return parentSuggestionId; } @JsonProperty("parentSuggestionId") public void setParentSuggestionId(@Nullable String parentSuggestionId) { this.parentSuggestionId = parentSuggestionId; } public SourceAttributionLineage acceptedAt(@Nullable OffsetDateTime acceptedAt) { this.acceptedAt = acceptedAt; return this; } /** * Get acceptedAt * @return acceptedAt */ @Valid @Schema(name = "acceptedAt", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("acceptedAt") public @Nullable OffsetDateTime getAcceptedAt() { return acceptedAt; } @JsonProperty("acceptedAt") public void setAcceptedAt(@Nullable OffsetDateTime acceptedAt) { this.acceptedAt = acceptedAt; } public SourceAttributionLineage acceptMode(@Nullable AcceptModeEnum acceptMode) { this.acceptMode = acceptMode; return this; } /** * Get acceptMode * @return acceptMode */ @Schema(name = "acceptMode", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("acceptMode") public @Nullable AcceptModeEnum getAcceptMode() { return acceptMode; } @JsonProperty("acceptMode") public void setAcceptMode(@Nullable AcceptModeEnum acceptMode) { this.acceptMode = acceptMode; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SourceAttributionLineage sourceAttributionLineage = (SourceAttributionLineage) o; return Objects.equals(this.parentSuggestionId, sourceAttributionLineage.parentSuggestionId) && Objects.equals(this.acceptedAt, sourceAttributionLineage.acceptedAt) && Objects.equals(this.acceptMode, sourceAttributionLineage.acceptMode); } @Override public int hashCode() { return Objects.hash(parentSuggestionId, acceptedAt, acceptMode); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SourceAttributionLineage {\n"); sb.append(" parentSuggestionId: ").append(toIndentedString(parentSuggestionId)).append("\n"); sb.append(" acceptedAt: ").append(toIndentedString(acceptedAt)).append("\n"); sb.append(" acceptMode: ").append(toIndentedString(acceptMode)).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 "); } }