/* tslint:disable */
/* eslint-disable */
/**
 * Storage node API
 * Storage node API
 *
 * The version of the OpenAPI document: 0.1.0
 * Contact: info@joystream.org
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


import { Configuration } from './configuration';
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';

/**
 * 
 * @export
 * @interface DataStatsResponse
 */
export interface DataStatsResponse {
    /**
     * 
     * @type {number}
     * @memberof DataStatsResponse
     */
    totalSize: number;
    /**
     * 
     * @type {number}
     * @memberof DataStatsResponse
     */
    objectNumber: number;
    /**
     * 
     * @type {number}
     * @memberof DataStatsResponse
     */
    tempDirSize?: number;
    /**
     * 
     * @type {number}
     * @memberof DataStatsResponse
     */
    tempDownloads?: number;
}
/**
 * 
 * @export
 * @interface ErrorResponse
 */
export interface ErrorResponse {
    /**
     * 
     * @type {string}
     * @memberof ErrorResponse
     */
    type?: string;
    /**
     * 
     * @type {string}
     * @memberof ErrorResponse
     */
    message: string;
}
/**
 * 
 * @export
 * @interface InlineResponse201
 */
export interface InlineResponse201 {
    /**
     * 
     * @type {string}
     * @memberof InlineResponse201
     */
    id?: string;
}
/**
 * 
 * @export
 * @interface InlineResponse2011
 */
export interface InlineResponse2011 {
    /**
     * 
     * @type {string}
     * @memberof InlineResponse2011
     */
    token?: string;
}
/**
 * 
 * @export
 * @interface TokenRequest
 */
export interface TokenRequest {
    /**
     * 
     * @type {TokenRequestData}
     * @memberof TokenRequest
     */
    data: TokenRequestData;
    /**
     * 
     * @type {string}
     * @memberof TokenRequest
     */
    signature: string;
}
/**
 * 
 * @export
 * @interface TokenRequestData
 */
export interface TokenRequestData {
    /**
     * 
     * @type {number}
     * @memberof TokenRequestData
     */
    memberId: number;
    /**
     * 
     * @type {string}
     * @memberof TokenRequestData
     */
    accountId: string;
    /**
     * 
     * @type {number}
     * @memberof TokenRequestData
     */
    dataObjectId: number;
    /**
     * 
     * @type {number}
     * @memberof TokenRequestData
     */
    storageBucketId: number;
    /**
     * 
     * @type {string}
     * @memberof TokenRequestData
     */
    bagId: string;
}
/**
 * 
 * @export
 * @interface VersionResponse
 */
export interface VersionResponse {
    /**
     * 
     * @type {string}
     * @memberof VersionResponse
     */
    version: string;
    /**
     * 
     * @type {string}
     * @memberof VersionResponse
     */
    userAgent?: string;
}

/**
 * FilesApi - axios parameter creator
 * @export
 */
