/* tslint:disable */
/* eslint-disable */
/**
 * Synapse REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
import * as runtime from '../runtime';
import { LogEntryToJSON, } from '../models/index';
/**
 *
 */
export class LogServiceApi extends runtime.BaseAPI {
    /**
     */
    async postRepoV1LogRaw(requestParameters, initOverrides) {
        if (requestParameters['userAgent'] == null) {
            throw new runtime.RequiredError('userAgent', 'Required parameter "userAgent" was null or undefined when calling postRepoV1Log().');
        }
        if (requestParameters['logEntry'] == null) {
            throw new runtime.RequiredError('logEntry', 'Required parameter "logEntry" was null or undefined when calling postRepoV1Log().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (requestParameters['userAgent'] != null) {
            headerParameters['User-Agent'] = String(requestParameters['userAgent']);
        }
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("bearerAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        let urlPath = `/repo/v1/log`;
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: LogEntryToJSON(requestParameters['logEntry']),
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     */
    async postRepoV1Log(requestParameters, initOverrides) {
        await this.postRepoV1LogRaw(requestParameters, initOverrides);
    }
}
//# sourceMappingURL=LogServiceApi.js.map