mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-07 20:45:53 +08:00
168 lines
3.5 KiB
Go
168 lines
3.5 KiB
Go
// Code generated by yaprotoc. DO NOT EDIT.
|
|
// source: oidb/0x990.proto
|
|
|
|
package oidb0x990
|
|
|
|
import (
|
|
"github.com/pkg/errors"
|
|
"github.com/segmentio/encoding/proto"
|
|
)
|
|
|
|
type BatchTranslateReq struct {
|
|
SrcLanguage *string `protobuf:"bytes,1,opt"`
|
|
DstLanguage *string `protobuf:"bytes,2,opt"`
|
|
SrcBytesTextList [][]byte `protobuf:"bytes,3,rep"`
|
|
}
|
|
|
|
func (x *BatchTranslateReq) GetSrcLanguage() string {
|
|
if x != nil && x.SrcLanguage != nil {
|
|
return *x.SrcLanguage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *BatchTranslateReq) GetDstLanguage() string {
|
|
if x != nil && x.DstLanguage != nil {
|
|
return *x.DstLanguage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *BatchTranslateReq) Marshal() ([]byte, error) {
|
|
if x == nil {
|
|
return nil, errors.New("nil message")
|
|
}
|
|
return proto.Marshal(x)
|
|
}
|
|
|
|
type BatchTranslateRsp struct {
|
|
ErrorCode *int32 `protobuf:"varint,1,opt"`
|
|
ErrorMsg []byte `protobuf:"bytes,2,opt"`
|
|
SrcLanguage *string `protobuf:"bytes,3,opt"`
|
|
DstLanguage *string `protobuf:"bytes,4,opt"`
|
|
SrcBytesTextList [][]byte `protobuf:"bytes,5,rep"`
|
|
DstBytesTextList [][]byte `protobuf:"bytes,6,rep"`
|
|
}
|
|
|
|
func (x *BatchTranslateRsp) GetErrorCode() int32 {
|
|
if x != nil && x.ErrorCode != nil {
|
|
return *x.ErrorCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *BatchTranslateRsp) GetSrcLanguage() string {
|
|
if x != nil && x.SrcLanguage != nil {
|
|
return *x.SrcLanguage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *BatchTranslateRsp) GetDstLanguage() string {
|
|
if x != nil && x.DstLanguage != nil {
|
|
return *x.DstLanguage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *BatchTranslateRsp) Marshal() ([]byte, error) {
|
|
if x == nil {
|
|
return nil, errors.New("nil message")
|
|
}
|
|
return proto.Marshal(x)
|
|
}
|
|
|
|
type ReqBody struct {
|
|
TranslateReq *TranslateReq `protobuf:"bytes,1,opt"`
|
|
BatchTranslateReq *BatchTranslateReq `protobuf:"bytes,2,opt"`
|
|
}
|
|
|
|
func (x *ReqBody) Marshal() ([]byte, error) {
|
|
if x == nil {
|
|
return nil, errors.New("nil message")
|
|
}
|
|
return proto.Marshal(x)
|
|
}
|
|
|
|
type RspBody struct {
|
|
TranslateRsp *TranslateRsp `protobuf:"bytes,1,opt"`
|
|
BatchTranslateRsp *BatchTranslateRsp `protobuf:"bytes,2,opt"`
|
|
}
|
|
|
|
func (x *RspBody) Marshal() ([]byte, error) {
|
|
if x == nil {
|
|
return nil, errors.New("nil message")
|
|
}
|
|
return proto.Marshal(x)
|
|
}
|
|
|
|
type TranslateReq struct {
|
|
Text []byte `protobuf:"bytes,1,opt"`
|
|
Type *int32 `protobuf:"varint,2,opt"`
|
|
SrcLanguage *string `protobuf:"bytes,3,opt"`
|
|
DstLanguage *string `protobuf:"bytes,4,opt"`
|
|
}
|
|
|
|
func (x *TranslateReq) GetType() int32 {
|
|
if x != nil && x.Type != nil {
|
|
return *x.Type
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *TranslateReq) GetSrcLanguage() string {
|
|
if x != nil && x.SrcLanguage != nil {
|
|
return *x.SrcLanguage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TranslateReq) GetDstLanguage() string {
|
|
if x != nil && x.DstLanguage != nil {
|
|
return *x.DstLanguage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TranslateReq) Marshal() ([]byte, error) {
|
|
if x == nil {
|
|
return nil, errors.New("nil message")
|
|
}
|
|
return proto.Marshal(x)
|
|
}
|
|
|
|
type TranslateRsp struct {
|
|
RetCode *int32 `protobuf:"varint,1,opt"`
|
|
Type *int32 `protobuf:"varint,2,opt"`
|
|
TransResult []byte `protobuf:"bytes,3,opt"`
|
|
TextLen *int32 `protobuf:"varint,4,opt"`
|
|
}
|
|
|
|
func (x *TranslateRsp) GetRetCode() int32 {
|
|
if x != nil && x.RetCode != nil {
|
|
return *x.RetCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *TranslateRsp) GetType() int32 {
|
|
if x != nil && x.Type != nil {
|
|
return *x.Type
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *TranslateRsp) GetTextLen() int32 {
|
|
if x != nil && x.TextLen != nil {
|
|
return *x.TextLen
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *TranslateRsp) Marshal() ([]byte, error) {
|
|
if x == nil {
|
|
return nil, errors.New("nil message")
|
|
}
|
|
return proto.Marshal(x)
|
|
}
|