package com.atlassian.bitbucket.mesh.repository;

import javax.annotation.Nonnull;

import static java.util.Objects.requireNonNull;

public class DefaultBranchChangedEvent extends RepositoryEvent {

    private final String defaultBranch;

    public DefaultBranchChangedEvent(@Nonnull Repository repository, @Nonnull String defaultBranch) {
        super(repository);

        this.defaultBranch = requireNonNull(defaultBranch, "defaultBranch");
    }

    @Nonnull
    public String getDefaultBranch() {
        return defaultBranch;
    }
}
