// Auto-generated by model-generator, source: org_details.conf
package ru.yandex.direct.core.entity.vcard.repository.internal;

import java.util.Objects;
import java.util.Set;

import javax.annotation.Generated;

import ru.yandex.direct.model.ModelProperty;
import ru.yandex.direct.model.ModelWithId;

/**
 *
 * Представление таблицы ppc.org_details
 */
@Generated(
        value = "ru.yandex.direct.model.generator.Tool",
        comments = "generated from org_details.conf"
)
public class DbOrgDetails implements ModelWithId {
    public static final ModelProperty<DbOrgDetails, Long> ID =
     ModelProperty.create(DbOrgDetails.class, "id", DbOrgDetails::getId, DbOrgDetails::setId);

    public static final ModelProperty<DbOrgDetails, Long> UID =
     ModelProperty.create(DbOrgDetails.class, "uid", DbOrgDetails::getUid, DbOrgDetails::setUid);

    public static final ModelProperty<DbOrgDetails, String> OGRN =
     ModelProperty.create(DbOrgDetails.class, "ogrn", DbOrgDetails::getOgrn, DbOrgDetails::setOgrn);

    private Long id;

    private Long uid;

    private String ogrn;

    public Long getId() {
        return id;
    }

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

    public DbOrgDetails withId(Long id) {
        setId(id);
        return this;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public DbOrgDetails withUid(Long uid) {
        setUid(uid);
        return this;
    }

    public String getOgrn() {
        return ogrn;
    }

    public void setOgrn(String ogrn) {
        this.ogrn = ogrn;
    }

    public DbOrgDetails withOgrn(String ogrn) {
        setOgrn(ogrn);
        return this;
    }

    public static Set<ModelProperty<?, ?>> allModelProperties() {
        return Set.of(
                ID,
                UID,
                OGRN
                );
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("ru.yandex.direct.core.entity.vcard.repository.internal.DbOrgDetails{");
        sb.append("id=").append(id);
        sb.append(", uid=").append(uid);
        sb.append(", ogrn=").append(ogrn);
        sb.append('}');
        return sb.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        DbOrgDetails that = (DbOrgDetails) o;
        return Objects.equals(id, that.id)
                 && Objects.equals(uid, that.uid)
                 && Objects.equals(ogrn, that.ogrn);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                id,
                uid,
                ogrn
                );
    }
}