export const FilesApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Get auth token from a server.
         * @param {TokenRequest} [tokenRequest] Token request parameters,
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        publicApiAuthTokenForUploading: async (tokenRequest?: TokenRequest, options: any = {}): Promise<RequestArgs> => {
            const localVarPath = `/authToken`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(tokenRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Returns a media file.
         * @param {string} id Data object ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        publicApiGetFile: async (id: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('publicApiGetFile', 'id', id)
            const localVarPath = `/files/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Returns a media file headers.
         * @param {string} id Data object ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        publicApiGetFileHeaders: async (id: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('publicApiGetFileHeaders', 'id', id)
            const localVarPath = `/files/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'HEAD', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Upload data
         * @param {string} dataObjectId Data object runtime ID
         * @param {string} storageBucketId Storage bucket ID
         * @param {string} bagId Bag ID
         * @param {any} [file] Data file
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        publicApiUploadFile: async (dataObjectId: string, storageBucketId: string, bagId: string, file?: any, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'dataObjectId' is not null or undefined
            assertParamExists('publicApiUploadFile', 'dataObjectId', dataObjectId)
            // verify required parameter 'storageBucketId' is not null or undefined
            assertParamExists('publicApiUploadFile', 'storageBucketId', storageBucketId)
            // verify required parameter 'bagId' is not null or undefined
            assertParamExists('publicApiUploadFile', 'bagId', bagId)
            const localVarPath = `/files`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;
            const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();

            // authentication UploadAuth required
            await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)


            if (file !== undefined) { 
                localVarFormParams.append('file', file as any);
            }
    
            if (dataObjectId !== undefined) { 
                localVarFormParams.append('dataObjectId', dataObjectId as any);
            }
    
            if (storageBucketId !== undefined) { 
                localVarFormParams.append('storageBucketId', storageBucketId as any);
            }
    
            if (bagId !== undefined) { 
                localVarFormParams.append('bagId', bagId as any);
            }
    
    
            localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
    
            setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = localVarFormParams;

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * FilesApi - functional programming interface
 * @export
 */
export const FilesApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = FilesApiAxiosParamCreator(configuration)
    return {
        /**
         * Get auth token from a server.
         * @param {TokenRequest} [tokenRequest] Token request parameters,
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async publicApiAuthTokenForUploading(tokenRequest?: TokenRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse2011>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.publicApiAuthTokenForUploading(tokenRequest, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Returns a media file.
         * @param {string} id Data object ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async publicApiGetFile(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.publicApiGetFile(id, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Returns a media file headers.
         * @param {string} id Data object ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async publicApiGetFileHeaders(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.publicApiGetFileHeaders(id, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Upload data
         * @param {string} dataObjectId Data object runtime ID
         * @param {string} storageBucketId Storage bucket ID
         * @param {string} bagId Bag ID
         * @param {any} [file] Data file
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async publicApiUploadFile(dataObjectId: string, storageBucketId: string, bagId: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse201>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.publicApiUploadFile(dataObjectId, storageBucketId, bagId, file, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
    }
};

/**
 * FilesApi - factory interface
 * @export
 */
export const FilesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = FilesApiFp(configuration)
    return {
        /**
         * Get auth token from a server.
         * @param {TokenRequest} [tokenRequest] Token request parameters,
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        publicApiAuthTokenForUploading(tokenRequest?: TokenRequest, options?: any): AxiosPromise<InlineResponse2011> {
            return localVarFp.publicApiAuthTokenForUploading(tokenRequest, options).then((request) => request(axios, basePath));
        },
        /**
         * Returns a media file.
         * @param {string} id Data object ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        publicApiGetFile(id: string, options?: any): AxiosPromise<any> {
            return localVarFp.publicApiGetFile(id, options).then((request) => request(axios, basePath));
        },
        /**
         * Returns a media file headers.
         * @param {string} id Data object ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        publicApiGetFileHeaders(id: string, options?: any): AxiosPromise<void> {
            return localVarFp.publicApiGetFileHeaders(id, options).then((request) => request(axios, basePath));
        },
        /**
         * Upload data
         * @param {string} dataObjectId Data object runtime ID
         * @param {string} storageBucketId Storage bucket ID
         * @param {string} bagId Bag ID
         * @param {any} [file] Data file
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        publicApiUploadFile(dataObjectId: string, storageBucketId: string, bagId: string, file?: any, options?: any): AxiosPromise<InlineResponse201> {
            return localVarFp.publicApiUploadFile(dataObjectId, storageBucketId, bagId, file, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * FilesApi - object-oriented interface
 * @export
 * @class FilesApi
 * @extends {BaseAPI}
 */
export class FilesApi extends BaseAPI {
    /**
     * Get auth token from a server.
     * @param {TokenRequest} [tokenRequest] Token request parameters,
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof FilesApi
     */
    public publicApiAuthTokenForUploading(tokenRequest?: TokenRequest, options?: any) {
        return FilesApiFp(this.configuration).publicApiAuthTokenForUploading(tokenRequest, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Returns a media file.
     * @param {string} id Data object ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof FilesApi
     */
    public publicApiGetFile(id: string, options?: any) {
        return FilesApiFp(this.configuration).publicApiGetFile(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Returns a media file headers.
     * @param {string} id Data object ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof FilesApi
     */
    public publicApiGetFileHeaders(id: string, options?: any) {
        return FilesApiFp(this.configuration).publicApiGetFileHeaders(id, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Upload data
     * @param {string} dataObjectId Data object runtime ID
     * @param {string} storageBucketId Storage bucket ID
     * @param {string} bagId Bag ID
     * @param {any} [file] Data file
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof FilesApi
     */
    public publicApiUploadFile(dataObjectId: string, storageBucketId: string, bagId: string, file?: any, options?: any) {
        return FilesApiFp(this.configuration).publicApiUploadFile(dataObjectId, storageBucketId, bagId, file, options).then((request) => request(this.axios, this.basePath));
    }
}


/**
 * StateApi - axios parameter creator
 * @export
 */
export const StateApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Returns all local data objects.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        stateApiGetAllLocalDataObjects: async (options: any = {}): Promise<RequestArgs> => {
            const localVarPath = `/state/data-objects`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Returns local data objects for the bag.
         * @param {string} bagId Bag ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        stateApiGetLocalDataObjectsByBagId: async (bagId: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'bagId' is not null or undefined
            assertParamExists('stateApiGetLocalDataObjectsByBagId', 'bagId', bagId)
            const localVarPath = `/state/bags/{bagId}/data-objects`
                .replace(`{${"bagId"}}`, encodeURIComponent(String(bagId)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Returns local uploading directory stats.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        stateApiGetLocalDataStats: async (options: any = {}): Promise<RequestArgs> => {
            const localVarPath = `/state/data`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Returns server version.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        stateApiGetVersion: async (options: any = {}): Promise<RequestArgs> => {
            const localVarPath = `/version`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = {} as any;
            const localVarQueryParameter = {} as any;


    
            setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * StateApi - functional programming interface
 * @export
 */
export const StateApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = StateApiAxiosParamCreator(configuration)
    return {
        /**
         * Returns all local data objects.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async stateApiGetAllLocalDataObjects(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<string>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.stateApiGetAllLocalDataObjects(options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Returns local data objects for the bag.
         * @param {string} bagId Bag ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async stateApiGetLocalDataObjectsByBagId(bagId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<string>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.stateApiGetLocalDataObjectsByBagId(bagId, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Returns local uploading directory stats.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async stateApiGetLocalDataStats(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataStatsResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.stateApiGetLocalDataStats(options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Returns server version.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async stateApiGetVersion(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VersionResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.stateApiGetVersion(options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
    }
};

/**
 * StateApi - factory interface
 * @export
 */
export const StateApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = StateApiFp(configuration)
    return {
        /**
         * Returns all local data objects.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        stateApiGetAllLocalDataObjects(options?: any): AxiosPromise<Array<string>> {
            return localVarFp.stateApiGetAllLocalDataObjects(options).then((request) => request(axios, basePath));
        },
        /**
         * Returns local data objects for the bag.
         * @param {string} bagId Bag ID
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        stateApiGetLocalDataObjectsByBagId(bagId: string, options?: any): AxiosPromise<Array<string>> {
            return localVarFp.stateApiGetLocalDataObjectsByBagId(bagId, options).then((request) => request(axios, basePath));
        },
        /**
         * Returns local uploading directory stats.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        stateApiGetLocalDataStats(options?: any): AxiosPromise<DataStatsResponse> {
            return localVarFp.stateApiGetLocalDataStats(options).then((request) => request(axios, basePath));
        },
        /**
         * Returns server version.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        stateApiGetVersion(options?: any): AxiosPromise<VersionResponse> {
            return localVarFp.stateApiGetVersion(options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * StateApi - object-oriented interface
 * @export
 * @class StateApi
 * @extends {BaseAPI}
 */
export class StateApi extends BaseAPI {
    /**
     * Returns all local data objects.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StateApi
     */
    public stateApiGetAllLocalDataObjects(options?: any) {
        return StateApiFp(this.configuration).stateApiGetAllLocalDataObjects(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Returns local data objects for the bag.
     * @param {string} bagId Bag ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StateApi
     */
    public stateApiGetLocalDataObjectsByBagId(bagId: string, options?: any) {
        return StateApiFp(this.configuration).stateApiGetLocalDataObjectsByBagId(bagId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Returns local uploading directory stats.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StateApi
     */
    public stateApiGetLocalDataStats(options?: any) {
        return StateApiFp(this.configuration).stateApiGetLocalDataStats(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Returns server version.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof StateApi
     */
    public stateApiGetVersion(options?: any) {
        return StateApiFp(this.configuration).stateApiGetVersion(options).then((request) => request(this.axios, this.basePath));
    }
}


