// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 创建基础ModelVersion POST /model_version/createModelVersion */
export async function postModelVersionCreateModelVersion(
  body: API.ModelVersion,
  options?: { [key: string]: any },
) {
  return request<API.Response & { msg?: string }>(`/api/v1/model_version/createModelVersion`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除ModelVersion DELETE /model_version/deleteModelVersion */
export async function deleteModelVersionDeleteModelVersion(
  body: API.ModelVersion,
  options?: { [key: string]: any },
) {
  return request<API.Response & { msg?: string }>(`/api/v1/model_version/deleteModelVersion`, {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除选中ModelVersion DELETE /model_version/deleteModelVersionByIds */
export async function deleteModelVersionDeleteModelVersionByIds(
  body: API.IdsReq,
  options?: { [key: string]: any },
) {
  return request<API.Response & { msg?: string }>(`/api/v1/model_version/deleteModelVersionByIds`, {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 根据id获取ModelVersion POST /model_version/getModelVersionById */
export async function postModelVersionGetModelVersionById(
  body: API.GetById,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.ResourceModelVersionResponse }>(
    `/api/v1/model_version/getModelVersionById`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 获取ModelVersion外键列表 POST /model_version/getModelVersionFkSelect */
export async function postModelVersionGetModelVersionFkSelect(
  body: API.GetFkSelect,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.FkResult; msg?: string }>(
    `/api/v1/model_version/getModelVersionFkSelect`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 分页获取ModelVersion列表 POST /model_version/getModelVersionList */
export async function postModelVersionGetModelVersionList(
  body: API.SearchModelVersionParams,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.PageResult; msg?: string }>(
    `/api/v1/model_version/getModelVersionList`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 获得ModelVersion名称列表 POST /model_version/getModelVersionNames */
export async function postModelVersionGetModelVersionNames(
  body: API.IdsReq,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.NamesResult; msg?: string }>(
    `/api/v1/model_version/getModelVersionNames`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 修改基础ModelVersion PUT /model_version/updateModelVersion */
export async function putModelVersionUpdateModelVersion(
  body: API.ModelVersion,
  options?: { [key: string]: any },
) {
  return request<API.Response & { msg?: string }>(`/api/v1/model_version/updateModelVersion`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 根据ids获取ModelVersion列表 POST /model_version/getModelVersionListByIds */
export async function postModelVersionGetModelVersionListByIds(
    body: API.IdsReq,
    options?: { [key: string]: any },
) {
    return request<API.Response & { data?: API.ResourceModelVersionListResponse }>(
        `/api/v1/model_version/getModelVersionListByIds`,
        {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json',
            },
            data: body,
            ...(options || {}),
        },
    );
}
