/* tslint:disable */
/* eslint-disable */
/**
 * Coscine.Api.ActivatedFeatures
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2.0.3
 * 
 *
 * 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 FeatureObject
 */
export interface FeatureObject {
    /**
     * 
     * @type {string}
     * @memberof FeatureObject
     */
    id?: string;
    /**
     * 
     * @type {string}
     * @memberof FeatureObject
     */
    sharepointId?: string | null;
    /**
     * 
     * @type {string}
     * @memberof FeatureObject
     */
    en?: string | null;
    /**
     * 
     * @type {string}
     * @memberof FeatureObject
     */
    de?: string | null;
    /**
     * 
     * @type {boolean}
     * @memberof FeatureObject
     */
    activated?: boolean;
}

/**
 * ActivatedFeaturesApi - axios parameter creator
 * @export
 */
export const ActivatedFeaturesApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary Activates the feature of the project.
         * @param {string} projectId Project for which the feature is activated
         * @param {string} featureId Feature
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        activatedFeaturesActivateFeature: async (projectId: string, featureId: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('activatedFeaturesActivateFeature', 'projectId', projectId)
            // verify required parameter 'featureId' is not null or undefined
            assertParamExists('activatedFeaturesActivateFeature', 'featureId', featureId)
            const localVarPath = `/ActivatedFeatures/{projectId}/activateFeature/{featureId}`
                .replace(`{${"projectId"}}`, encodeURIComponent(String(projectId)))
                .replace(`{${"featureId"}}`, encodeURIComponent(String(featureId)));
            // 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;

            // authentication JWT token required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Deactives the feature of the project.
         * @param {string} projectId Project for which the feature is deactivated
         * @param {string} featureId Feature
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        activatedFeaturesDeactivateFeature: async (projectId: string, featureId: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('activatedFeaturesDeactivateFeature', 'projectId', projectId)
            // verify required parameter 'featureId' is not null or undefined
            assertParamExists('activatedFeaturesDeactivateFeature', 'featureId', featureId)
            const localVarPath = `/ActivatedFeatures/{projectId}/deactivateFeature/{featureId}`
                .replace(`{${"projectId"}}`, encodeURIComponent(String(projectId)))
                .replace(`{${"featureId"}}`, encodeURIComponent(String(featureId)));
            // 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;

            // authentication JWT token required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Returns activated features of the project.
         * @param {string} projectId Project for which the activated features are returned
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        activatedFeaturesGetActiveFeatures: async (projectId: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('activatedFeaturesGetActiveFeatures', 'projectId', projectId)
            const localVarPath = `/ActivatedFeatures/{projectId}/activeFeatures`
                .replace(`{${"projectId"}}`, encodeURIComponent(String(projectId)));
            // 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;

            // authentication JWT token required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Returns features of the project.
         * @param {string} projectId Project for which the features are returned
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        activatedFeaturesGetFeatures: async (projectId: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('activatedFeaturesGetFeatures', 'projectId', projectId)
            const localVarPath = `/ActivatedFeatures/{projectId}`
                .replace(`{${"projectId"}}`, encodeURIComponent(String(projectId)));
            // 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;

            // authentication JWT token required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Returns all available features.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        activatedFeaturesGetFeaturesAll: async (options: any = {}): Promise<RequestArgs> => {
            const localVarPath = `/ActivatedFeatures`;
            // 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;

            // authentication JWT token required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)


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

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Returns the inactive features of the project.
         * @param {string} projectId Project for which the inactivate features are returned
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        activatedFeaturesGetInactiveFeatures: async (projectId: string, options: any = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('activatedFeaturesGetInactiveFeatures', 'projectId', projectId)
            const localVarPath = `/ActivatedFeatures/{projectId}/inactiveFeatures`
                .replace(`{${"projectId"}}`, encodeURIComponent(String(projectId)));
            // 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;

            // authentication JWT token required
            await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)


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

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

/**
 * ActivatedFeaturesApi - functional programming interface
 * @export
 */
export const ActivatedFeaturesApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = ActivatedFeaturesApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary Activates the feature of the project.
         * @param {string} projectId Project for which the feature is activated
         * @param {string} featureId Feature
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async activatedFeaturesActivateFeature(projectId: string, featureId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.activatedFeaturesActivateFeature(projectId, featureId, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * 
         * @summary Deactives the feature of the project.
         * @param {string} projectId Project for which the feature is deactivated
         * @param {string} featureId Feature
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async activatedFeaturesDeactivateFeature(projectId: string, featureId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.activatedFeaturesDeactivateFeature(projectId, featureId, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * 
         * @summary Returns activated features of the project.
         * @param {string} projectId Project for which the activated features are returned
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async activatedFeaturesGetActiveFeatures(projectId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<FeatureObject>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.activatedFeaturesGetActiveFeatures(projectId, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * 
         * @summary Returns features of the project.
         * @param {string} projectId Project for which the features are returned
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async activatedFeaturesGetFeatures(projectId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<FeatureObject>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.activatedFeaturesGetFeatures(projectId, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * 
         * @summary Returns all available features.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async activatedFeaturesGetFeaturesAll(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<FeatureObject>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.activatedFeaturesGetFeaturesAll(options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * 
         * @summary Returns the inactive features of the project.
         * @param {string} projectId Project for which the inactivate features are returned
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async activatedFeaturesGetInactiveFeatures(projectId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<FeatureObject>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.activatedFeaturesGetInactiveFeatures(projectId, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
    }
};

/**
 * ActivatedFeaturesApi - factory interface
 * @export
 */
export const ActivatedFeaturesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = ActivatedFeaturesApiFp(configuration)
    return {
        /**
         * 
         * @summary Activates the feature of the project.
         * @param {string} projectId Project for which the feature is activated
         * @param {string} featureId Feature
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        activatedFeaturesActivateFeature(projectId: string, featureId: string, options?: any): AxiosPromise<any> {
            return localVarFp.activatedFeaturesActivateFeature(projectId, featureId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Deactives the feature of the project.
         * @param {string} projectId Project for which the feature is deactivated
         * @param {string} featureId Feature
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        activatedFeaturesDeactivateFeature(projectId: string, featureId: string, options?: any): AxiosPromise<any> {
            return localVarFp.activatedFeaturesDeactivateFeature(projectId, featureId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Returns activated features of the project.
         * @param {string} projectId Project for which the activated features are returned
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        activatedFeaturesGetActiveFeatures(projectId: string, options?: any): AxiosPromise<Array<FeatureObject>> {
            return localVarFp.activatedFeaturesGetActiveFeatures(projectId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Returns features of the project.
         * @param {string} projectId Project for which the features are returned
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        activatedFeaturesGetFeatures(projectId: string, options?: any): AxiosPromise<Array<FeatureObject>> {
            return localVarFp.activatedFeaturesGetFeatures(projectId, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Returns all available features.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        activatedFeaturesGetFeaturesAll(options?: any): AxiosPromise<Array<FeatureObject>> {
            return localVarFp.activatedFeaturesGetFeaturesAll(options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Returns the inactive features of the project.
         * @param {string} projectId Project for which the inactivate features are returned
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        activatedFeaturesGetInactiveFeatures(projectId: string, options?: any): AxiosPromise<Array<FeatureObject>> {
            return localVarFp.activatedFeaturesGetInactiveFeatures(projectId, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * ActivatedFeaturesApi - object-oriented interface
 * @export
 * @class ActivatedFeaturesApi
 * @extends {BaseAPI}
 */
export class ActivatedFeaturesApi extends BaseAPI {
    /**
     * 
     * @summary Activates the feature of the project.
     * @param {string} projectId Project for which the feature is activated
     * @param {string} featureId Feature
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ActivatedFeaturesApi
     */
    public activatedFeaturesActivateFeature(projectId: string, featureId: string, options?: any) {
        return ActivatedFeaturesApiFp(this.configuration).activatedFeaturesActivateFeature(projectId, featureId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Deactives the feature of the project.
     * @param {string} projectId Project for which the feature is deactivated
     * @param {string} featureId Feature
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ActivatedFeaturesApi
     */
    public activatedFeaturesDeactivateFeature(projectId: string, featureId: string, options?: any) {
        return ActivatedFeaturesApiFp(this.configuration).activatedFeaturesDeactivateFeature(projectId, featureId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Returns activated features of the project.
     * @param {string} projectId Project for which the activated features are returned
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ActivatedFeaturesApi
     */
    public activatedFeaturesGetActiveFeatures(projectId: string, options?: any) {
        return ActivatedFeaturesApiFp(this.configuration).activatedFeaturesGetActiveFeatures(projectId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Returns features of the project.
     * @param {string} projectId Project for which the features are returned
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ActivatedFeaturesApi
     */
    public activatedFeaturesGetFeatures(projectId: string, options?: any) {
        return ActivatedFeaturesApiFp(this.configuration).activatedFeaturesGetFeatures(projectId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Returns all available features.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ActivatedFeaturesApi
     */
    public activatedFeaturesGetFeaturesAll(options?: any) {
        return ActivatedFeaturesApiFp(this.configuration).activatedFeaturesGetFeaturesAll(options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Returns the inactive features of the project.
     * @param {string} projectId Project for which the inactivate features are returned
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ActivatedFeaturesApi
     */
    public activatedFeaturesGetInactiveFeatures(projectId: string, options?: any) {
        return ActivatedFeaturesApiFp(this.configuration).activatedFeaturesGetInactiveFeatures(projectId, options).then((request) => request(this.axios, this.basePath));
    }
}