package cz.moneta.test.dsl.cagw.api.cbl.psd;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.cagw.api.cbl.psd.aisp.AispBuilder;
import cz.moneta.test.dsl.cagw.api.cbl.psd.pisp.PispBuilder;
import cz.moneta.test.harness.endpoints.cagw.CaGwEndpoint;
import cz.moneta.test.harness.support.rest.Builders;
import cz.moneta.test.harness.support.rest.RestRequest;

public class PsdBuilder {
    private final Harness harness;

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

    public PispBuilder pisp() {
        return new PispBuilder(harness);
    }

    public AispBuilder aisp() {
        return new AispBuilder(harness);
    }

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