/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ClientCreateRequest } from '../models/ClientCreateRequest';
import type { ClientCreateResponse } from '../models/ClientCreateResponse';
import type { ClientDeleteRequest } from '../models/ClientDeleteRequest';
import type { ClientDeleteResponse } from '../models/ClientDeleteResponse';
import type { ClientGetAllResponse } from '../models/ClientGetAllResponse';
import type { ClientUpdateDetailsRequest } from '../models/ClientUpdateDetailsRequest';
import type { ClientUpdateRequest } from '../models/ClientUpdateRequest';
import type { ClientUpdateResponse } from '../models/ClientUpdateResponse';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class ClientService {
    /**
     * Search Clients
     * @returns any Successful Response
     * @throws ApiError
     */
    public static searchClients({
        name,
    }: {
        name: string,
    }): CancelablePromise<any> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/client/search',
            query: {
                'name': name,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Update Client Details
     * @returns any Successful Response
     * @throws ApiError
     */
    public static updateClientDetailsClientUpdateDetailsPost({
        requestBody,
    }: {
        requestBody: ClientUpdateDetailsRequest,
    }): CancelablePromise<any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/client/update-details',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Get All Clients
     * @returns ClientGetAllResponse Successful Response
     * @throws ApiError
     */
    public static getAllClients(): CancelablePromise<ClientGetAllResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/client/get-all',
        });
    }
    /**
     * Create Client
     * @returns ClientCreateResponse Successful Response
     * @throws ApiError
     */
    public static createClientApi({
        requestBody,
    }: {
        requestBody: ClientCreateRequest,
    }): CancelablePromise<ClientCreateResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/client/create',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Update Client
     * @returns ClientUpdateResponse Successful Response
     * @throws ApiError
     */
    public static updateClient({
        requestBody,
    }: {
        requestBody: ClientUpdateRequest,
    }): CancelablePromise<ClientUpdateResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/client/update',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Delete Client
     * @returns ClientDeleteResponse Successful Response
     * @throws ApiError
     */
    public static deleteClient({
        requestBody,
    }: {
        requestBody: ClientDeleteRequest,
    }): CancelablePromise<ClientDeleteResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/client/delete',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
}
