From 971e7dafccc9d536e47eb2b8d90774f7b109bf02 Mon Sep 17 00:00:00 2001 From: violapioggia <2604296771@qq.com> Date: Thu, 30 Nov 2023 22:12:11 +0800 Subject: [PATCH] feat:optimize aigc --- server/idl/aigc.thrift | 35 +- server/kitex_gen/aigc/aigc.go | 2818 ++++++++++++++++- .../kitex_gen/aigc/aigcserver/aigcserver.go | 89 +- server/kitex_gen/aigc/aigcserver/client.go | 18 + server/kitex_gen/aigc/k-aigc.go | 1879 ++++++++++- server/service/aigc/handler.go | 18 + 6 files changed, 4699 insertions(+), 158 deletions(-) diff --git a/server/idl/aigc.thrift b/server/idl/aigc.thrift index 1004205..7ca6225 100644 --- a/server/idl/aigc.thrift +++ b/server/idl/aigc.thrift @@ -9,9 +9,42 @@ struct qingyu_aigc_question_request { struct qingyu_aigc_question_response { 1: base.qingyu_base_response base_resp - 2: string msg // User authentication token + 2: string msg } +struct qingyu_aigc_issueList_request { + 1:i64 user_id +} + +struct qingyu_aigc_issueList_response { + 1: base.qingyu_base_response base_resp + 2: string msg +} + +struct qingyu_aigc_choose_word_request { + 1:i64 user_id + 2:string content +} + +struct qingyu_aigc_choose_word_response { + 1: base.qingyu_base_response base_resp + 2: string msg +} + +struct qingyu_aigc_doctor_analyse_request { + 1:i64 user_id + 2:list content +} + +struct qingyu_aigc_doctor_analyse_response { + 1: base.qingyu_base_response base_resp + 2: string msg +} + + service AIGCServer { qingyu_aigc_question_response UserAskQuestion(1: qingyu_aigc_question_request req), + qingyu_aigc_issueList_response AnalyseIssueList(1:qingyu_aigc_issueList_request req), + qingyu_aigc_choose_word_response ChooseWord(1:qingyu_aigc_choose_word_request req), + qingyu_aigc_doctor_analyse_response DoctorAnalyse(1:qingyu_aigc_doctor_analyse_request req), } \ No newline at end of file diff --git a/server/kitex_gen/aigc/aigc.go b/server/kitex_gen/aigc/aigc.go index b9f5cbb..053ab60 100644 --- a/server/kitex_gen/aigc/aigc.go +++ b/server/kitex_gen/aigc/aigc.go @@ -464,168 +464,2716 @@ func (p *QingyuAigcQuestionResponse) Field2DeepEqual(src string) bool { return true } +type QingyuAigcIssueListRequest struct { + UserId int64 `thrift:"user_id,1" frugal:"1,default,i64" json:"user_id"` +} + +func NewQingyuAigcIssueListRequest() *QingyuAigcIssueListRequest { + return &QingyuAigcIssueListRequest{} +} + +func (p *QingyuAigcIssueListRequest) InitDefault() { + *p = QingyuAigcIssueListRequest{} +} + +func (p *QingyuAigcIssueListRequest) GetUserId() (v int64) { + return p.UserId +} +func (p *QingyuAigcIssueListRequest) SetUserId(val int64) { + p.UserId = val +} + +var fieldIDToName_QingyuAigcIssueListRequest = map[int16]string{ + 1: "user_id", +} + +func (p *QingyuAigcIssueListRequest) Read(iprot thrift.TProtocol) (err error) { + + var fieldTypeId thrift.TType + var fieldId int16 + + if _, err = iprot.ReadStructBegin(); err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, err = iprot.ReadFieldBegin() + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + if err = p.ReadField1(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + default: + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + + if err = iprot.ReadFieldEnd(); err != nil { + goto ReadFieldEndError + } + } + if err = iprot.ReadStructEnd(); err != nil { + goto ReadStructEndError + } + + return nil +ReadStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_QingyuAigcIssueListRequest[fieldId]), err) +SkipFieldError: + return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) + +ReadFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *QingyuAigcIssueListRequest) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { + return err + } else { + p.UserId = v + } + return nil +} + +func (p *QingyuAigcIssueListRequest) Write(oprot thrift.TProtocol) (err error) { + var fieldId int16 + if err = oprot.WriteStructBegin("qingyu_aigc_issueList_request"); err != nil { + goto WriteStructBeginError + } + if p != nil { + if err = p.writeField1(oprot); err != nil { + fieldId = 1 + goto WriteFieldError + } + + } + if err = oprot.WriteFieldStop(); err != nil { + goto WriteFieldStopError + } + if err = oprot.WriteStructEnd(); err != nil { + goto WriteStructEndError + } + return nil +WriteStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) +WriteFieldError: + return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) +WriteFieldStopError: + return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) +WriteStructEndError: + return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) +} + +func (p *QingyuAigcIssueListRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err = oprot.WriteFieldBegin("user_id", thrift.I64, 1); err != nil { + goto WriteFieldBeginError + } + if err := oprot.WriteI64(p.UserId); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) +} + +func (p *QingyuAigcIssueListRequest) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("QingyuAigcIssueListRequest(%+v)", *p) +} + +func (p *QingyuAigcIssueListRequest) DeepEqual(ano *QingyuAigcIssueListRequest) bool { + if p == ano { + return true + } else if p == nil || ano == nil { + return false + } + if !p.Field1DeepEqual(ano.UserId) { + return false + } + return true +} + +func (p *QingyuAigcIssueListRequest) Field1DeepEqual(src int64) bool { + + if p.UserId != src { + return false + } + return true +} + +type QingyuAigcIssueListResponse struct { + BaseResp *base.QingyuBaseResponse `thrift:"base_resp,1" frugal:"1,default,base.QingyuBaseResponse" json:"base_resp"` + Msg string `thrift:"msg,2" frugal:"2,default,string" json:"msg"` +} + +func NewQingyuAigcIssueListResponse() *QingyuAigcIssueListResponse { + return &QingyuAigcIssueListResponse{} +} + +func (p *QingyuAigcIssueListResponse) InitDefault() { + *p = QingyuAigcIssueListResponse{} +} + +var QingyuAigcIssueListResponse_BaseResp_DEFAULT *base.QingyuBaseResponse + +func (p *QingyuAigcIssueListResponse) GetBaseResp() (v *base.QingyuBaseResponse) { + if !p.IsSetBaseResp() { + return QingyuAigcIssueListResponse_BaseResp_DEFAULT + } + return p.BaseResp +} + +func (p *QingyuAigcIssueListResponse) GetMsg() (v string) { + return p.Msg +} +func (p *QingyuAigcIssueListResponse) SetBaseResp(val *base.QingyuBaseResponse) { + p.BaseResp = val +} +func (p *QingyuAigcIssueListResponse) SetMsg(val string) { + p.Msg = val +} + +var fieldIDToName_QingyuAigcIssueListResponse = map[int16]string{ + 1: "base_resp", + 2: "msg", +} + +func (p *QingyuAigcIssueListResponse) IsSetBaseResp() bool { + return p.BaseResp != nil +} + +func (p *QingyuAigcIssueListResponse) Read(iprot thrift.TProtocol) (err error) { + + var fieldTypeId thrift.TType + var fieldId int16 + + if _, err = iprot.ReadStructBegin(); err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, err = iprot.ReadFieldBegin() + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err = p.ReadField1(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err = p.ReadField2(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + default: + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + + if err = iprot.ReadFieldEnd(); err != nil { + goto ReadFieldEndError + } + } + if err = iprot.ReadStructEnd(); err != nil { + goto ReadStructEndError + } + + return nil +ReadStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_QingyuAigcIssueListResponse[fieldId]), err) +SkipFieldError: + return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) + +ReadFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *QingyuAigcIssueListResponse) ReadField1(iprot thrift.TProtocol) error { + p.BaseResp = base.NewQingyuBaseResponse() + if err := p.BaseResp.Read(iprot); err != nil { + return err + } + return nil +} + +func (p *QingyuAigcIssueListResponse) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return err + } else { + p.Msg = v + } + return nil +} + +func (p *QingyuAigcIssueListResponse) Write(oprot thrift.TProtocol) (err error) { + var fieldId int16 + if err = oprot.WriteStructBegin("qingyu_aigc_issueList_response"); err != nil { + goto WriteStructBeginError + } + if p != nil { + if err = p.writeField1(oprot); err != nil { + fieldId = 1 + goto WriteFieldError + } + if err = p.writeField2(oprot); err != nil { + fieldId = 2 + goto WriteFieldError + } + + } + if err = oprot.WriteFieldStop(); err != nil { + goto WriteFieldStopError + } + if err = oprot.WriteStructEnd(); err != nil { + goto WriteStructEndError + } + return nil +WriteStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) +WriteFieldError: + return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) +WriteFieldStopError: + return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) +WriteStructEndError: + return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) +} + +func (p *QingyuAigcIssueListResponse) writeField1(oprot thrift.TProtocol) (err error) { + if err = oprot.WriteFieldBegin("base_resp", thrift.STRUCT, 1); err != nil { + goto WriteFieldBeginError + } + if err := p.BaseResp.Write(oprot); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) +} + +func (p *QingyuAigcIssueListResponse) writeField2(oprot thrift.TProtocol) (err error) { + if err = oprot.WriteFieldBegin("msg", thrift.STRING, 2); err != nil { + goto WriteFieldBeginError + } + if err := oprot.WriteString(p.Msg); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 2 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err) +} + +func (p *QingyuAigcIssueListResponse) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("QingyuAigcIssueListResponse(%+v)", *p) +} + +func (p *QingyuAigcIssueListResponse) DeepEqual(ano *QingyuAigcIssueListResponse) bool { + if p == ano { + return true + } else if p == nil || ano == nil { + return false + } + if !p.Field1DeepEqual(ano.BaseResp) { + return false + } + if !p.Field2DeepEqual(ano.Msg) { + return false + } + return true +} + +func (p *QingyuAigcIssueListResponse) Field1DeepEqual(src *base.QingyuBaseResponse) bool { + + if !p.BaseResp.DeepEqual(src) { + return false + } + return true +} +func (p *QingyuAigcIssueListResponse) Field2DeepEqual(src string) bool { + + if strings.Compare(p.Msg, src) != 0 { + return false + } + return true +} + +type QingyuAigcChooseWordRequest struct { + UserId int64 `thrift:"user_id,1" frugal:"1,default,i64" json:"user_id"` + Content string `thrift:"content,2" frugal:"2,default,string" json:"content"` +} + +func NewQingyuAigcChooseWordRequest() *QingyuAigcChooseWordRequest { + return &QingyuAigcChooseWordRequest{} +} + +func (p *QingyuAigcChooseWordRequest) InitDefault() { + *p = QingyuAigcChooseWordRequest{} +} + +func (p *QingyuAigcChooseWordRequest) GetUserId() (v int64) { + return p.UserId +} + +func (p *QingyuAigcChooseWordRequest) GetContent() (v string) { + return p.Content +} +func (p *QingyuAigcChooseWordRequest) SetUserId(val int64) { + p.UserId = val +} +func (p *QingyuAigcChooseWordRequest) SetContent(val string) { + p.Content = val +} + +var fieldIDToName_QingyuAigcChooseWordRequest = map[int16]string{ + 1: "user_id", + 2: "content", +} + +func (p *QingyuAigcChooseWordRequest) Read(iprot thrift.TProtocol) (err error) { + + var fieldTypeId thrift.TType + var fieldId int16 + + if _, err = iprot.ReadStructBegin(); err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, err = iprot.ReadFieldBegin() + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + if err = p.ReadField1(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err = p.ReadField2(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + default: + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + + if err = iprot.ReadFieldEnd(); err != nil { + goto ReadFieldEndError + } + } + if err = iprot.ReadStructEnd(); err != nil { + goto ReadStructEndError + } + + return nil +ReadStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_QingyuAigcChooseWordRequest[fieldId]), err) +SkipFieldError: + return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) + +ReadFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *QingyuAigcChooseWordRequest) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { + return err + } else { + p.UserId = v + } + return nil +} + +func (p *QingyuAigcChooseWordRequest) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return err + } else { + p.Content = v + } + return nil +} + +func (p *QingyuAigcChooseWordRequest) Write(oprot thrift.TProtocol) (err error) { + var fieldId int16 + if err = oprot.WriteStructBegin("qingyu_aigc_choose_word_request"); err != nil { + goto WriteStructBeginError + } + if p != nil { + if err = p.writeField1(oprot); err != nil { + fieldId = 1 + goto WriteFieldError + } + if err = p.writeField2(oprot); err != nil { + fieldId = 2 + goto WriteFieldError + } + + } + if err = oprot.WriteFieldStop(); err != nil { + goto WriteFieldStopError + } + if err = oprot.WriteStructEnd(); err != nil { + goto WriteStructEndError + } + return nil +WriteStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) +WriteFieldError: + return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) +WriteFieldStopError: + return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) +WriteStructEndError: + return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) +} + +func (p *QingyuAigcChooseWordRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err = oprot.WriteFieldBegin("user_id", thrift.I64, 1); err != nil { + goto WriteFieldBeginError + } + if err := oprot.WriteI64(p.UserId); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) +} + +func (p *QingyuAigcChooseWordRequest) writeField2(oprot thrift.TProtocol) (err error) { + if err = oprot.WriteFieldBegin("content", thrift.STRING, 2); err != nil { + goto WriteFieldBeginError + } + if err := oprot.WriteString(p.Content); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 2 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err) +} + +func (p *QingyuAigcChooseWordRequest) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("QingyuAigcChooseWordRequest(%+v)", *p) +} + +func (p *QingyuAigcChooseWordRequest) DeepEqual(ano *QingyuAigcChooseWordRequest) bool { + if p == ano { + return true + } else if p == nil || ano == nil { + return false + } + if !p.Field1DeepEqual(ano.UserId) { + return false + } + if !p.Field2DeepEqual(ano.Content) { + return false + } + return true +} + +func (p *QingyuAigcChooseWordRequest) Field1DeepEqual(src int64) bool { + + if p.UserId != src { + return false + } + return true +} +func (p *QingyuAigcChooseWordRequest) Field2DeepEqual(src string) bool { + + if strings.Compare(p.Content, src) != 0 { + return false + } + return true +} + +type QingyuAigcChooseWordResponse struct { + BaseResp *base.QingyuBaseResponse `thrift:"base_resp,1" frugal:"1,default,base.QingyuBaseResponse" json:"base_resp"` + Msg string `thrift:"msg,2" frugal:"2,default,string" json:"msg"` +} + +func NewQingyuAigcChooseWordResponse() *QingyuAigcChooseWordResponse { + return &QingyuAigcChooseWordResponse{} +} + +func (p *QingyuAigcChooseWordResponse) InitDefault() { + *p = QingyuAigcChooseWordResponse{} +} + +var QingyuAigcChooseWordResponse_BaseResp_DEFAULT *base.QingyuBaseResponse + +func (p *QingyuAigcChooseWordResponse) GetBaseResp() (v *base.QingyuBaseResponse) { + if !p.IsSetBaseResp() { + return QingyuAigcChooseWordResponse_BaseResp_DEFAULT + } + return p.BaseResp +} + +func (p *QingyuAigcChooseWordResponse) GetMsg() (v string) { + return p.Msg +} +func (p *QingyuAigcChooseWordResponse) SetBaseResp(val *base.QingyuBaseResponse) { + p.BaseResp = val +} +func (p *QingyuAigcChooseWordResponse) SetMsg(val string) { + p.Msg = val +} + +var fieldIDToName_QingyuAigcChooseWordResponse = map[int16]string{ + 1: "base_resp", + 2: "msg", +} + +func (p *QingyuAigcChooseWordResponse) IsSetBaseResp() bool { + return p.BaseResp != nil +} + +func (p *QingyuAigcChooseWordResponse) Read(iprot thrift.TProtocol) (err error) { + + var fieldTypeId thrift.TType + var fieldId int16 + + if _, err = iprot.ReadStructBegin(); err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, err = iprot.ReadFieldBegin() + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err = p.ReadField1(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err = p.ReadField2(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + default: + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + + if err = iprot.ReadFieldEnd(); err != nil { + goto ReadFieldEndError + } + } + if err = iprot.ReadStructEnd(); err != nil { + goto ReadStructEndError + } + + return nil +ReadStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_QingyuAigcChooseWordResponse[fieldId]), err) +SkipFieldError: + return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) + +ReadFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *QingyuAigcChooseWordResponse) ReadField1(iprot thrift.TProtocol) error { + p.BaseResp = base.NewQingyuBaseResponse() + if err := p.BaseResp.Read(iprot); err != nil { + return err + } + return nil +} + +func (p *QingyuAigcChooseWordResponse) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return err + } else { + p.Msg = v + } + return nil +} + +func (p *QingyuAigcChooseWordResponse) Write(oprot thrift.TProtocol) (err error) { + var fieldId int16 + if err = oprot.WriteStructBegin("qingyu_aigc_choose_word_response"); err != nil { + goto WriteStructBeginError + } + if p != nil { + if err = p.writeField1(oprot); err != nil { + fieldId = 1 + goto WriteFieldError + } + if err = p.writeField2(oprot); err != nil { + fieldId = 2 + goto WriteFieldError + } + + } + if err = oprot.WriteFieldStop(); err != nil { + goto WriteFieldStopError + } + if err = oprot.WriteStructEnd(); err != nil { + goto WriteStructEndError + } + return nil +WriteStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) +WriteFieldError: + return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) +WriteFieldStopError: + return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) +WriteStructEndError: + return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) +} + +func (p *QingyuAigcChooseWordResponse) writeField1(oprot thrift.TProtocol) (err error) { + if err = oprot.WriteFieldBegin("base_resp", thrift.STRUCT, 1); err != nil { + goto WriteFieldBeginError + } + if err := p.BaseResp.Write(oprot); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) +} + +func (p *QingyuAigcChooseWordResponse) writeField2(oprot thrift.TProtocol) (err error) { + if err = oprot.WriteFieldBegin("msg", thrift.STRING, 2); err != nil { + goto WriteFieldBeginError + } + if err := oprot.WriteString(p.Msg); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 2 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err) +} + +func (p *QingyuAigcChooseWordResponse) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("QingyuAigcChooseWordResponse(%+v)", *p) +} + +func (p *QingyuAigcChooseWordResponse) DeepEqual(ano *QingyuAigcChooseWordResponse) bool { + if p == ano { + return true + } else if p == nil || ano == nil { + return false + } + if !p.Field1DeepEqual(ano.BaseResp) { + return false + } + if !p.Field2DeepEqual(ano.Msg) { + return false + } + return true +} + +func (p *QingyuAigcChooseWordResponse) Field1DeepEqual(src *base.QingyuBaseResponse) bool { + + if !p.BaseResp.DeepEqual(src) { + return false + } + return true +} +func (p *QingyuAigcChooseWordResponse) Field2DeepEqual(src string) bool { + + if strings.Compare(p.Msg, src) != 0 { + return false + } + return true +} + +type QingyuAigcDoctorAnalyseRequest struct { + UserId int64 `thrift:"user_id,1" frugal:"1,default,i64" json:"user_id"` + Content []string `thrift:"content,2" frugal:"2,default,list" json:"content"` +} + +func NewQingyuAigcDoctorAnalyseRequest() *QingyuAigcDoctorAnalyseRequest { + return &QingyuAigcDoctorAnalyseRequest{} +} + +func (p *QingyuAigcDoctorAnalyseRequest) InitDefault() { + *p = QingyuAigcDoctorAnalyseRequest{} +} + +func (p *QingyuAigcDoctorAnalyseRequest) GetUserId() (v int64) { + return p.UserId +} + +func (p *QingyuAigcDoctorAnalyseRequest) GetContent() (v []string) { + return p.Content +} +func (p *QingyuAigcDoctorAnalyseRequest) SetUserId(val int64) { + p.UserId = val +} +func (p *QingyuAigcDoctorAnalyseRequest) SetContent(val []string) { + p.Content = val +} + +var fieldIDToName_QingyuAigcDoctorAnalyseRequest = map[int16]string{ + 1: "user_id", + 2: "content", +} + +func (p *QingyuAigcDoctorAnalyseRequest) Read(iprot thrift.TProtocol) (err error) { + + var fieldTypeId thrift.TType + var fieldId int16 + + if _, err = iprot.ReadStructBegin(); err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, err = iprot.ReadFieldBegin() + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + if err = p.ReadField1(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err = p.ReadField2(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + default: + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + + if err = iprot.ReadFieldEnd(); err != nil { + goto ReadFieldEndError + } + } + if err = iprot.ReadStructEnd(); err != nil { + goto ReadStructEndError + } + + return nil +ReadStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_QingyuAigcDoctorAnalyseRequest[fieldId]), err) +SkipFieldError: + return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) + +ReadFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *QingyuAigcDoctorAnalyseRequest) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { + return err + } else { + p.UserId = v + } + return nil +} + +func (p *QingyuAigcDoctorAnalyseRequest) ReadField2(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin() + if err != nil { + return err + } + p.Content = make([]string, 0, size) + for i := 0; i < size; i++ { + var _elem string + if v, err := iprot.ReadString(); err != nil { + return err + } else { + _elem = v + } + + p.Content = append(p.Content, _elem) + } + if err := iprot.ReadListEnd(); err != nil { + return err + } + return nil +} + +func (p *QingyuAigcDoctorAnalyseRequest) Write(oprot thrift.TProtocol) (err error) { + var fieldId int16 + if err = oprot.WriteStructBegin("qingyu_aigc_doctor_analyse_request"); err != nil { + goto WriteStructBeginError + } + if p != nil { + if err = p.writeField1(oprot); err != nil { + fieldId = 1 + goto WriteFieldError + } + if err = p.writeField2(oprot); err != nil { + fieldId = 2 + goto WriteFieldError + } + + } + if err = oprot.WriteFieldStop(); err != nil { + goto WriteFieldStopError + } + if err = oprot.WriteStructEnd(); err != nil { + goto WriteStructEndError + } + return nil +WriteStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) +WriteFieldError: + return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) +WriteFieldStopError: + return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) +WriteStructEndError: + return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) +} + +func (p *QingyuAigcDoctorAnalyseRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err = oprot.WriteFieldBegin("user_id", thrift.I64, 1); err != nil { + goto WriteFieldBeginError + } + if err := oprot.WriteI64(p.UserId); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) +} + +func (p *QingyuAigcDoctorAnalyseRequest) writeField2(oprot thrift.TProtocol) (err error) { + if err = oprot.WriteFieldBegin("content", thrift.LIST, 2); err != nil { + goto WriteFieldBeginError + } + if err := oprot.WriteListBegin(thrift.STRING, len(p.Content)); err != nil { + return err + } + for _, v := range p.Content { + if err := oprot.WriteString(v); err != nil { + return err + } + } + if err := oprot.WriteListEnd(); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 2 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err) +} + +func (p *QingyuAigcDoctorAnalyseRequest) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("QingyuAigcDoctorAnalyseRequest(%+v)", *p) +} + +func (p *QingyuAigcDoctorAnalyseRequest) DeepEqual(ano *QingyuAigcDoctorAnalyseRequest) bool { + if p == ano { + return true + } else if p == nil || ano == nil { + return false + } + if !p.Field1DeepEqual(ano.UserId) { + return false + } + if !p.Field2DeepEqual(ano.Content) { + return false + } + return true +} + +func (p *QingyuAigcDoctorAnalyseRequest) Field1DeepEqual(src int64) bool { + + if p.UserId != src { + return false + } + return true +} +func (p *QingyuAigcDoctorAnalyseRequest) Field2DeepEqual(src []string) bool { + + if len(p.Content) != len(src) { + return false + } + for i, v := range p.Content { + _src := src[i] + if strings.Compare(v, _src) != 0 { + return false + } + } + return true +} + +type QingyuAigcDoctorAnalyseResponse struct { + BaseResp *base.QingyuBaseResponse `thrift:"base_resp,1" frugal:"1,default,base.QingyuBaseResponse" json:"base_resp"` + Msg string `thrift:"msg,2" frugal:"2,default,string" json:"msg"` +} + +func NewQingyuAigcDoctorAnalyseResponse() *QingyuAigcDoctorAnalyseResponse { + return &QingyuAigcDoctorAnalyseResponse{} +} + +func (p *QingyuAigcDoctorAnalyseResponse) InitDefault() { + *p = QingyuAigcDoctorAnalyseResponse{} +} + +var QingyuAigcDoctorAnalyseResponse_BaseResp_DEFAULT *base.QingyuBaseResponse + +func (p *QingyuAigcDoctorAnalyseResponse) GetBaseResp() (v *base.QingyuBaseResponse) { + if !p.IsSetBaseResp() { + return QingyuAigcDoctorAnalyseResponse_BaseResp_DEFAULT + } + return p.BaseResp +} + +func (p *QingyuAigcDoctorAnalyseResponse) GetMsg() (v string) { + return p.Msg +} +func (p *QingyuAigcDoctorAnalyseResponse) SetBaseResp(val *base.QingyuBaseResponse) { + p.BaseResp = val +} +func (p *QingyuAigcDoctorAnalyseResponse) SetMsg(val string) { + p.Msg = val +} + +var fieldIDToName_QingyuAigcDoctorAnalyseResponse = map[int16]string{ + 1: "base_resp", + 2: "msg", +} + +func (p *QingyuAigcDoctorAnalyseResponse) IsSetBaseResp() bool { + return p.BaseResp != nil +} + +func (p *QingyuAigcDoctorAnalyseResponse) Read(iprot thrift.TProtocol) (err error) { + + var fieldTypeId thrift.TType + var fieldId int16 + + if _, err = iprot.ReadStructBegin(); err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, err = iprot.ReadFieldBegin() + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err = p.ReadField1(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err = p.ReadField2(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + default: + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + + if err = iprot.ReadFieldEnd(); err != nil { + goto ReadFieldEndError + } + } + if err = iprot.ReadStructEnd(); err != nil { + goto ReadStructEndError + } + + return nil +ReadStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_QingyuAigcDoctorAnalyseResponse[fieldId]), err) +SkipFieldError: + return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) + +ReadFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *QingyuAigcDoctorAnalyseResponse) ReadField1(iprot thrift.TProtocol) error { + p.BaseResp = base.NewQingyuBaseResponse() + if err := p.BaseResp.Read(iprot); err != nil { + return err + } + return nil +} + +func (p *QingyuAigcDoctorAnalyseResponse) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return err + } else { + p.Msg = v + } + return nil +} + +func (p *QingyuAigcDoctorAnalyseResponse) Write(oprot thrift.TProtocol) (err error) { + var fieldId int16 + if err = oprot.WriteStructBegin("qingyu_aigc_doctor_analyse_response"); err != nil { + goto WriteStructBeginError + } + if p != nil { + if err = p.writeField1(oprot); err != nil { + fieldId = 1 + goto WriteFieldError + } + if err = p.writeField2(oprot); err != nil { + fieldId = 2 + goto WriteFieldError + } + + } + if err = oprot.WriteFieldStop(); err != nil { + goto WriteFieldStopError + } + if err = oprot.WriteStructEnd(); err != nil { + goto WriteStructEndError + } + return nil +WriteStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) +WriteFieldError: + return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) +WriteFieldStopError: + return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) +WriteStructEndError: + return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) +} + +func (p *QingyuAigcDoctorAnalyseResponse) writeField1(oprot thrift.TProtocol) (err error) { + if err = oprot.WriteFieldBegin("base_resp", thrift.STRUCT, 1); err != nil { + goto WriteFieldBeginError + } + if err := p.BaseResp.Write(oprot); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) +} + +func (p *QingyuAigcDoctorAnalyseResponse) writeField2(oprot thrift.TProtocol) (err error) { + if err = oprot.WriteFieldBegin("msg", thrift.STRING, 2); err != nil { + goto WriteFieldBeginError + } + if err := oprot.WriteString(p.Msg); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 2 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err) +} + +func (p *QingyuAigcDoctorAnalyseResponse) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("QingyuAigcDoctorAnalyseResponse(%+v)", *p) +} + +func (p *QingyuAigcDoctorAnalyseResponse) DeepEqual(ano *QingyuAigcDoctorAnalyseResponse) bool { + if p == ano { + return true + } else if p == nil || ano == nil { + return false + } + if !p.Field1DeepEqual(ano.BaseResp) { + return false + } + if !p.Field2DeepEqual(ano.Msg) { + return false + } + return true +} + +func (p *QingyuAigcDoctorAnalyseResponse) Field1DeepEqual(src *base.QingyuBaseResponse) bool { + + if !p.BaseResp.DeepEqual(src) { + return false + } + return true +} +func (p *QingyuAigcDoctorAnalyseResponse) Field2DeepEqual(src string) bool { + + if strings.Compare(p.Msg, src) != 0 { + return false + } + return true +} + type AIGCServer interface { UserAskQuestion(ctx context.Context, req *QingyuAigcQuestionRequest) (r *QingyuAigcQuestionResponse, err error) + + AnalyseIssueList(ctx context.Context, req *QingyuAigcIssueListRequest) (r *QingyuAigcIssueListResponse, err error) + + ChooseWord(ctx context.Context, req *QingyuAigcChooseWordRequest) (r *QingyuAigcChooseWordResponse, err error) + + DoctorAnalyse(ctx context.Context, req *QingyuAigcDoctorAnalyseRequest) (r *QingyuAigcDoctorAnalyseResponse, err error) +} + +type AIGCServerClient struct { + c thrift.TClient +} + +func NewAIGCServerClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *AIGCServerClient { + return &AIGCServerClient{ + c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)), + } +} + +func NewAIGCServerClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *AIGCServerClient { + return &AIGCServerClient{ + c: thrift.NewTStandardClient(iprot, oprot), + } +} + +func NewAIGCServerClient(c thrift.TClient) *AIGCServerClient { + return &AIGCServerClient{ + c: c, + } +} + +func (p *AIGCServerClient) Client_() thrift.TClient { + return p.c +} + +func (p *AIGCServerClient) UserAskQuestion(ctx context.Context, req *QingyuAigcQuestionRequest) (r *QingyuAigcQuestionResponse, err error) { + var _args AIGCServerUserAskQuestionArgs + _args.Req = req + var _result AIGCServerUserAskQuestionResult + if err = p.Client_().Call(ctx, "UserAskQuestion", &_args, &_result); err != nil { + return + } + return _result.GetSuccess(), nil +} +func (p *AIGCServerClient) AnalyseIssueList(ctx context.Context, req *QingyuAigcIssueListRequest) (r *QingyuAigcIssueListResponse, err error) { + var _args AIGCServerAnalyseIssueListArgs + _args.Req = req + var _result AIGCServerAnalyseIssueListResult + if err = p.Client_().Call(ctx, "AnalyseIssueList", &_args, &_result); err != nil { + return + } + return _result.GetSuccess(), nil +} +func (p *AIGCServerClient) ChooseWord(ctx context.Context, req *QingyuAigcChooseWordRequest) (r *QingyuAigcChooseWordResponse, err error) { + var _args AIGCServerChooseWordArgs + _args.Req = req + var _result AIGCServerChooseWordResult + if err = p.Client_().Call(ctx, "ChooseWord", &_args, &_result); err != nil { + return + } + return _result.GetSuccess(), nil +} +func (p *AIGCServerClient) DoctorAnalyse(ctx context.Context, req *QingyuAigcDoctorAnalyseRequest) (r *QingyuAigcDoctorAnalyseResponse, err error) { + var _args AIGCServerDoctorAnalyseArgs + _args.Req = req + var _result AIGCServerDoctorAnalyseResult + if err = p.Client_().Call(ctx, "DoctorAnalyse", &_args, &_result); err != nil { + return + } + return _result.GetSuccess(), nil +} + +type AIGCServerProcessor struct { + processorMap map[string]thrift.TProcessorFunction + handler AIGCServer +} + +func (p *AIGCServerProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { + p.processorMap[key] = processor +} + +func (p *AIGCServerProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { + processor, ok = p.processorMap[key] + return processor, ok +} + +func (p *AIGCServerProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { + return p.processorMap +} + +func NewAIGCServerProcessor(handler AIGCServer) *AIGCServerProcessor { + self := &AIGCServerProcessor{handler: handler, processorMap: make(map[string]thrift.TProcessorFunction)} + self.AddToProcessorMap("UserAskQuestion", &aIGCServerProcessorUserAskQuestion{handler: handler}) + self.AddToProcessorMap("AnalyseIssueList", &aIGCServerProcessorAnalyseIssueList{handler: handler}) + self.AddToProcessorMap("ChooseWord", &aIGCServerProcessorChooseWord{handler: handler}) + self.AddToProcessorMap("DoctorAnalyse", &aIGCServerProcessorDoctorAnalyse{handler: handler}) + return self +} +func (p *AIGCServerProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + name, _, seqId, err := iprot.ReadMessageBegin() + if err != nil { + return false, err + } + if processor, ok := p.GetProcessorFunction(name); ok { + return processor.Process(ctx, seqId, iprot, oprot) + } + iprot.Skip(thrift.STRUCT) + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function "+name) + oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush(ctx) + return false, x +} + +type aIGCServerProcessorUserAskQuestion struct { + handler AIGCServer +} + +func (p *aIGCServerProcessorUserAskQuestion) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := AIGCServerUserAskQuestionArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("UserAskQuestion", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush(ctx) + return false, err + } + + iprot.ReadMessageEnd() + var err2 error + result := AIGCServerUserAskQuestionResult{} + var retval *QingyuAigcQuestionResponse + if retval, err2 = p.handler.UserAskQuestion(ctx, args.Req); err2 != nil { + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing UserAskQuestion: "+err2.Error()) + oprot.WriteMessageBegin("UserAskQuestion", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush(ctx) + return true, err2 + } else { + result.Success = retval + } + if err2 = oprot.WriteMessageBegin("UserAskQuestion", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type aIGCServerProcessorAnalyseIssueList struct { + handler AIGCServer +} + +func (p *aIGCServerProcessorAnalyseIssueList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := AIGCServerAnalyseIssueListArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("AnalyseIssueList", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush(ctx) + return false, err + } + + iprot.ReadMessageEnd() + var err2 error + result := AIGCServerAnalyseIssueListResult{} + var retval *QingyuAigcIssueListResponse + if retval, err2 = p.handler.AnalyseIssueList(ctx, args.Req); err2 != nil { + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing AnalyseIssueList: "+err2.Error()) + oprot.WriteMessageBegin("AnalyseIssueList", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush(ctx) + return true, err2 + } else { + result.Success = retval + } + if err2 = oprot.WriteMessageBegin("AnalyseIssueList", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type aIGCServerProcessorChooseWord struct { + handler AIGCServer +} + +func (p *aIGCServerProcessorChooseWord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := AIGCServerChooseWordArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("ChooseWord", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush(ctx) + return false, err + } + + iprot.ReadMessageEnd() + var err2 error + result := AIGCServerChooseWordResult{} + var retval *QingyuAigcChooseWordResponse + if retval, err2 = p.handler.ChooseWord(ctx, args.Req); err2 != nil { + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing ChooseWord: "+err2.Error()) + oprot.WriteMessageBegin("ChooseWord", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush(ctx) + return true, err2 + } else { + result.Success = retval + } + if err2 = oprot.WriteMessageBegin("ChooseWord", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type aIGCServerProcessorDoctorAnalyse struct { + handler AIGCServer +} + +func (p *aIGCServerProcessorDoctorAnalyse) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := AIGCServerDoctorAnalyseArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("DoctorAnalyse", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush(ctx) + return false, err + } + + iprot.ReadMessageEnd() + var err2 error + result := AIGCServerDoctorAnalyseResult{} + var retval *QingyuAigcDoctorAnalyseResponse + if retval, err2 = p.handler.DoctorAnalyse(ctx, args.Req); err2 != nil { + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing DoctorAnalyse: "+err2.Error()) + oprot.WriteMessageBegin("DoctorAnalyse", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush(ctx) + return true, err2 + } else { + result.Success = retval + } + if err2 = oprot.WriteMessageBegin("DoctorAnalyse", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type AIGCServerUserAskQuestionArgs struct { + Req *QingyuAigcQuestionRequest `thrift:"req,1" frugal:"1,default,QingyuAigcQuestionRequest" json:"req"` +} + +func NewAIGCServerUserAskQuestionArgs() *AIGCServerUserAskQuestionArgs { + return &AIGCServerUserAskQuestionArgs{} +} + +func (p *AIGCServerUserAskQuestionArgs) InitDefault() { + *p = AIGCServerUserAskQuestionArgs{} +} + +var AIGCServerUserAskQuestionArgs_Req_DEFAULT *QingyuAigcQuestionRequest + +func (p *AIGCServerUserAskQuestionArgs) GetReq() (v *QingyuAigcQuestionRequest) { + if !p.IsSetReq() { + return AIGCServerUserAskQuestionArgs_Req_DEFAULT + } + return p.Req +} +func (p *AIGCServerUserAskQuestionArgs) SetReq(val *QingyuAigcQuestionRequest) { + p.Req = val +} + +var fieldIDToName_AIGCServerUserAskQuestionArgs = map[int16]string{ + 1: "req", +} + +func (p *AIGCServerUserAskQuestionArgs) IsSetReq() bool { + return p.Req != nil +} + +func (p *AIGCServerUserAskQuestionArgs) Read(iprot thrift.TProtocol) (err error) { + + var fieldTypeId thrift.TType + var fieldId int16 + + if _, err = iprot.ReadStructBegin(); err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, err = iprot.ReadFieldBegin() + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err = p.ReadField1(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + default: + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + + if err = iprot.ReadFieldEnd(); err != nil { + goto ReadFieldEndError + } + } + if err = iprot.ReadStructEnd(); err != nil { + goto ReadStructEndError + } + + return nil +ReadStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerUserAskQuestionArgs[fieldId]), err) +SkipFieldError: + return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) + +ReadFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *AIGCServerUserAskQuestionArgs) ReadField1(iprot thrift.TProtocol) error { + p.Req = NewQingyuAigcQuestionRequest() + if err := p.Req.Read(iprot); err != nil { + return err + } + return nil +} + +func (p *AIGCServerUserAskQuestionArgs) Write(oprot thrift.TProtocol) (err error) { + var fieldId int16 + if err = oprot.WriteStructBegin("UserAskQuestion_args"); err != nil { + goto WriteStructBeginError + } + if p != nil { + if err = p.writeField1(oprot); err != nil { + fieldId = 1 + goto WriteFieldError + } + + } + if err = oprot.WriteFieldStop(); err != nil { + goto WriteFieldStopError + } + if err = oprot.WriteStructEnd(); err != nil { + goto WriteStructEndError + } + return nil +WriteStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) +WriteFieldError: + return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) +WriteFieldStopError: + return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) +WriteStructEndError: + return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) +} + +func (p *AIGCServerUserAskQuestionArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err = oprot.WriteFieldBegin("req", thrift.STRUCT, 1); err != nil { + goto WriteFieldBeginError + } + if err := p.Req.Write(oprot); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) +} + +func (p *AIGCServerUserAskQuestionArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("AIGCServerUserAskQuestionArgs(%+v)", *p) +} + +func (p *AIGCServerUserAskQuestionArgs) DeepEqual(ano *AIGCServerUserAskQuestionArgs) bool { + if p == ano { + return true + } else if p == nil || ano == nil { + return false + } + if !p.Field1DeepEqual(ano.Req) { + return false + } + return true +} + +func (p *AIGCServerUserAskQuestionArgs) Field1DeepEqual(src *QingyuAigcQuestionRequest) bool { + + if !p.Req.DeepEqual(src) { + return false + } + return true +} + +type AIGCServerUserAskQuestionResult struct { + Success *QingyuAigcQuestionResponse `thrift:"success,0,optional" frugal:"0,optional,QingyuAigcQuestionResponse" json:"success,omitempty"` +} + +func NewAIGCServerUserAskQuestionResult() *AIGCServerUserAskQuestionResult { + return &AIGCServerUserAskQuestionResult{} +} + +func (p *AIGCServerUserAskQuestionResult) InitDefault() { + *p = AIGCServerUserAskQuestionResult{} +} + +var AIGCServerUserAskQuestionResult_Success_DEFAULT *QingyuAigcQuestionResponse + +func (p *AIGCServerUserAskQuestionResult) GetSuccess() (v *QingyuAigcQuestionResponse) { + if !p.IsSetSuccess() { + return AIGCServerUserAskQuestionResult_Success_DEFAULT + } + return p.Success +} +func (p *AIGCServerUserAskQuestionResult) SetSuccess(x interface{}) { + p.Success = x.(*QingyuAigcQuestionResponse) +} + +var fieldIDToName_AIGCServerUserAskQuestionResult = map[int16]string{ + 0: "success", +} + +func (p *AIGCServerUserAskQuestionResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *AIGCServerUserAskQuestionResult) Read(iprot thrift.TProtocol) (err error) { + + var fieldTypeId thrift.TType + var fieldId int16 + + if _, err = iprot.ReadStructBegin(); err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, err = iprot.ReadFieldBegin() + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err = p.ReadField0(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + default: + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + + if err = iprot.ReadFieldEnd(); err != nil { + goto ReadFieldEndError + } + } + if err = iprot.ReadStructEnd(); err != nil { + goto ReadStructEndError + } + + return nil +ReadStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerUserAskQuestionResult[fieldId]), err) +SkipFieldError: + return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) + +ReadFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *AIGCServerUserAskQuestionResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = NewQingyuAigcQuestionResponse() + if err := p.Success.Read(iprot); err != nil { + return err + } + return nil +} + +func (p *AIGCServerUserAskQuestionResult) Write(oprot thrift.TProtocol) (err error) { + var fieldId int16 + if err = oprot.WriteStructBegin("UserAskQuestion_result"); err != nil { + goto WriteStructBeginError + } + if p != nil { + if err = p.writeField0(oprot); err != nil { + fieldId = 0 + goto WriteFieldError + } + + } + if err = oprot.WriteFieldStop(); err != nil { + goto WriteFieldStopError + } + if err = oprot.WriteStructEnd(); err != nil { + goto WriteStructEndError + } + return nil +WriteStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) +WriteFieldError: + return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) +WriteFieldStopError: + return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) +WriteStructEndError: + return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) +} + +func (p *AIGCServerUserAskQuestionResult) writeField0(oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + goto WriteFieldBeginError + } + if err := p.Success.Write(oprot); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err) +} + +func (p *AIGCServerUserAskQuestionResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("AIGCServerUserAskQuestionResult(%+v)", *p) +} + +func (p *AIGCServerUserAskQuestionResult) DeepEqual(ano *AIGCServerUserAskQuestionResult) bool { + if p == ano { + return true + } else if p == nil || ano == nil { + return false + } + if !p.Field0DeepEqual(ano.Success) { + return false + } + return true +} + +func (p *AIGCServerUserAskQuestionResult) Field0DeepEqual(src *QingyuAigcQuestionResponse) bool { + + if !p.Success.DeepEqual(src) { + return false + } + return true +} + +type AIGCServerAnalyseIssueListArgs struct { + Req *QingyuAigcIssueListRequest `thrift:"req,1" frugal:"1,default,QingyuAigcIssueListRequest" json:"req"` +} + +func NewAIGCServerAnalyseIssueListArgs() *AIGCServerAnalyseIssueListArgs { + return &AIGCServerAnalyseIssueListArgs{} +} + +func (p *AIGCServerAnalyseIssueListArgs) InitDefault() { + *p = AIGCServerAnalyseIssueListArgs{} +} + +var AIGCServerAnalyseIssueListArgs_Req_DEFAULT *QingyuAigcIssueListRequest + +func (p *AIGCServerAnalyseIssueListArgs) GetReq() (v *QingyuAigcIssueListRequest) { + if !p.IsSetReq() { + return AIGCServerAnalyseIssueListArgs_Req_DEFAULT + } + return p.Req +} +func (p *AIGCServerAnalyseIssueListArgs) SetReq(val *QingyuAigcIssueListRequest) { + p.Req = val +} + +var fieldIDToName_AIGCServerAnalyseIssueListArgs = map[int16]string{ + 1: "req", +} + +func (p *AIGCServerAnalyseIssueListArgs) IsSetReq() bool { + return p.Req != nil +} + +func (p *AIGCServerAnalyseIssueListArgs) Read(iprot thrift.TProtocol) (err error) { + + var fieldTypeId thrift.TType + var fieldId int16 + + if _, err = iprot.ReadStructBegin(); err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, err = iprot.ReadFieldBegin() + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err = p.ReadField1(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + default: + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + + if err = iprot.ReadFieldEnd(); err != nil { + goto ReadFieldEndError + } + } + if err = iprot.ReadStructEnd(); err != nil { + goto ReadStructEndError + } + + return nil +ReadStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerAnalyseIssueListArgs[fieldId]), err) +SkipFieldError: + return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) + +ReadFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *AIGCServerAnalyseIssueListArgs) ReadField1(iprot thrift.TProtocol) error { + p.Req = NewQingyuAigcIssueListRequest() + if err := p.Req.Read(iprot); err != nil { + return err + } + return nil +} + +func (p *AIGCServerAnalyseIssueListArgs) Write(oprot thrift.TProtocol) (err error) { + var fieldId int16 + if err = oprot.WriteStructBegin("AnalyseIssueList_args"); err != nil { + goto WriteStructBeginError + } + if p != nil { + if err = p.writeField1(oprot); err != nil { + fieldId = 1 + goto WriteFieldError + } + + } + if err = oprot.WriteFieldStop(); err != nil { + goto WriteFieldStopError + } + if err = oprot.WriteStructEnd(); err != nil { + goto WriteStructEndError + } + return nil +WriteStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) +WriteFieldError: + return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) +WriteFieldStopError: + return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) +WriteStructEndError: + return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) +} + +func (p *AIGCServerAnalyseIssueListArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err = oprot.WriteFieldBegin("req", thrift.STRUCT, 1); err != nil { + goto WriteFieldBeginError + } + if err := p.Req.Write(oprot); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) +} + +func (p *AIGCServerAnalyseIssueListArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("AIGCServerAnalyseIssueListArgs(%+v)", *p) +} + +func (p *AIGCServerAnalyseIssueListArgs) DeepEqual(ano *AIGCServerAnalyseIssueListArgs) bool { + if p == ano { + return true + } else if p == nil || ano == nil { + return false + } + if !p.Field1DeepEqual(ano.Req) { + return false + } + return true +} + +func (p *AIGCServerAnalyseIssueListArgs) Field1DeepEqual(src *QingyuAigcIssueListRequest) bool { + + if !p.Req.DeepEqual(src) { + return false + } + return true +} + +type AIGCServerAnalyseIssueListResult struct { + Success *QingyuAigcIssueListResponse `thrift:"success,0,optional" frugal:"0,optional,QingyuAigcIssueListResponse" json:"success,omitempty"` +} + +func NewAIGCServerAnalyseIssueListResult() *AIGCServerAnalyseIssueListResult { + return &AIGCServerAnalyseIssueListResult{} +} + +func (p *AIGCServerAnalyseIssueListResult) InitDefault() { + *p = AIGCServerAnalyseIssueListResult{} +} + +var AIGCServerAnalyseIssueListResult_Success_DEFAULT *QingyuAigcIssueListResponse + +func (p *AIGCServerAnalyseIssueListResult) GetSuccess() (v *QingyuAigcIssueListResponse) { + if !p.IsSetSuccess() { + return AIGCServerAnalyseIssueListResult_Success_DEFAULT + } + return p.Success +} +func (p *AIGCServerAnalyseIssueListResult) SetSuccess(x interface{}) { + p.Success = x.(*QingyuAigcIssueListResponse) +} + +var fieldIDToName_AIGCServerAnalyseIssueListResult = map[int16]string{ + 0: "success", +} + +func (p *AIGCServerAnalyseIssueListResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *AIGCServerAnalyseIssueListResult) Read(iprot thrift.TProtocol) (err error) { + + var fieldTypeId thrift.TType + var fieldId int16 + + if _, err = iprot.ReadStructBegin(); err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, err = iprot.ReadFieldBegin() + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err = p.ReadField0(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + default: + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + + if err = iprot.ReadFieldEnd(); err != nil { + goto ReadFieldEndError + } + } + if err = iprot.ReadStructEnd(); err != nil { + goto ReadStructEndError + } + + return nil +ReadStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerAnalyseIssueListResult[fieldId]), err) +SkipFieldError: + return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) + +ReadFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } -type AIGCServerClient struct { - c thrift.TClient +func (p *AIGCServerAnalyseIssueListResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = NewQingyuAigcIssueListResponse() + if err := p.Success.Read(iprot); err != nil { + return err + } + return nil } -func NewAIGCServerClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *AIGCServerClient { - return &AIGCServerClient{ - c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)), +func (p *AIGCServerAnalyseIssueListResult) Write(oprot thrift.TProtocol) (err error) { + var fieldId int16 + if err = oprot.WriteStructBegin("AnalyseIssueList_result"); err != nil { + goto WriteStructBeginError + } + if p != nil { + if err = p.writeField0(oprot); err != nil { + fieldId = 0 + goto WriteFieldError + } + + } + if err = oprot.WriteFieldStop(); err != nil { + goto WriteFieldStopError + } + if err = oprot.WriteStructEnd(); err != nil { + goto WriteStructEndError + } + return nil +WriteStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) +WriteFieldError: + return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) +WriteFieldStopError: + return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) +WriteStructEndError: + return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) +} + +func (p *AIGCServerAnalyseIssueListResult) writeField0(oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + goto WriteFieldBeginError + } + if err := p.Success.Write(oprot); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err) +} + +func (p *AIGCServerAnalyseIssueListResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("AIGCServerAnalyseIssueListResult(%+v)", *p) +} + +func (p *AIGCServerAnalyseIssueListResult) DeepEqual(ano *AIGCServerAnalyseIssueListResult) bool { + if p == ano { + return true + } else if p == nil || ano == nil { + return false + } + if !p.Field0DeepEqual(ano.Success) { + return false + } + return true +} + +func (p *AIGCServerAnalyseIssueListResult) Field0DeepEqual(src *QingyuAigcIssueListResponse) bool { + + if !p.Success.DeepEqual(src) { + return false + } + return true +} + +type AIGCServerChooseWordArgs struct { + Req *QingyuAigcChooseWordRequest `thrift:"req,1" frugal:"1,default,QingyuAigcChooseWordRequest" json:"req"` +} + +func NewAIGCServerChooseWordArgs() *AIGCServerChooseWordArgs { + return &AIGCServerChooseWordArgs{} +} + +func (p *AIGCServerChooseWordArgs) InitDefault() { + *p = AIGCServerChooseWordArgs{} +} + +var AIGCServerChooseWordArgs_Req_DEFAULT *QingyuAigcChooseWordRequest + +func (p *AIGCServerChooseWordArgs) GetReq() (v *QingyuAigcChooseWordRequest) { + if !p.IsSetReq() { + return AIGCServerChooseWordArgs_Req_DEFAULT + } + return p.Req +} +func (p *AIGCServerChooseWordArgs) SetReq(val *QingyuAigcChooseWordRequest) { + p.Req = val +} + +var fieldIDToName_AIGCServerChooseWordArgs = map[int16]string{ + 1: "req", +} + +func (p *AIGCServerChooseWordArgs) IsSetReq() bool { + return p.Req != nil +} + +func (p *AIGCServerChooseWordArgs) Read(iprot thrift.TProtocol) (err error) { + + var fieldTypeId thrift.TType + var fieldId int16 + + if _, err = iprot.ReadStructBegin(); err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, err = iprot.ReadFieldBegin() + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err = p.ReadField1(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + default: + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + + if err = iprot.ReadFieldEnd(); err != nil { + goto ReadFieldEndError + } + } + if err = iprot.ReadStructEnd(); err != nil { + goto ReadStructEndError + } + + return nil +ReadStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerChooseWordArgs[fieldId]), err) +SkipFieldError: + return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) + +ReadFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *AIGCServerChooseWordArgs) ReadField1(iprot thrift.TProtocol) error { + p.Req = NewQingyuAigcChooseWordRequest() + if err := p.Req.Read(iprot); err != nil { + return err + } + return nil +} + +func (p *AIGCServerChooseWordArgs) Write(oprot thrift.TProtocol) (err error) { + var fieldId int16 + if err = oprot.WriteStructBegin("ChooseWord_args"); err != nil { + goto WriteStructBeginError + } + if p != nil { + if err = p.writeField1(oprot); err != nil { + fieldId = 1 + goto WriteFieldError + } + + } + if err = oprot.WriteFieldStop(); err != nil { + goto WriteFieldStopError + } + if err = oprot.WriteStructEnd(); err != nil { + goto WriteStructEndError + } + return nil +WriteStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) +WriteFieldError: + return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) +WriteFieldStopError: + return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) +WriteStructEndError: + return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) +} + +func (p *AIGCServerChooseWordArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err = oprot.WriteFieldBegin("req", thrift.STRUCT, 1); err != nil { + goto WriteFieldBeginError + } + if err := p.Req.Write(oprot); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) +} + +func (p *AIGCServerChooseWordArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("AIGCServerChooseWordArgs(%+v)", *p) +} + +func (p *AIGCServerChooseWordArgs) DeepEqual(ano *AIGCServerChooseWordArgs) bool { + if p == ano { + return true + } else if p == nil || ano == nil { + return false + } + if !p.Field1DeepEqual(ano.Req) { + return false } + return true } -func NewAIGCServerClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *AIGCServerClient { - return &AIGCServerClient{ - c: thrift.NewTStandardClient(iprot, oprot), - } -} +func (p *AIGCServerChooseWordArgs) Field1DeepEqual(src *QingyuAigcChooseWordRequest) bool { -func NewAIGCServerClient(c thrift.TClient) *AIGCServerClient { - return &AIGCServerClient{ - c: c, + if !p.Req.DeepEqual(src) { + return false } + return true } -func (p *AIGCServerClient) Client_() thrift.TClient { - return p.c +type AIGCServerChooseWordResult struct { + Success *QingyuAigcChooseWordResponse `thrift:"success,0,optional" frugal:"0,optional,QingyuAigcChooseWordResponse" json:"success,omitempty"` } -func (p *AIGCServerClient) UserAskQuestion(ctx context.Context, req *QingyuAigcQuestionRequest) (r *QingyuAigcQuestionResponse, err error) { - var _args AIGCServerUserAskQuestionArgs - _args.Req = req - var _result AIGCServerUserAskQuestionResult - if err = p.Client_().Call(ctx, "UserAskQuestion", &_args, &_result); err != nil { - return - } - return _result.GetSuccess(), nil +func NewAIGCServerChooseWordResult() *AIGCServerChooseWordResult { + return &AIGCServerChooseWordResult{} } -type AIGCServerProcessor struct { - processorMap map[string]thrift.TProcessorFunction - handler AIGCServer +func (p *AIGCServerChooseWordResult) InitDefault() { + *p = AIGCServerChooseWordResult{} } -func (p *AIGCServerProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { - p.processorMap[key] = processor -} +var AIGCServerChooseWordResult_Success_DEFAULT *QingyuAigcChooseWordResponse -func (p *AIGCServerProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { - processor, ok = p.processorMap[key] - return processor, ok +func (p *AIGCServerChooseWordResult) GetSuccess() (v *QingyuAigcChooseWordResponse) { + if !p.IsSetSuccess() { + return AIGCServerChooseWordResult_Success_DEFAULT + } + return p.Success +} +func (p *AIGCServerChooseWordResult) SetSuccess(x interface{}) { + p.Success = x.(*QingyuAigcChooseWordResponse) } -func (p *AIGCServerProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { - return p.processorMap +var fieldIDToName_AIGCServerChooseWordResult = map[int16]string{ + 0: "success", } -func NewAIGCServerProcessor(handler AIGCServer) *AIGCServerProcessor { - self := &AIGCServerProcessor{handler: handler, processorMap: make(map[string]thrift.TProcessorFunction)} - self.AddToProcessorMap("UserAskQuestion", &aIGCServerProcessorUserAskQuestion{handler: handler}) - return self +func (p *AIGCServerChooseWordResult) IsSetSuccess() bool { + return p.Success != nil } -func (p *AIGCServerProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - name, _, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return false, err + +func (p *AIGCServerChooseWordResult) Read(iprot thrift.TProtocol) (err error) { + + var fieldTypeId thrift.TType + var fieldId int16 + + if _, err = iprot.ReadStructBegin(); err != nil { + goto ReadStructBeginError } - if processor, ok := p.GetProcessorFunction(name); ok { - return processor.Process(ctx, seqId, iprot, oprot) + + for { + _, fieldTypeId, fieldId, err = iprot.ReadFieldBegin() + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err = p.ReadField0(iprot); err != nil { + goto ReadFieldError + } + } else { + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + default: + if err = iprot.Skip(fieldTypeId); err != nil { + goto SkipFieldError + } + } + + if err = iprot.ReadFieldEnd(); err != nil { + goto ReadFieldEndError + } } - iprot.Skip(thrift.STRUCT) - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function "+name) - oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush(ctx) - return false, x + if err = iprot.ReadStructEnd(); err != nil { + goto ReadStructEndError + } + + return nil +ReadStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerChooseWordResult[fieldId]), err) +SkipFieldError: + return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) + +ReadFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } -type aIGCServerProcessorUserAskQuestion struct { - handler AIGCServer +func (p *AIGCServerChooseWordResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = NewQingyuAigcChooseWordResponse() + if err := p.Success.Read(iprot); err != nil { + return err + } + return nil } -func (p *aIGCServerProcessorUserAskQuestion) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := AIGCServerUserAskQuestionArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("UserAskQuestion", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush(ctx) - return false, err +func (p *AIGCServerChooseWordResult) Write(oprot thrift.TProtocol) (err error) { + var fieldId int16 + if err = oprot.WriteStructBegin("ChooseWord_result"); err != nil { + goto WriteStructBeginError } + if p != nil { + if err = p.writeField0(oprot); err != nil { + fieldId = 0 + goto WriteFieldError + } - iprot.ReadMessageEnd() - var err2 error - result := AIGCServerUserAskQuestionResult{} - var retval *QingyuAigcQuestionResponse - if retval, err2 = p.handler.UserAskQuestion(ctx, args.Req); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing UserAskQuestion: "+err2.Error()) - oprot.WriteMessageBegin("UserAskQuestion", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush(ctx) - return true, err2 - } else { - result.Success = retval } - if err2 = oprot.WriteMessageBegin("UserAskQuestion", thrift.REPLY, seqId); err2 != nil { - err = err2 + if err = oprot.WriteFieldStop(); err != nil { + goto WriteFieldStopError } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + if err = oprot.WriteStructEnd(); err != nil { + goto WriteStructEndError } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + return nil +WriteStructBeginError: + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) +WriteFieldError: + return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) +WriteFieldStopError: + return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) +WriteStructEndError: + return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) +} + +func (p *AIGCServerChooseWordResult) writeField0(oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + goto WriteFieldBeginError + } + if err := p.Success.Write(oprot); err != nil { + return err + } + if err = oprot.WriteFieldEnd(); err != nil { + goto WriteFieldEndError + } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = err2 + return nil +WriteFieldBeginError: + return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err) +WriteFieldEndError: + return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err) +} + +func (p *AIGCServerChooseWordResult) String() string { + if p == nil { + return "" } - if err != nil { - return + return fmt.Sprintf("AIGCServerChooseWordResult(%+v)", *p) +} + +func (p *AIGCServerChooseWordResult) DeepEqual(ano *AIGCServerChooseWordResult) bool { + if p == ano { + return true + } else if p == nil || ano == nil { + return false } - return true, err + if !p.Field0DeepEqual(ano.Success) { + return false + } + return true } -type AIGCServerUserAskQuestionArgs struct { - Req *QingyuAigcQuestionRequest `thrift:"req,1" frugal:"1,default,QingyuAigcQuestionRequest" json:"req"` +func (p *AIGCServerChooseWordResult) Field0DeepEqual(src *QingyuAigcChooseWordResponse) bool { + + if !p.Success.DeepEqual(src) { + return false + } + return true } -func NewAIGCServerUserAskQuestionArgs() *AIGCServerUserAskQuestionArgs { - return &AIGCServerUserAskQuestionArgs{} +type AIGCServerDoctorAnalyseArgs struct { + Req *QingyuAigcDoctorAnalyseRequest `thrift:"req,1" frugal:"1,default,QingyuAigcDoctorAnalyseRequest" json:"req"` } -func (p *AIGCServerUserAskQuestionArgs) InitDefault() { - *p = AIGCServerUserAskQuestionArgs{} +func NewAIGCServerDoctorAnalyseArgs() *AIGCServerDoctorAnalyseArgs { + return &AIGCServerDoctorAnalyseArgs{} } -var AIGCServerUserAskQuestionArgs_Req_DEFAULT *QingyuAigcQuestionRequest +func (p *AIGCServerDoctorAnalyseArgs) InitDefault() { + *p = AIGCServerDoctorAnalyseArgs{} +} -func (p *AIGCServerUserAskQuestionArgs) GetReq() (v *QingyuAigcQuestionRequest) { +var AIGCServerDoctorAnalyseArgs_Req_DEFAULT *QingyuAigcDoctorAnalyseRequest + +func (p *AIGCServerDoctorAnalyseArgs) GetReq() (v *QingyuAigcDoctorAnalyseRequest) { if !p.IsSetReq() { - return AIGCServerUserAskQuestionArgs_Req_DEFAULT + return AIGCServerDoctorAnalyseArgs_Req_DEFAULT } return p.Req } -func (p *AIGCServerUserAskQuestionArgs) SetReq(val *QingyuAigcQuestionRequest) { +func (p *AIGCServerDoctorAnalyseArgs) SetReq(val *QingyuAigcDoctorAnalyseRequest) { p.Req = val } -var fieldIDToName_AIGCServerUserAskQuestionArgs = map[int16]string{ +var fieldIDToName_AIGCServerDoctorAnalyseArgs = map[int16]string{ 1: "req", } -func (p *AIGCServerUserAskQuestionArgs) IsSetReq() bool { +func (p *AIGCServerDoctorAnalyseArgs) IsSetReq() bool { return p.Req != nil } -func (p *AIGCServerUserAskQuestionArgs) Read(iprot thrift.TProtocol) (err error) { +func (p *AIGCServerDoctorAnalyseArgs) Read(iprot thrift.TProtocol) (err error) { var fieldTypeId thrift.TType var fieldId int16 @@ -674,7 +3222,7 @@ ReadStructBeginError: ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: - return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerUserAskQuestionArgs[fieldId]), err) + return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerDoctorAnalyseArgs[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) @@ -684,17 +3232,17 @@ ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } -func (p *AIGCServerUserAskQuestionArgs) ReadField1(iprot thrift.TProtocol) error { - p.Req = NewQingyuAigcQuestionRequest() +func (p *AIGCServerDoctorAnalyseArgs) ReadField1(iprot thrift.TProtocol) error { + p.Req = NewQingyuAigcDoctorAnalyseRequest() if err := p.Req.Read(iprot); err != nil { return err } return nil } -func (p *AIGCServerUserAskQuestionArgs) Write(oprot thrift.TProtocol) (err error) { +func (p *AIGCServerDoctorAnalyseArgs) Write(oprot thrift.TProtocol) (err error) { var fieldId int16 - if err = oprot.WriteStructBegin("UserAskQuestion_args"); err != nil { + if err = oprot.WriteStructBegin("DoctorAnalyse_args"); err != nil { goto WriteStructBeginError } if p != nil { @@ -721,7 +3269,7 @@ WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) } -func (p *AIGCServerUserAskQuestionArgs) writeField1(oprot thrift.TProtocol) (err error) { +func (p *AIGCServerDoctorAnalyseArgs) writeField1(oprot thrift.TProtocol) (err error) { if err = oprot.WriteFieldBegin("req", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } @@ -738,14 +3286,14 @@ WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } -func (p *AIGCServerUserAskQuestionArgs) String() string { +func (p *AIGCServerDoctorAnalyseArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("AIGCServerUserAskQuestionArgs(%+v)", *p) + return fmt.Sprintf("AIGCServerDoctorAnalyseArgs(%+v)", *p) } -func (p *AIGCServerUserAskQuestionArgs) DeepEqual(ano *AIGCServerUserAskQuestionArgs) bool { +func (p *AIGCServerDoctorAnalyseArgs) DeepEqual(ano *AIGCServerDoctorAnalyseArgs) bool { if p == ano { return true } else if p == nil || ano == nil { @@ -757,7 +3305,7 @@ func (p *AIGCServerUserAskQuestionArgs) DeepEqual(ano *AIGCServerUserAskQuestion return true } -func (p *AIGCServerUserAskQuestionArgs) Field1DeepEqual(src *QingyuAigcQuestionRequest) bool { +func (p *AIGCServerDoctorAnalyseArgs) Field1DeepEqual(src *QingyuAigcDoctorAnalyseRequest) bool { if !p.Req.DeepEqual(src) { return false @@ -765,39 +3313,39 @@ func (p *AIGCServerUserAskQuestionArgs) Field1DeepEqual(src *QingyuAigcQuestionR return true } -type AIGCServerUserAskQuestionResult struct { - Success *QingyuAigcQuestionResponse `thrift:"success,0,optional" frugal:"0,optional,QingyuAigcQuestionResponse" json:"success,omitempty"` +type AIGCServerDoctorAnalyseResult struct { + Success *QingyuAigcDoctorAnalyseResponse `thrift:"success,0,optional" frugal:"0,optional,QingyuAigcDoctorAnalyseResponse" json:"success,omitempty"` } -func NewAIGCServerUserAskQuestionResult() *AIGCServerUserAskQuestionResult { - return &AIGCServerUserAskQuestionResult{} +func NewAIGCServerDoctorAnalyseResult() *AIGCServerDoctorAnalyseResult { + return &AIGCServerDoctorAnalyseResult{} } -func (p *AIGCServerUserAskQuestionResult) InitDefault() { - *p = AIGCServerUserAskQuestionResult{} +func (p *AIGCServerDoctorAnalyseResult) InitDefault() { + *p = AIGCServerDoctorAnalyseResult{} } -var AIGCServerUserAskQuestionResult_Success_DEFAULT *QingyuAigcQuestionResponse +var AIGCServerDoctorAnalyseResult_Success_DEFAULT *QingyuAigcDoctorAnalyseResponse -func (p *AIGCServerUserAskQuestionResult) GetSuccess() (v *QingyuAigcQuestionResponse) { +func (p *AIGCServerDoctorAnalyseResult) GetSuccess() (v *QingyuAigcDoctorAnalyseResponse) { if !p.IsSetSuccess() { - return AIGCServerUserAskQuestionResult_Success_DEFAULT + return AIGCServerDoctorAnalyseResult_Success_DEFAULT } return p.Success } -func (p *AIGCServerUserAskQuestionResult) SetSuccess(x interface{}) { - p.Success = x.(*QingyuAigcQuestionResponse) +func (p *AIGCServerDoctorAnalyseResult) SetSuccess(x interface{}) { + p.Success = x.(*QingyuAigcDoctorAnalyseResponse) } -var fieldIDToName_AIGCServerUserAskQuestionResult = map[int16]string{ +var fieldIDToName_AIGCServerDoctorAnalyseResult = map[int16]string{ 0: "success", } -func (p *AIGCServerUserAskQuestionResult) IsSetSuccess() bool { +func (p *AIGCServerDoctorAnalyseResult) IsSetSuccess() bool { return p.Success != nil } -func (p *AIGCServerUserAskQuestionResult) Read(iprot thrift.TProtocol) (err error) { +func (p *AIGCServerDoctorAnalyseResult) Read(iprot thrift.TProtocol) (err error) { var fieldTypeId thrift.TType var fieldId int16 @@ -846,7 +3394,7 @@ ReadStructBeginError: ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: - return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerUserAskQuestionResult[fieldId]), err) + return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerDoctorAnalyseResult[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) @@ -856,17 +3404,17 @@ ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } -func (p *AIGCServerUserAskQuestionResult) ReadField0(iprot thrift.TProtocol) error { - p.Success = NewQingyuAigcQuestionResponse() +func (p *AIGCServerDoctorAnalyseResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = NewQingyuAigcDoctorAnalyseResponse() if err := p.Success.Read(iprot); err != nil { return err } return nil } -func (p *AIGCServerUserAskQuestionResult) Write(oprot thrift.TProtocol) (err error) { +func (p *AIGCServerDoctorAnalyseResult) Write(oprot thrift.TProtocol) (err error) { var fieldId int16 - if err = oprot.WriteStructBegin("UserAskQuestion_result"); err != nil { + if err = oprot.WriteStructBegin("DoctorAnalyse_result"); err != nil { goto WriteStructBeginError } if p != nil { @@ -893,7 +3441,7 @@ WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) } -func (p *AIGCServerUserAskQuestionResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *AIGCServerDoctorAnalyseResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { goto WriteFieldBeginError @@ -912,14 +3460,14 @@ WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err) } -func (p *AIGCServerUserAskQuestionResult) String() string { +func (p *AIGCServerDoctorAnalyseResult) String() string { if p == nil { return "" } - return fmt.Sprintf("AIGCServerUserAskQuestionResult(%+v)", *p) + return fmt.Sprintf("AIGCServerDoctorAnalyseResult(%+v)", *p) } -func (p *AIGCServerUserAskQuestionResult) DeepEqual(ano *AIGCServerUserAskQuestionResult) bool { +func (p *AIGCServerDoctorAnalyseResult) DeepEqual(ano *AIGCServerDoctorAnalyseResult) bool { if p == ano { return true } else if p == nil || ano == nil { @@ -931,7 +3479,7 @@ func (p *AIGCServerUserAskQuestionResult) DeepEqual(ano *AIGCServerUserAskQuesti return true } -func (p *AIGCServerUserAskQuestionResult) Field0DeepEqual(src *QingyuAigcQuestionResponse) bool { +func (p *AIGCServerDoctorAnalyseResult) Field0DeepEqual(src *QingyuAigcDoctorAnalyseResponse) bool { if !p.Success.DeepEqual(src) { return false diff --git a/server/kitex_gen/aigc/aigcserver/aigcserver.go b/server/kitex_gen/aigc/aigcserver/aigcserver.go index d43c6d9..75b69e3 100644 --- a/server/kitex_gen/aigc/aigcserver/aigcserver.go +++ b/server/kitex_gen/aigc/aigcserver/aigcserver.go @@ -19,7 +19,10 @@ func NewServiceInfo() *kitex.ServiceInfo { serviceName := "AIGCServer" handlerType := (*aigc.AIGCServer)(nil) methods := map[string]kitex.MethodInfo{ - "UserAskQuestion": kitex.NewMethodInfo(userAskQuestionHandler, newAIGCServerUserAskQuestionArgs, newAIGCServerUserAskQuestionResult, false), + "UserAskQuestion": kitex.NewMethodInfo(userAskQuestionHandler, newAIGCServerUserAskQuestionArgs, newAIGCServerUserAskQuestionResult, false), + "AnalyseIssueList": kitex.NewMethodInfo(analyseIssueListHandler, newAIGCServerAnalyseIssueListArgs, newAIGCServerAnalyseIssueListResult, false), + "ChooseWord": kitex.NewMethodInfo(chooseWordHandler, newAIGCServerChooseWordArgs, newAIGCServerChooseWordResult, false), + "DoctorAnalyse": kitex.NewMethodInfo(doctorAnalyseHandler, newAIGCServerDoctorAnalyseArgs, newAIGCServerDoctorAnalyseResult, false), } extra := map[string]interface{}{ "PackageName": "aigc", @@ -54,6 +57,60 @@ func newAIGCServerUserAskQuestionResult() interface{} { return aigc.NewAIGCServerUserAskQuestionResult() } +func analyseIssueListHandler(ctx context.Context, handler interface{}, arg, result interface{}) error { + realArg := arg.(*aigc.AIGCServerAnalyseIssueListArgs) + realResult := result.(*aigc.AIGCServerAnalyseIssueListResult) + success, err := handler.(aigc.AIGCServer).AnalyseIssueList(ctx, realArg.Req) + if err != nil { + return err + } + realResult.Success = success + return nil +} +func newAIGCServerAnalyseIssueListArgs() interface{} { + return aigc.NewAIGCServerAnalyseIssueListArgs() +} + +func newAIGCServerAnalyseIssueListResult() interface{} { + return aigc.NewAIGCServerAnalyseIssueListResult() +} + +func chooseWordHandler(ctx context.Context, handler interface{}, arg, result interface{}) error { + realArg := arg.(*aigc.AIGCServerChooseWordArgs) + realResult := result.(*aigc.AIGCServerChooseWordResult) + success, err := handler.(aigc.AIGCServer).ChooseWord(ctx, realArg.Req) + if err != nil { + return err + } + realResult.Success = success + return nil +} +func newAIGCServerChooseWordArgs() interface{} { + return aigc.NewAIGCServerChooseWordArgs() +} + +func newAIGCServerChooseWordResult() interface{} { + return aigc.NewAIGCServerChooseWordResult() +} + +func doctorAnalyseHandler(ctx context.Context, handler interface{}, arg, result interface{}) error { + realArg := arg.(*aigc.AIGCServerDoctorAnalyseArgs) + realResult := result.(*aigc.AIGCServerDoctorAnalyseResult) + success, err := handler.(aigc.AIGCServer).DoctorAnalyse(ctx, realArg.Req) + if err != nil { + return err + } + realResult.Success = success + return nil +} +func newAIGCServerDoctorAnalyseArgs() interface{} { + return aigc.NewAIGCServerDoctorAnalyseArgs() +} + +func newAIGCServerDoctorAnalyseResult() interface{} { + return aigc.NewAIGCServerDoctorAnalyseResult() +} + type kClient struct { c client.Client } @@ -73,3 +130,33 @@ func (p *kClient) UserAskQuestion(ctx context.Context, req *aigc.QingyuAigcQuest } return _result.GetSuccess(), nil } + +func (p *kClient) AnalyseIssueList(ctx context.Context, req *aigc.QingyuAigcIssueListRequest) (r *aigc.QingyuAigcIssueListResponse, err error) { + var _args aigc.AIGCServerAnalyseIssueListArgs + _args.Req = req + var _result aigc.AIGCServerAnalyseIssueListResult + if err = p.c.Call(ctx, "AnalyseIssueList", &_args, &_result); err != nil { + return + } + return _result.GetSuccess(), nil +} + +func (p *kClient) ChooseWord(ctx context.Context, req *aigc.QingyuAigcChooseWordRequest) (r *aigc.QingyuAigcChooseWordResponse, err error) { + var _args aigc.AIGCServerChooseWordArgs + _args.Req = req + var _result aigc.AIGCServerChooseWordResult + if err = p.c.Call(ctx, "ChooseWord", &_args, &_result); err != nil { + return + } + return _result.GetSuccess(), nil +} + +func (p *kClient) DoctorAnalyse(ctx context.Context, req *aigc.QingyuAigcDoctorAnalyseRequest) (r *aigc.QingyuAigcDoctorAnalyseResponse, err error) { + var _args aigc.AIGCServerDoctorAnalyseArgs + _args.Req = req + var _result aigc.AIGCServerDoctorAnalyseResult + if err = p.c.Call(ctx, "DoctorAnalyse", &_args, &_result); err != nil { + return + } + return _result.GetSuccess(), nil +} diff --git a/server/kitex_gen/aigc/aigcserver/client.go b/server/kitex_gen/aigc/aigcserver/client.go index bb2977c..1c9c43a 100644 --- a/server/kitex_gen/aigc/aigcserver/client.go +++ b/server/kitex_gen/aigc/aigcserver/client.go @@ -12,6 +12,9 @@ import ( // Client is designed to provide IDL-compatible methods with call-option parameter for kitex framework. type Client interface { UserAskQuestion(ctx context.Context, req *aigc.QingyuAigcQuestionRequest, callOptions ...callopt.Option) (r *aigc.QingyuAigcQuestionResponse, err error) + AnalyseIssueList(ctx context.Context, req *aigc.QingyuAigcIssueListRequest, callOptions ...callopt.Option) (r *aigc.QingyuAigcIssueListResponse, err error) + ChooseWord(ctx context.Context, req *aigc.QingyuAigcChooseWordRequest, callOptions ...callopt.Option) (r *aigc.QingyuAigcChooseWordResponse, err error) + DoctorAnalyse(ctx context.Context, req *aigc.QingyuAigcDoctorAnalyseRequest, callOptions ...callopt.Option) (r *aigc.QingyuAigcDoctorAnalyseResponse, err error) } // NewClient creates a client for the service defined in IDL. @@ -47,3 +50,18 @@ func (p *kAIGCServerClient) UserAskQuestion(ctx context.Context, req *aigc.Qingy ctx = client.NewCtxWithCallOptions(ctx, callOptions) return p.kClient.UserAskQuestion(ctx, req) } + +func (p *kAIGCServerClient) AnalyseIssueList(ctx context.Context, req *aigc.QingyuAigcIssueListRequest, callOptions ...callopt.Option) (r *aigc.QingyuAigcIssueListResponse, err error) { + ctx = client.NewCtxWithCallOptions(ctx, callOptions) + return p.kClient.AnalyseIssueList(ctx, req) +} + +func (p *kAIGCServerClient) ChooseWord(ctx context.Context, req *aigc.QingyuAigcChooseWordRequest, callOptions ...callopt.Option) (r *aigc.QingyuAigcChooseWordResponse, err error) { + ctx = client.NewCtxWithCallOptions(ctx, callOptions) + return p.kClient.ChooseWord(ctx, req) +} + +func (p *kAIGCServerClient) DoctorAnalyse(ctx context.Context, req *aigc.QingyuAigcDoctorAnalyseRequest, callOptions ...callopt.Option) (r *aigc.QingyuAigcDoctorAnalyseResponse, err error) { + ctx = client.NewCtxWithCallOptions(ctx, callOptions) + return p.kClient.DoctorAnalyse(ctx, req) +} diff --git a/server/kitex_gen/aigc/k-aigc.go b/server/kitex_gen/aigc/k-aigc.go index d95b6f4..8d3456f 100644 --- a/server/kitex_gen/aigc/k-aigc.go +++ b/server/kitex_gen/aigc/k-aigc.go @@ -379,6 +379,1045 @@ func (p *QingyuAigcQuestionResponse) field2Length() int { return l } +func (p *QingyuAigcIssueListRequest) FastRead(buf []byte) (int, error) { + var err error + var offset int + var l int + var fieldTypeId thrift.TType + var fieldId int16 + _, l, err = bthrift.Binary.ReadStructBegin(buf) + offset += l + if err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, l, err = bthrift.Binary.ReadFieldBegin(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + l, err = p.FastReadField1(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + default: + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + + l, err = bthrift.Binary.ReadFieldEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldEndError + } + } + l, err = bthrift.Binary.ReadStructEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadStructEndError + } + + return offset, nil +ReadStructBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_QingyuAigcIssueListRequest[fieldId]), err) +SkipFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) +ReadFieldEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *QingyuAigcIssueListRequest) FastReadField1(buf []byte) (int, error) { + offset := 0 + + if v, l, err := bthrift.Binary.ReadI64(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + + p.UserId = v + + } + return offset, nil +} + +// for compatibility +func (p *QingyuAigcIssueListRequest) FastWrite(buf []byte) int { + return 0 +} + +func (p *QingyuAigcIssueListRequest) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteStructBegin(buf[offset:], "qingyu_aigc_issueList_request") + if p != nil { + offset += p.fastWriteField1(buf[offset:], binaryWriter) + } + offset += bthrift.Binary.WriteFieldStop(buf[offset:]) + offset += bthrift.Binary.WriteStructEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcIssueListRequest) BLength() int { + l := 0 + l += bthrift.Binary.StructBeginLength("qingyu_aigc_issueList_request") + if p != nil { + l += p.field1Length() + } + l += bthrift.Binary.FieldStopLength() + l += bthrift.Binary.StructEndLength() + return l +} + +func (p *QingyuAigcIssueListRequest) fastWriteField1(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "user_id", thrift.I64, 1) + offset += bthrift.Binary.WriteI64(buf[offset:], p.UserId) + + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcIssueListRequest) field1Length() int { + l := 0 + l += bthrift.Binary.FieldBeginLength("user_id", thrift.I64, 1) + l += bthrift.Binary.I64Length(p.UserId) + + l += bthrift.Binary.FieldEndLength() + return l +} + +func (p *QingyuAigcIssueListResponse) FastRead(buf []byte) (int, error) { + var err error + var offset int + var l int + var fieldTypeId thrift.TType + var fieldId int16 + _, l, err = bthrift.Binary.ReadStructBegin(buf) + offset += l + if err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, l, err = bthrift.Binary.ReadFieldBegin(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + l, err = p.FastReadField1(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + case 2: + if fieldTypeId == thrift.STRING { + l, err = p.FastReadField2(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + default: + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + + l, err = bthrift.Binary.ReadFieldEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldEndError + } + } + l, err = bthrift.Binary.ReadStructEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadStructEndError + } + + return offset, nil +ReadStructBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_QingyuAigcIssueListResponse[fieldId]), err) +SkipFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) +ReadFieldEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *QingyuAigcIssueListResponse) FastReadField1(buf []byte) (int, error) { + offset := 0 + + tmp := base.NewQingyuBaseResponse() + if l, err := tmp.FastRead(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + } + p.BaseResp = tmp + return offset, nil +} + +func (p *QingyuAigcIssueListResponse) FastReadField2(buf []byte) (int, error) { + offset := 0 + + if v, l, err := bthrift.Binary.ReadString(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + + p.Msg = v + + } + return offset, nil +} + +// for compatibility +func (p *QingyuAigcIssueListResponse) FastWrite(buf []byte) int { + return 0 +} + +func (p *QingyuAigcIssueListResponse) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteStructBegin(buf[offset:], "qingyu_aigc_issueList_response") + if p != nil { + offset += p.fastWriteField1(buf[offset:], binaryWriter) + offset += p.fastWriteField2(buf[offset:], binaryWriter) + } + offset += bthrift.Binary.WriteFieldStop(buf[offset:]) + offset += bthrift.Binary.WriteStructEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcIssueListResponse) BLength() int { + l := 0 + l += bthrift.Binary.StructBeginLength("qingyu_aigc_issueList_response") + if p != nil { + l += p.field1Length() + l += p.field2Length() + } + l += bthrift.Binary.FieldStopLength() + l += bthrift.Binary.StructEndLength() + return l +} + +func (p *QingyuAigcIssueListResponse) fastWriteField1(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "base_resp", thrift.STRUCT, 1) + offset += p.BaseResp.FastWriteNocopy(buf[offset:], binaryWriter) + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcIssueListResponse) fastWriteField2(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "msg", thrift.STRING, 2) + offset += bthrift.Binary.WriteStringNocopy(buf[offset:], binaryWriter, p.Msg) + + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcIssueListResponse) field1Length() int { + l := 0 + l += bthrift.Binary.FieldBeginLength("base_resp", thrift.STRUCT, 1) + l += p.BaseResp.BLength() + l += bthrift.Binary.FieldEndLength() + return l +} + +func (p *QingyuAigcIssueListResponse) field2Length() int { + l := 0 + l += bthrift.Binary.FieldBeginLength("msg", thrift.STRING, 2) + l += bthrift.Binary.StringLengthNocopy(p.Msg) + + l += bthrift.Binary.FieldEndLength() + return l +} + +func (p *QingyuAigcChooseWordRequest) FastRead(buf []byte) (int, error) { + var err error + var offset int + var l int + var fieldTypeId thrift.TType + var fieldId int16 + _, l, err = bthrift.Binary.ReadStructBegin(buf) + offset += l + if err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, l, err = bthrift.Binary.ReadFieldBegin(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + l, err = p.FastReadField1(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + case 2: + if fieldTypeId == thrift.STRING { + l, err = p.FastReadField2(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + default: + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + + l, err = bthrift.Binary.ReadFieldEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldEndError + } + } + l, err = bthrift.Binary.ReadStructEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadStructEndError + } + + return offset, nil +ReadStructBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_QingyuAigcChooseWordRequest[fieldId]), err) +SkipFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) +ReadFieldEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *QingyuAigcChooseWordRequest) FastReadField1(buf []byte) (int, error) { + offset := 0 + + if v, l, err := bthrift.Binary.ReadI64(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + + p.UserId = v + + } + return offset, nil +} + +func (p *QingyuAigcChooseWordRequest) FastReadField2(buf []byte) (int, error) { + offset := 0 + + if v, l, err := bthrift.Binary.ReadString(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + + p.Content = v + + } + return offset, nil +} + +// for compatibility +func (p *QingyuAigcChooseWordRequest) FastWrite(buf []byte) int { + return 0 +} + +func (p *QingyuAigcChooseWordRequest) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteStructBegin(buf[offset:], "qingyu_aigc_choose_word_request") + if p != nil { + offset += p.fastWriteField1(buf[offset:], binaryWriter) + offset += p.fastWriteField2(buf[offset:], binaryWriter) + } + offset += bthrift.Binary.WriteFieldStop(buf[offset:]) + offset += bthrift.Binary.WriteStructEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcChooseWordRequest) BLength() int { + l := 0 + l += bthrift.Binary.StructBeginLength("qingyu_aigc_choose_word_request") + if p != nil { + l += p.field1Length() + l += p.field2Length() + } + l += bthrift.Binary.FieldStopLength() + l += bthrift.Binary.StructEndLength() + return l +} + +func (p *QingyuAigcChooseWordRequest) fastWriteField1(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "user_id", thrift.I64, 1) + offset += bthrift.Binary.WriteI64(buf[offset:], p.UserId) + + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcChooseWordRequest) fastWriteField2(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "content", thrift.STRING, 2) + offset += bthrift.Binary.WriteStringNocopy(buf[offset:], binaryWriter, p.Content) + + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcChooseWordRequest) field1Length() int { + l := 0 + l += bthrift.Binary.FieldBeginLength("user_id", thrift.I64, 1) + l += bthrift.Binary.I64Length(p.UserId) + + l += bthrift.Binary.FieldEndLength() + return l +} + +func (p *QingyuAigcChooseWordRequest) field2Length() int { + l := 0 + l += bthrift.Binary.FieldBeginLength("content", thrift.STRING, 2) + l += bthrift.Binary.StringLengthNocopy(p.Content) + + l += bthrift.Binary.FieldEndLength() + return l +} + +func (p *QingyuAigcChooseWordResponse) FastRead(buf []byte) (int, error) { + var err error + var offset int + var l int + var fieldTypeId thrift.TType + var fieldId int16 + _, l, err = bthrift.Binary.ReadStructBegin(buf) + offset += l + if err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, l, err = bthrift.Binary.ReadFieldBegin(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + l, err = p.FastReadField1(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + case 2: + if fieldTypeId == thrift.STRING { + l, err = p.FastReadField2(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + default: + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + + l, err = bthrift.Binary.ReadFieldEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldEndError + } + } + l, err = bthrift.Binary.ReadStructEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadStructEndError + } + + return offset, nil +ReadStructBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_QingyuAigcChooseWordResponse[fieldId]), err) +SkipFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) +ReadFieldEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *QingyuAigcChooseWordResponse) FastReadField1(buf []byte) (int, error) { + offset := 0 + + tmp := base.NewQingyuBaseResponse() + if l, err := tmp.FastRead(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + } + p.BaseResp = tmp + return offset, nil +} + +func (p *QingyuAigcChooseWordResponse) FastReadField2(buf []byte) (int, error) { + offset := 0 + + if v, l, err := bthrift.Binary.ReadString(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + + p.Msg = v + + } + return offset, nil +} + +// for compatibility +func (p *QingyuAigcChooseWordResponse) FastWrite(buf []byte) int { + return 0 +} + +func (p *QingyuAigcChooseWordResponse) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteStructBegin(buf[offset:], "qingyu_aigc_choose_word_response") + if p != nil { + offset += p.fastWriteField1(buf[offset:], binaryWriter) + offset += p.fastWriteField2(buf[offset:], binaryWriter) + } + offset += bthrift.Binary.WriteFieldStop(buf[offset:]) + offset += bthrift.Binary.WriteStructEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcChooseWordResponse) BLength() int { + l := 0 + l += bthrift.Binary.StructBeginLength("qingyu_aigc_choose_word_response") + if p != nil { + l += p.field1Length() + l += p.field2Length() + } + l += bthrift.Binary.FieldStopLength() + l += bthrift.Binary.StructEndLength() + return l +} + +func (p *QingyuAigcChooseWordResponse) fastWriteField1(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "base_resp", thrift.STRUCT, 1) + offset += p.BaseResp.FastWriteNocopy(buf[offset:], binaryWriter) + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcChooseWordResponse) fastWriteField2(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "msg", thrift.STRING, 2) + offset += bthrift.Binary.WriteStringNocopy(buf[offset:], binaryWriter, p.Msg) + + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcChooseWordResponse) field1Length() int { + l := 0 + l += bthrift.Binary.FieldBeginLength("base_resp", thrift.STRUCT, 1) + l += p.BaseResp.BLength() + l += bthrift.Binary.FieldEndLength() + return l +} + +func (p *QingyuAigcChooseWordResponse) field2Length() int { + l := 0 + l += bthrift.Binary.FieldBeginLength("msg", thrift.STRING, 2) + l += bthrift.Binary.StringLengthNocopy(p.Msg) + + l += bthrift.Binary.FieldEndLength() + return l +} + +func (p *QingyuAigcDoctorAnalyseRequest) FastRead(buf []byte) (int, error) { + var err error + var offset int + var l int + var fieldTypeId thrift.TType + var fieldId int16 + _, l, err = bthrift.Binary.ReadStructBegin(buf) + offset += l + if err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, l, err = bthrift.Binary.ReadFieldBegin(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + l, err = p.FastReadField1(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + case 2: + if fieldTypeId == thrift.LIST { + l, err = p.FastReadField2(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + default: + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + + l, err = bthrift.Binary.ReadFieldEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldEndError + } + } + l, err = bthrift.Binary.ReadStructEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadStructEndError + } + + return offset, nil +ReadStructBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_QingyuAigcDoctorAnalyseRequest[fieldId]), err) +SkipFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) +ReadFieldEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *QingyuAigcDoctorAnalyseRequest) FastReadField1(buf []byte) (int, error) { + offset := 0 + + if v, l, err := bthrift.Binary.ReadI64(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + + p.UserId = v + + } + return offset, nil +} + +func (p *QingyuAigcDoctorAnalyseRequest) FastReadField2(buf []byte) (int, error) { + offset := 0 + + _, size, l, err := bthrift.Binary.ReadListBegin(buf[offset:]) + offset += l + if err != nil { + return offset, err + } + p.Content = make([]string, 0, size) + for i := 0; i < size; i++ { + var _elem string + if v, l, err := bthrift.Binary.ReadString(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + + _elem = v + + } + + p.Content = append(p.Content, _elem) + } + if l, err := bthrift.Binary.ReadListEnd(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + } + return offset, nil +} + +// for compatibility +func (p *QingyuAigcDoctorAnalyseRequest) FastWrite(buf []byte) int { + return 0 +} + +func (p *QingyuAigcDoctorAnalyseRequest) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteStructBegin(buf[offset:], "qingyu_aigc_doctor_analyse_request") + if p != nil { + offset += p.fastWriteField1(buf[offset:], binaryWriter) + offset += p.fastWriteField2(buf[offset:], binaryWriter) + } + offset += bthrift.Binary.WriteFieldStop(buf[offset:]) + offset += bthrift.Binary.WriteStructEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcDoctorAnalyseRequest) BLength() int { + l := 0 + l += bthrift.Binary.StructBeginLength("qingyu_aigc_doctor_analyse_request") + if p != nil { + l += p.field1Length() + l += p.field2Length() + } + l += bthrift.Binary.FieldStopLength() + l += bthrift.Binary.StructEndLength() + return l +} + +func (p *QingyuAigcDoctorAnalyseRequest) fastWriteField1(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "user_id", thrift.I64, 1) + offset += bthrift.Binary.WriteI64(buf[offset:], p.UserId) + + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcDoctorAnalyseRequest) fastWriteField2(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "content", thrift.LIST, 2) + listBeginOffset := offset + offset += bthrift.Binary.ListBeginLength(thrift.STRING, 0) + var length int + for _, v := range p.Content { + length++ + offset += bthrift.Binary.WriteStringNocopy(buf[offset:], binaryWriter, v) + + } + bthrift.Binary.WriteListBegin(buf[listBeginOffset:], thrift.STRING, length) + offset += bthrift.Binary.WriteListEnd(buf[offset:]) + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcDoctorAnalyseRequest) field1Length() int { + l := 0 + l += bthrift.Binary.FieldBeginLength("user_id", thrift.I64, 1) + l += bthrift.Binary.I64Length(p.UserId) + + l += bthrift.Binary.FieldEndLength() + return l +} + +func (p *QingyuAigcDoctorAnalyseRequest) field2Length() int { + l := 0 + l += bthrift.Binary.FieldBeginLength("content", thrift.LIST, 2) + l += bthrift.Binary.ListBeginLength(thrift.STRING, len(p.Content)) + for _, v := range p.Content { + l += bthrift.Binary.StringLengthNocopy(v) + + } + l += bthrift.Binary.ListEndLength() + l += bthrift.Binary.FieldEndLength() + return l +} + +func (p *QingyuAigcDoctorAnalyseResponse) FastRead(buf []byte) (int, error) { + var err error + var offset int + var l int + var fieldTypeId thrift.TType + var fieldId int16 + _, l, err = bthrift.Binary.ReadStructBegin(buf) + offset += l + if err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, l, err = bthrift.Binary.ReadFieldBegin(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + l, err = p.FastReadField1(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + case 2: + if fieldTypeId == thrift.STRING { + l, err = p.FastReadField2(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + default: + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + + l, err = bthrift.Binary.ReadFieldEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldEndError + } + } + l, err = bthrift.Binary.ReadStructEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadStructEndError + } + + return offset, nil +ReadStructBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_QingyuAigcDoctorAnalyseResponse[fieldId]), err) +SkipFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) +ReadFieldEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *QingyuAigcDoctorAnalyseResponse) FastReadField1(buf []byte) (int, error) { + offset := 0 + + tmp := base.NewQingyuBaseResponse() + if l, err := tmp.FastRead(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + } + p.BaseResp = tmp + return offset, nil +} + +func (p *QingyuAigcDoctorAnalyseResponse) FastReadField2(buf []byte) (int, error) { + offset := 0 + + if v, l, err := bthrift.Binary.ReadString(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + + p.Msg = v + + } + return offset, nil +} + +// for compatibility +func (p *QingyuAigcDoctorAnalyseResponse) FastWrite(buf []byte) int { + return 0 +} + +func (p *QingyuAigcDoctorAnalyseResponse) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteStructBegin(buf[offset:], "qingyu_aigc_doctor_analyse_response") + if p != nil { + offset += p.fastWriteField1(buf[offset:], binaryWriter) + offset += p.fastWriteField2(buf[offset:], binaryWriter) + } + offset += bthrift.Binary.WriteFieldStop(buf[offset:]) + offset += bthrift.Binary.WriteStructEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcDoctorAnalyseResponse) BLength() int { + l := 0 + l += bthrift.Binary.StructBeginLength("qingyu_aigc_doctor_analyse_response") + if p != nil { + l += p.field1Length() + l += p.field2Length() + } + l += bthrift.Binary.FieldStopLength() + l += bthrift.Binary.StructEndLength() + return l +} + +func (p *QingyuAigcDoctorAnalyseResponse) fastWriteField1(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "base_resp", thrift.STRUCT, 1) + offset += p.BaseResp.FastWriteNocopy(buf[offset:], binaryWriter) + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcDoctorAnalyseResponse) fastWriteField2(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "msg", thrift.STRING, 2) + offset += bthrift.Binary.WriteStringNocopy(buf[offset:], binaryWriter, p.Msg) + + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + return offset +} + +func (p *QingyuAigcDoctorAnalyseResponse) field1Length() int { + l := 0 + l += bthrift.Binary.FieldBeginLength("base_resp", thrift.STRUCT, 1) + l += p.BaseResp.BLength() + l += bthrift.Binary.FieldEndLength() + return l +} + +func (p *QingyuAigcDoctorAnalyseResponse) field2Length() int { + l := 0 + l += bthrift.Binary.FieldBeginLength("msg", thrift.STRING, 2) + l += bthrift.Binary.StringLengthNocopy(p.Msg) + + l += bthrift.Binary.FieldEndLength() + return l +} + func (p *AIGCServerUserAskQuestionArgs) FastRead(buf []byte) (int, error) { var err error var offset int @@ -441,7 +1480,781 @@ ReadStructBeginError: ReadFieldBeginError: return offset, thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: - return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerUserAskQuestionArgs[fieldId]), err) + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerUserAskQuestionArgs[fieldId]), err) +SkipFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) +ReadFieldEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *AIGCServerUserAskQuestionArgs) FastReadField1(buf []byte) (int, error) { + offset := 0 + + tmp := NewQingyuAigcQuestionRequest() + if l, err := tmp.FastRead(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + } + p.Req = tmp + return offset, nil +} + +// for compatibility +func (p *AIGCServerUserAskQuestionArgs) FastWrite(buf []byte) int { + return 0 +} + +func (p *AIGCServerUserAskQuestionArgs) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteStructBegin(buf[offset:], "UserAskQuestion_args") + if p != nil { + offset += p.fastWriteField1(buf[offset:], binaryWriter) + } + offset += bthrift.Binary.WriteFieldStop(buf[offset:]) + offset += bthrift.Binary.WriteStructEnd(buf[offset:]) + return offset +} + +func (p *AIGCServerUserAskQuestionArgs) BLength() int { + l := 0 + l += bthrift.Binary.StructBeginLength("UserAskQuestion_args") + if p != nil { + l += p.field1Length() + } + l += bthrift.Binary.FieldStopLength() + l += bthrift.Binary.StructEndLength() + return l +} + +func (p *AIGCServerUserAskQuestionArgs) fastWriteField1(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "req", thrift.STRUCT, 1) + offset += p.Req.FastWriteNocopy(buf[offset:], binaryWriter) + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + return offset +} + +func (p *AIGCServerUserAskQuestionArgs) field1Length() int { + l := 0 + l += bthrift.Binary.FieldBeginLength("req", thrift.STRUCT, 1) + l += p.Req.BLength() + l += bthrift.Binary.FieldEndLength() + return l +} + +func (p *AIGCServerUserAskQuestionResult) FastRead(buf []byte) (int, error) { + var err error + var offset int + var l int + var fieldTypeId thrift.TType + var fieldId int16 + _, l, err = bthrift.Binary.ReadStructBegin(buf) + offset += l + if err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, l, err = bthrift.Binary.ReadFieldBegin(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + l, err = p.FastReadField0(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + default: + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + + l, err = bthrift.Binary.ReadFieldEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldEndError + } + } + l, err = bthrift.Binary.ReadStructEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadStructEndError + } + + return offset, nil +ReadStructBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerUserAskQuestionResult[fieldId]), err) +SkipFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) +ReadFieldEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *AIGCServerUserAskQuestionResult) FastReadField0(buf []byte) (int, error) { + offset := 0 + + tmp := NewQingyuAigcQuestionResponse() + if l, err := tmp.FastRead(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + } + p.Success = tmp + return offset, nil +} + +// for compatibility +func (p *AIGCServerUserAskQuestionResult) FastWrite(buf []byte) int { + return 0 +} + +func (p *AIGCServerUserAskQuestionResult) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteStructBegin(buf[offset:], "UserAskQuestion_result") + if p != nil { + offset += p.fastWriteField0(buf[offset:], binaryWriter) + } + offset += bthrift.Binary.WriteFieldStop(buf[offset:]) + offset += bthrift.Binary.WriteStructEnd(buf[offset:]) + return offset +} + +func (p *AIGCServerUserAskQuestionResult) BLength() int { + l := 0 + l += bthrift.Binary.StructBeginLength("UserAskQuestion_result") + if p != nil { + l += p.field0Length() + } + l += bthrift.Binary.FieldStopLength() + l += bthrift.Binary.StructEndLength() + return l +} + +func (p *AIGCServerUserAskQuestionResult) fastWriteField0(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + if p.IsSetSuccess() { + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "success", thrift.STRUCT, 0) + offset += p.Success.FastWriteNocopy(buf[offset:], binaryWriter) + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + } + return offset +} + +func (p *AIGCServerUserAskQuestionResult) field0Length() int { + l := 0 + if p.IsSetSuccess() { + l += bthrift.Binary.FieldBeginLength("success", thrift.STRUCT, 0) + l += p.Success.BLength() + l += bthrift.Binary.FieldEndLength() + } + return l +} + +func (p *AIGCServerAnalyseIssueListArgs) FastRead(buf []byte) (int, error) { + var err error + var offset int + var l int + var fieldTypeId thrift.TType + var fieldId int16 + _, l, err = bthrift.Binary.ReadStructBegin(buf) + offset += l + if err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, l, err = bthrift.Binary.ReadFieldBegin(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + l, err = p.FastReadField1(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + default: + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + + l, err = bthrift.Binary.ReadFieldEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldEndError + } + } + l, err = bthrift.Binary.ReadStructEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadStructEndError + } + + return offset, nil +ReadStructBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerAnalyseIssueListArgs[fieldId]), err) +SkipFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) +ReadFieldEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *AIGCServerAnalyseIssueListArgs) FastReadField1(buf []byte) (int, error) { + offset := 0 + + tmp := NewQingyuAigcIssueListRequest() + if l, err := tmp.FastRead(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + } + p.Req = tmp + return offset, nil +} + +// for compatibility +func (p *AIGCServerAnalyseIssueListArgs) FastWrite(buf []byte) int { + return 0 +} + +func (p *AIGCServerAnalyseIssueListArgs) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteStructBegin(buf[offset:], "AnalyseIssueList_args") + if p != nil { + offset += p.fastWriteField1(buf[offset:], binaryWriter) + } + offset += bthrift.Binary.WriteFieldStop(buf[offset:]) + offset += bthrift.Binary.WriteStructEnd(buf[offset:]) + return offset +} + +func (p *AIGCServerAnalyseIssueListArgs) BLength() int { + l := 0 + l += bthrift.Binary.StructBeginLength("AnalyseIssueList_args") + if p != nil { + l += p.field1Length() + } + l += bthrift.Binary.FieldStopLength() + l += bthrift.Binary.StructEndLength() + return l +} + +func (p *AIGCServerAnalyseIssueListArgs) fastWriteField1(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "req", thrift.STRUCT, 1) + offset += p.Req.FastWriteNocopy(buf[offset:], binaryWriter) + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + return offset +} + +func (p *AIGCServerAnalyseIssueListArgs) field1Length() int { + l := 0 + l += bthrift.Binary.FieldBeginLength("req", thrift.STRUCT, 1) + l += p.Req.BLength() + l += bthrift.Binary.FieldEndLength() + return l +} + +func (p *AIGCServerAnalyseIssueListResult) FastRead(buf []byte) (int, error) { + var err error + var offset int + var l int + var fieldTypeId thrift.TType + var fieldId int16 + _, l, err = bthrift.Binary.ReadStructBegin(buf) + offset += l + if err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, l, err = bthrift.Binary.ReadFieldBegin(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + l, err = p.FastReadField0(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + default: + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + + l, err = bthrift.Binary.ReadFieldEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldEndError + } + } + l, err = bthrift.Binary.ReadStructEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadStructEndError + } + + return offset, nil +ReadStructBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerAnalyseIssueListResult[fieldId]), err) +SkipFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) +ReadFieldEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *AIGCServerAnalyseIssueListResult) FastReadField0(buf []byte) (int, error) { + offset := 0 + + tmp := NewQingyuAigcIssueListResponse() + if l, err := tmp.FastRead(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + } + p.Success = tmp + return offset, nil +} + +// for compatibility +func (p *AIGCServerAnalyseIssueListResult) FastWrite(buf []byte) int { + return 0 +} + +func (p *AIGCServerAnalyseIssueListResult) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteStructBegin(buf[offset:], "AnalyseIssueList_result") + if p != nil { + offset += p.fastWriteField0(buf[offset:], binaryWriter) + } + offset += bthrift.Binary.WriteFieldStop(buf[offset:]) + offset += bthrift.Binary.WriteStructEnd(buf[offset:]) + return offset +} + +func (p *AIGCServerAnalyseIssueListResult) BLength() int { + l := 0 + l += bthrift.Binary.StructBeginLength("AnalyseIssueList_result") + if p != nil { + l += p.field0Length() + } + l += bthrift.Binary.FieldStopLength() + l += bthrift.Binary.StructEndLength() + return l +} + +func (p *AIGCServerAnalyseIssueListResult) fastWriteField0(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + if p.IsSetSuccess() { + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "success", thrift.STRUCT, 0) + offset += p.Success.FastWriteNocopy(buf[offset:], binaryWriter) + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + } + return offset +} + +func (p *AIGCServerAnalyseIssueListResult) field0Length() int { + l := 0 + if p.IsSetSuccess() { + l += bthrift.Binary.FieldBeginLength("success", thrift.STRUCT, 0) + l += p.Success.BLength() + l += bthrift.Binary.FieldEndLength() + } + return l +} + +func (p *AIGCServerChooseWordArgs) FastRead(buf []byte) (int, error) { + var err error + var offset int + var l int + var fieldTypeId thrift.TType + var fieldId int16 + _, l, err = bthrift.Binary.ReadStructBegin(buf) + offset += l + if err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, l, err = bthrift.Binary.ReadFieldBegin(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + l, err = p.FastReadField1(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + default: + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + + l, err = bthrift.Binary.ReadFieldEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldEndError + } + } + l, err = bthrift.Binary.ReadStructEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadStructEndError + } + + return offset, nil +ReadStructBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerChooseWordArgs[fieldId]), err) +SkipFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) +ReadFieldEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *AIGCServerChooseWordArgs) FastReadField1(buf []byte) (int, error) { + offset := 0 + + tmp := NewQingyuAigcChooseWordRequest() + if l, err := tmp.FastRead(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + } + p.Req = tmp + return offset, nil +} + +// for compatibility +func (p *AIGCServerChooseWordArgs) FastWrite(buf []byte) int { + return 0 +} + +func (p *AIGCServerChooseWordArgs) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteStructBegin(buf[offset:], "ChooseWord_args") + if p != nil { + offset += p.fastWriteField1(buf[offset:], binaryWriter) + } + offset += bthrift.Binary.WriteFieldStop(buf[offset:]) + offset += bthrift.Binary.WriteStructEnd(buf[offset:]) + return offset +} + +func (p *AIGCServerChooseWordArgs) BLength() int { + l := 0 + l += bthrift.Binary.StructBeginLength("ChooseWord_args") + if p != nil { + l += p.field1Length() + } + l += bthrift.Binary.FieldStopLength() + l += bthrift.Binary.StructEndLength() + return l +} + +func (p *AIGCServerChooseWordArgs) fastWriteField1(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "req", thrift.STRUCT, 1) + offset += p.Req.FastWriteNocopy(buf[offset:], binaryWriter) + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + return offset +} + +func (p *AIGCServerChooseWordArgs) field1Length() int { + l := 0 + l += bthrift.Binary.FieldBeginLength("req", thrift.STRUCT, 1) + l += p.Req.BLength() + l += bthrift.Binary.FieldEndLength() + return l +} + +func (p *AIGCServerChooseWordResult) FastRead(buf []byte) (int, error) { + var err error + var offset int + var l int + var fieldTypeId thrift.TType + var fieldId int16 + _, l, err = bthrift.Binary.ReadStructBegin(buf) + offset += l + if err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, l, err = bthrift.Binary.ReadFieldBegin(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + l, err = p.FastReadField0(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + default: + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + + l, err = bthrift.Binary.ReadFieldEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldEndError + } + } + l, err = bthrift.Binary.ReadStructEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadStructEndError + } + + return offset, nil +ReadStructBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerChooseWordResult[fieldId]), err) +SkipFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) +ReadFieldEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) +ReadStructEndError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +} + +func (p *AIGCServerChooseWordResult) FastReadField0(buf []byte) (int, error) { + offset := 0 + + tmp := NewQingyuAigcChooseWordResponse() + if l, err := tmp.FastRead(buf[offset:]); err != nil { + return offset, err + } else { + offset += l + } + p.Success = tmp + return offset, nil +} + +// for compatibility +func (p *AIGCServerChooseWordResult) FastWrite(buf []byte) int { + return 0 +} + +func (p *AIGCServerChooseWordResult) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + offset += bthrift.Binary.WriteStructBegin(buf[offset:], "ChooseWord_result") + if p != nil { + offset += p.fastWriteField0(buf[offset:], binaryWriter) + } + offset += bthrift.Binary.WriteFieldStop(buf[offset:]) + offset += bthrift.Binary.WriteStructEnd(buf[offset:]) + return offset +} + +func (p *AIGCServerChooseWordResult) BLength() int { + l := 0 + l += bthrift.Binary.StructBeginLength("ChooseWord_result") + if p != nil { + l += p.field0Length() + } + l += bthrift.Binary.FieldStopLength() + l += bthrift.Binary.StructEndLength() + return l +} + +func (p *AIGCServerChooseWordResult) fastWriteField0(buf []byte, binaryWriter bthrift.BinaryWriter) int { + offset := 0 + if p.IsSetSuccess() { + offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "success", thrift.STRUCT, 0) + offset += p.Success.FastWriteNocopy(buf[offset:], binaryWriter) + offset += bthrift.Binary.WriteFieldEnd(buf[offset:]) + } + return offset +} + +func (p *AIGCServerChooseWordResult) field0Length() int { + l := 0 + if p.IsSetSuccess() { + l += bthrift.Binary.FieldBeginLength("success", thrift.STRUCT, 0) + l += p.Success.BLength() + l += bthrift.Binary.FieldEndLength() + } + return l +} + +func (p *AIGCServerDoctorAnalyseArgs) FastRead(buf []byte) (int, error) { + var err error + var offset int + var l int + var fieldTypeId thrift.TType + var fieldId int16 + _, l, err = bthrift.Binary.ReadStructBegin(buf) + offset += l + if err != nil { + goto ReadStructBeginError + } + + for { + _, fieldTypeId, fieldId, l, err = bthrift.Binary.ReadFieldBegin(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldBeginError + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + l, err = p.FastReadField1(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldError + } + } else { + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + default: + l, err = bthrift.Binary.Skip(buf[offset:], fieldTypeId) + offset += l + if err != nil { + goto SkipFieldError + } + } + + l, err = bthrift.Binary.ReadFieldEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadFieldEndError + } + } + l, err = bthrift.Binary.ReadStructEnd(buf[offset:]) + offset += l + if err != nil { + goto ReadStructEndError + } + + return offset, nil +ReadStructBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) +ReadFieldBeginError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) +ReadFieldError: + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerDoctorAnalyseArgs[fieldId]), err) SkipFieldError: return offset, thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) ReadFieldEndError: @@ -450,10 +2263,10 @@ ReadStructEndError: return offset, thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } -func (p *AIGCServerUserAskQuestionArgs) FastReadField1(buf []byte) (int, error) { +func (p *AIGCServerDoctorAnalyseArgs) FastReadField1(buf []byte) (int, error) { offset := 0 - tmp := NewQingyuAigcQuestionRequest() + tmp := NewQingyuAigcDoctorAnalyseRequest() if l, err := tmp.FastRead(buf[offset:]); err != nil { return offset, err } else { @@ -464,13 +2277,13 @@ func (p *AIGCServerUserAskQuestionArgs) FastReadField1(buf []byte) (int, error) } // for compatibility -func (p *AIGCServerUserAskQuestionArgs) FastWrite(buf []byte) int { +func (p *AIGCServerDoctorAnalyseArgs) FastWrite(buf []byte) int { return 0 } -func (p *AIGCServerUserAskQuestionArgs) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { +func (p *AIGCServerDoctorAnalyseArgs) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { offset := 0 - offset += bthrift.Binary.WriteStructBegin(buf[offset:], "UserAskQuestion_args") + offset += bthrift.Binary.WriteStructBegin(buf[offset:], "DoctorAnalyse_args") if p != nil { offset += p.fastWriteField1(buf[offset:], binaryWriter) } @@ -479,9 +2292,9 @@ func (p *AIGCServerUserAskQuestionArgs) FastWriteNocopy(buf []byte, binaryWriter return offset } -func (p *AIGCServerUserAskQuestionArgs) BLength() int { +func (p *AIGCServerDoctorAnalyseArgs) BLength() int { l := 0 - l += bthrift.Binary.StructBeginLength("UserAskQuestion_args") + l += bthrift.Binary.StructBeginLength("DoctorAnalyse_args") if p != nil { l += p.field1Length() } @@ -490,7 +2303,7 @@ func (p *AIGCServerUserAskQuestionArgs) BLength() int { return l } -func (p *AIGCServerUserAskQuestionArgs) fastWriteField1(buf []byte, binaryWriter bthrift.BinaryWriter) int { +func (p *AIGCServerDoctorAnalyseArgs) fastWriteField1(buf []byte, binaryWriter bthrift.BinaryWriter) int { offset := 0 offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "req", thrift.STRUCT, 1) offset += p.Req.FastWriteNocopy(buf[offset:], binaryWriter) @@ -498,7 +2311,7 @@ func (p *AIGCServerUserAskQuestionArgs) fastWriteField1(buf []byte, binaryWriter return offset } -func (p *AIGCServerUserAskQuestionArgs) field1Length() int { +func (p *AIGCServerDoctorAnalyseArgs) field1Length() int { l := 0 l += bthrift.Binary.FieldBeginLength("req", thrift.STRUCT, 1) l += p.Req.BLength() @@ -506,7 +2319,7 @@ func (p *AIGCServerUserAskQuestionArgs) field1Length() int { return l } -func (p *AIGCServerUserAskQuestionResult) FastRead(buf []byte) (int, error) { +func (p *AIGCServerDoctorAnalyseResult) FastRead(buf []byte) (int, error) { var err error var offset int var l int @@ -568,7 +2381,7 @@ ReadStructBeginError: ReadFieldBeginError: return offset, thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: - return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerUserAskQuestionResult[fieldId]), err) + return offset, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_AIGCServerDoctorAnalyseResult[fieldId]), err) SkipFieldError: return offset, thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) ReadFieldEndError: @@ -577,10 +2390,10 @@ ReadStructEndError: return offset, thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } -func (p *AIGCServerUserAskQuestionResult) FastReadField0(buf []byte) (int, error) { +func (p *AIGCServerDoctorAnalyseResult) FastReadField0(buf []byte) (int, error) { offset := 0 - tmp := NewQingyuAigcQuestionResponse() + tmp := NewQingyuAigcDoctorAnalyseResponse() if l, err := tmp.FastRead(buf[offset:]); err != nil { return offset, err } else { @@ -591,13 +2404,13 @@ func (p *AIGCServerUserAskQuestionResult) FastReadField0(buf []byte) (int, error } // for compatibility -func (p *AIGCServerUserAskQuestionResult) FastWrite(buf []byte) int { +func (p *AIGCServerDoctorAnalyseResult) FastWrite(buf []byte) int { return 0 } -func (p *AIGCServerUserAskQuestionResult) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { +func (p *AIGCServerDoctorAnalyseResult) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWriter) int { offset := 0 - offset += bthrift.Binary.WriteStructBegin(buf[offset:], "UserAskQuestion_result") + offset += bthrift.Binary.WriteStructBegin(buf[offset:], "DoctorAnalyse_result") if p != nil { offset += p.fastWriteField0(buf[offset:], binaryWriter) } @@ -606,9 +2419,9 @@ func (p *AIGCServerUserAskQuestionResult) FastWriteNocopy(buf []byte, binaryWrit return offset } -func (p *AIGCServerUserAskQuestionResult) BLength() int { +func (p *AIGCServerDoctorAnalyseResult) BLength() int { l := 0 - l += bthrift.Binary.StructBeginLength("UserAskQuestion_result") + l += bthrift.Binary.StructBeginLength("DoctorAnalyse_result") if p != nil { l += p.field0Length() } @@ -617,7 +2430,7 @@ func (p *AIGCServerUserAskQuestionResult) BLength() int { return l } -func (p *AIGCServerUserAskQuestionResult) fastWriteField0(buf []byte, binaryWriter bthrift.BinaryWriter) int { +func (p *AIGCServerDoctorAnalyseResult) fastWriteField0(buf []byte, binaryWriter bthrift.BinaryWriter) int { offset := 0 if p.IsSetSuccess() { offset += bthrift.Binary.WriteFieldBegin(buf[offset:], "success", thrift.STRUCT, 0) @@ -627,7 +2440,7 @@ func (p *AIGCServerUserAskQuestionResult) fastWriteField0(buf []byte, binaryWrit return offset } -func (p *AIGCServerUserAskQuestionResult) field0Length() int { +func (p *AIGCServerDoctorAnalyseResult) field0Length() int { l := 0 if p.IsSetSuccess() { l += bthrift.Binary.FieldBeginLength("success", thrift.STRUCT, 0) @@ -644,3 +2457,27 @@ func (p *AIGCServerUserAskQuestionArgs) GetFirstArgument() interface{} { func (p *AIGCServerUserAskQuestionResult) GetResult() interface{} { return p.Success } + +func (p *AIGCServerAnalyseIssueListArgs) GetFirstArgument() interface{} { + return p.Req +} + +func (p *AIGCServerAnalyseIssueListResult) GetResult() interface{} { + return p.Success +} + +func (p *AIGCServerChooseWordArgs) GetFirstArgument() interface{} { + return p.Req +} + +func (p *AIGCServerChooseWordResult) GetResult() interface{} { + return p.Success +} + +func (p *AIGCServerDoctorAnalyseArgs) GetFirstArgument() interface{} { + return p.Req +} + +func (p *AIGCServerDoctorAnalyseResult) GetResult() interface{} { + return p.Success +} diff --git a/server/service/aigc/handler.go b/server/service/aigc/handler.go index af25e51..0df9a25 100644 --- a/server/service/aigc/handler.go +++ b/server/service/aigc/handler.go @@ -48,3 +48,21 @@ func (s *AIGCServerImpl) UserAskQuestion(ctx context.Context, req *aigc.QingyuAi } return } + +// ChooseWord implements the AIGCServerImpl interface. +func (s *AIGCServerImpl) ChooseWord(ctx context.Context, req *aigc.QingyuAigcChooseWordRequest) (resp *aigc.QingyuAigcChooseWordResponse, err error) { + // TODO: Your code here... + return +} + +// DoctorAnalyse implements the AIGCServerImpl interface. +func (s *AIGCServerImpl) DoctorAnalyse(ctx context.Context, req *aigc.QingyuAigcDoctorAnalyseRequest) (resp *aigc.QingyuAigcDoctorAnalyseResponse, err error) { + // TODO: Your code here... + return +} + +// AnalyseIssueList implements the AIGCServerImpl interface. +func (s *AIGCServerImpl) AnalyseIssueList(ctx context.Context, req *aigc.QingyuAigcIssueListRequest) (resp *aigc.QingyuAigcIssueListResponse, err error) { + // TODO: Your code here... + return +}