com.mparticle.sdk.model.eventprocessing.CustomEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk Show documentation
Show all versions of java-sdk Show documentation
mParticle Java SDK used to integrate with mParticle's Firehose API
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();
}
}
}