package com.atlassian.bitbucket.internal.mirroring.mirror.rest.webhook.server;

import com.atlassian.bitbucket.internal.mirroring.mirror.rest.server.RestServerExternalProject;
import com.atlassian.bitbucket.internal.mirroring.mirror.webhook.ProjectWebHookEvent;

import java.util.Map;

import static com.atlassian.bitbucket.internal.mirroring.mirror.rest.webhook.server.RestServerWebHookPropertyNames.PROJECT;

public abstract class BaseRestServerProjectWebHookEvent extends BaseRestServerWebHookEvent implements ProjectWebHookEvent {

    public BaseRestServerProjectWebHookEvent() {
    }

    public BaseRestServerProjectWebHookEvent(Map<String, ?> values) {
        super(values);
    }

    @Override
    public RestServerExternalProject getProject() {
        return RestServerExternalProject.valueOf(get(PROJECT));
    }
}