/* tslint:disable */
/* eslint-disable */
/**
 * OmsorgCore.Api
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0
 * 
 *
 * 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 type {
  TrashAbsenceResponse,
  TrashAssignmentResponse,
  TrashContractResponse,
  TrashEmployeeFacilityDistanceResponse,
  TrashEmployeeResponse,
  TrashFacilityContactResponse,
  TrashFacilityQualificationRateResponse,
  TrashFacilityResponse,
  TrashOrderResponse,
  TrashTimeEntryResponse,
} from '../models/index';
import {
    TrashAbsenceResponseFromJSON,
    TrashAbsenceResponseToJSON,
    TrashAssignmentResponseFromJSON,
    TrashAssignmentResponseToJSON,
    TrashContractResponseFromJSON,
    TrashContractResponseToJSON,
    TrashEmployeeFacilityDistanceResponseFromJSON,
    TrashEmployeeFacilityDistanceResponseToJSON,
    TrashEmployeeResponseFromJSON,
    TrashEmployeeResponseToJSON,
    TrashFacilityContactResponseFromJSON,
    TrashFacilityContactResponseToJSON,
    TrashFacilityQualificationRateResponseFromJSON,
    TrashFacilityQualificationRateResponseToJSON,
    TrashFacilityResponseFromJSON,
    TrashFacilityResponseToJSON,
    TrashOrderResponseFromJSON,
    TrashOrderResponseToJSON,
    TrashTimeEntryResponseFromJSON,
    TrashTimeEntryResponseToJSON,
} from '../models/index';

export interface ApiTrashAbsencesGetRequest {
    search?: string;
}

export interface ApiTrashAbsencesIdRestorePostRequest {
    id: string;
}

export interface ApiTrashAssignmentsGetRequest {
    search?: string;
}

export interface ApiTrashAssignmentsIdRestorePostRequest {
    id: string;
}

export interface ApiTrashContractsGetRequest {
    search?: string;
}

export interface ApiTrashContractsIdRestorePostRequest {
    id: string;
}

export interface ApiTrashEmployeeFacilityDistancesGetRequest {
    search?: string;
}

export interface ApiTrashEmployeeFacilityDistancesIdRestorePostRequest {
    id: string;
}

export interface ApiTrashEmployeesGetRequest {
    search?: string;
}

export interface ApiTrashEmployeesIdRestorePostRequest {
    id: string;
}

export interface ApiTrashFacilitiesGetRequest {
    search?: string;
}

export interface ApiTrashFacilitiesIdRestorePostRequest {
    id: string;
}

export interface ApiTrashFacilityContactsGetRequest {
    search?: string;
}

export interface ApiTrashFacilityContactsIdRestorePostRequest {
    id: string;
}

export interface ApiTrashFacilityQualificationRatesGetRequest {
    search?: string;
}

export interface ApiTrashFacilityQualificationRatesIdRestorePostRequest {
    id: string;
}

export interface ApiTrashOrdersGetRequest {
    search?: string;
}

export interface ApiTrashOrdersIdRestorePostRequest {
    id: string;
}

export interface ApiTrashTimeEntriesGetRequest {
    search?: string;
}

export interface ApiTrashTimeEntriesIdRestorePostRequest {
    id: string;
}

/**
 * 
 */
export class TrashApi extends runtime.BaseAPI {

    /**
     */
    async apiTrashAbsencesGetRaw(requestParameters: ApiTrashAbsencesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrashAbsenceResponse>>> {
        const queryParameters: any = {};

        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/absences`;

        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrashAbsenceResponseFromJSON));
    }

    /**
     */
    async apiTrashAbsencesGet(requestParameters: ApiTrashAbsencesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TrashAbsenceResponse>> {
        const response = await this.apiTrashAbsencesGetRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     */
    async apiTrashAbsencesIdRestorePostRaw(requestParameters: ApiTrashAbsencesIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError(
                'id',
                'Required parameter "id" was null or undefined when calling apiTrashAbsencesIdRestorePost().'
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/absences/{id}/restore`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));

        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     */
    async apiTrashAbsencesIdRestorePost(requestParameters: ApiTrashAbsencesIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.apiTrashAbsencesIdRestorePostRaw(requestParameters, initOverrides);
    }

