1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-07 20:45:53 +08:00
2021-11-07 13:14:05 +08:00

306 lines
6.4 KiB
Go

// Code generated by yaprotoc. DO NOT EDIT.
// source: oidb/0xe07.proto
package oidb0xe07
import (
"github.com/pkg/errors"
"github.com/segmentio/encoding/proto"
)
type Coordinate struct {
X *int32 `protobuf:"varint,1,opt"`
Y *int32 `protobuf:"varint,2,opt"`
}
func (x *Coordinate) GetX() int32 {
if x != nil && x.X != nil {
return *x.X
}
return 0
}
func (x *Coordinate) GetY() int32 {
if x != nil && x.Y != nil {
return *x.Y
}
return 0
}
func (x *Coordinate) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type Language struct {
Language *string `protobuf:"bytes,1,opt"`
LanguageDesc *string `protobuf:"bytes,2,opt"`
}
func (x *Language) GetLanguage() string {
if x != nil && x.Language != nil {
return *x.Language
}
return ""
}
func (x *Language) GetLanguageDesc() string {
if x != nil && x.LanguageDesc != nil {
return *x.LanguageDesc
}
return ""
}
func (x *Language) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type OCRReqBody struct {
ImageUrl *string `protobuf:"bytes,1,opt"`
LanguageType *string `protobuf:"bytes,2,opt"`
Scene *string `protobuf:"bytes,3,opt"`
OriginMd5 *string `protobuf:"bytes,10,opt"`
AfterCompressMd5 *string `protobuf:"bytes,11,opt"`
AfterCompressFileSize *uint32 `protobuf:"varint,12,opt"`
AfterCompressWeight *uint32 `protobuf:"varint,13,opt"`
AfterCompressHeight *uint32 `protobuf:"varint,14,opt"`
IsCut *bool `protobuf:"varint,15,opt"`
}
func (x *OCRReqBody) GetImageUrl() string {
if x != nil && x.ImageUrl != nil {
return *x.ImageUrl
}
return ""
}
func (x *OCRReqBody) GetLanguageType() string {
if x != nil && x.LanguageType != nil {
return *x.LanguageType
}
return ""
}
func (x *OCRReqBody) GetScene() string {
if x != nil && x.Scene != nil {
return *x.Scene
}
return ""
}
func (x *OCRReqBody) GetOriginMd5() string {
if x != nil && x.OriginMd5 != nil {
return *x.OriginMd5
}
return ""
}
func (x *OCRReqBody) GetAfterCompressMd5() string {
if x != nil && x.AfterCompressMd5 != nil {
return *x.AfterCompressMd5
}
return ""
}
func (x *OCRReqBody) GetAfterCompressFileSize() uint32 {
if x != nil && x.AfterCompressFileSize != nil {
return *x.AfterCompressFileSize
}
return 0
}
func (x *OCRReqBody) GetAfterCompressWeight() uint32 {
if x != nil && x.AfterCompressWeight != nil {
return *x.AfterCompressWeight
}
return 0
}
func (x *OCRReqBody) GetAfterCompressHeight() uint32 {
if x != nil && x.AfterCompressHeight != nil {
return *x.AfterCompressHeight
}
return 0
}
func (x *OCRReqBody) GetIsCut() bool {
if x != nil && x.IsCut != nil {
return *x.IsCut
}
return false
}
func (x *OCRReqBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type OCRRspBody struct {
TextDetections []*TextDetection `protobuf:"bytes,1,rep"`
Language *string `protobuf:"bytes,2,opt"`
RequestId *string `protobuf:"bytes,3,opt"`
OcrLanguageList []string `protobuf:"bytes,101,rep"`
DstTranslateLanguageList []string `protobuf:"bytes,102,rep"`
LanguageList []*Language `protobuf:"bytes,103,rep"`
AfterCompressWeight *uint32 `protobuf:"varint,111,opt"`
AfterCompressHeight *uint32 `protobuf:"varint,112,opt"`
}
func (x *OCRRspBody) GetLanguage() string {
if x != nil && x.Language != nil {
return *x.Language
}
return ""
}
func (x *OCRRspBody) GetRequestId() string {
if x != nil && x.RequestId != nil {
return *x.RequestId
}
return ""
}
func (x *OCRRspBody) GetAfterCompressWeight() uint32 {
if x != nil && x.AfterCompressWeight != nil {
return *x.AfterCompressWeight
}
return 0
}
func (x *OCRRspBody) GetAfterCompressHeight() uint32 {
if x != nil && x.AfterCompressHeight != nil {
return *x.AfterCompressHeight
}
return 0
}
func (x *OCRRspBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type Polygon struct {
Coordinates []*Coordinate `protobuf:"bytes,1,rep"`
}
func (x *Polygon) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type ReqBody struct {
Version *uint32 `protobuf:"varint,1,opt"`
Client *uint32 `protobuf:"varint,2,opt"`
Entrance *uint32 `protobuf:"varint,3,opt"`
OcrReqBody *OCRReqBody `protobuf:"bytes,10,opt"`
}
func (x *ReqBody) GetVersion() uint32 {
if x != nil && x.Version != nil {
return *x.Version
}
return 0
}
func (x *ReqBody) GetClient() uint32 {
if x != nil && x.Client != nil {
return *x.Client
}
return 0
}
func (x *ReqBody) GetEntrance() uint32 {
if x != nil && x.Entrance != nil {
return *x.Entrance
}
return 0
}
func (x *ReqBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type RspBody struct {
RetCode *int32 `protobuf:"varint,1,opt"`
ErrMsg *string `protobuf:"bytes,2,opt"`
Wording *string `protobuf:"bytes,3,opt"`
OcrRspBody *OCRRspBody `protobuf:"bytes,10,opt"`
}
func (x *RspBody) GetRetCode() int32 {
if x != nil && x.RetCode != nil {
return *x.RetCode
}
return 0
}
func (x *RspBody) GetErrMsg() string {
if x != nil && x.ErrMsg != nil {
return *x.ErrMsg
}
return ""
}
func (x *RspBody) GetWording() string {
if x != nil && x.Wording != nil {
return *x.Wording
}
return ""
}
func (x *RspBody) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}
type TextDetection struct {
DetectedText *string `protobuf:"bytes,1,opt"`
Confidence *uint32 `protobuf:"varint,2,opt"`
Polygon *Polygon `protobuf:"bytes,3,opt"`
AdvancedInfo *string `protobuf:"bytes,4,opt"`
}
func (x *TextDetection) GetDetectedText() string {
if x != nil && x.DetectedText != nil {
return *x.DetectedText
}
return ""
}
func (x *TextDetection) GetConfidence() uint32 {
if x != nil && x.Confidence != nil {
return *x.Confidence
}
return 0
}
func (x *TextDetection) GetAdvancedInfo() string {
if x != nil && x.AdvancedInfo != nil {
return *x.AdvancedInfo
}
return ""
}
func (x *TextDetection) Marshal() ([]byte, error) {
if x == nil {
return nil, errors.New("nil message")
}
return proto.Marshal(x)
}