package com.atlassian.bitbucket.mesh.repository;

import com.atlassian.bitbucket.mesh.util.BuilderSupport;

import javax.annotation.Nonnull;
import java.nio.file.Path;

import static java.util.Objects.requireNonNull;

public class AddShardParameters {

    private final String id;
    private final Path path;

    private AddShardParameters(Builder builder) {
        id = builder.id;
        path = builder.path;
    }

    @Nonnull
    public String getId() {
        return id;
    }

    @Nonnull
    public Path getPath() {
        return path;
    }

    public static class Builder extends BuilderSupport {

        private final String id;
        private final Path path;

        public Builder(@Nonnull String id, @Nonnull Path path) {
            this.id = requireNonBlank(id, "id");
            this.path = requireNonNull(path, "path");
        }

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