package com.atlassian.bitbucket.mesh.repository;

import javax.annotation.Nonnull;

import static java.util.Objects.requireNonNull;

public class ForkCreatedEvent extends RepositoryCreatedEvent {

    private final Repository origin;

    public ForkCreatedEvent(@Nonnull Repository repository, @Nonnull Repository origin) {
        super(repository);
        this.origin = requireNonNull(origin, "origin");
    }

    @Nonnull
    public Repository getOrigin() {
        return origin;
    }
}
