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


import com.heyu.api.data.annotation.CustomPath;
import com.heyu.api.baidu.BaiduBaseHandle;
import com.heyu.api.baidu.request.traffic.BVehicleRegistrationCertificateRequest;
import com.heyu.api.baidu.response.traffic.BVehicleRegistrationCertificateResp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * https://console.bce.baidu.com/support/?_=1740411162437&timestamp=1740412165257#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E4%BA%A4%E9%80%9A%E5%9C%BA%E6%99%AFOCR&api=rest%2F2.0%2Focr%2Fv1%2Fvehicle_registration_certificate&method=post
 * <p>
 * <p>
 * 机动车登记证书识别
 */
@Component
@Slf4j
@CustomPath("vehicleRegistrationCertificate")
public class BVehicleRegistrationCertificateHandle extends BaiduBaseHandle<BVehicleRegistrationCertificateRequest, BVehicleRegistrationCertificateResp> {

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

    @Override
    public String check(BVehicleRegistrationCertificateRequest bVehicleRegistrationCertificateRequest) {
        return checkImageUri(bVehicleRegistrationCertificateRequest);
    }

    @Override
    public String getContent(BVehicleRegistrationCertificateRequest bVehicleRegistrationCertificateRequest) {
        return getImageContent(bVehicleRegistrationCertificateRequest).toString();
    }
}
