package cz.moneta.test.dsl.cagw;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.cagw.api.ApiBuilder;
import cz.moneta.test.dsl.cagw.auth.AuthBuilder;
import cz.moneta.test.dsl.cagw.oauth2.Oauth2Builder;
import cz.moneta.test.harness.endpoints.cagw.CaGwEndpoint;
import cz.moneta.test.harness.support.rest.RawRestRequest;

public class CaGw extends CaGwBuilder {

    public CaGw(Harness harness) {
        super(harness);
    }

    public ApiBuilder api() {
        return new ApiBuilder(harness);
    }

    public Oauth2Builder oauth2() {
        return new Oauth2Builder(harness);
    }

    public AuthBuilder auth() {
        return new AuthBuilder(harness);
    }

    public RawRestRequest.Path prepareRequest() {
        CaGwEndpoint endpoint = harness.getEndpoint(CaGwEndpoint.class);
        return RawRestRequest.jsonBuilder(endpoint);
    }

}