com.mailgun.model.stats.Stats Maven / Gradle / Ivy
Show all versions of mailgun-java Show documentation
package com.mailgun.model.stats;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Builder;
import lombok.Value;
import lombok.extern.jackson.Jacksonized;
import java.time.ZonedDateTime;
import static com.mailgun.util.Constants.ENGLISH;
import static com.mailgun.util.Constants.RFC_2822_DATE_TIME_PATTERN_TIME_ZONE_NAME;
/**
*
* Mailgun tracks all of the events that occur throughout the system.
*
*
* @see Stats
*/
@Value
@Jacksonized
@Builder
@JsonIgnoreProperties(ignoreUnknown = true)
public class Stats {
/**
*
* The starting time.
*
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = RFC_2822_DATE_TIME_PATTERN_TIME_ZONE_NAME, locale = ENGLISH)
ZonedDateTime time;
/**
*
* Mailgun accepted the request to send/forward the email and the message has been placed in queue.
*
* {@link Accepted}
*/
Accepted accepted;
/**
*
* Mailgun sent the email and it was accepted by the recipient email server.
*
* {@link Delivered}
*/
Delivered delivered;
/**
*
* Mailgun could not deliver the email to the recipient email server.
*
* {@link Failed}
*/
Failed failed;
/**
*
* Mailgun has stored an incoming message
*
* {@link StatsTotalValueObject}
*/
StatsTotalValueObject stored;
/**
*
* The email recipient opened the email and enabled image viewing. Open tracking must be enabled in the Mailgun control panel,
* and the CNAME record must be pointing to mailgun.org.
*
* {@link StatsTotalValueObject}
*/
StatsTotalValueObject opened;
/**
*
* The email recipient clicked on a link in the email. Click tracking must be enabled in the Mailgun control panel,
* and the CNAME record must be pointing to mailgun.org.
*
* {@link StatsTotalValueObject}
*/
StatsTotalValueObject clicked;
/**
*
* The email recipient clicked on the unsubscribe link. Unsubscribe tracking must be enabled in the Mailgun control panel.
*
* {@link StatsTotalValueObject}
*/
StatsTotalValueObject unsubscribed;
/**
*
* The email recipient clicked on the spam complaint button within their email client.
* Feedback loops enable the notification to be received by Mailgun.
*
* {@link StatsTotalValueObject}
*/
StatsTotalValueObject complained;
}