public class ChangeAbandoned extends ChangeBasedEvent {

    /**
     * The person who triggered this event.
     */
    private Account abandoner;

    /**
     * Default constructor.
     */
    public ChangeAbandoned() {
    }

    /**
     * Get the abandoner who triggered this event.
     * @return the abandoner
     */
    public Account getAbandoner() {
        return this.abandoner;
    }

    /**
     * Set the abandoner for this event.
     * @param abandoner the abandoner to set
     */
    public void setAbandoner(Account abandoner) {
        this.abandoner = abandoner;
    }

    /**
     * Constructor that fills data directly.
     * @param json the JSON Object
     * @see #fromJson(net.sf.json.JSONObject)
     */
    @SuppressWarnings("OverridableMethodCallInConstructor")
    public ChangeAbandoned(JSONObject json) {
        fromJson(json);
    }

    @Override
    public GerritEventType getEventType() {
        return GerritEventType.CHANGE_ABANDONED;
    }

    @Override
    public boolean isScorable() {
        return false;
    }

    @Override
    public void fromJson(JSONObject json) {
        super.fromJson(json);

        if (json.containsKey(ABANDONER)) {
            abandoner = new Account(json.getJSONObject(ABANDONER));
        }
    }
} public class ChangeMerged extends ChangeBasedEvent implements RepositoryModifiedEvent {
    /**
     * Rev of the merge-commit.
     */
    protected String newRev;

    /**
     * Default constructor.
     */
    public ChangeMerged() {
    }

    /**
     * Constructor that fills data directly.
     *
     * @param json the JSON Object
     * @see #fromJson(net.sf.json.JSONObject)
     */
    public ChangeMerged(JSONObject json) {
        fromJson(json);
    }

    @Override
    public GerritEventType getEventType() {
        return GerritEventType.CHANGE_MERGED;
    }

    @Override
    public boolean isScorable() {
        return false;
    }

    @Override
    public String getModifiedProject() {
        if (change != null) {
            return change.getProject();
        }
        return null;
    }

    @Override
    public String getModifiedRef() {
        if (patchSet != null) {
            return patchSet.getRef();
        }
        return null;
    }

    @Override
    public void fromJson(JSONObject json) {
        super.fromJson(json);
        if (json.containsKey(SUBMITTER)) {
            account = new Account(json.getJSONObject(SUBMITTER));
        }

        if (json.containsKey(NEWREV)) {
            this.newRev = getString(json, NEWREV);
        }
    }

    /**
     * Rev of the merge-commit.
     * @return the new Rev
     */
    public String getNewRev() {
        return this.newRev;
    }

     /**
     * Rev of the merge-commit.
     * @param newRev the new Rev
     */
    public void setNewRev(String newRev) {
        this.newRev = newRev;
    }
} public class CommentAdded extends ChangeBasedEvent {
    /**
     * Comment string
     */
    private String comment;

    private List<Approval> approvals = new ArrayList<Approval>();

    @Override
    public GerritEventType getEventType() {
        return GerritEventType.COMMENT_ADDED;
    }

    /**
     * Get the code review approvals associated with this Gerrit comment.
     * @return a list of code review approvals.
     */
    public List<Approval> getApprovals() {
        return approvals;
    }

    /**
     * Set the code review approvals for this event.
     * @param approvals the list of Approvals.
     */
    public void setApprovals(List<Approval> approvals) {
        this.approvals = approvals;
    }

    /**
     * Comment.
     * @return the comment
     */
    public String getComment() {
        return comment;
    }

    /**
     * Comment.
     * @param comment the comment to set
     */
    public void setComment(String comment) {
        this.comment = comment;
    }

    @Override
    public boolean isScorable() {
        return true;
    }

    @Override
    public void fromJson(JSONObject json) {
        super.fromJson(json);
        comment = getString(json, COMMENT);
        if (json.containsKey(AUTHOR)) {
            account = new Account(json.getJSONObject(AUTHOR));
        }
        if (json.containsKey(APPROVALS)) {
            JSONArray eventApprovals = json.getJSONArray(APPROVALS);
            for (int i = 0; i < eventApprovals.size(); i++) {
                approvals.add(new Approval(eventApprovals.getJSONObject(i)));
            }
        }
    }

    @Override
    public int hashCode() {
        int a = 0;
        if (comment != null) {
            a = comment.hashCode();
        }
        return super.hashCode() + a;
    }

    @Override
    public boolean equals(Object o) {
        if (!super.equals(o)) {
            return false;
        }

        CommentAdded event = (CommentAdded)o;
        if (comment == null) {
            return event.comment == null;
        }
        return comment.equals(event.comment);
    }
} public class PatchsetCreated extends ChangeBasedEvent implements RepositoryModifiedEvent {

    /* Uploader has been replaced by GerritTriggeredEvent.account.
     * This allows old builds to deserialize without warnings. */
    @SuppressWarnings("unused")
    private transient Account uploader;

    @Override
    public GerritEventType getEventType() {
        return GerritEventType.PATCHSET_CREATED;
    }

    @Override
    public boolean isScorable() {
        return true;
    }

    @Override
    public void fromJson(JSONObject json) {
        super.fromJson(json);
        if (json.containsKey(UPLOADER)) {
            this.account = new Account(json.getJSONObject(UPLOADER));
        }
    }

    @Override
    public String toString() {
        return "PatchsetCreated: " + change + " " + patchSet;
    }

    @Override
    public String getModifiedProject() {
        if (change != null) {
            return change.getProject();
        }
        return null;
    }

    @Override
    public String getModifiedRef() {
        if (patchSet != null) {
            return patchSet.getRef();
        }
        return null;
    }
} public class RefReplicated extends GerritTriggeredEvent {

    /**
     * Replication failed status.
     */
    public static final String FAILED_STATUS = "failed";
    /**
     * Replication succeeded status.
     */
    public static final String SUCCEEDED_STATUS = "succeeded";

    /**
     * Project path in Gerrit.
     */
    private String project;
    /**
     * Ref name within project.
     */
    private String ref;
    /**
     * Status of the replication.
     */
    private String status;
    /**
     * Target node name of the replication.
     */
    private String targetNode;

    @Override
    public GerritEventType getEventType() {
        return GerritEventType.REF_REPLICATED;
    }

    @Override
    public boolean isScorable() {
        return false;
    }

    @Override
    public void fromJson(JSONObject json) {
        project = getString(json, PROJECT);
        ref = getString(json, REF);
        status = getString(json, STATUS);
        targetNode = getString(json, TARGET_NODE);
        super.fromJson(json);
    }

    /**
     * Project name.
     * @return the project
     */
    public String getProject() {
        return project;
    }

    /**
     * Project name.
     * @param project the project to set
     */
    public void setProject(String project) {
        this.project = project;
    }

    /**
     * Ref within the project.
     * @return the ref
     */
    public String getRef() {
        return ref;
    }

    /**
     * Ref within the project.
     * @param ref the ref to set
     */
    public void setRef(String ref) {
        this.ref = ref;
    }

    /**
     * Status of the replication.
     * @return the status
     */
    public String getStatus() {
        return status;
    }

    /**
     * Status of the replication.
     * @param status the status to set
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * Target node name of the replication.
     * @return the targetNode
     */
    public String getTargetNode() {
        return targetNode;
    }

    /**
     * Target node name of the replication.
     * @param targetNode the targetNode to set
     */
    public void setTargetNode(String targetNode) {
        this.targetNode = targetNode;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
        //CS IGNORE MagicNumber FOR NEXT 6 LINES. REASON: Autogenerated Code.
        //CS IGNORE AvoidInlineConditionals FOR NEXT 6 LINES. REASON: Autogenerated Code.
        final int prime = 31;
        int result = 1;
        result = prime * result + ((project == null) ? 0 : project.hashCode());
        result = prime * result + ((ref == null) ? 0 : ref.hashCode());
        result = prime * result + ((status == null) ? 0 : status.hashCode());
        result = prime * result + ((targetNode == null) ? 0 : targetNode.hashCode());
        return result;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        RefReplicated other = (RefReplicated)obj;
        if (project == null) {
            if (other.project != null) {
                return false;
            }
        } else if (!project.equals(other.project)) {
            return false;
        }
        if (ref == null) {
            if (other.ref != null) {
                return false;
            }
        } else if (!ref.equals(other.ref)) {
            return false;
        }
        if (status == null) {
            if (other.status != null) {
                return false;
            }
        } else if (!status.equals(other.status)) {
            return false;
        }
        if (targetNode == null) {
            if (other.targetNode != null) {
                return false;
            }
        } else if (!targetNode.equals(other.targetNode)) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "RefReplicated [project=" + project + ", ref=" + ref + ", status=" + status
                + ", targetNode=" + targetNode + "]";
    }
} public class RefReplicationDone extends GerritTriggeredEvent {

    /**
     * Project path in Gerrit.
     */
    private String project;
    /**
     * Ref name within project.
     */
    private String ref;
    /**
     * Number of nodes the replication was done to.
     */
    private int nodesCount;

    @Override
    public GerritEventType getEventType() {
        return GerritEventType.REF_REPLICATION_DONE;
    }

    @Override
    public boolean isScorable() {
        return false;
    }

    @Override
    public void fromJson(JSONObject json) {
        project = getString(json, PROJECT);
        ref = getString(json, REF);
        nodesCount = json.getInt(NODES_COUNT);
        super.fromJson(json);
    }

    /**
     * Project name.
     * @return the project
     */
    public String getProject() {
        return project;
    }

    /**
     * Project name.
     * @param project the project to set
     */
    public void setProject(String project) {
        this.project = project;
    }

    /**
     * Ref within the project.
     * @return the ref
     */
    public String getRef() {
        return ref;
    }

    /**
     * Ref within the project.
     * @param ref the ref to set
     */
    public void setRef(String ref) {
        this.ref = ref;
    }

    /**
     * Number of nodes the replication was done to.
     * @return the nodesCount
     */
    public int getNodesCount() {
        return nodesCount;
    }

    /**
     * Number of nodes the replication was done to.
     * @param nodesCount the nodesCount to set
     */
    public void setNodesCount(int nodesCount) {
        this.nodesCount = nodesCount;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
        //CS IGNORE MagicNumber FOR NEXT 5 LINES. REASON: Autogenerated Code.
        //CS IGNORE AvoidInlineConditionals FOR NEXT 5 LINES. REASON: Autogenerated Code.
        final int prime = 31;
        int result = 1;
        result = prime * result + nodesCount;
        result = prime * result + ((project == null) ? 0 : project.hashCode());
        result = prime * result + ((ref == null) ? 0 : ref.hashCode());
        return result;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        RefReplicationDone other = (RefReplicationDone)obj;
        if (nodesCount != other.nodesCount) {
            return false;
        }
        if (project == null) {
            if (other.project != null) {
                return false;
            }
        } else if (!project.equals(other.project)) {
            return false;
        }
        if (ref == null) {
            if (other.ref != null) {
                return false;
            }
        } else if (!ref.equals(other.ref)) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "RefReplicationDone [project=" + project + ", ref=" + ref + ", nodesCount="
                + nodesCount + "]";
    }
} public class RefUpdated extends GerritTriggeredEvent implements RepositoryModifiedEvent {

    /**
     * The Gerrit ref update the event is related to.
     */
    protected RefUpdate refUpdate;

    /**
     * The ref update.
     *
     * @return the refupdate.
     */
    public RefUpdate getRefUpdate() {
        return refUpdate;
    }

    /**
     * The ref update.
     *
     * @param refUpdate the refupdate.
     */
    public void setRefUpdate(RefUpdate refUpdate) {
        this.refUpdate = refUpdate;
    }

    @Override
    public GerritEventType getEventType() {
        return GerritEventType.REF_UPDATED;
    }

    @Override
    public boolean isScorable() {
        return false;
    }

    @Override
    public void fromJson(JSONObject json) {
        super.fromJson(json);
        if (json.containsKey(REFUPDATE)) {
            refUpdate = new RefUpdate(json.getJSONObject(REFUPDATE));
        }
        if (json.containsKey(SUBMITTER)) {
            this.account = new Account(json.getJSONObject(SUBMITTER));
        }
    }
    //CS IGNORE MagicNumber FOR NEXT 12 LINES. REASON: Semi-autogenerated code.
    @Override
    public int hashCode() {
        int result = 0;
        if (getEventType() != null) {
            result = getEventType().hashCode() * 31;
        }
        if (refUpdate != null) {
            result += refUpdate.hashCode();
        }
        return result;
    }

    @Override
    public boolean equals(Object o) {
        if (!getClass().isInstance(o)) {
            return false;
        }
        RefUpdated event = (RefUpdated)o;
        if (getEventType() == null) {
            if (event.getEventType() != null) {
                return false;
            }
        } else if (!getEventType().equals(event.getEventType())) {
            return false;
        }
        if (getRefUpdate() == null) {
            if (getRefUpdate() != null) {
                return false;
            }
        } else if (!getRefUpdate().equals(event.getRefUpdate())) {
            return false;
        }
        return true;
    }

    @Override
    public String getModifiedProject() {
        if (refUpdate != null) {
            return refUpdate.getProject();
        }
        return null;
    }

    @Override
    public String getModifiedRef() {
        if (refUpdate != null) {
            return refUpdate.getRef();
        }
        return null;
    }
} public class ProjectCreated extends GerritTriggeredEvent implements RepositoryModifiedEvent {

    /**
     * Name of the created project.
     */
    private String projectName;

    /**
     * HEAD reference name.
     */
    private String headName;

    /**
     *
     * @return the name of HEAD.
     */
    public String getHeadName() {
        return headName;
    }

    /**
     * Sets the name of HEAD.
     * @param headName the name of HEAD.
     */
    public void setHeadName(String headName) {
        this.headName = headName;
    }

    /**
     *
     * @return the project name.
     */
    public String getProjectName() {
        return projectName;
    }

    /**
     * sets the project name.
     * @param projectName the name of the project.
     */
    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    @Override
    public void fromJson(JSONObject json) {
        super.fromJson(json);
        projectName = getString(json, PROJECT_NAME);
        headName = getString(json, HEAD_NAME);
    }

    @Override
    public GerritEventType getEventType() {
        return GerritEventType.PROJECT_CREATED;
    }

    @Override
    public boolean isScorable() {
        return false;
    }

    @Override
    public String getModifiedProject() {
        return projectName;
    }

    @Override
    public String getModifiedRef() {
        return headName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) { return true; }
        if (o == null || getClass() != o.getClass()) { return false; }
        ProjectCreated that = (ProjectCreated)o;
        return projectName.equals(that.projectName);
    }

    @Override
    public int hashCode() {
        return projectName.hashCode();
    }
} public class PatchsetNotified extends ChangeBasedEvent {

    @Override
    public GerritEventType getEventType() {
        return GerritEventType.PATCHSET_NOTIFIED;
    }

    @Override
    public boolean isScorable() {
        return true;
    }

    @Override
    public void fromJson(JSONObject json) {
        super.fromJson(json);
        if (json.containsKey(NOTIFIER)) {
            this.account = new Account(json.getJSONObject(NOTIFIER));
        }
    }

    @Override
    public String toString() {
        return "PatchsetNotified: " + change + " " + patchSet;
    }
} public class PrivateStateChanged extends ChangeBasedEvent {
  @Override
  public GerritEventType getEventType() {
    return GerritEventType.PRIVATE_STATE_CHANGED;
  }

  @Override
  public boolean isScorable() {
    return !change.isPrivate();
  }

  @Override
  public String toString() {
    return "PrivateStateChanged: " + change;
  }
} public class WipStateChanged extends ChangeBasedEvent {
  @Override
  public GerritEventType getEventType() {
    return GerritEventType.WIP_STATE_CHANGED;
  }

  @Override
  public boolean isScorable() {
    return !change.isWip();
  }
} public class HashtagsChanged extends ChangeBasedEvent {
    private List<String> hashtags;
    private List<String> removedHashtags;
    private List<String> addedHashtags;

    @Override
    public GerritEventType getEventType() {
        return GerritEventType.HASHTAGS_CHANGED;
    }

    @Override
    public boolean isScorable() {
        return false;
    }

    /**
     * Obtains the list of hashtags.
     * @return A list of strings, each containing a hashtag.
     */
    public List<String> getHashtags() {
        return hashtags;
    }

    /**
     * Obtains the list of added hashtags.
     * @return A list of strings, each containing an added hashtag.
     */
    public List<String> getAddedHashtags() {
        return addedHashtags;
    }

    /**
     * Obtains the list of removed hashtags.
     * @return A list of strings, each containing a removed hashtag.
     */
    public List<String> getRemovedHashtags() {
        return removedHashtags;
    }

    @Override
    public void fromJson(JSONObject json) {
        super.fromJson(json);

        this.hashtags = hashtagsFromArray(json, HASHTAGS);
        this.removedHashtags = hashtagsFromArray(json, HASHTAGS_REMOVED);
        this.addedHashtags = hashtagsFromArray(json, HASHTAGS_ADDED);
    }

    /**
     * Converts an array key from JSON into a list of the strings it contains.
     *
     * @param json The json object.
     * @param array The array name within the json object.
     * @return A list of strings contained in the array or an empty list if the array is not present.
     */
    private List<String> hashtagsFromArray(JSONObject json, String array) {
        if (json.containsKey(array)) {
            JSONArray hashtagsArray = json.getJSONArray(array);
            List<String> result = new ArrayList<String>(hashtagsArray.size());
            for (Object tag : hashtagsArray) {
                result.add(tag.toString());
            }
            return result;
        }
        return Collections.emptyList();
    }
} public class VoteDeleted extends ChangeBasedEvent {
    /**
     * Comment string
     */
    private String comment;

    private List<Approval> approvals = new ArrayList<Approval>();
    /**
     * The user whose vote was removed.
     */
    private Account reviewer;
    /**
     * The user who removed the vote.
     */
    private Account remover;

    @Override
    public GerritEventType getEventType() {
        return GerritEventType.VOTE_DELETED;
    }

    /**
     * Get the code review approvals associated with this Gerrit comment.
     * @return a list of code review approvals.
     */
    public List<Approval> getApprovals() {
        return approvals;
    }

    /**
     * Set the code review approvals for this event.
     * @param approvals the list of Approvals.
     */
    public void setApprovals(List<Approval> approvals) {
        this.approvals = approvals;
    }

    /**
     * Comment.
     * @return the comment
     */
    public String getComment() {
        return comment;
    }

    /**
     * Comment.
     * @param comment the comment to set
     */
    public void setComment(String comment) {
        this.comment = comment;
    }

    /**
     * Set the reviewer.
     * @param reviewer the reviewer.
     */
    public void setReviewer(Account reviewer) {
        this.reviewer = reviewer;
    }

    /**
     * Get the remover.
     * @return the remover.
     */
    public Account getRemover() {
        return remover;
    }

    /**
     * Set the remover.
     * @param remover the remover.
     */
    public void setRemover(Account remover) {
        this.remover = remover;
    }

    /**
     * Get the reviewer.
     * @return the reviewer.
     */
    public Account getReviewer() {
        return reviewer;
    }

    @Override
    public boolean isScorable() {
        return true;
    }

    @Override
    public void fromJson(JSONObject json) {
        super.fromJson(json);
        comment = getString(json, COMMENT);
        if (json.containsKey(REVIEWER)) {
            this.reviewer = new Account(json.getJSONObject(REVIEWER));
        }
        if (json.containsKey(REMOVER)) {
            this.remover = new Account(json.getJSONObject(REMOVER));
        }
        if (json.containsKey(APPROVALS)) {
            JSONArray eventApprovals = json.getJSONArray(APPROVALS);
            for (int i = 0; i < eventApprovals.size(); i++) {
                approvals.add(new Approval(eventApprovals.getJSONObject(i)));
            }
        }
    }
} public class RerunCheck extends ChangeBasedEvent {
  @Override
  public GerritEventType getEventType() {
    return GerritEventType.RERUN_CHECK;
  }

  @Override
  public boolean isScorable() {
      return true;
  }
}
import com.sonymobile.tools.gerrit.gerritevents.dto.events.ChangeAbandoned;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.ChangeMerged;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.ChangeRestored;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.CommentAdded;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.DraftPublished;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.MergeFailed;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.PatchsetCreated;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.RefReplicated;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.RefReplicationDone;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.RefUpdated;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.ReviewerAdded;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.TopicChanged;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.ProjectCreated;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.PatchsetNotified;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.PrivateStateChanged;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.WipStateChanged;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.HashtagsChanged;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.VoteDeleted;
import com.sonymobile.tools.gerrit.gerritevents.dto.events.RerunCheck;
import java.util.LinkedList;
import java.util.List;
/*
 *  The MIT License
 *
 *  Copyright 2010 Sony Mobile Communications Inc. All rights reserved.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in
 *  all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 *  THE SOFTWARE.
 */