    /**
     */
    async apiTrashAssignmentsGetRaw(requestParameters: ApiTrashAssignmentsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrashAssignmentResponse>>> {
        const queryParameters: any = {};

        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/assignments`;

        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrashAssignmentResponseFromJSON));
    }

    /**
     */
    async apiTrashAssignmentsGet(requestParameters: ApiTrashAssignmentsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TrashAssignmentResponse>> {
        const response = await this.apiTrashAssignmentsGetRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     */
    async apiTrashAssignmentsIdRestorePostRaw(requestParameters: ApiTrashAssignmentsIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError(
                'id',
                'Required parameter "id" was null or undefined when calling apiTrashAssignmentsIdRestorePost().'
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/assignments/{id}/restore`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));

        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     */
    async apiTrashAssignmentsIdRestorePost(requestParameters: ApiTrashAssignmentsIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.apiTrashAssignmentsIdRestorePostRaw(requestParameters, initOverrides);
    }

    /**
     */
    async apiTrashContractsGetRaw(requestParameters: ApiTrashContractsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrashContractResponse>>> {
        const queryParameters: any = {};

        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/contracts`;

        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrashContractResponseFromJSON));
    }

    /**
     */
    async apiTrashContractsGet(requestParameters: ApiTrashContractsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TrashContractResponse>> {
        const response = await this.apiTrashContractsGetRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     */
    async apiTrashContractsIdRestorePostRaw(requestParameters: ApiTrashContractsIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError(
                'id',
                'Required parameter "id" was null or undefined when calling apiTrashContractsIdRestorePost().'
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/contracts/{id}/restore`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));

        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     */
    async apiTrashContractsIdRestorePost(requestParameters: ApiTrashContractsIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.apiTrashContractsIdRestorePostRaw(requestParameters, initOverrides);
    }

    /**
     */
    async apiTrashEmployeeFacilityDistancesGetRaw(requestParameters: ApiTrashEmployeeFacilityDistancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrashEmployeeFacilityDistanceResponse>>> {
        const queryParameters: any = {};

        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/employee-facility-distances`;

        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrashEmployeeFacilityDistanceResponseFromJSON));
    }

    /**
     */
    async apiTrashEmployeeFacilityDistancesGet(requestParameters: ApiTrashEmployeeFacilityDistancesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TrashEmployeeFacilityDistanceResponse>> {
        const response = await this.apiTrashEmployeeFacilityDistancesGetRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     */
    async apiTrashEmployeeFacilityDistancesIdRestorePostRaw(requestParameters: ApiTrashEmployeeFacilityDistancesIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError(
                'id',
                'Required parameter "id" was null or undefined when calling apiTrashEmployeeFacilityDistancesIdRestorePost().'
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/employee-facility-distances/{id}/restore`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));

        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     */
    async apiTrashEmployeeFacilityDistancesIdRestorePost(requestParameters: ApiTrashEmployeeFacilityDistancesIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.apiTrashEmployeeFacilityDistancesIdRestorePostRaw(requestParameters, initOverrides);
    }

    /**
     */
    async apiTrashEmployeesGetRaw(requestParameters: ApiTrashEmployeesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrashEmployeeResponse>>> {
        const queryParameters: any = {};

        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/employees`;

        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrashEmployeeResponseFromJSON));
    }

    /**
     */
    async apiTrashEmployeesGet(requestParameters: ApiTrashEmployeesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TrashEmployeeResponse>> {
        const response = await this.apiTrashEmployeesGetRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     */
    async apiTrashEmployeesIdRestorePostRaw(requestParameters: ApiTrashEmployeesIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError(
                'id',
                'Required parameter "id" was null or undefined when calling apiTrashEmployeesIdRestorePost().'
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/employees/{id}/restore`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));

        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     */
    async apiTrashEmployeesIdRestorePost(requestParameters: ApiTrashEmployeesIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.apiTrashEmployeesIdRestorePostRaw(requestParameters, initOverrides);
    }

    /**
     */
    async apiTrashFacilitiesGetRaw(requestParameters: ApiTrashFacilitiesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrashFacilityResponse>>> {
        const queryParameters: any = {};

        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/facilities`;

        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrashFacilityResponseFromJSON));
    }

    /**
     */
    async apiTrashFacilitiesGet(requestParameters: ApiTrashFacilitiesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TrashFacilityResponse>> {
        const response = await this.apiTrashFacilitiesGetRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     */
    async apiTrashFacilitiesIdRestorePostRaw(requestParameters: ApiTrashFacilitiesIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError(
                'id',
                'Required parameter "id" was null or undefined when calling apiTrashFacilitiesIdRestorePost().'
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/facilities/{id}/restore`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));

        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     */
    async apiTrashFacilitiesIdRestorePost(requestParameters: ApiTrashFacilitiesIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.apiTrashFacilitiesIdRestorePostRaw(requestParameters, initOverrides);
    }

