package com.lanyuanxiaoyao.service.configuration.entity.info;

/**
 * Flink Job ID 和 Alias 组合体
 *
 * @author lanyuanxiaoyao
 * @date 2023-04-26
 */
public class JobIdAndAlias {
    private Long id;
    private String alias;

    public JobIdAndAlias() {
    }

    public JobIdAndAlias(Long id, String alias) {
        this.id = id;
        this.alias = alias;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        JobIdAndAlias that = (JobIdAndAlias) o;

        if (!id.equals(that.id)) return false;
        return alias.equals(that.alias);
    }

    @Override
    public int hashCode() {
        int result = id.hashCode();
        result = 31 * result + alias.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return "JobIdAndAlias{" +
               "id=" + id +
               ", alias='" + alias + '\'' +
               '}';
    }
}
