package com.heyu.api.baidu.handle.doc;


import com.heyu.api.baidu.BaiduBaseHandle;
import com.heyu.api.baidu.request.doc.BDocRepairRequest;
import com.heyu.api.baidu.response.doc.BDocRepairResp;
import org.springframework.stereotype.Component;

/***
 * https://console.bce.baidu.com/support/?_=1740667714316&timestamp=1740671368219#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E6%96%87%E6%A1%A3%E5%9B%BE%E5%83%8F%E5%A4%84%E7%90%86&api=rest%2F2.0%2Fimage-process%2Fv1%2Fdoc_repair&method=post
 *
 * 文档图片去底纹
 */
@Component
public class BDocRepairHandle extends BaiduBaseHandle<BDocRepairRequest, BDocRepairResp> {
    @Override
    public String getUri() {
        return "/rest/2.0/image-process/v1/doc_repair";
    }

    @Override
    public String check(BDocRepairRequest bDocRepairRequest) {
        return checkImageUri(bDocRepairRequest);
    }

    @Override
    public String getContent(BDocRepairRequest bDocRepairRequest) {
        return getImageContent(bDocRepairRequest).toString();
    }
}
