package cz.moneta.test.dsl.auto.autoapi;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.auto.autoapi.lamder.LamderBuilder;
import cz.moneta.test.dsl.auto.autoapi.setman.SetmanBuilder;
import cz.moneta.test.harness.endpoints.autoapi.AutoApiEndpoint;
import cz.moneta.test.harness.support.rest.Builders;
import cz.moneta.test.harness.support.rest.RestRequest;

public class AutoApiBuilder {

    private final Harness harness;

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

    public LamderBuilder lamder() {
        return new LamderBuilder(harness);
    }

    public SetmanBuilder setman() {
        return new SetmanBuilder(harness);
    }

    private <RESP, B extends RestRequest<B, ?, RESP>> B getBuilder(Class<B> builderClass) {
        return Builders.newRestBuilder(builderClass, AutoApiEndpoint.class, harness);
    }
}
