package ervu.model.fileupload;

import java.util.Objects;

/**
 * @author Alexandr Shalaginov
 */
public class EmployeeInfoKafkaMessage {
  private final UploadOrgInfo orgInfo;
  private final FileInfo fileInfo;

  public EmployeeInfoKafkaMessage(UploadOrgInfo orgInfo, FileInfo fileInfo) {
    this.orgInfo = orgInfo;
    this.fileInfo = fileInfo;
  }

  public UploadOrgInfo getOrgInfo() {
    return orgInfo;
  }

  public FileInfo getFileInfo() {
    return fileInfo;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    EmployeeInfoKafkaMessage that = (EmployeeInfoKafkaMessage) o;
    return Objects.equals(orgInfo, that.orgInfo) && Objects.equals(fileInfo, that.fileInfo);
  }

  @Override
  public int hashCode() {
    return Objects.hash(orgInfo, fileInfo);
  }

  @Override
  public String toString() {
    return "KafkaMessage{" +
           "uploadOrgInfo=" + orgInfo +
           ", fileInfo=" + fileInfo +
           '}';
  }
}
