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

com.mparticle.sdk.model.eventprocessing.CustomEvent Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Map;

public final class CustomEvent extends Event {

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

    @JsonProperty("custom_event_type")
    private CustomType customType;

    @JsonProperty("attributes")
    private Map attributes;

    /**
     *
     * @return event name
     */
    public String getName() {
        return name;
    }

    /**
     *
     * @param name event name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     *
     * @return custom event type
     */
    public CustomType getCustomType() {
        return customType;
    }

    /**
     *
     * @param customType  custom event type
     */
    public void setCustomType(CustomType customType) {
        this.customType = customType;
    }

    /**
     *
     * @return event attributes
     */
    public Map getAttributes() {
        return attributes;
    }

    /**
     *
     * @param attributes  event attributes
     */
    public void setAttributes(Map attributes) {
        this.attributes = attributes;
    }

    public CustomEvent() {
        super(Type.CUSTOM_EVENT);
    }

    /**
     * Custom event types.
     */
    public enum CustomType {
        UNKNOWN,
        NAVIGATION,
        LOCATION,
        SEARCH,
        TRANSACTION,
        USER_CONTENT,
        USER_PREFERENCE,
        SOCIAL,
        OTHER,
        MEDIA;

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy