All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.searchbox.snapshot.CreateSnapshotRepository Maven / Gradle / Ivy

package io.searchbox.snapshot;

/**
 * @author happyprg([email protected])
 */
public class CreateSnapshotRepository extends AbstractSnapshotRepositoryAction {

    protected CreateSnapshotRepository(Builder builder) {
        super(builder);

        this.payload = builder.settings;
    }

    @Override
    public String getRestMethodName() {
        return "PUT";
    }

    public static class Builder extends AbstractSnapshotRepositoryAction.SingleRepositoryBuilder {
        private Object settings;

        public Builder(String repository) {
            super(repository);
        }

        public Builder settings(Object settings) {
            this.settings = settings;
            return this;
        }

        public Builder verify(boolean verify) {
            return setParameter("verify", verify);
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy