package com.atlassian.bitbucket.mesh.git.porcelain;

import com.atlassian.bitbucket.mesh.git.AbstractParameters;
import com.atlassian.bitbucket.mesh.repository.Repository;

import javax.annotation.Nonnull;

import static java.util.Objects.requireNonNull;

public class StreamReflogsParameters extends AbstractParameters {

    private final Repository repository;

    private StreamReflogsParameters(Builder builder) {
        super(builder);

        repository = builder.repository;
    }

    @Nonnull
    public Repository getRepository() {
        return repository;
    }

    public static class Builder extends AbstractBuilder<Builder, StreamReflogsParameters> {

        private final Repository repository;

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

        @Nonnull
        @Override
        public StreamReflogsParameters build() {
            return new StreamReflogsParameters(this);
        }

        @Nonnull
        @Override
        protected Builder self() {
            return this;
        }
    }
}
