/* 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 { DockerCommitToJSON, PaginatedResultsOfDockerCommitFromJSON, } from '../models/index';
/**
 *
 */
export class DockerCommitServicesApi extends runtime.BaseAPI {
    /**
     */
    async getRepoV1EntityIdDockerTagRaw(requestParameters, initOverrides) {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getRepoV1EntityIdDockerTag().');
        }
        const queryParameters = {};
        if (requestParameters['sort'] != null) {
            queryParameters['sort'] = requestParameters['sort'];
        }
        if (requestParameters['ascending'] != null) {
            queryParameters['ascending'] = requestParameters['ascending'];
        }
        if (requestParameters['limit'] != null) {
            queryParameters['limit'] = requestParameters['limit'];
        }
        if (requestParameters['offset'] != null) {
            queryParameters['offset'] = requestParameters['offset'];
        }
        const headerParameters = {};
        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/entity/{id}/dockerTag`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResultsOfDockerCommitFromJSON(jsonValue));
    }
    /**
     */
    async getRepoV1EntityIdDockerTag(requestParameters, initOverrides) {
        const response = await this.getRepoV1EntityIdDockerTagRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     */
    async postRepoV1EntityIdDockerCommitRaw(requestParameters, initOverrides) {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling postRepoV1EntityIdDockerCommit().');
        }
        if (requestParameters['dockerCommit'] == null) {
            throw new runtime.RequiredError('dockerCommit', 'Required parameter "dockerCommit" was null or undefined when calling postRepoV1EntityIdDockerCommit().');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        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/entity/{id}/dockerCommit`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: DockerCommitToJSON(requestParameters['dockerCommit']),
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     */
    async postRepoV1EntityIdDockerCommit(requestParameters, initOverrides) {
        await this.postRepoV1EntityIdDockerCommitRaw(requestParameters, initOverrides);
    }
}
//# sourceMappingURL=DockerCommitServicesApi.js.map