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


import com.heyu.api.data.annotation.CustomPath;
import com.heyu.api.baidu.BaiduBaseHandle;
import com.heyu.api.baidu.request.certificate.BBirthCertificateRequest;
import com.heyu.api.baidu.response.certificate.BBirthCertificateResp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * https://console.bce.baidu.com/support/?_=1740219852952&timestamp=1740309618781#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E5%8D%A1%E8%AF%81OCR&api=rest%2F2.0%2Focr%2Fv1%2Fbirth_certificate&method=post
 * <p>
 * <p>
 * 出生医学证明识别
 */
@Component
@Slf4j
@CustomPath("birthCertificate")
public class BBirthCertificateHandle extends BaiduBaseHandle<BBirthCertificateRequest, BBirthCertificateResp> {

    @Override
    public String getUri() {
        return "/rest/2.0/ocr/v1/birth_certificate";
    }

    @Override
    public String check(BBirthCertificateRequest bBirthCertificateRequest) {
        return checkImageUri(bBirthCertificateRequest);
    }

    @Override
    public String getContent(BBirthCertificateRequest bBirthCertificateRequest) {
        return getImageContent(bBirthCertificateRequest).toString();
    }

}
