package cz.moneta.test.dsl.cagw.auth.oauth;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.cagw.auth.oauth.v2.V2Builder;
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 OauthBuilder {
    private final Harness harness;

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

    public V2Builder v2() {
        return new V2Builder(harness);
    }

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