    /**
     */
    async apiTrashFacilityContactsGetRaw(requestParameters: ApiTrashFacilityContactsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrashFacilityContactResponse>>> {
        const queryParameters: any = {};

        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/facility-contacts`;

        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrashFacilityContactResponseFromJSON));
    }

    /**
     */
    async apiTrashFacilityContactsGet(requestParameters: ApiTrashFacilityContactsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TrashFacilityContactResponse>> {
        const response = await this.apiTrashFacilityContactsGetRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     */
    async apiTrashFacilityContactsIdRestorePostRaw(requestParameters: ApiTrashFacilityContactsIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError(
                'id',
                'Required parameter "id" was null or undefined when calling apiTrashFacilityContactsIdRestorePost().'
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/facility-contacts/{id}/restore`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));

        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     */
    async apiTrashFacilityContactsIdRestorePost(requestParameters: ApiTrashFacilityContactsIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.apiTrashFacilityContactsIdRestorePostRaw(requestParameters, initOverrides);
    }

    /**
     */
    async apiTrashFacilityQualificationRatesGetRaw(requestParameters: ApiTrashFacilityQualificationRatesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrashFacilityQualificationRateResponse>>> {
        const queryParameters: any = {};

        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/facility-qualification-rates`;

        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrashFacilityQualificationRateResponseFromJSON));
    }

    /**
     */
    async apiTrashFacilityQualificationRatesGet(requestParameters: ApiTrashFacilityQualificationRatesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TrashFacilityQualificationRateResponse>> {
        const response = await this.apiTrashFacilityQualificationRatesGetRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     */
    async apiTrashFacilityQualificationRatesIdRestorePostRaw(requestParameters: ApiTrashFacilityQualificationRatesIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError(
                'id',
                'Required parameter "id" was null or undefined when calling apiTrashFacilityQualificationRatesIdRestorePost().'
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/facility-qualification-rates/{id}/restore`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));

        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     */
    async apiTrashFacilityQualificationRatesIdRestorePost(requestParameters: ApiTrashFacilityQualificationRatesIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.apiTrashFacilityQualificationRatesIdRestorePostRaw(requestParameters, initOverrides);
    }

    /**
     */
    async apiTrashOrdersGetRaw(requestParameters: ApiTrashOrdersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrashOrderResponse>>> {
        const queryParameters: any = {};

        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/orders`;

        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrashOrderResponseFromJSON));
    }

    /**
     */
    async apiTrashOrdersGet(requestParameters: ApiTrashOrdersGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TrashOrderResponse>> {
        const response = await this.apiTrashOrdersGetRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     */
    async apiTrashOrdersIdRestorePostRaw(requestParameters: ApiTrashOrdersIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError(
                'id',
                'Required parameter "id" was null or undefined when calling apiTrashOrdersIdRestorePost().'
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/orders/{id}/restore`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));

        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     */
    async apiTrashOrdersIdRestorePost(requestParameters: ApiTrashOrdersIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.apiTrashOrdersIdRestorePostRaw(requestParameters, initOverrides);
    }

    /**
     */
    async apiTrashTimeEntriesGetRaw(requestParameters: ApiTrashTimeEntriesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrashTimeEntryResponse>>> {
        const queryParameters: any = {};

        if (requestParameters['search'] != null) {
            queryParameters['search'] = requestParameters['search'];
        }

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/time-entries`;

        const response = await this.request({
            path: urlPath,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrashTimeEntryResponseFromJSON));
    }

    /**
     */
    async apiTrashTimeEntriesGet(requestParameters: ApiTrashTimeEntriesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TrashTimeEntryResponse>> {
        const response = await this.apiTrashTimeEntriesGetRaw(requestParameters, initOverrides);
        return await response.value();
    }

    /**
     */
    async apiTrashTimeEntriesIdRestorePostRaw(requestParameters: ApiTrashTimeEntriesIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters['id'] == null) {
            throw new runtime.RequiredError(
                'id',
                'Required parameter "id" was null or undefined when calling apiTrashTimeEntriesIdRestorePost().'
            );
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("Bearer", []);

            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }

        let urlPath = `/api/trash/time-entries/{id}/restore`;
        urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));

        const response = await this.request({
            path: urlPath,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     */
    async apiTrashTimeEntriesIdRestorePost(requestParameters: ApiTrashTimeEntriesIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.apiTrashTimeEntriesIdRestorePostRaw(requestParameters, initOverrides);
    }

}
