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

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

import javax.annotation.Generated;

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

/**
 *
 * Данные мессенджера в виртуальной визитке
 */
@Generated(
        value = "ru.yandex.direct.model.generator.Tool",
        comments = "generated from instant_messenger.conf"
)
public class InstantMessenger implements Model {
    public static final ModelProperty<InstantMessenger, String> TYPE =
     ModelProperty.create(InstantMessenger.class, "type", InstantMessenger::getType, InstantMessenger::setType);

    public static final ModelProperty<InstantMessenger, String> LOGIN =
     ModelProperty.create(InstantMessenger.class, "login", InstantMessenger::getLogin, InstantMessenger::setLogin);

    private String type;

    private String login;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public InstantMessenger withType(String type) {
        setType(type);
        return this;
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public InstantMessenger withLogin(String login) {
        setLogin(login);
        return this;
    }

    public static Set<ModelProperty<?, ?>> allModelProperties() {
        return Set.of(
                TYPE,
                LOGIN
                );
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("ru.yandex.direct.core.entity.vcard.model.InstantMessenger{");
        sb.append("type=").append(type);
        sb.append(", login=").append(login);
        sb.append('}');
        return sb.toString();
    }

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

    @Override
    public int hashCode() {
        return Objects.hash(
                type,
                login
                );
    }
}
