// Generated by protoc-gen-twirp_typescript. DO NOT EDIT
import {code} from './audit_logs.pb';
import {createTwirpAdapter} from 'pbjs-twirp';
import Axios from 'axios';

const getServiceMethodName = (fn: any): string => {
	if (fn === code.justin.tv.eventbus.controlplane.AuditLogs.prototype.getAuditLogsForService) {
		return 'GetAuditLogsForService';
    }

    throw new Error('Unknown Method');
};


export const AuditLogsPathPrefix = '/twirp/code.justin.tv.eventbus.controlplane.AuditLogs/';

export const createAuditLogs = (baseURL: string, options = {}): code.justin.tv.eventbus.controlplane.AuditLogs => {
    const defaultOpts = {
        baseURL: baseURL + AuditLogsPathPrefix,
        headers: {
          Accept: 'application/protobuf'
        }
    };
    const axiosOpts = { ...defaultOpts, ...options };
    
    const axios = Axios.create(axiosOpts);

    return code.justin.tv.eventbus.controlplane.AuditLogs.create(createTwirpAdapter(axios, getServiceMethodName));
};
