
com.wavefront.sdk.entities.events.EventDTO Maven / Gradle / Ivy
package com.wavefront.sdk.entities.events;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.wavefront.sdk.common.annotation.Nullable;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* DTO for the event to be sent to Wavefront.
*
* @author Shipeng Xie ([email protected])
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class EventDTO {
private final String name;
private final long startTime;
private final long endTime;
private final List hosts;
private final List tags;
private final Map annotations;
public EventDTO(String name, long startTime, long endTime, String source,
Map annotations, @Nullable List listTags) {
this.name = name;
this.startTime = startTime;
this.endTime = endTime;
this.hosts = Collections.singletonList(source);
this.tags = listTags;
this.annotations = annotations;
}
public String getName() {
return name;
}
public long getStartTime() {
return startTime;
}
public long getEndTime() {
return endTime;
}
public List getHosts() {
return hosts;
}
public List getTags() {
if (tags == null) {
return null;
}
return Collections.unmodifiableList(tags);
}
public Map getAnnotations() {
return Collections.unmodifiableMap(annotations);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy