package ru.nbch.indicsearchservice.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Objects;
import ru.nbch.indicsearchservice.model.enums.JobStatus;

@Schema(description = "Job's status response data transfer object")
public class JobStatusResponseDto {
    @Schema(description = "Job's status", example = "DONE")
    private JobStatus status;

    public JobStatusResponseDto() {
    }

    public JobStatusResponseDto(JobStatus status) {
        this.status = status;
    }

    public JobStatus getStatus() {
        return status;
    }

    public void setStatus(JobStatus status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        JobStatusResponseDto that = (JobStatusResponseDto) o;
        return status == that.status;
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(status);
    }

    @Override
    public String toString() {
        return "JobStatusResponseDto{" +
            "status=" + status +
            '}';
    }
}
