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

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

package io.searchbox.snapshot;

/**
 * @author happyprg([email protected])
 */
public class RestoreSnapshot extends AbstractSnapshotAction {

    protected RestoreSnapshot(Builder builder) {
        super(builder);
        this.payload = builder.settings;
    }

    @Override
    protected String buildURI() {
        return super.buildURI() + "/_restore";
    }

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

    public static class Builder extends AbstractSnapshotAction.SingleSnapshotBuilder {
        private Object settings;

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy