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

import java.time.LocalDateTime;
import java.util.Objects;
import java.util.Set;

import javax.annotation.Generated;

import ru.yandex.direct.core.entity.CampaignLibraryObject;
import ru.yandex.direct.model.Entity;
import ru.yandex.direct.model.ModelProperty;
import ru.yandex.direct.model.ModelWithId;

/**
 *
 * Виртуальная визитка
 */
@Generated(
        value = "ru.yandex.direct.model.generator.Tool",
        comments = "generated from vcard.conf"
)
public class Vcard implements Entity<Long>, CampaignLibraryObject, ModelWithId {
    public static final ModelProperty<Vcard, Long> ID =
     ModelProperty.create(Vcard.class, "id", Vcard::getId, Vcard::setId);

    public static final ModelProperty<Vcard, Long> CAMPAIGN_ID =
     ModelProperty.create(Vcard.class, "campaignId", Vcard::getCampaignId, Vcard::setCampaignId);

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

    public static final ModelProperty<Vcard, LocalDateTime> LAST_CHANGE =
     ModelProperty.create(Vcard.class, "lastChange", Vcard::getLastChange, Vcard::setLastChange);

    public static final ModelProperty<Vcard, LocalDateTime> LAST_DISSOCIATION =
     ModelProperty.create(Vcard.class, "lastDissociation", Vcard::getLastDissociation, Vcard::setLastDissociation);

    public static final ModelProperty<Vcard, String> COMPANY_NAME =
     ModelProperty.create(Vcard.class, "companyName", Vcard::getCompanyName, Vcard::setCompanyName);

    public static final ModelProperty<Vcard, String> WORK_TIME =
     ModelProperty.create(Vcard.class, "workTime", Vcard::getWorkTime, Vcard::setWorkTime);

    public static final ModelProperty<Vcard, String> CONTACT_PERSON =
     ModelProperty.create(Vcard.class, "contactPerson", Vcard::getContactPerson, Vcard::setContactPerson);

    public static final ModelProperty<Vcard, Phone> PHONE =
     ModelProperty.create(Vcard.class, "phone", Vcard::getPhone, Vcard::setPhone);

    public static final ModelProperty<Vcard, String> EMAIL =
     ModelProperty.create(Vcard.class, "email", Vcard::getEmail, Vcard::setEmail);

    public static final ModelProperty<Vcard, InstantMessenger> INSTANT_MESSENGER =
     ModelProperty.create(Vcard.class, "instantMessenger", Vcard::getInstantMessenger, Vcard::setInstantMessenger);

    public static final ModelProperty<Vcard, String> EXTRA_MESSAGE =
     ModelProperty.create(Vcard.class, "extraMessage", Vcard::getExtraMessage, Vcard::setExtraMessage);

    public static final ModelProperty<Vcard, Long> ORG_DETAILS_ID =
     ModelProperty.create(Vcard.class, "orgDetailsId", Vcard::getOrgDetailsId, Vcard::setOrgDetailsId);

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

    /**
     * id организации в справочнике */
    public static final ModelProperty<Vcard, Long> PERMALINK =
     ModelProperty.create(Vcard.class, "permalink", Vcard::getPermalink, Vcard::setPermalink);

    /**
     * id записи в таблице ppc.addresses */
    public static final ModelProperty<Vcard, Long> ADDRESS_ID =
     ModelProperty.create(Vcard.class, "addressId", Vcard::getAddressId, Vcard::setAddressId);

    /**
     * id региона, определяется в сервисе */
    public static final ModelProperty<Vcard, Long> GEO_ID =
     ModelProperty.create(Vcard.class, "geoId", Vcard::getGeoId, Vcard::setGeoId);

    public static final ModelProperty<Vcard, String> COUNTRY =
     ModelProperty.create(Vcard.class, "country", Vcard::getCountry, Vcard::setCountry);

    public static final ModelProperty<Vcard, String> CITY =
     ModelProperty.create(Vcard.class, "city", Vcard::getCity, Vcard::setCity);

    public static final ModelProperty<Vcard, String> STREET =
     ModelProperty.create(Vcard.class, "street", Vcard::getStreet, Vcard::setStreet);

    public static final ModelProperty<Vcard, String> HOUSE =
     ModelProperty.create(Vcard.class, "house", Vcard::getHouse, Vcard::setHouse);

    public static final ModelProperty<Vcard, String> BUILD =
     ModelProperty.create(Vcard.class, "build", Vcard::getBuild, Vcard::setBuild);

    public static final ModelProperty<Vcard, String> APART =
     ModelProperty.create(Vcard.class, "apart", Vcard::getApart, Vcard::setApart);

    /**
     * id станции метро из geo_regions */
    public static final ModelProperty<Vcard, Long> METRO_ID =
     ModelProperty.create(Vcard.class, "metroId", Vcard::getMetroId, Vcard::setMetroId);

    public static final ModelProperty<Vcard, String> METRO_NAME =
     ModelProperty.create(Vcard.class, "metroName", Vcard::getMetroName, Vcard::setMetroName);

    public static final ModelProperty<Vcard, Long> COUNTRY_GEO_ID =
     ModelProperty.create(Vcard.class, "countryGeoId", Vcard::getCountryGeoId, Vcard::setCountryGeoId);

    /**
     * точка на карте, указанная вручную */
    public static final ModelProperty<Vcard, PointOnMap> MANUAL_POINT =
     ModelProperty.create(Vcard.class, "manualPoint", Vcard::getManualPoint, Vcard::setManualPoint);

    /**
     * автоматически определенная точка на карте */
    public static final ModelProperty<Vcard, PointOnMap> AUTO_POINT =
     ModelProperty.create(Vcard.class, "autoPoint", Vcard::getAutoPoint, Vcard::setAutoPoint);

    public static final ModelProperty<Vcard, PointType> POINT_TYPE =
     ModelProperty.create(Vcard.class, "pointType", Vcard::getPointType, Vcard::setPointType);

    public static final ModelProperty<Vcard, PointPrecision> PRECISION =
     ModelProperty.create(Vcard.class, "precision", Vcard::getPrecision, Vcard::setPrecision);

    private Long id;

    private Long campaignId;

    private Long uid;

    private LocalDateTime lastChange;

    private LocalDateTime lastDissociation;

    private String companyName;

    private String workTime;

    private String contactPerson;

    private Phone phone;

    private String email;

    private InstantMessenger instantMessenger;

    private String extraMessage;

    private Long orgDetailsId;

    private String ogrn;

    private Long permalink;

    private Long addressId;

    private Long geoId;

    private String country;

    private String city;

    private String street;

    private String house;

    private String build;

    private String apart;

    private Long metroId;

    private String metroName;

    private Long countryGeoId;

    private PointOnMap manualPoint;

    private PointOnMap autoPoint;

    private PointType pointType;

    private PointPrecision precision;

    public Long getId() {
        return id;
    }

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

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

    public Long getCampaignId() {
        return campaignId;
    }

    public void setCampaignId(Long campaignId) {
        this.campaignId = campaignId;
    }

    public Vcard withCampaignId(Long campaignId) {
        setCampaignId(campaignId);
        return this;
    }

    public Long getUid() {
        return uid;
    }

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

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

    public LocalDateTime getLastChange() {
        return lastChange;
    }

    public void setLastChange(LocalDateTime lastChange) {
        this.lastChange = lastChange;
    }

    public Vcard withLastChange(LocalDateTime lastChange) {
        setLastChange(lastChange);
        return this;
    }

    public LocalDateTime getLastDissociation() {
        return lastDissociation;
    }

    public void setLastDissociation(LocalDateTime lastDissociation) {
        this.lastDissociation = lastDissociation;
    }

