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

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

import javax.annotation.Generated;

import ru.yandex.direct.core.entity.vcard.model.Vcard;
import ru.yandex.direct.model.Model;
import ru.yandex.direct.model.ModelProperty;

@Generated(
        value = "ru.yandex.direct.model.generator.Tool",
        comments = "generated from save_vcard_request.conf"
)
public class SaveVcardRequest implements Model {
    public static final ModelProperty<SaveVcardRequest, Long> CAMPAIGN_ID =
     ModelProperty.create(SaveVcardRequest.class, "campaignId", SaveVcardRequest::getCampaignId, SaveVcardRequest::setCampaignId);

    public static final ModelProperty<SaveVcardRequest, List<Long>> BANNER_IDS =
     ModelProperty.create(SaveVcardRequest.class, "bannerIds", SaveVcardRequest::getBannerIds, SaveVcardRequest::setBannerIds);

    public static final ModelProperty<SaveVcardRequest, Long> VCARD_ID =
     ModelProperty.create(SaveVcardRequest.class, "vcardId", SaveVcardRequest::getVcardId, SaveVcardRequest::setVcardId);

    public static final ModelProperty<SaveVcardRequest, Vcard> VCARD =
     ModelProperty.create(SaveVcardRequest.class, "vcard", SaveVcardRequest::getVcard, SaveVcardRequest::setVcard);

    private Long campaignId;

    private List<Long> bannerIds;

    private Long vcardId;

    private Vcard vcard;

    public Long getCampaignId() {
        return campaignId;
    }

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

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

    public List<Long> getBannerIds() {
        return bannerIds;
    }

    public void setBannerIds(List<Long> bannerIds) {
        this.bannerIds = bannerIds;
    }

    public SaveVcardRequest withBannerIds(List<Long> bannerIds) {
        setBannerIds(bannerIds);
        return this;
    }

    public Long getVcardId() {
        return vcardId;
    }

    public void setVcardId(Long vcardId) {
        this.vcardId = vcardId;
    }

    public SaveVcardRequest withVcardId(Long vcardId) {
        setVcardId(vcardId);
        return this;
    }

    public Vcard getVcard() {
        return vcard;
    }

    public void setVcard(Vcard vcard) {
        this.vcard = vcard;
    }

    public SaveVcardRequest withVcard(Vcard vcard) {
        setVcard(vcard);
        return this;
    }

    public static Set<ModelProperty<?, ?>> allModelProperties() {
        return Set.of(
                CAMPAIGN_ID,
                BANNER_IDS,
                VCARD_ID,
                VCARD
                );
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("ru.yandex.direct.core.entity.vcard.container.SaveVcardRequest{");
        sb.append("campaignId=").append(campaignId);
        sb.append(", bannerIds=").append(bannerIds);
        sb.append(", vcardId=").append(vcardId);
        sb.append(", vcard=").append(vcard);
        sb.append('}');
        return sb.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        SaveVcardRequest that = (SaveVcardRequest) o;
        return Objects.equals(campaignId, that.campaignId)
                 && Objects.equals(bannerIds, that.bannerIds)
                 && Objects.equals(vcardId, that.vcardId)
                 && Objects.equals(vcard, that.vcard);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                campaignId,
                bannerIds,
                vcardId,
                vcard
                );
    }
}
