371 lines
11 KiB
Java
371 lines
11 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 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;
|
|
|
|
/**
|
|
* 调用归属 job 详情
|
|
*/
|
|
|
|
@Schema(name = "CallAttributionJobDetail", description = "调用归属 job 详情")
|
|
@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 CallAttributionJobDetail implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String jobId;
|
|
|
|
/**
|
|
* 执行状态
|
|
*/
|
|
public enum StatusEnum {
|
|
QUEUED("queued"),
|
|
|
|
PROCESSING("processing"),
|
|
|
|
COMPLETED("completed"),
|
|
|
|
FAILED("failed"),
|
|
|
|
PARTIALLY_COMPLETED("partially_completed");
|
|
|
|
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 String userId;
|
|
|
|
private @Nullable Integer attributedCallCount;
|
|
|
|
private @Nullable Integer pendingCallCount;
|
|
|
|
private @Nullable Integer failedCallCount;
|
|
|
|
private @Nullable String failedReason;
|
|
|
|
private @Nullable String compensationSuggestion;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private OffsetDateTime createdAt;
|
|
|
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
|
private @Nullable OffsetDateTime completedAt;
|
|
|
|
public CallAttributionJobDetail() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public CallAttributionJobDetail(String jobId, StatusEnum status, String userId, OffsetDateTime createdAt) {
|
|
this.jobId = jobId;
|
|
this.status = status;
|
|
this.userId = userId;
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
public CallAttributionJobDetail jobId(String jobId) {
|
|
this.jobId = jobId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 调用归属 job ID
|
|
* @return jobId
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "jobId", description = "调用归属 job ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("jobId")
|
|
public String getJobId() {
|
|
return jobId;
|
|
}
|
|
|
|
@JsonProperty("jobId")
|
|
public void setJobId(String jobId) {
|
|
this.jobId = jobId;
|
|
}
|
|
|
|
public CallAttributionJobDetail status(StatusEnum status) {
|
|
this.status = status;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 执行状态
|
|
* @return status
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "status", description = "执行状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("status")
|
|
public StatusEnum getStatus() {
|
|
return status;
|
|
}
|
|
|
|
@JsonProperty("status")
|
|
public void setStatus(StatusEnum status) {
|
|
this.status = status;
|
|
}
|
|
|
|
public CallAttributionJobDetail userId(String userId) {
|
|
this.userId = userId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 归属用户 ID
|
|
* @return userId
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "userId", description = "归属用户 ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("userId")
|
|
public String getUserId() {
|
|
return userId;
|
|
}
|
|
|
|
@JsonProperty("userId")
|
|
public void setUserId(String userId) {
|
|
this.userId = userId;
|
|
}
|
|
|
|
public CallAttributionJobDetail attributedCallCount(@Nullable Integer attributedCallCount) {
|
|
this.attributedCallCount = attributedCallCount;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 已归属调用数
|
|
* @return attributedCallCount
|
|
*/
|
|
|
|
@Schema(name = "attributedCallCount", description = "已归属调用数", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("attributedCallCount")
|
|
public @Nullable Integer getAttributedCallCount() {
|
|
return attributedCallCount;
|
|
}
|
|
|
|
@JsonProperty("attributedCallCount")
|
|
public void setAttributedCallCount(@Nullable Integer attributedCallCount) {
|
|
this.attributedCallCount = attributedCallCount;
|
|
}
|
|
|
|
public CallAttributionJobDetail pendingCallCount(@Nullable Integer pendingCallCount) {
|
|
this.pendingCallCount = pendingCallCount;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 待归属调用数
|
|
* @return pendingCallCount
|
|
*/
|
|
|
|
@Schema(name = "pendingCallCount", description = "待归属调用数", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("pendingCallCount")
|
|
public @Nullable Integer getPendingCallCount() {
|
|
return pendingCallCount;
|
|
}
|
|
|
|
@JsonProperty("pendingCallCount")
|
|
public void setPendingCallCount(@Nullable Integer pendingCallCount) {
|
|
this.pendingCallCount = pendingCallCount;
|
|
}
|
|
|
|
public CallAttributionJobDetail failedCallCount(@Nullable Integer failedCallCount) {
|
|
this.failedCallCount = failedCallCount;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 归属失败调用数
|
|
* @return failedCallCount
|
|
*/
|
|
|
|
@Schema(name = "failedCallCount", description = "归属失败调用数", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("failedCallCount")
|
|
public @Nullable Integer getFailedCallCount() {
|
|
return failedCallCount;
|
|
}
|
|
|
|
@JsonProperty("failedCallCount")
|
|
public void setFailedCallCount(@Nullable Integer failedCallCount) {
|
|
this.failedCallCount = failedCallCount;
|
|
}
|
|
|
|
public CallAttributionJobDetail failedReason(@Nullable String failedReason) {
|
|
this.failedReason = failedReason;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 失败原因(仅失败时返回)
|
|
* @return failedReason
|
|
*/
|
|
|
|
@Schema(name = "failedReason", description = "失败原因(仅失败时返回)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("failedReason")
|
|
public @Nullable String getFailedReason() {
|
|
return failedReason;
|
|
}
|
|
|
|
@JsonProperty("failedReason")
|
|
public void setFailedReason(@Nullable String failedReason) {
|
|
this.failedReason = failedReason;
|
|
}
|
|
|
|
public CallAttributionJobDetail compensationSuggestion(@Nullable String compensationSuggestion) {
|
|
this.compensationSuggestion = compensationSuggestion;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 补偿建议(失败时提供)
|
|
* @return compensationSuggestion
|
|
*/
|
|
|
|
@Schema(name = "compensationSuggestion", description = "补偿建议(失败时提供)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("compensationSuggestion")
|
|
public @Nullable String getCompensationSuggestion() {
|
|
return compensationSuggestion;
|
|
}
|
|
|
|
@JsonProperty("compensationSuggestion")
|
|
public void setCompensationSuggestion(@Nullable String compensationSuggestion) {
|
|
this.compensationSuggestion = compensationSuggestion;
|
|
}
|
|
|
|
public CallAttributionJobDetail createdAt(OffsetDateTime createdAt) {
|
|
this.createdAt = createdAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 创建时间
|
|
* @return createdAt
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "createdAt", description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("createdAt")
|
|
public OffsetDateTime getCreatedAt() {
|
|
return createdAt;
|
|
}
|
|
|
|
@JsonProperty("createdAt")
|
|
public void setCreatedAt(OffsetDateTime createdAt) {
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
public CallAttributionJobDetail completedAt(@Nullable OffsetDateTime completedAt) {
|
|
this.completedAt = completedAt;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 完成时间
|
|
* @return completedAt
|
|
*/
|
|
@Valid
|
|
@Schema(name = "completedAt", description = "完成时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("completedAt")
|
|
public @Nullable OffsetDateTime getCompletedAt() {
|
|
return completedAt;
|
|
}
|
|
|
|
@JsonProperty("completedAt")
|
|
public void setCompletedAt(@Nullable OffsetDateTime completedAt) {
|
|
this.completedAt = completedAt;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
CallAttributionJobDetail callAttributionJobDetail = (CallAttributionJobDetail) o;
|
|
return Objects.equals(this.jobId, callAttributionJobDetail.jobId) &&
|
|
Objects.equals(this.status, callAttributionJobDetail.status) &&
|
|
Objects.equals(this.userId, callAttributionJobDetail.userId) &&
|
|
Objects.equals(this.attributedCallCount, callAttributionJobDetail.attributedCallCount) &&
|
|
Objects.equals(this.pendingCallCount, callAttributionJobDetail.pendingCallCount) &&
|
|
Objects.equals(this.failedCallCount, callAttributionJobDetail.failedCallCount) &&
|
|
Objects.equals(this.failedReason, callAttributionJobDetail.failedReason) &&
|
|
Objects.equals(this.compensationSuggestion, callAttributionJobDetail.compensationSuggestion) &&
|
|
Objects.equals(this.createdAt, callAttributionJobDetail.createdAt) &&
|
|
Objects.equals(this.completedAt, callAttributionJobDetail.completedAt);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(jobId, status, userId, attributedCallCount, pendingCallCount, failedCallCount, failedReason, compensationSuggestion, createdAt, completedAt);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class CallAttributionJobDetail {\n");
|
|
sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n");
|
|
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
|
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
|
|
sb.append(" attributedCallCount: ").append(toIndentedString(attributedCallCount)).append("\n");
|
|
sb.append(" pendingCallCount: ").append(toIndentedString(pendingCallCount)).append("\n");
|
|
sb.append(" failedCallCount: ").append(toIndentedString(failedCallCount)).append("\n");
|
|
sb.append(" failedReason: ").append(toIndentedString(failedReason)).append("\n");
|
|
sb.append(" compensationSuggestion: ").append(toIndentedString(compensationSuggestion)).append("\n");
|
|
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
|
|
sb.append(" completedAt: ").append(toIndentedString(completedAt)).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 ");
|
|
}
|
|
}
|
|
|