    public Vcard withLastDissociation(LocalDateTime lastDissociation) {
        setLastDissociation(lastDissociation);
        return this;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public Vcard withCompanyName(String companyName) {
        setCompanyName(companyName);
        return this;
    }

    public String getWorkTime() {
        return workTime;
    }

    public void setWorkTime(String workTime) {
        this.workTime = workTime;
    }

    public Vcard withWorkTime(String workTime) {
        setWorkTime(workTime);
        return this;
    }

    public String getContactPerson() {
        return contactPerson;
    }

    public void setContactPerson(String contactPerson) {
        this.contactPerson = contactPerson;
    }

    public Vcard withContactPerson(String contactPerson) {
        setContactPerson(contactPerson);
        return this;
    }

    public Phone getPhone() {
        return phone;
    }

    public void setPhone(Phone phone) {
        this.phone = phone;
    }

    public Vcard withPhone(Phone phone) {
        setPhone(phone);
        return this;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Vcard withEmail(String email) {
        setEmail(email);
        return this;
    }

    public InstantMessenger getInstantMessenger() {
        return instantMessenger;
    }

    public void setInstantMessenger(InstantMessenger instantMessenger) {
        this.instantMessenger = instantMessenger;
    }

    public Vcard withInstantMessenger(InstantMessenger instantMessenger) {
        setInstantMessenger(instantMessenger);
        return this;
    }

    public String getExtraMessage() {
        return extraMessage;
    }

    public void setExtraMessage(String extraMessage) {
        this.extraMessage = extraMessage;
    }

    public Vcard withExtraMessage(String extraMessage) {
        setExtraMessage(extraMessage);
        return this;
    }

    public Long getOrgDetailsId() {
        return orgDetailsId;
    }

    public void setOrgDetailsId(Long orgDetailsId) {
        this.orgDetailsId = orgDetailsId;
    }

    public Vcard withOrgDetailsId(Long orgDetailsId) {
        setOrgDetailsId(orgDetailsId);
        return this;
    }

    public String getOgrn() {
        return ogrn;
    }

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

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

    /**
     * id организации в справочнике */
    public Long getPermalink() {
        return permalink;
    }

    public void setPermalink(Long permalink) {
        this.permalink = permalink;
    }

    public Vcard withPermalink(Long permalink) {
        setPermalink(permalink);
        return this;
    }

    /**
     * id записи в таблице ppc.addresses */
    public Long getAddressId() {
        return addressId;
    }

    public void setAddressId(Long addressId) {
        this.addressId = addressId;
    }

    public Vcard withAddressId(Long addressId) {
        setAddressId(addressId);
        return this;
    }

    /**
     * id региона, определяется в сервисе */
    public Long getGeoId() {
        return geoId;
    }

    public void setGeoId(Long geoId) {
        this.geoId = geoId;
    }

    public Vcard withGeoId(Long geoId) {
        setGeoId(geoId);
        return this;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public Vcard withCountry(String country) {
        setCountry(country);
        return this;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public Vcard withCity(String city) {
        setCity(city);
        return this;
    }

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }

    public Vcard withStreet(String street) {
        setStreet(street);
        return this;
    }

    public String getHouse() {
        return house;
    }

    public void setHouse(String house) {
        this.house = house;
    }

    public Vcard withHouse(String house) {
        setHouse(house);
        return this;
    }

    public String getBuild() {
        return build;
    }

    public void setBuild(String build) {
        this.build = build;
    }

    public Vcard withBuild(String build) {
        setBuild(build);
        return this;
    }

    public String getApart() {
        return apart;
    }

    public void setApart(String apart) {
        this.apart = apart;
    }

    public Vcard withApart(String apart) {
        setApart(apart);
        return this;
    }

    /**
     * id станции метро из geo_regions */
    public Long getMetroId() {
        return metroId;
    }

    public void setMetroId(Long metroId) {
        this.metroId = metroId;
    }

    public Vcard withMetroId(Long metroId) {
        setMetroId(metroId);
        return this;
    }

    public String getMetroName() {
        return metroName;
    }

    public void setMetroName(String metroName) {
        this.metroName = metroName;
    }

    public Vcard withMetroName(String metroName) {
        setMetroName(metroName);
        return this;
    }

    public Long getCountryGeoId() {
        return countryGeoId;
    }

    public void setCountryGeoId(Long countryGeoId) {
        this.countryGeoId = countryGeoId;
    }

    public Vcard withCountryGeoId(Long countryGeoId) {
        setCountryGeoId(countryGeoId);
        return this;
    }

    /**
     * точка на карте, указанная вручную */
    public PointOnMap getManualPoint() {
        return manualPoint;
    }

    public void setManualPoint(PointOnMap manualPoint) {
        this.manualPoint = manualPoint;
    }

    public Vcard withManualPoint(PointOnMap manualPoint) {
        setManualPoint(manualPoint);
        return this;
    }

    /**
     * автоматически определенная точка на карте */
    public PointOnMap getAutoPoint() {
        return autoPoint;
    }

    public void setAutoPoint(PointOnMap autoPoint) {
        this.autoPoint = autoPoint;
    }

    public Vcard withAutoPoint(PointOnMap autoPoint) {
        setAutoPoint(autoPoint);
        return this;
    }

    public PointType getPointType() {
        return pointType;
    }

    public void setPointType(PointType pointType) {
        this.pointType = pointType;
    }

    public Vcard withPointType(PointType pointType) {
        setPointType(pointType);
        return this;
    }

    public PointPrecision getPrecision() {
        return precision;
    }

    public void setPrecision(PointPrecision precision) {
        this.precision = precision;
    }

    public Vcard withPrecision(PointPrecision precision) {
        setPrecision(precision);
        return this;
    }

    public static Set<ModelProperty<?, ?>> allModelProperties() {
        return Set.of(
                ID,
                CAMPAIGN_ID,
                UID,
                LAST_CHANGE,
                LAST_DISSOCIATION,
                COMPANY_NAME,
                WORK_TIME,
                CONTACT_PERSON,
                PHONE,
                EMAIL,
                INSTANT_MESSENGER,
                EXTRA_MESSAGE,
                ORG_DETAILS_ID,
                OGRN,
                PERMALINK,
                ADDRESS_ID,
                GEO_ID,
                COUNTRY,
                CITY,
                STREET,
                HOUSE,
                BUILD,
                APART,
                METRO_ID,
                METRO_NAME,
                COUNTRY_GEO_ID,
                MANUAL_POINT,
                AUTO_POINT,
                POINT_TYPE,
                PRECISION
                );
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("ru.yandex.direct.core.entity.vcard.model.Vcard{");
        sb.append("id=").append(id);
        sb.append(", campaignId=").append(campaignId);
        sb.append(", uid=").append(uid);
        sb.append(", lastChange=").append(lastChange);
        sb.append(", lastDissociation=").append(lastDissociation);
        sb.append(", companyName=").append(companyName);
        sb.append(", workTime=").append(workTime);
        sb.append(", contactPerson=").append(contactPerson);
        sb.append(", phone=").append(phone);
        sb.append(", email=").append(email);
        sb.append(", instantMessenger=").append(instantMessenger);
        sb.append(", extraMessage=").append(extraMessage);
        sb.append(", orgDetailsId=").append(orgDetailsId);
        sb.append(", ogrn=").append(ogrn);
        sb.append(", permalink=").append(permalink);
        sb.append(", addressId=").append(addressId);
        sb.append(", geoId=").append(geoId);
        sb.append(", country=").append(country);
        sb.append(", city=").append(city);
        sb.append(", street=").append(street);
        sb.append(", house=").append(house);
        sb.append(", build=").append(build);
        sb.append(", apart=").append(apart);
        sb.append(", metroId=").append(metroId);
        sb.append(", metroName=").append(metroName);
        sb.append(", countryGeoId=").append(countryGeoId);
        sb.append(", manualPoint=").append(manualPoint);
        sb.append(", autoPoint=").append(autoPoint);
        sb.append(", pointType=").append(pointType);
        sb.append(", precision=").append(precision);
        sb.append('}');
        return sb.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Vcard that = (Vcard) o;
        return Objects.equals(id, that.id)
                 && Objects.equals(campaignId, that.campaignId)
                 && Objects.equals(uid, that.uid)
                 && Objects.equals(lastChange, that.lastChange)
                 && Objects.equals(lastDissociation, that.lastDissociation)
                 && Objects.equals(companyName, that.companyName)
                 && Objects.equals(workTime, that.workTime)
                 && Objects.equals(contactPerson, that.contactPerson)
                 && Objects.equals(phone, that.phone)
                 && Objects.equals(email, that.email)
                 && Objects.equals(instantMessenger, that.instantMessenger)
                 && Objects.equals(extraMessage, that.extraMessage)
                 && Objects.equals(orgDetailsId, that.orgDetailsId)
                 && Objects.equals(ogrn, that.ogrn)
                 && Objects.equals(permalink, that.permalink)
                 && Objects.equals(addressId, that.addressId)
                 && Objects.equals(geoId, that.geoId)
                 && Objects.equals(country, that.country)
                 && Objects.equals(city, that.city)
                 && Objects.equals(street, that.street)
                 && Objects.equals(house, that.house)
                 && Objects.equals(build, that.build)
                 && Objects.equals(apart, that.apart)
                 && Objects.equals(metroId, that.metroId)
                 && Objects.equals(metroName, that.metroName)
                 && Objects.equals(countryGeoId, that.countryGeoId)
                 && Objects.equals(manualPoint, that.manualPoint)
                 && Objects.equals(autoPoint, that.autoPoint)
                 && Objects.equals(pointType, that.pointType)
                 && Objects.equals(precision, that.precision);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                id,
                campaignId,
                uid,
                lastChange,
                lastDissociation,
                companyName,
                workTime,
                contactPerson,
                phone,
                email,
                instantMessenger,
                extraMessage,
                orgDetailsId,
                ogrn,
                permalink,
                addressId,
                geoId,
                country,
                city,
                street,
                house,
                build,
                apart,
                metroId,
                metroName,
                countryGeoId,
                manualPoint,
                autoPoint,
                pointType,
                precision
                );
    }
}
