package ru.nbch.indicsearchservice.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import java.util.Objects;

@Schema(description = "Add search job response data transfer object")
public class AddSearchJobResponseDto {
    @Schema(description = "Job id", example = "1")
    @NotNull
    private Long jobId;

    public AddSearchJobResponseDto() {
    }

    public AddSearchJobResponseDto(Long jobId) {
        this.jobId = jobId;
    }

    public Long getJobId() {
        return jobId;
    }

    public void setJobId(Long jobId) {
        this.jobId = jobId;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        AddSearchJobResponseDto that = (AddSearchJobResponseDto) o;
        return Objects.equals(jobId, that.jobId);
    }

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

    @Override
    public String toString() {
        return "AddSearchJobResponseDto{" +
            "jobId=" + jobId +
            '}';
    }
}
