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

com.mparticle.sdk.model.audienceprocessing.Audience Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
package com.mparticle.sdk.model.audienceprocessing;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;
import java.util.Map;

public final class Audience {

    @JsonProperty(value="audience_id", required=true)
    private int audienceId;

    @JsonProperty(value="audience_name", required=true)
    private String audienceName;

    @JsonProperty("audience_subscription_settings")
    private Map audienceSubscriptionSettings;

    @JsonProperty(value="action", required=true)
    private AudienceAction action;

    @JsonProperty("user_attributes")
    private List userAttributes;

    /**
     *
     * @return audience unique identifier
     */
    public int getAudienceId() {
        return audienceId;
    }

    /**
     *
     * @param audienceId audience unique identifier
     */
    public void setAudienceId(int audienceId) {
        this.audienceId = audienceId;
    }

    /**
     *
     * @return audience name
     */
    public String getAudienceName() {
        return audienceName;
    }

    /**
     *
     * @param audienceName audience name
     */
    public void setAudienceName(String audienceName) {
        this.audienceName = audienceName;
    }

    /**
     *
     * @return audience subscription settings
     */
    public Map getAudienceSubscriptionSettings() {
        return audienceSubscriptionSettings;
    }

    /**
     *
     * @param audienceSubscriptionSettings audience subscription settings
     */
    public void setAudienceSubscriptionSettings(Map audienceSubscriptionSettings) {
        this.audienceSubscriptionSettings = audienceSubscriptionSettings;
    }

    /**
     *
     * @return the action taken on this audience
     */
    @JsonIgnore
    public AudienceAction getAudienceAction() {
        return action;
    }

    /**
     *
     * @param audienceAction the action taken on this audience
     */
    public void setAudienceAction(AudienceAction audienceAction) {
        this.action = audienceAction;
    }

    /**
     *
     * @return user's attributes for this audience
     */
    public List getUserAttributes() {
        return userAttributes;
    }

    /**
     *
     * @param userAttributes user's attributes for this audience
     */
    public void setUserAttributes(List userAttributes) {
        this.userAttributes = userAttributes;
    }

    public enum AudienceAction {
        ADD,
        DELETE,
        ATTRIBUTE_UPDATE;

        @Override
        public String toString() {
            return this.name().toLowerCase();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy