All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.taboola.backstage.model.media.campaigns.targeting.PostalTargeting Maven / Gradle / Ivy

package com.taboola.backstage.model.media.campaigns.targeting;

import com.taboola.backstage.annotations.Required;

import java.util.Collection;
import java.util.Objects;

/**
 * Created by vladi
 * Date: 1/15/2018
 * Time: 11:28 PM
 * By Taboola
 */
public class PostalTargeting {

    @Required
    private Type type;
    @Required
    private Collection collection;

    public PostalTargeting() {
        //for serialization
    }

    public PostalTargeting(Collection collection) {
        this.collection = collection;
    }

    public Type getType() {
        return type;
    }

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

    public Collection getCollection() {
        return collection;
    }

    public void setCollection(Collection collection) {
        this.collection = collection;
    }

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

    @Override
    public int hashCode() {

        return Objects.hash(type, collection);
    }

    @Override
    public String toString() {
        return "PostalTargeting{" +
        "type=" + type +
        ", collection=" + collection +
        '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy