
com.tencentcloudapi.ocr.v20181119.models.GeneralBasicOCRRequest Maven / Gradle / Ivy
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.ocr.v20181119.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class GeneralBasicOCRRequest extends AbstractModel{
/**
* 图片/PDF的 Base64 值。
要求图片/PDF经Base64编码后不超过 7M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
*/
@SerializedName("ImageBase64")
@Expose
private String ImageBase64;
/**
* 图片/PDF的 Url 地址。
要求图片/PDF经Base64编码后不超过 7M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。
图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
*/
@SerializedName("ImageUrl")
@Expose
private String ImageUrl;
/**
* 保留字段。
*/
@SerializedName("Scene")
@Expose
private String Scene;
/**
* 识别语言类型。
支持自动识别语言类型,同时支持自选语言种类,默认中英文混合(zh),各种语言均支持与英文混合的文字识别。
可选值:
zh:中英混合
zh_rare:支持英文、数字、中文生僻字、繁体字,特殊符号等
auto:自动
mix:混合语种
jap:日语
kor:韩语
spa:西班牙语
fre:法语
ger:德语
por:葡萄牙语
vie:越语
may:马来语
rus:俄语
ita:意大利语
hol:荷兰语
swe:瑞典语
fin:芬兰语
dan:丹麦语
nor:挪威语
hun:匈牙利语
tha:泰语
hi:印地语
ara:阿拉伯语
*/
@SerializedName("LanguageType")
@Expose
private String LanguageType;
/**
* 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
*/
@SerializedName("IsPdf")
@Expose
private Boolean IsPdf;
/**
* 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
*/
@SerializedName("PdfPageNumber")
@Expose
private Long PdfPageNumber;
/**
* 是否返回单字信息,默认关
*/
@SerializedName("IsWords")
@Expose
private Boolean IsWords;
/**
* Get 图片/PDF的 Base64 值。
要求图片/PDF经Base64编码后不超过 7M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
* @return ImageBase64 图片/PDF的 Base64 值。
要求图片/PDF经Base64编码后不超过 7M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
*/
public String getImageBase64() {
return this.ImageBase64;
}
/**
* Set 图片/PDF的 Base64 值。
要求图片/PDF经Base64编码后不超过 7M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
* @param ImageBase64 图片/PDF的 Base64 值。
要求图片/PDF经Base64编码后不超过 7M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。
图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
*/
public void setImageBase64(String ImageBase64) {
this.ImageBase64 = ImageBase64;
}
/**
* Get 图片/PDF的 Url 地址。
要求图片/PDF经Base64编码后不超过 7M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。
图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
* @return ImageUrl 图片/PDF的 Url 地址。
要求图片/PDF经Base64编码后不超过 7M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。
图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
*/
public String getImageUrl() {
return this.ImageUrl;
}
/**
* Set 图片/PDF的 Url 地址。
要求图片/PDF经Base64编码后不超过 7M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。
图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
* @param ImageUrl 图片/PDF的 Url 地址。
要求图片/PDF经Base64编码后不超过 7M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。
图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
*/
public void setImageUrl(String ImageUrl) {
this.ImageUrl = ImageUrl;
}
/**
* Get 保留字段。
* @return Scene 保留字段。
*/
public String getScene() {
return this.Scene;
}
/**
* Set 保留字段。
* @param Scene 保留字段。
*/
public void setScene(String Scene) {
this.Scene = Scene;
}
/**
* Get 识别语言类型。
支持自动识别语言类型,同时支持自选语言种类,默认中英文混合(zh),各种语言均支持与英文混合的文字识别。
可选值:
zh:中英混合
zh_rare:支持英文、数字、中文生僻字、繁体字,特殊符号等
auto:自动
mix:混合语种
jap:日语
kor:韩语
spa:西班牙语
fre:法语
ger:德语
por:葡萄牙语
vie:越语
may:马来语
rus:俄语
ita:意大利语
hol:荷兰语
swe:瑞典语
fin:芬兰语
dan:丹麦语
nor:挪威语
hun:匈牙利语
tha:泰语
hi:印地语
ara:阿拉伯语
* @return LanguageType 识别语言类型。
支持自动识别语言类型,同时支持自选语言种类,默认中英文混合(zh),各种语言均支持与英文混合的文字识别。
可选值:
zh:中英混合
zh_rare:支持英文、数字、中文生僻字、繁体字,特殊符号等
auto:自动
mix:混合语种
jap:日语
kor:韩语
spa:西班牙语
fre:法语
ger:德语
por:葡萄牙语
vie:越语
may:马来语
rus:俄语
ita:意大利语
hol:荷兰语
swe:瑞典语
fin:芬兰语
dan:丹麦语
nor:挪威语
hun:匈牙利语
tha:泰语
hi:印地语
ara:阿拉伯语
*/
public String getLanguageType() {
return this.LanguageType;
}
/**
* Set 识别语言类型。
支持自动识别语言类型,同时支持自选语言种类,默认中英文混合(zh),各种语言均支持与英文混合的文字识别。
可选值:
zh:中英混合
zh_rare:支持英文、数字、中文生僻字、繁体字,特殊符号等
auto:自动
mix:混合语种
jap:日语
kor:韩语
spa:西班牙语
fre:法语
ger:德语
por:葡萄牙语
vie:越语
may:马来语
rus:俄语
ita:意大利语
hol:荷兰语
swe:瑞典语
fin:芬兰语
dan:丹麦语
nor:挪威语
hun:匈牙利语
tha:泰语
hi:印地语
ara:阿拉伯语
* @param LanguageType 识别语言类型。
支持自动识别语言类型,同时支持自选语言种类,默认中英文混合(zh),各种语言均支持与英文混合的文字识别。
可选值:
zh:中英混合
zh_rare:支持英文、数字、中文生僻字、繁体字,特殊符号等
auto:自动
mix:混合语种
jap:日语
kor:韩语
spa:西班牙语
fre:法语
ger:德语
por:葡萄牙语
vie:越语
may:马来语
rus:俄语
ita:意大利语
hol:荷兰语
swe:瑞典语
fin:芬兰语
dan:丹麦语
nor:挪威语
hun:匈牙利语
tha:泰语
hi:印地语
ara:阿拉伯语
*/
public void setLanguageType(String LanguageType) {
this.LanguageType = LanguageType;
}
/**
* Get 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
* @return IsPdf 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
*/
public Boolean getIsPdf() {
return this.IsPdf;
}
/**
* Set 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
* @param IsPdf 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
*/
public void setIsPdf(Boolean IsPdf) {
this.IsPdf = IsPdf;
}
/**
* Get 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
* @return PdfPageNumber 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
*/
public Long getPdfPageNumber() {
return this.PdfPageNumber;
}
/**
* Set 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
* @param PdfPageNumber 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
*/
public void setPdfPageNumber(Long PdfPageNumber) {
this.PdfPageNumber = PdfPageNumber;
}
/**
* Get 是否返回单字信息,默认关
* @return IsWords 是否返回单字信息,默认关
*/
public Boolean getIsWords() {
return this.IsWords;
}
/**
* Set 是否返回单字信息,默认关
* @param IsWords 是否返回单字信息,默认关
*/
public void setIsWords(Boolean IsWords) {
this.IsWords = IsWords;
}
public GeneralBasicOCRRequest() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public GeneralBasicOCRRequest(GeneralBasicOCRRequest source) {
if (source.ImageBase64 != null) {
this.ImageBase64 = new String(source.ImageBase64);
}
if (source.ImageUrl != null) {
this.ImageUrl = new String(source.ImageUrl);
}
if (source.Scene != null) {
this.Scene = new String(source.Scene);
}
if (source.LanguageType != null) {
this.LanguageType = new String(source.LanguageType);
}
if (source.IsPdf != null) {
this.IsPdf = new Boolean(source.IsPdf);
}
if (source.PdfPageNumber != null) {
this.PdfPageNumber = new Long(source.PdfPageNumber);
}
if (source.IsWords != null) {
this.IsWords = new Boolean(source.IsWords);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap map, String prefix) {
this.setParamSimple(map, prefix + "ImageBase64", this.ImageBase64);
this.setParamSimple(map, prefix + "ImageUrl", this.ImageUrl);
this.setParamSimple(map, prefix + "Scene", this.Scene);
this.setParamSimple(map, prefix + "LanguageType", this.LanguageType);
this.setParamSimple(map, prefix + "IsPdf", this.IsPdf);
this.setParamSimple(map, prefix + "PdfPageNumber", this.PdfPageNumber);
this.setParamSimple(map, prefix + "IsWords", this.IsWords);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy