import apiRequest from '@/network/http/apiRequest'

/**
 * 根据Id获取ObjectParams
 * @param bizId
 * @param objectId
 * @param oamId
 * @returns
 */
export function getObjectOAMParamsListByOamId(bizId: number, objectId: number, oamId: number) {
  return apiRequest({
    url: `/biz/object/oam/params/${bizId}/${objectId}/${oamId}`,
    method: 'GET',
  })
}

/**
 * 根据Id获取ObjectParams
 * @param bizId
 * @param objectId
 * @param oamId
 * @param paramsId
 * @returns
 */
export function getObjectOAMParamsById(bizId: number, objectId: number, oamId: number, paramsId: number) {
  return apiRequest({
    url: `/biz/object/oam/params/${bizId}/${objectId}/${oamId}/${paramsId}`,
    method: 'GET',
  })
}

/**
 * 添加ObjectParams
 * @param data
 * @returns
 */
export function createObjectOAMParams(data: any) {
  return apiRequest({
    url: '/biz/object/oam/params/add',
    method: 'POST',
    data,
  })
}

/**
 * 更新ObjectParams
 * @param data
 * @returns
 */
export function updateObjectOAMParams(data: any) {
  return apiRequest({
    url: '/biz/object/oam/params/update',
    method: 'PUT',
    data,
  })
}

/**
 * 删除ObjectParams
 * @param bizId
 * @param objectId
 * @param oamId
 * @param paramsId
 * @returns
 */
export function deleteObjectOAMParamsById(bizId: number, objectId: number, oamId: number, paramsId: number) {
  return apiRequest({
    url: `/biz/object/oam/params/${bizId}/${objectId}/${oamId}/${paramsId}`,
    method: 'DELETE',
  })
}
