package cz.moneta.test.dsl.elastic;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.harness.endpoints.elastic.ElasticReadEndpoint;
import cz.moneta.test.harness.endpoints.elastic.ElasticWriteEndpoint;
import cz.moneta.test.harness.support.rest.RawRestRequest;

public class ElasticApiBuilder {
    private final Harness harness;

    public ElasticApiBuilder(Harness harness) {
        this.harness = harness;
    }

    public RawRestRequest.Path prepareReadRequest() {
        return RawRestRequest.jsonBuilder(harness.getEndpoint(ElasticReadEndpoint.class));
    }

    public RawRestRequest.Path prepareWriteRequest() {
        return RawRestRequest.jsonBuilder(harness.getEndpoint(ElasticWriteEndpoint.class));
    }
}
