package ervu.model.fileupload;

import java.util.Objects;

import ru.micord.ervu.journal.SenderInfo;

/**
 * @author Alexandr Shalaginov
 */
public class UploadOrgInfo {
  private String orgName;
  private String orgId;
  private SenderInfo senderInfo;
  private String esiaOrgId;

  public UploadOrgInfo() {
  }

  public UploadOrgInfo(String orgName, String orgId, SenderInfo senderInfo, String esiaOrgId) {
    this.orgName = orgName;
    this.orgId = orgId;
    this.senderInfo = senderInfo;
    this.esiaOrgId = esiaOrgId;
  }

  public String getEsiaOrgId() {
    return esiaOrgId;
  }

  public String getOrgName() {
    return orgName;
  }

  public String getOrgId() {
    return orgId;
  }

  public SenderInfo getSenderInfo() {
    return senderInfo;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    UploadOrgInfo uploadOrgInfo = (UploadOrgInfo) o;
    return Objects.equals(orgName, uploadOrgInfo.orgName) && Objects.equals(orgId,
        uploadOrgInfo.orgId
    ) && Objects.equals(senderInfo, uploadOrgInfo.senderInfo)
           && Objects.equals(esiaOrgId, uploadOrgInfo.esiaOrgId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(orgName, orgId, senderInfo, esiaOrgId);
  }

  @Override
  public String toString() {
    return "UploadOrgInfo{" +
           "orgName='" + orgName + '\'' +
           ", orgId='" + orgId + '\'' +
           ", senderInfo='" + senderInfo + '\'' +
           ", esiaOrgId='" + esiaOrgId + '\'' +
           '}';
  }
}