package com.sonymobile.tools.gerrit.gerritevents.dto;



/**
 * Representation of the type of event, if they are interesting and what class to use to parse the JSON string.
 * @author Robert Sandell &lt;robert.sandell@sonyericsson.com&gt;
 */
public enum GerritEventType {

    /**
     * A patchset-created event.
     */
    PATCHSET_CREATED("patchset-created", true, PatchsetCreated.class),
    /**
     * A draft-published event.
     */
    DRAFT_PUBLISHED("draft-published", true, DraftPublished.class),
    /**
     * A change-abandoned event.
     */
    CHANGE_ABANDONED("change-abandoned", true, ChangeAbandoned.class),
    /**
     * A change-merged event.
     */
    CHANGE_MERGED("change-merged", true, ChangeMerged.class),
    /**
     * A change-restored event.
     */
    CHANGE_RESTORED("change-restored", true, ChangeRestored.class),
    /**
     * A comment-added event.
     */
    COMMENT_ADDED("comment-added", true, CommentAdded.class),
    /**
     * A ref-updated event.
     */
    REF_UPDATED("ref-updated", true, RefUpdated.class),
    /**
     * Replication Plugin: A ref-replicated event.
     */
    REF_REPLICATED("ref-replicated", true, RefReplicated.class),
    /**
     * Replication Plugin: A ref-replication-done event.
     */
    REF_REPLICATION_DONE("ref-replication-done", true, RefReplicationDone.class),
    /**
     * Notify PatchSet Plugin: A patchset-notified event.
     */
    PATCHSET_NOTIFIED("patchset-notified", true, PatchsetNotified.class),
    /***
     * A project-created event.
     */
    PROJECT_CREATED("project-created", true, ProjectCreated.class),