30887 lines
		
	
	
		
			811 KiB
		
	
	
	
		
			Go
		
	
	
	
			
		
		
	
	
			30887 lines
		
	
	
		
			811 KiB
		
	
	
	
		
			Go
		
	
	
	
| // Code generated by thriftgo (0.4.1). DO NOT EDIT.
 | |
| 
 | |
| package bot_common
 | |
| 
 | |
| import (
 | |
| 	"database/sql"
 | |
| 	"database/sql/driver"
 | |
| 	"fmt"
 | |
| 	"github.com/apache/thrift/lib/go/thrift"
 | |
| )
 | |
| 
 | |
| type ModelStyle int64
 | |
| 
 | |
| const (
 | |
| 	ModelStyle_Custom   ModelStyle = 0
 | |
| 	ModelStyle_Creative ModelStyle = 1
 | |
| 	ModelStyle_Balance  ModelStyle = 2
 | |
| 	ModelStyle_Precise  ModelStyle = 3
 | |
| )
 | |
| 
 | |
| func (p ModelStyle) String() string {
 | |
| 	switch p {
 | |
| 	case ModelStyle_Custom:
 | |
| 		return "Custom"
 | |
| 	case ModelStyle_Creative:
 | |
| 		return "Creative"
 | |
| 	case ModelStyle_Balance:
 | |
| 		return "Balance"
 | |
| 	case ModelStyle_Precise:
 | |
| 		return "Precise"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func ModelStyleFromString(s string) (ModelStyle, error) {
 | |
| 	switch s {
 | |
| 	case "Custom":
 | |
| 		return ModelStyle_Custom, nil
 | |
| 	case "Creative":
 | |
| 		return ModelStyle_Creative, nil
 | |
| 	case "Balance":
 | |
| 		return ModelStyle_Balance, nil
 | |
| 	case "Precise":
 | |
| 		return ModelStyle_Precise, nil
 | |
| 	}
 | |
| 	return ModelStyle(0), fmt.Errorf("not a valid ModelStyle string")
 | |
| }
 | |
| 
 | |
| func ModelStylePtr(v ModelStyle) *ModelStyle { return &v }
 | |
| func (p *ModelStyle) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = ModelStyle(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *ModelStyle) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type ModelResponseFormat int64
 | |
| 
 | |
| const (
 | |
| 	ModelResponseFormat_Text     ModelResponseFormat = 0
 | |
| 	ModelResponseFormat_Markdown ModelResponseFormat = 1
 | |
| 	ModelResponseFormat_JSON     ModelResponseFormat = 2
 | |
| )
 | |
| 
 | |
| func (p ModelResponseFormat) String() string {
 | |
| 	switch p {
 | |
| 	case ModelResponseFormat_Text:
 | |
| 		return "Text"
 | |
| 	case ModelResponseFormat_Markdown:
 | |
| 		return "Markdown"
 | |
| 	case ModelResponseFormat_JSON:
 | |
| 		return "JSON"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func ModelResponseFormatFromString(s string) (ModelResponseFormat, error) {
 | |
| 	switch s {
 | |
| 	case "Text":
 | |
| 		return ModelResponseFormat_Text, nil
 | |
| 	case "Markdown":
 | |
| 		return ModelResponseFormat_Markdown, nil
 | |
| 	case "JSON":
 | |
| 		return ModelResponseFormat_JSON, nil
 | |
| 	}
 | |
| 	return ModelResponseFormat(0), fmt.Errorf("not a valid ModelResponseFormat string")
 | |
| }
 | |
| 
 | |
| func ModelResponseFormatPtr(v ModelResponseFormat) *ModelResponseFormat { return &v }
 | |
| func (p *ModelResponseFormat) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = ModelResponseFormat(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *ModelResponseFormat) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| // The type of transmission allowed by the context
 | |
| type ContextMode int64
 | |
| 
 | |
| const (
 | |
| 	ContextMode_Chat           ContextMode = 0
 | |
| 	ContextMode_FunctionCall_1 ContextMode = 1
 | |
| 	ContextMode_FunctionCall_2 ContextMode = 2
 | |
| 	ContextMode_FunctionCall_3 ContextMode = 3
 | |
| )
 | |
| 
 | |
| func (p ContextMode) String() string {
 | |
| 	switch p {
 | |
| 	case ContextMode_Chat:
 | |
| 		return "Chat"
 | |
| 	case ContextMode_FunctionCall_1:
 | |
| 		return "FunctionCall_1"
 | |
| 	case ContextMode_FunctionCall_2:
 | |
| 		return "FunctionCall_2"
 | |
| 	case ContextMode_FunctionCall_3:
 | |
| 		return "FunctionCall_3"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func ContextModeFromString(s string) (ContextMode, error) {
 | |
| 	switch s {
 | |
| 	case "Chat":
 | |
| 		return ContextMode_Chat, nil
 | |
| 	case "FunctionCall_1":
 | |
| 		return ContextMode_FunctionCall_1, nil
 | |
| 	case "FunctionCall_2":
 | |
| 		return ContextMode_FunctionCall_2, nil
 | |
| 	case "FunctionCall_3":
 | |
| 		return ContextMode_FunctionCall_3, nil
 | |
| 	}
 | |
| 	return ContextMode(0), fmt.Errorf("not a valid ContextMode string")
 | |
| }
 | |
| 
 | |
| func ContextModePtr(v ContextMode) *ContextMode { return &v }
 | |
| func (p *ContextMode) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = ContextMode(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *ContextMode) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type ModelFuncConfigType int64
 | |
| 
 | |
| const (
 | |
| 	ModelFuncConfigType_Plugin                ModelFuncConfigType = 1
 | |
| 	ModelFuncConfigType_Workflow              ModelFuncConfigType = 2
 | |
| 	ModelFuncConfigType_ImageFlow             ModelFuncConfigType = 3
 | |
| 	ModelFuncConfigType_Trigger               ModelFuncConfigType = 4
 | |
| 	ModelFuncConfigType_KnowledgeText         ModelFuncConfigType = 5
 | |
| 	ModelFuncConfigType_KnowledgeTable        ModelFuncConfigType = 6
 | |
| 	ModelFuncConfigType_KnowledgeAutoCall     ModelFuncConfigType = 7
 | |
| 	ModelFuncConfigType_KnowledgeOnDemandCall ModelFuncConfigType = 8
 | |
| 	ModelFuncConfigType_Variable              ModelFuncConfigType = 9
 | |
| 	ModelFuncConfigType_Database              ModelFuncConfigType = 10
 | |
| 	ModelFuncConfigType_LongTermMemory        ModelFuncConfigType = 11
 | |
| 	ModelFuncConfigType_FileBox               ModelFuncConfigType = 12
 | |
| 	ModelFuncConfigType_Onboarding            ModelFuncConfigType = 13
 | |
| 	ModelFuncConfigType_Suggestion            ModelFuncConfigType = 14
 | |
| 	ModelFuncConfigType_ShortcutCommand       ModelFuncConfigType = 15
 | |
| 	ModelFuncConfigType_BackGroundImage       ModelFuncConfigType = 16
 | |
| 	ModelFuncConfigType_TTS                   ModelFuncConfigType = 17
 | |
| 	ModelFuncConfigType_MultiAgentRecognize   ModelFuncConfigType = 18
 | |
| 	ModelFuncConfigType_KnowledgePhoto        ModelFuncConfigType = 19
 | |
| 	ModelFuncConfigType_HookInfo              ModelFuncConfigType = 20
 | |
| )
 | |
| 
 | |
| func (p ModelFuncConfigType) String() string {
 | |
| 	switch p {
 | |
| 	case ModelFuncConfigType_Plugin:
 | |
| 		return "Plugin"
 | |
| 	case ModelFuncConfigType_Workflow:
 | |
| 		return "Workflow"
 | |
| 	case ModelFuncConfigType_ImageFlow:
 | |
| 		return "ImageFlow"
 | |
| 	case ModelFuncConfigType_Trigger:
 | |
| 		return "Trigger"
 | |
| 	case ModelFuncConfigType_KnowledgeText:
 | |
| 		return "KnowledgeText"
 | |
| 	case ModelFuncConfigType_KnowledgeTable:
 | |
| 		return "KnowledgeTable"
 | |
| 	case ModelFuncConfigType_KnowledgeAutoCall:
 | |
| 		return "KnowledgeAutoCall"
 | |
| 	case ModelFuncConfigType_KnowledgeOnDemandCall:
 | |
| 		return "KnowledgeOnDemandCall"
 | |
| 	case ModelFuncConfigType_Variable:
 | |
| 		return "Variable"
 | |
| 	case ModelFuncConfigType_Database:
 | |
| 		return "Database"
 | |
| 	case ModelFuncConfigType_LongTermMemory:
 | |
| 		return "LongTermMemory"
 | |
| 	case ModelFuncConfigType_FileBox:
 | |
| 		return "FileBox"
 | |
| 	case ModelFuncConfigType_Onboarding:
 | |
| 		return "Onboarding"
 | |
| 	case ModelFuncConfigType_Suggestion:
 | |
| 		return "Suggestion"
 | |
| 	case ModelFuncConfigType_ShortcutCommand:
 | |
| 		return "ShortcutCommand"
 | |
| 	case ModelFuncConfigType_BackGroundImage:
 | |
| 		return "BackGroundImage"
 | |
| 	case ModelFuncConfigType_TTS:
 | |
| 		return "TTS"
 | |
| 	case ModelFuncConfigType_MultiAgentRecognize:
 | |
| 		return "MultiAgentRecognize"
 | |
| 	case ModelFuncConfigType_KnowledgePhoto:
 | |
| 		return "KnowledgePhoto"
 | |
| 	case ModelFuncConfigType_HookInfo:
 | |
| 		return "HookInfo"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func ModelFuncConfigTypeFromString(s string) (ModelFuncConfigType, error) {
 | |
| 	switch s {
 | |
| 	case "Plugin":
 | |
| 		return ModelFuncConfigType_Plugin, nil
 | |
| 	case "Workflow":
 | |
| 		return ModelFuncConfigType_Workflow, nil
 | |
| 	case "ImageFlow":
 | |
| 		return ModelFuncConfigType_ImageFlow, nil
 | |
| 	case "Trigger":
 | |
| 		return ModelFuncConfigType_Trigger, nil
 | |
| 	case "KnowledgeText":
 | |
| 		return ModelFuncConfigType_KnowledgeText, nil
 | |
| 	case "KnowledgeTable":
 | |
| 		return ModelFuncConfigType_KnowledgeTable, nil
 | |
| 	case "KnowledgeAutoCall":
 | |
| 		return ModelFuncConfigType_KnowledgeAutoCall, nil
 | |
| 	case "KnowledgeOnDemandCall":
 | |
| 		return ModelFuncConfigType_KnowledgeOnDemandCall, nil
 | |
| 	case "Variable":
 | |
| 		return ModelFuncConfigType_Variable, nil
 | |
| 	case "Database":
 | |
| 		return ModelFuncConfigType_Database, nil
 | |
| 	case "LongTermMemory":
 | |
| 		return ModelFuncConfigType_LongTermMemory, nil
 | |
| 	case "FileBox":
 | |
| 		return ModelFuncConfigType_FileBox, nil
 | |
| 	case "Onboarding":
 | |
| 		return ModelFuncConfigType_Onboarding, nil
 | |
| 	case "Suggestion":
 | |
| 		return ModelFuncConfigType_Suggestion, nil
 | |
| 	case "ShortcutCommand":
 | |
| 		return ModelFuncConfigType_ShortcutCommand, nil
 | |
| 	case "BackGroundImage":
 | |
| 		return ModelFuncConfigType_BackGroundImage, nil
 | |
| 	case "TTS":
 | |
| 		return ModelFuncConfigType_TTS, nil
 | |
| 	case "MultiAgentRecognize":
 | |
| 		return ModelFuncConfigType_MultiAgentRecognize, nil
 | |
| 	case "KnowledgePhoto":
 | |
| 		return ModelFuncConfigType_KnowledgePhoto, nil
 | |
| 	case "HookInfo":
 | |
| 		return ModelFuncConfigType_HookInfo, nil
 | |
| 	}
 | |
| 	return ModelFuncConfigType(0), fmt.Errorf("not a valid ModelFuncConfigType string")
 | |
| }
 | |
| 
 | |
| func ModelFuncConfigTypePtr(v ModelFuncConfigType) *ModelFuncConfigType { return &v }
 | |
| func (p *ModelFuncConfigType) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = ModelFuncConfigType(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *ModelFuncConfigType) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type ModelFuncConfigStatus int64
 | |
| 
 | |
| const (
 | |
| 	ModelFuncConfigStatus_FullSupport ModelFuncConfigStatus = 0
 | |
| 	ModelFuncConfigStatus_PoorSupport ModelFuncConfigStatus = 1
 | |
| 	ModelFuncConfigStatus_NotSupport  ModelFuncConfigStatus = 2
 | |
| )
 | |
| 
 | |
| func (p ModelFuncConfigStatus) String() string {
 | |
| 	switch p {
 | |
| 	case ModelFuncConfigStatus_FullSupport:
 | |
| 		return "FullSupport"
 | |
| 	case ModelFuncConfigStatus_PoorSupport:
 | |
| 		return "PoorSupport"
 | |
| 	case ModelFuncConfigStatus_NotSupport:
 | |
| 		return "NotSupport"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func ModelFuncConfigStatusFromString(s string) (ModelFuncConfigStatus, error) {
 | |
| 	switch s {
 | |
| 	case "FullSupport":
 | |
| 		return ModelFuncConfigStatus_FullSupport, nil
 | |
| 	case "PoorSupport":
 | |
| 		return ModelFuncConfigStatus_PoorSupport, nil
 | |
| 	case "NotSupport":
 | |
| 		return ModelFuncConfigStatus_NotSupport, nil
 | |
| 	}
 | |
| 	return ModelFuncConfigStatus(0), fmt.Errorf("not a valid ModelFuncConfigStatus string")
 | |
| }
 | |
| 
 | |
| func ModelFuncConfigStatusPtr(v ModelFuncConfigStatus) *ModelFuncConfigStatus { return &v }
 | |
| func (p *ModelFuncConfigStatus) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = ModelFuncConfigStatus(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *ModelFuncConfigStatus) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type WorkflowMode int64
 | |
| 
 | |
| const (
 | |
| 	WorkflowMode_Workflow  WorkflowMode = 0
 | |
| 	WorkflowMode_Imageflow WorkflowMode = 1
 | |
| 	WorkflowMode_SceneFlow WorkflowMode = 2
 | |
| 	WorkflowMode_ChatFlow  WorkflowMode = 3
 | |
| 	WorkflowMode_All       WorkflowMode = 100
 | |
| )
 | |
| 
 | |
| func (p WorkflowMode) String() string {
 | |
| 	switch p {
 | |
| 	case WorkflowMode_Workflow:
 | |
| 		return "Workflow"
 | |
| 	case WorkflowMode_Imageflow:
 | |
| 		return "Imageflow"
 | |
| 	case WorkflowMode_SceneFlow:
 | |
| 		return "SceneFlow"
 | |
| 	case WorkflowMode_ChatFlow:
 | |
| 		return "ChatFlow"
 | |
| 	case WorkflowMode_All:
 | |
| 		return "All"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func WorkflowModeFromString(s string) (WorkflowMode, error) {
 | |
| 	switch s {
 | |
| 	case "Workflow":
 | |
| 		return WorkflowMode_Workflow, nil
 | |
| 	case "Imageflow":
 | |
| 		return WorkflowMode_Imageflow, nil
 | |
| 	case "SceneFlow":
 | |
| 		return WorkflowMode_SceneFlow, nil
 | |
| 	case "ChatFlow":
 | |
| 		return WorkflowMode_ChatFlow, nil
 | |
| 	case "All":
 | |
| 		return WorkflowMode_All, nil
 | |
| 	}
 | |
| 	return WorkflowMode(0), fmt.Errorf("not a valid WorkflowMode string")
 | |
| }
 | |
| 
 | |
| func WorkflowModePtr(v WorkflowMode) *WorkflowMode { return &v }
 | |
| func (p *WorkflowMode) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = WorkflowMode(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *WorkflowMode) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| // onboarding content generation mode
 | |
| type OnboardingMode int64
 | |
| 
 | |
| const (
 | |
| 	// No.
 | |
| 	OnboardingMode_NO_NEED OnboardingMode = 1
 | |
| 	// Manually specify content (multi-language support is covered by LLM)
 | |
| 	OnboardingMode_USE_MANUAL OnboardingMode = 2
 | |
| 	// Generated by LLM
 | |
| 	OnboardingMode_USE_LLM OnboardingMode = 3
 | |
| )
 | |
| 
 | |
| func (p OnboardingMode) String() string {
 | |
| 	switch p {
 | |
| 	case OnboardingMode_NO_NEED:
 | |
| 		return "NO_NEED"
 | |
| 	case OnboardingMode_USE_MANUAL:
 | |
| 		return "USE_MANUAL"
 | |
| 	case OnboardingMode_USE_LLM:
 | |
| 		return "USE_LLM"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func OnboardingModeFromString(s string) (OnboardingMode, error) {
 | |
| 	switch s {
 | |
| 	case "NO_NEED":
 | |
| 		return OnboardingMode_NO_NEED, nil
 | |
| 	case "USE_MANUAL":
 | |
| 		return OnboardingMode_USE_MANUAL, nil
 | |
| 	case "USE_LLM":
 | |
| 		return OnboardingMode_USE_LLM, nil
 | |
| 	}
 | |
| 	return OnboardingMode(0), fmt.Errorf("not a valid OnboardingMode string")
 | |
| }
 | |
| 
 | |
| func OnboardingModePtr(v OnboardingMode) *OnboardingMode { return &v }
 | |
| func (p *OnboardingMode) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = OnboardingMode(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *OnboardingMode) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type SuggestedQuestionsShowMode int64
 | |
| 
 | |
| const (
 | |
| 	SuggestedQuestionsShowMode_Random SuggestedQuestionsShowMode = 0
 | |
| 	SuggestedQuestionsShowMode_All    SuggestedQuestionsShowMode = 1
 | |
| )
 | |
| 
 | |
| func (p SuggestedQuestionsShowMode) String() string {
 | |
| 	switch p {
 | |
| 	case SuggestedQuestionsShowMode_Random:
 | |
| 		return "Random"
 | |
| 	case SuggestedQuestionsShowMode_All:
 | |
| 		return "All"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func SuggestedQuestionsShowModeFromString(s string) (SuggestedQuestionsShowMode, error) {
 | |
| 	switch s {
 | |
| 	case "Random":
 | |
| 		return SuggestedQuestionsShowMode_Random, nil
 | |
| 	case "All":
 | |
| 		return SuggestedQuestionsShowMode_All, nil
 | |
| 	}
 | |
| 	return SuggestedQuestionsShowMode(0), fmt.Errorf("not a valid SuggestedQuestionsShowMode string")
 | |
| }
 | |
| 
 | |
| func SuggestedQuestionsShowModePtr(v SuggestedQuestionsShowMode) *SuggestedQuestionsShowMode {
 | |
| 	return &v
 | |
| }
 | |
| func (p *SuggestedQuestionsShowMode) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = SuggestedQuestionsShowMode(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *SuggestedQuestionsShowMode) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type SuggestReplyMode int64
 | |
| 
 | |
| const (
 | |
| 	SuggestReplyMode_System  SuggestReplyMode = 0
 | |
| 	SuggestReplyMode_Custom  SuggestReplyMode = 1
 | |
| 	SuggestReplyMode_Disable SuggestReplyMode = 2
 | |
| 	// Agent specific, multiplexed source Bot configuration
 | |
| 	SuggestReplyMode_OriBot SuggestReplyMode = 3
 | |
| )
 | |
| 
 | |
| func (p SuggestReplyMode) String() string {
 | |
| 	switch p {
 | |
| 	case SuggestReplyMode_System:
 | |
| 		return "System"
 | |
| 	case SuggestReplyMode_Custom:
 | |
| 		return "Custom"
 | |
| 	case SuggestReplyMode_Disable:
 | |
| 		return "Disable"
 | |
| 	case SuggestReplyMode_OriBot:
 | |
| 		return "OriBot"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func SuggestReplyModeFromString(s string) (SuggestReplyMode, error) {
 | |
| 	switch s {
 | |
| 	case "System":
 | |
| 		return SuggestReplyMode_System, nil
 | |
| 	case "Custom":
 | |
| 		return SuggestReplyMode_Custom, nil
 | |
| 	case "Disable":
 | |
| 		return SuggestReplyMode_Disable, nil
 | |
| 	case "OriBot":
 | |
| 		return SuggestReplyMode_OriBot, nil
 | |
| 	}
 | |
| 	return SuggestReplyMode(0), fmt.Errorf("not a valid SuggestReplyMode string")
 | |
| }
 | |
| 
 | |
| func SuggestReplyModePtr(v SuggestReplyMode) *SuggestReplyMode { return &v }
 | |
| func (p *SuggestReplyMode) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = SuggestReplyMode(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *SuggestReplyMode) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type DefaultUserInputType int64
 | |
| 
 | |
| const (
 | |
| 	// Not set
 | |
| 	DefaultUserInputType_NotSet DefaultUserInputType = 0
 | |
| 	// Text
 | |
| 	DefaultUserInputType_Text DefaultUserInputType = 1
 | |
| 	// Hold down the voice
 | |
| 	DefaultUserInputType_Voice DefaultUserInputType = 2
 | |
| 	// voice call
 | |
| 	DefaultUserInputType_Call DefaultUserInputType = 3
 | |
| )
 | |
| 
 | |
| func (p DefaultUserInputType) String() string {
 | |
| 	switch p {
 | |
| 	case DefaultUserInputType_NotSet:
 | |
| 		return "NotSet"
 | |
| 	case DefaultUserInputType_Text:
 | |
| 		return "Text"
 | |
| 	case DefaultUserInputType_Voice:
 | |
| 		return "Voice"
 | |
| 	case DefaultUserInputType_Call:
 | |
| 		return "Call"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func DefaultUserInputTypeFromString(s string) (DefaultUserInputType, error) {
 | |
| 	switch s {
 | |
| 	case "NotSet":
 | |
| 		return DefaultUserInputType_NotSet, nil
 | |
| 	case "Text":
 | |
| 		return DefaultUserInputType_Text, nil
 | |
| 	case "Voice":
 | |
| 		return DefaultUserInputType_Voice, nil
 | |
| 	case "Call":
 | |
| 		return DefaultUserInputType_Call, nil
 | |
| 	}
 | |
| 	return DefaultUserInputType(0), fmt.Errorf("not a valid DefaultUserInputType string")
 | |
| }
 | |
| 
 | |
| func DefaultUserInputTypePtr(v DefaultUserInputType) *DefaultUserInputType { return &v }
 | |
| func (p *DefaultUserInputType) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = DefaultUserInputType(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *DefaultUserInputType) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| // AnswerActions
 | |
| type AnswerActionsMode int64
 | |
| 
 | |
| const (
 | |
| 	AnswerActionsMode_Default   AnswerActionsMode = 1
 | |
| 	AnswerActionsMode_Customize AnswerActionsMode = 2
 | |
| )
 | |
| 
 | |
| func (p AnswerActionsMode) String() string {
 | |
| 	switch p {
 | |
| 	case AnswerActionsMode_Default:
 | |
| 		return "Default"
 | |
| 	case AnswerActionsMode_Customize:
 | |
| 		return "Customize"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func AnswerActionsModeFromString(s string) (AnswerActionsMode, error) {
 | |
| 	switch s {
 | |
| 	case "Default":
 | |
| 		return AnswerActionsMode_Default, nil
 | |
| 	case "Customize":
 | |
| 		return AnswerActionsMode_Customize, nil
 | |
| 	}
 | |
| 	return AnswerActionsMode(0), fmt.Errorf("not a valid AnswerActionsMode string")
 | |
| }
 | |
| 
 | |
| func AnswerActionsModePtr(v AnswerActionsMode) *AnswerActionsMode { return &v }
 | |
| func (p *AnswerActionsMode) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = AnswerActionsMode(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionsMode) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type AnswerActionTriggerType int64
 | |
| 
 | |
| const (
 | |
| 	// Platform preset Trigger action
 | |
| 	AnswerActionTriggerType_Direct AnswerActionTriggerType = 1
 | |
| 	// Click Action to display the custom H5 page
 | |
| 	AnswerActionTriggerType_WebView AnswerActionTriggerType = 2
 | |
| 	// Click Action to send a custom user message
 | |
| 	AnswerActionTriggerType_SendMessage AnswerActionTriggerType = 3
 | |
| )
 | |
| 
 | |
| func (p AnswerActionTriggerType) String() string {
 | |
| 	switch p {
 | |
| 	case AnswerActionTriggerType_Direct:
 | |
| 		return "Direct"
 | |
| 	case AnswerActionTriggerType_WebView:
 | |
| 		return "WebView"
 | |
| 	case AnswerActionTriggerType_SendMessage:
 | |
| 		return "SendMessage"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func AnswerActionTriggerTypeFromString(s string) (AnswerActionTriggerType, error) {
 | |
| 	switch s {
 | |
| 	case "Direct":
 | |
| 		return AnswerActionTriggerType_Direct, nil
 | |
| 	case "WebView":
 | |
| 		return AnswerActionTriggerType_WebView, nil
 | |
| 	case "SendMessage":
 | |
| 		return AnswerActionTriggerType_SendMessage, nil
 | |
| 	}
 | |
| 	return AnswerActionTriggerType(0), fmt.Errorf("not a valid AnswerActionTriggerType string")
 | |
| }
 | |
| 
 | |
| func AnswerActionTriggerTypePtr(v AnswerActionTriggerType) *AnswerActionTriggerType { return &v }
 | |
| func (p *AnswerActionTriggerType) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = AnswerActionTriggerType(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionTriggerType) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type SearchStrategy int64
 | |
| 
 | |
| const (
 | |
| 	// semantic search
 | |
| 	SearchStrategy_SemanticSearch SearchStrategy = 0
 | |
| 	// Hybrid Search
 | |
| 	SearchStrategy_HybirdSearch SearchStrategy = 1
 | |
| 	// Full Text Search
 | |
| 	SearchStrategy_FullTextSearch SearchStrategy = 20
 | |
| )
 | |
| 
 | |
| func (p SearchStrategy) String() string {
 | |
| 	switch p {
 | |
| 	case SearchStrategy_SemanticSearch:
 | |
| 		return "SemanticSearch"
 | |
| 	case SearchStrategy_HybirdSearch:
 | |
| 		return "HybirdSearch"
 | |
| 	case SearchStrategy_FullTextSearch:
 | |
| 		return "FullTextSearch"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func SearchStrategyFromString(s string) (SearchStrategy, error) {
 | |
| 	switch s {
 | |
| 	case "SemanticSearch":
 | |
| 		return SearchStrategy_SemanticSearch, nil
 | |
| 	case "HybirdSearch":
 | |
| 		return SearchStrategy_HybirdSearch, nil
 | |
| 	case "FullTextSearch":
 | |
| 		return SearchStrategy_FullTextSearch, nil
 | |
| 	}
 | |
| 	return SearchStrategy(0), fmt.Errorf("not a valid SearchStrategy string")
 | |
| }
 | |
| 
 | |
| func SearchStrategyPtr(v SearchStrategy) *SearchStrategy { return &v }
 | |
| func (p *SearchStrategy) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = SearchStrategy(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *SearchStrategy) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type KnowledgeShowSourceMode int64
 | |
| 
 | |
| const (
 | |
| 	KnowledgeShowSourceMode_ReplyBottom KnowledgeShowSourceMode = 0
 | |
| 	KnowledgeShowSourceMode_CardList    KnowledgeShowSourceMode = 1
 | |
| )
 | |
| 
 | |
| func (p KnowledgeShowSourceMode) String() string {
 | |
| 	switch p {
 | |
| 	case KnowledgeShowSourceMode_ReplyBottom:
 | |
| 		return "ReplyBottom"
 | |
| 	case KnowledgeShowSourceMode_CardList:
 | |
| 		return "CardList"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func KnowledgeShowSourceModeFromString(s string) (KnowledgeShowSourceMode, error) {
 | |
| 	switch s {
 | |
| 	case "ReplyBottom":
 | |
| 		return KnowledgeShowSourceMode_ReplyBottom, nil
 | |
| 	case "CardList":
 | |
| 		return KnowledgeShowSourceMode_CardList, nil
 | |
| 	}
 | |
| 	return KnowledgeShowSourceMode(0), fmt.Errorf("not a valid KnowledgeShowSourceMode string")
 | |
| }
 | |
| 
 | |
| func KnowledgeShowSourceModePtr(v KnowledgeShowSourceMode) *KnowledgeShowSourceMode { return &v }
 | |
| func (p *KnowledgeShowSourceMode) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = KnowledgeShowSourceMode(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *KnowledgeShowSourceMode) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type KnowledgeNoRecallReplyMode int64
 | |
| 
 | |
| const (
 | |
| 	KnowledgeNoRecallReplyMode_Default         KnowledgeNoRecallReplyMode = 0
 | |
| 	KnowledgeNoRecallReplyMode_CustomizePrompt KnowledgeNoRecallReplyMode = 1
 | |
| )
 | |
| 
 | |
| func (p KnowledgeNoRecallReplyMode) String() string {
 | |
| 	switch p {
 | |
| 	case KnowledgeNoRecallReplyMode_Default:
 | |
| 		return "Default"
 | |
| 	case KnowledgeNoRecallReplyMode_CustomizePrompt:
 | |
| 		return "CustomizePrompt"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func KnowledgeNoRecallReplyModeFromString(s string) (KnowledgeNoRecallReplyMode, error) {
 | |
| 	switch s {
 | |
| 	case "Default":
 | |
| 		return KnowledgeNoRecallReplyMode_Default, nil
 | |
| 	case "CustomizePrompt":
 | |
| 		return KnowledgeNoRecallReplyMode_CustomizePrompt, nil
 | |
| 	}
 | |
| 	return KnowledgeNoRecallReplyMode(0), fmt.Errorf("not a valid KnowledgeNoRecallReplyMode string")
 | |
| }
 | |
| 
 | |
| func KnowledgeNoRecallReplyModePtr(v KnowledgeNoRecallReplyMode) *KnowledgeNoRecallReplyMode {
 | |
| 	return &v
 | |
| }
 | |
| func (p *KnowledgeNoRecallReplyMode) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = KnowledgeNoRecallReplyMode(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *KnowledgeNoRecallReplyMode) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type SocietyVisibility int64
 | |
| 
 | |
| const (
 | |
| 	// Visible to all
 | |
| 	SocietyVisibility_Public SocietyVisibility = 1
 | |
| 	// Visible to host only
 | |
| 	SocietyVisibility_Anonymous SocietyVisibility = 2
 | |
| 	// custom
 | |
| 	SocietyVisibility_Custom SocietyVisibility = 3
 | |
| )
 | |
| 
 | |
| func (p SocietyVisibility) String() string {
 | |
| 	switch p {
 | |
| 	case SocietyVisibility_Public:
 | |
| 		return "Public"
 | |
| 	case SocietyVisibility_Anonymous:
 | |
| 		return "Anonymous"
 | |
| 	case SocietyVisibility_Custom:
 | |
| 		return "Custom"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func SocietyVisibilityFromString(s string) (SocietyVisibility, error) {
 | |
| 	switch s {
 | |
| 	case "Public":
 | |
| 		return SocietyVisibility_Public, nil
 | |
| 	case "Anonymous":
 | |
| 		return SocietyVisibility_Anonymous, nil
 | |
| 	case "Custom":
 | |
| 		return SocietyVisibility_Custom, nil
 | |
| 	}
 | |
| 	return SocietyVisibility(0), fmt.Errorf("not a valid SocietyVisibility string")
 | |
| }
 | |
| 
 | |
| func SocietyVisibilityPtr(v SocietyVisibility) *SocietyVisibility { return &v }
 | |
| func (p *SocietyVisibility) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = SocietyVisibility(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *SocietyVisibility) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type FieldItemType int64
 | |
| 
 | |
| const (
 | |
| 	// Text String
 | |
| 	FieldItemType_Text FieldItemType = 1
 | |
| 	// Digital Integer
 | |
| 	FieldItemType_Number FieldItemType = 2
 | |
| 	// Time Time
 | |
| 	FieldItemType_Date FieldItemType = 3
 | |
| 	// float Number
 | |
| 	FieldItemType_Float FieldItemType = 4
 | |
| 	// bool Boolean
 | |
| 	FieldItemType_Boolean FieldItemType = 5
 | |
| )
 | |
| 
 | |
| func (p FieldItemType) String() string {
 | |
| 	switch p {
 | |
| 	case FieldItemType_Text:
 | |
| 		return "Text"
 | |
| 	case FieldItemType_Number:
 | |
| 		return "Number"
 | |
| 	case FieldItemType_Date:
 | |
| 		return "Date"
 | |
| 	case FieldItemType_Float:
 | |
| 		return "Float"
 | |
| 	case FieldItemType_Boolean:
 | |
| 		return "Boolean"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func FieldItemTypeFromString(s string) (FieldItemType, error) {
 | |
| 	switch s {
 | |
| 	case "Text":
 | |
| 		return FieldItemType_Text, nil
 | |
| 	case "Number":
 | |
| 		return FieldItemType_Number, nil
 | |
| 	case "Date":
 | |
| 		return FieldItemType_Date, nil
 | |
| 	case "Float":
 | |
| 		return FieldItemType_Float, nil
 | |
| 	case "Boolean":
 | |
| 		return FieldItemType_Boolean, nil
 | |
| 	}
 | |
| 	return FieldItemType(0), fmt.Errorf("not a valid FieldItemType string")
 | |
| }
 | |
| 
 | |
| func FieldItemTypePtr(v FieldItemType) *FieldItemType { return &v }
 | |
| func (p *FieldItemType) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = FieldItemType(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *FieldItemType) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type BotTableRWMode int64
 | |
| 
 | |
| const (
 | |
| 	BotTableRWMode_LimitedReadWrite   BotTableRWMode = 1
 | |
| 	BotTableRWMode_ReadOnly           BotTableRWMode = 2
 | |
| 	BotTableRWMode_UnlimitedReadWrite BotTableRWMode = 3
 | |
| 	BotTableRWMode_RWModeMax          BotTableRWMode = 4
 | |
| )
 | |
| 
 | |
| func (p BotTableRWMode) String() string {
 | |
| 	switch p {
 | |
| 	case BotTableRWMode_LimitedReadWrite:
 | |
| 		return "LimitedReadWrite"
 | |
| 	case BotTableRWMode_ReadOnly:
 | |
| 		return "ReadOnly"
 | |
| 	case BotTableRWMode_UnlimitedReadWrite:
 | |
| 		return "UnlimitedReadWrite"
 | |
| 	case BotTableRWMode_RWModeMax:
 | |
| 		return "RWModeMax"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func BotTableRWModeFromString(s string) (BotTableRWMode, error) {
 | |
| 	switch s {
 | |
| 	case "LimitedReadWrite":
 | |
| 		return BotTableRWMode_LimitedReadWrite, nil
 | |
| 	case "ReadOnly":
 | |
| 		return BotTableRWMode_ReadOnly, nil
 | |
| 	case "UnlimitedReadWrite":
 | |
| 		return BotTableRWMode_UnlimitedReadWrite, nil
 | |
| 	case "RWModeMax":
 | |
| 		return BotTableRWMode_RWModeMax, nil
 | |
| 	}
 | |
| 	return BotTableRWMode(0), fmt.Errorf("not a valid BotTableRWMode string")
 | |
| }
 | |
| 
 | |
| func BotTableRWModePtr(v BotTableRWMode) *BotTableRWMode { return &v }
 | |
| func (p *BotTableRWMode) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = BotTableRWMode(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *BotTableRWMode) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type AgentType int64
 | |
| 
 | |
| const (
 | |
| 	AgentType_Start_Agent  AgentType = 0
 | |
| 	AgentType_LLM_Agent    AgentType = 1
 | |
| 	AgentType_Task_Agent   AgentType = 2
 | |
| 	AgentType_Global_Agent AgentType = 3
 | |
| 	AgentType_Bot_Agent    AgentType = 4
 | |
| )
 | |
| 
 | |
| func (p AgentType) String() string {
 | |
| 	switch p {
 | |
| 	case AgentType_Start_Agent:
 | |
| 		return "Start_Agent"
 | |
| 	case AgentType_LLM_Agent:
 | |
| 		return "LLM_Agent"
 | |
| 	case AgentType_Task_Agent:
 | |
| 		return "Task_Agent"
 | |
| 	case AgentType_Global_Agent:
 | |
| 		return "Global_Agent"
 | |
| 	case AgentType_Bot_Agent:
 | |
| 		return "Bot_Agent"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func AgentTypeFromString(s string) (AgentType, error) {
 | |
| 	switch s {
 | |
| 	case "Start_Agent":
 | |
| 		return AgentType_Start_Agent, nil
 | |
| 	case "LLM_Agent":
 | |
| 		return AgentType_LLM_Agent, nil
 | |
| 	case "Task_Agent":
 | |
| 		return AgentType_Task_Agent, nil
 | |
| 	case "Global_Agent":
 | |
| 		return AgentType_Global_Agent, nil
 | |
| 	case "Bot_Agent":
 | |
| 		return AgentType_Bot_Agent, nil
 | |
| 	}
 | |
| 	return AgentType(0), fmt.Errorf("not a valid AgentType string")
 | |
| }
 | |
| 
 | |
| func AgentTypePtr(v AgentType) *AgentType { return &v }
 | |
| func (p *AgentType) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = AgentType(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *AgentType) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| // Version Compatibility: 0 - Old Version 1 - Rollback New Version 2 - Non-Rollback New Version 3 - Rollback New Version (no longer prompted)
 | |
| type AgentVersionCompat int64
 | |
| 
 | |
| const (
 | |
| 	AgentVersionCompat_OldVersion             AgentVersionCompat = 0
 | |
| 	AgentVersionCompat_MiddleVersion          AgentVersionCompat = 1
 | |
| 	AgentVersionCompat_NewVersion             AgentVersionCompat = 2
 | |
| 	AgentVersionCompat_MiddleVersionNotPrompt AgentVersionCompat = 3
 | |
| )
 | |
| 
 | |
| func (p AgentVersionCompat) String() string {
 | |
| 	switch p {
 | |
| 	case AgentVersionCompat_OldVersion:
 | |
| 		return "OldVersion"
 | |
| 	case AgentVersionCompat_MiddleVersion:
 | |
| 		return "MiddleVersion"
 | |
| 	case AgentVersionCompat_NewVersion:
 | |
| 		return "NewVersion"
 | |
| 	case AgentVersionCompat_MiddleVersionNotPrompt:
 | |
| 		return "MiddleVersionNotPrompt"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func AgentVersionCompatFromString(s string) (AgentVersionCompat, error) {
 | |
| 	switch s {
 | |
| 	case "OldVersion":
 | |
| 		return AgentVersionCompat_OldVersion, nil
 | |
| 	case "MiddleVersion":
 | |
| 		return AgentVersionCompat_MiddleVersion, nil
 | |
| 	case "NewVersion":
 | |
| 		return AgentVersionCompat_NewVersion, nil
 | |
| 	case "MiddleVersionNotPrompt":
 | |
| 		return AgentVersionCompat_MiddleVersionNotPrompt, nil
 | |
| 	}
 | |
| 	return AgentVersionCompat(0), fmt.Errorf("not a valid AgentVersionCompat string")
 | |
| }
 | |
| 
 | |
| func AgentVersionCompatPtr(v AgentVersionCompat) *AgentVersionCompat { return &v }
 | |
| func (p *AgentVersionCompat) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = AgentVersionCompat(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *AgentVersionCompat) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type MultiAgentSessionType int64
 | |
| 
 | |
| const (
 | |
| 	MultiAgentSessionType_Flow MultiAgentSessionType = 1
 | |
| 	MultiAgentSessionType_Host MultiAgentSessionType = 2
 | |
| )
 | |
| 
 | |
| func (p MultiAgentSessionType) String() string {
 | |
| 	switch p {
 | |
| 	case MultiAgentSessionType_Flow:
 | |
| 		return "Flow"
 | |
| 	case MultiAgentSessionType_Host:
 | |
| 		return "Host"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func MultiAgentSessionTypeFromString(s string) (MultiAgentSessionType, error) {
 | |
| 	switch s {
 | |
| 	case "Flow":
 | |
| 		return MultiAgentSessionType_Flow, nil
 | |
| 	case "Host":
 | |
| 		return MultiAgentSessionType_Host, nil
 | |
| 	}
 | |
| 	return MultiAgentSessionType(0), fmt.Errorf("not a valid MultiAgentSessionType string")
 | |
| }
 | |
| 
 | |
| func MultiAgentSessionTypePtr(v MultiAgentSessionType) *MultiAgentSessionType { return &v }
 | |
| func (p *MultiAgentSessionType) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = MultiAgentSessionType(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *MultiAgentSessionType) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type MultiAgentConnectorType int64
 | |
| 
 | |
| const (
 | |
| 	MultiAgentConnectorType_Curve    MultiAgentConnectorType = 0
 | |
| 	MultiAgentConnectorType_Straight MultiAgentConnectorType = 1
 | |
| )
 | |
| 
 | |
| func (p MultiAgentConnectorType) String() string {
 | |
| 	switch p {
 | |
| 	case MultiAgentConnectorType_Curve:
 | |
| 		return "Curve"
 | |
| 	case MultiAgentConnectorType_Straight:
 | |
| 		return "Straight"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func MultiAgentConnectorTypeFromString(s string) (MultiAgentConnectorType, error) {
 | |
| 	switch s {
 | |
| 	case "Curve":
 | |
| 		return MultiAgentConnectorType_Curve, nil
 | |
| 	case "Straight":
 | |
| 		return MultiAgentConnectorType_Straight, nil
 | |
| 	}
 | |
| 	return MultiAgentConnectorType(0), fmt.Errorf("not a valid MultiAgentConnectorType string")
 | |
| }
 | |
| 
 | |
| func MultiAgentConnectorTypePtr(v MultiAgentConnectorType) *MultiAgentConnectorType { return &v }
 | |
| func (p *MultiAgentConnectorType) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = MultiAgentConnectorType(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *MultiAgentConnectorType) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type BotMode int64
 | |
| 
 | |
| const (
 | |
| 	BotMode_SingleMode   BotMode = 0
 | |
| 	BotMode_MultiMode    BotMode = 1
 | |
| 	BotMode_WorkflowMode BotMode = 2
 | |
| )
 | |
| 
 | |
| func (p BotMode) String() string {
 | |
| 	switch p {
 | |
| 	case BotMode_SingleMode:
 | |
| 		return "SingleMode"
 | |
| 	case BotMode_MultiMode:
 | |
| 		return "MultiMode"
 | |
| 	case BotMode_WorkflowMode:
 | |
| 		return "WorkflowMode"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func BotModeFromString(s string) (BotMode, error) {
 | |
| 	switch s {
 | |
| 	case "SingleMode":
 | |
| 		return BotMode_SingleMode, nil
 | |
| 	case "MultiMode":
 | |
| 		return BotMode_MultiMode, nil
 | |
| 	case "WorkflowMode":
 | |
| 		return BotMode_WorkflowMode, nil
 | |
| 	}
 | |
| 	return BotMode(0), fmt.Errorf("not a valid BotMode string")
 | |
| }
 | |
| 
 | |
| func BotModePtr(v BotMode) *BotMode { return &v }
 | |
| func (p *BotMode) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = BotMode(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *BotMode) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type BotSpecies int64
 | |
| 
 | |
| const (
 | |
| 	// Bot type
 | |
| 	BotSpecies_Default BotSpecies = 0
 | |
| 	// Created from coze
 | |
| 	BotSpecies_Function BotSpecies = 1
 | |
| )
 | |
| 
 | |
| func (p BotSpecies) String() string {
 | |
| 	switch p {
 | |
| 	case BotSpecies_Default:
 | |
| 		return "Default"
 | |
| 	case BotSpecies_Function:
 | |
| 		return "Function"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func BotSpeciesFromString(s string) (BotSpecies, error) {
 | |
| 	switch s {
 | |
| 	case "Default":
 | |
| 		return BotSpecies_Default, nil
 | |
| 	case "Function":
 | |
| 		return BotSpecies_Function, nil
 | |
| 	}
 | |
| 	return BotSpecies(0), fmt.Errorf("not a valid BotSpecies string")
 | |
| }
 | |
| 
 | |
| func BotSpeciesPtr(v BotSpecies) *BotSpecies { return &v }
 | |
| func (p *BotSpecies) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = BotSpecies(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *BotSpecies) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type TimeCapsuleMode int64
 | |
| 
 | |
| const (
 | |
| 	// close
 | |
| 	TimeCapsuleMode_Off TimeCapsuleMode = 0
 | |
| 	// open
 | |
| 	TimeCapsuleMode_On TimeCapsuleMode = 1
 | |
| )
 | |
| 
 | |
| func (p TimeCapsuleMode) String() string {
 | |
| 	switch p {
 | |
| 	case TimeCapsuleMode_Off:
 | |
| 		return "Off"
 | |
| 	case TimeCapsuleMode_On:
 | |
| 		return "On"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func TimeCapsuleModeFromString(s string) (TimeCapsuleMode, error) {
 | |
| 	switch s {
 | |
| 	case "Off":
 | |
| 		return TimeCapsuleMode_Off, nil
 | |
| 	case "On":
 | |
| 		return TimeCapsuleMode_On, nil
 | |
| 	}
 | |
| 	return TimeCapsuleMode(0), fmt.Errorf("not a valid TimeCapsuleMode string")
 | |
| }
 | |
| 
 | |
| func TimeCapsuleModePtr(v TimeCapsuleMode) *TimeCapsuleMode { return &v }
 | |
| func (p *TimeCapsuleMode) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = TimeCapsuleMode(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *TimeCapsuleMode) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type DisablePromptCalling int64
 | |
| 
 | |
| const (
 | |
| 	DisablePromptCalling_Off DisablePromptCalling = 0
 | |
| 	DisablePromptCalling_On  DisablePromptCalling = 1
 | |
| )
 | |
| 
 | |
| func (p DisablePromptCalling) String() string {
 | |
| 	switch p {
 | |
| 	case DisablePromptCalling_Off:
 | |
| 		return "Off"
 | |
| 	case DisablePromptCalling_On:
 | |
| 		return "On"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func DisablePromptCallingFromString(s string) (DisablePromptCalling, error) {
 | |
| 	switch s {
 | |
| 	case "Off":
 | |
| 		return DisablePromptCalling_Off, nil
 | |
| 	case "On":
 | |
| 		return DisablePromptCalling_On, nil
 | |
| 	}
 | |
| 	return DisablePromptCalling(0), fmt.Errorf("not a valid DisablePromptCalling string")
 | |
| }
 | |
| 
 | |
| func DisablePromptCallingPtr(v DisablePromptCalling) *DisablePromptCalling { return &v }
 | |
| func (p *DisablePromptCalling) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = DisablePromptCalling(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *DisablePromptCalling) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type FileboxInfoMode int64
 | |
| 
 | |
| const (
 | |
| 	FileboxInfoMode_Off FileboxInfoMode = 0
 | |
| 	FileboxInfoMode_On  FileboxInfoMode = 1
 | |
| )
 | |
| 
 | |
| func (p FileboxInfoMode) String() string {
 | |
| 	switch p {
 | |
| 	case FileboxInfoMode_Off:
 | |
| 		return "Off"
 | |
| 	case FileboxInfoMode_On:
 | |
| 		return "On"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func FileboxInfoModeFromString(s string) (FileboxInfoMode, error) {
 | |
| 	switch s {
 | |
| 	case "Off":
 | |
| 		return FileboxInfoMode_Off, nil
 | |
| 	case "On":
 | |
| 		return FileboxInfoMode_On, nil
 | |
| 	}
 | |
| 	return FileboxInfoMode(0), fmt.Errorf("not a valid FileboxInfoMode string")
 | |
| }
 | |
| 
 | |
| func FileboxInfoModePtr(v FileboxInfoMode) *FileboxInfoMode { return &v }
 | |
| func (p *FileboxInfoMode) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = FileboxInfoMode(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *FileboxInfoMode) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type BotStatus int64
 | |
| 
 | |
| const (
 | |
| 	BotStatus_Deleted BotStatus = 0
 | |
| 	BotStatus_Using   BotStatus = 1
 | |
| 	BotStatus_Banned  BotStatus = 2
 | |
| )
 | |
| 
 | |
| func (p BotStatus) String() string {
 | |
| 	switch p {
 | |
| 	case BotStatus_Deleted:
 | |
| 		return "Deleted"
 | |
| 	case BotStatus_Using:
 | |
| 		return "Using"
 | |
| 	case BotStatus_Banned:
 | |
| 		return "Banned"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func BotStatusFromString(s string) (BotStatus, error) {
 | |
| 	switch s {
 | |
| 	case "Deleted":
 | |
| 		return BotStatus_Deleted, nil
 | |
| 	case "Using":
 | |
| 		return BotStatus_Using, nil
 | |
| 	case "Banned":
 | |
| 		return BotStatus_Banned, nil
 | |
| 	}
 | |
| 	return BotStatus(0), fmt.Errorf("not a valid BotStatus string")
 | |
| }
 | |
| 
 | |
| func BotStatusPtr(v BotStatus) *BotStatus { return &v }
 | |
| func (p *BotStatus) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = BotStatus(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *BotStatus) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type BusinessType int64
 | |
| 
 | |
| const (
 | |
| 	BusinessType_Default      BusinessType = 0
 | |
| 	BusinessType_DouyinAvatar BusinessType = 1
 | |
| )
 | |
| 
 | |
| func (p BusinessType) String() string {
 | |
| 	switch p {
 | |
| 	case BusinessType_Default:
 | |
| 		return "Default"
 | |
| 	case BusinessType_DouyinAvatar:
 | |
| 		return "DouyinAvatar"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func BusinessTypeFromString(s string) (BusinessType, error) {
 | |
| 	switch s {
 | |
| 	case "Default":
 | |
| 		return BusinessType_Default, nil
 | |
| 	case "DouyinAvatar":
 | |
| 		return BusinessType_DouyinAvatar, nil
 | |
| 	}
 | |
| 	return BusinessType(0), fmt.Errorf("not a valid BusinessType string")
 | |
| }
 | |
| 
 | |
| func BusinessTypePtr(v BusinessType) *BusinessType { return &v }
 | |
| func (p *BusinessType) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = BusinessType(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *BusinessType) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type BacktrackMode int64
 | |
| 
 | |
| const (
 | |
| 	BacktrackMode_Current      BacktrackMode = 1
 | |
| 	BacktrackMode_Previous     BacktrackMode = 2
 | |
| 	BacktrackMode_Start        BacktrackMode = 3
 | |
| 	BacktrackMode_MostSuitable BacktrackMode = 4
 | |
| )
 | |
| 
 | |
| func (p BacktrackMode) String() string {
 | |
| 	switch p {
 | |
| 	case BacktrackMode_Current:
 | |
| 		return "Current"
 | |
| 	case BacktrackMode_Previous:
 | |
| 		return "Previous"
 | |
| 	case BacktrackMode_Start:
 | |
| 		return "Start"
 | |
| 	case BacktrackMode_MostSuitable:
 | |
| 		return "MostSuitable"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func BacktrackModeFromString(s string) (BacktrackMode, error) {
 | |
| 	switch s {
 | |
| 	case "Current":
 | |
| 		return BacktrackMode_Current, nil
 | |
| 	case "Previous":
 | |
| 		return BacktrackMode_Previous, nil
 | |
| 	case "Start":
 | |
| 		return BacktrackMode_Start, nil
 | |
| 	case "MostSuitable":
 | |
| 		return BacktrackMode_MostSuitable, nil
 | |
| 	}
 | |
| 	return BacktrackMode(0), fmt.Errorf("not a valid BacktrackMode string")
 | |
| }
 | |
| 
 | |
| func BacktrackModePtr(v BacktrackMode) *BacktrackMode { return &v }
 | |
| func (p *BacktrackMode) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = BacktrackMode(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *BacktrackMode) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type RecognitionMode int64
 | |
| 
 | |
| const (
 | |
| 	RecognitionMode_FunctionCall RecognitionMode = 1
 | |
| 	RecognitionMode_Independent  RecognitionMode = 2
 | |
| )
 | |
| 
 | |
| func (p RecognitionMode) String() string {
 | |
| 	switch p {
 | |
| 	case RecognitionMode_FunctionCall:
 | |
| 		return "FunctionCall"
 | |
| 	case RecognitionMode_Independent:
 | |
| 		return "Independent"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func RecognitionModeFromString(s string) (RecognitionMode, error) {
 | |
| 	switch s {
 | |
| 	case "FunctionCall":
 | |
| 		return RecognitionMode_FunctionCall, nil
 | |
| 	case "Independent":
 | |
| 		return RecognitionMode_Independent, nil
 | |
| 	}
 | |
| 	return RecognitionMode(0), fmt.Errorf("not a valid RecognitionMode string")
 | |
| }
 | |
| 
 | |
| func RecognitionModePtr(v RecognitionMode) *RecognitionMode { return &v }
 | |
| func (p *RecognitionMode) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = RecognitionMode(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *RecognitionMode) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type IndependentTiming int64
 | |
| 
 | |
| const (
 | |
| 	// Determine user input (front)
 | |
| 	IndependentTiming_Pre IndependentTiming = 1
 | |
| 	// Determine node output (postfix)
 | |
| 	IndependentTiming_Post IndependentTiming = 2
 | |
| 	// Front mode and rear mode support simultaneous selection
 | |
| 	IndependentTiming_PreAndPost IndependentTiming = 3
 | |
| )
 | |
| 
 | |
| func (p IndependentTiming) String() string {
 | |
| 	switch p {
 | |
| 	case IndependentTiming_Pre:
 | |
| 		return "Pre"
 | |
| 	case IndependentTiming_Post:
 | |
| 		return "Post"
 | |
| 	case IndependentTiming_PreAndPost:
 | |
| 		return "PreAndPost"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func IndependentTimingFromString(s string) (IndependentTiming, error) {
 | |
| 	switch s {
 | |
| 	case "Pre":
 | |
| 		return IndependentTiming_Pre, nil
 | |
| 	case "Post":
 | |
| 		return IndependentTiming_Post, nil
 | |
| 	case "PreAndPost":
 | |
| 		return IndependentTiming_PreAndPost, nil
 | |
| 	}
 | |
| 	return IndependentTiming(0), fmt.Errorf("not a valid IndependentTiming string")
 | |
| }
 | |
| 
 | |
| func IndependentTimingPtr(v IndependentTiming) *IndependentTiming { return &v }
 | |
| func (p *IndependentTiming) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = IndependentTiming(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *IndependentTiming) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type IndependentRecognitionModelType int64
 | |
| 
 | |
| const (
 | |
| 	// Small model
 | |
| 	IndependentRecognitionModelType_SLM IndependentRecognitionModelType = 0
 | |
| 	// Large model
 | |
| 	IndependentRecognitionModelType_LLM IndependentRecognitionModelType = 1
 | |
| )
 | |
| 
 | |
| func (p IndependentRecognitionModelType) String() string {
 | |
| 	switch p {
 | |
| 	case IndependentRecognitionModelType_SLM:
 | |
| 		return "SLM"
 | |
| 	case IndependentRecognitionModelType_LLM:
 | |
| 		return "LLM"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func IndependentRecognitionModelTypeFromString(s string) (IndependentRecognitionModelType, error) {
 | |
| 	switch s {
 | |
| 	case "SLM":
 | |
| 		return IndependentRecognitionModelType_SLM, nil
 | |
| 	case "LLM":
 | |
| 		return IndependentRecognitionModelType_LLM, nil
 | |
| 	}
 | |
| 	return IndependentRecognitionModelType(0), fmt.Errorf("not a valid IndependentRecognitionModelType string")
 | |
| }
 | |
| 
 | |
| func IndependentRecognitionModelTypePtr(v IndependentRecognitionModelType) *IndependentRecognitionModelType {
 | |
| 	return &v
 | |
| }
 | |
| func (p *IndependentRecognitionModelType) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = IndependentRecognitionModelType(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *IndependentRecognitionModelType) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type MessageFeedbackType int64
 | |
| 
 | |
| const (
 | |
| 	MessageFeedbackType_Default MessageFeedbackType = 0
 | |
| 	MessageFeedbackType_Like    MessageFeedbackType = 1
 | |
| 	MessageFeedbackType_Unlike  MessageFeedbackType = 2
 | |
| )
 | |
| 
 | |
| func (p MessageFeedbackType) String() string {
 | |
| 	switch p {
 | |
| 	case MessageFeedbackType_Default:
 | |
| 		return "Default"
 | |
| 	case MessageFeedbackType_Like:
 | |
| 		return "Like"
 | |
| 	case MessageFeedbackType_Unlike:
 | |
| 		return "Unlike"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func MessageFeedbackTypeFromString(s string) (MessageFeedbackType, error) {
 | |
| 	switch s {
 | |
| 	case "Default":
 | |
| 		return MessageFeedbackType_Default, nil
 | |
| 	case "Like":
 | |
| 		return MessageFeedbackType_Like, nil
 | |
| 	case "Unlike":
 | |
| 		return MessageFeedbackType_Unlike, nil
 | |
| 	}
 | |
| 	return MessageFeedbackType(0), fmt.Errorf("not a valid MessageFeedbackType string")
 | |
| }
 | |
| 
 | |
| func MessageFeedbackTypePtr(v MessageFeedbackType) *MessageFeedbackType { return &v }
 | |
| func (p *MessageFeedbackType) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = MessageFeedbackType(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *MessageFeedbackType) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type MessageFeedbackDetailType int64
 | |
| 
 | |
| const (
 | |
| 	MessageFeedbackDetailType_UnlikeDefault MessageFeedbackDetailType = 0
 | |
| 	// Harmful information
 | |
| 	MessageFeedbackDetailType_UnlikeHarmful MessageFeedbackDetailType = 1
 | |
| 	// incorrect information
 | |
| 	MessageFeedbackDetailType_UnlikeIncorrect MessageFeedbackDetailType = 2
 | |
| 	// Did not follow instructions
 | |
| 	MessageFeedbackDetailType_UnlikeNotFollowInstructions MessageFeedbackDetailType = 3
 | |
| 	// other
 | |
| 	MessageFeedbackDetailType_UnlikeOthers MessageFeedbackDetailType = 4
 | |
| )
 | |
| 
 | |
| func (p MessageFeedbackDetailType) String() string {
 | |
| 	switch p {
 | |
| 	case MessageFeedbackDetailType_UnlikeDefault:
 | |
| 		return "UnlikeDefault"
 | |
| 	case MessageFeedbackDetailType_UnlikeHarmful:
 | |
| 		return "UnlikeHarmful"
 | |
| 	case MessageFeedbackDetailType_UnlikeIncorrect:
 | |
| 		return "UnlikeIncorrect"
 | |
| 	case MessageFeedbackDetailType_UnlikeNotFollowInstructions:
 | |
| 		return "UnlikeNotFollowInstructions"
 | |
| 	case MessageFeedbackDetailType_UnlikeOthers:
 | |
| 		return "UnlikeOthers"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func MessageFeedbackDetailTypeFromString(s string) (MessageFeedbackDetailType, error) {
 | |
| 	switch s {
 | |
| 	case "UnlikeDefault":
 | |
| 		return MessageFeedbackDetailType_UnlikeDefault, nil
 | |
| 	case "UnlikeHarmful":
 | |
| 		return MessageFeedbackDetailType_UnlikeHarmful, nil
 | |
| 	case "UnlikeIncorrect":
 | |
| 		return MessageFeedbackDetailType_UnlikeIncorrect, nil
 | |
| 	case "UnlikeNotFollowInstructions":
 | |
| 		return MessageFeedbackDetailType_UnlikeNotFollowInstructions, nil
 | |
| 	case "UnlikeOthers":
 | |
| 		return MessageFeedbackDetailType_UnlikeOthers, nil
 | |
| 	}
 | |
| 	return MessageFeedbackDetailType(0), fmt.Errorf("not a valid MessageFeedbackDetailType string")
 | |
| }
 | |
| 
 | |
| func MessageFeedbackDetailTypePtr(v MessageFeedbackDetailType) *MessageFeedbackDetailType { return &v }
 | |
| func (p *MessageFeedbackDetailType) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = MessageFeedbackDetailType(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *MessageFeedbackDetailType) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type Scene int64
 | |
| 
 | |
| const (
 | |
| 	Scene_Default    Scene = 0
 | |
| 	Scene_Explore    Scene = 1
 | |
| 	Scene_BotStore   Scene = 2
 | |
| 	Scene_CozeHome   Scene = 3
 | |
| 	Scene_Playground Scene = 4
 | |
| 	// evaluation platform
 | |
| 	Scene_Evaluation Scene = 5
 | |
| 	Scene_AgentAPP   Scene = 6
 | |
| 	//Prompt optimization
 | |
| 	Scene_PromptOptimize Scene = 7
 | |
| 	// Createbot's nl2bot features
 | |
| 	Scene_GenerateAgentInfo Scene = 8
 | |
| )
 | |
| 
 | |
| func (p Scene) String() string {
 | |
| 	switch p {
 | |
| 	case Scene_Default:
 | |
| 		return "Default"
 | |
| 	case Scene_Explore:
 | |
| 		return "Explore"
 | |
| 	case Scene_BotStore:
 | |
| 		return "BotStore"
 | |
| 	case Scene_CozeHome:
 | |
| 		return "CozeHome"
 | |
| 	case Scene_Playground:
 | |
| 		return "Playground"
 | |
| 	case Scene_Evaluation:
 | |
| 		return "Evaluation"
 | |
| 	case Scene_AgentAPP:
 | |
| 		return "AgentAPP"
 | |
| 	case Scene_PromptOptimize:
 | |
| 		return "PromptOptimize"
 | |
| 	case Scene_GenerateAgentInfo:
 | |
| 		return "GenerateAgentInfo"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func SceneFromString(s string) (Scene, error) {
 | |
| 	switch s {
 | |
| 	case "Default":
 | |
| 		return Scene_Default, nil
 | |
| 	case "Explore":
 | |
| 		return Scene_Explore, nil
 | |
| 	case "BotStore":
 | |
| 		return Scene_BotStore, nil
 | |
| 	case "CozeHome":
 | |
| 		return Scene_CozeHome, nil
 | |
| 	case "Playground":
 | |
| 		return Scene_Playground, nil
 | |
| 	case "Evaluation":
 | |
| 		return Scene_Evaluation, nil
 | |
| 	case "AgentAPP":
 | |
| 		return Scene_AgentAPP, nil
 | |
| 	case "PromptOptimize":
 | |
| 		return Scene_PromptOptimize, nil
 | |
| 	case "GenerateAgentInfo":
 | |
| 		return Scene_GenerateAgentInfo, nil
 | |
| 	}
 | |
| 	return Scene(0), fmt.Errorf("not a valid Scene string")
 | |
| }
 | |
| 
 | |
| func ScenePtr(v Scene) *Scene { return &v }
 | |
| func (p *Scene) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = Scene(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *Scene) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| //	struct ContentAttachment {
 | |
| //	   1: required string FileID (api.body = "file_id")
 | |
| //	}
 | |
| //
 | |
| //	struct MetaContent{
 | |
| //	    1: required string Type (api.body="type"),
 | |
| //	    2: optional string Text ( api.body="text"),
 | |
| //	    3: optional string FileID (api.body="file_id"),
 | |
| //	    4: optional string FileURL (api.body="file_url"),
 | |
| //	    5: optional string Card (api.body="card"),
 | |
| //	}
 | |
| //
 | |
| //	struct EnterMessage  {
 | |
| //	    1: required string Role (api.body = "role")
 | |
| //	    2: string Content (api.body = "content")//content
 | |
| //	    3: map<string,string> MetaData(api.body = "meta_data")
 | |
| //	    4: string ContentType(api.body = "content_type")//text/card/object_string
 | |
| //	    5: string Type(api.body = "type")
 | |
| //	}
 | |
| //
 | |
| //	struct OpenMessageApi {
 | |
| //	    1: string Id (api.body = "id")//primary key ID
 | |
| //	    2: string BotId (api.body = "bot_id")//bot id//TODO All i64 plus annotation str, imported parameters and exported parameters are required
 | |
| //	    3: string Role(api.body = "role")
 | |
| //	    4: string Content (api.body = "content")//content
 | |
| //	    5: string ConversationId(api.body = "conversation_id")   // conversation id
 | |
| //	    6: map<string,string> MetaData(api.body = "meta_data")
 | |
| //	    7: string CreatedAt (api.body = "created_at")//create_time
 | |
| //	    8: string UpdatedAt (api.body = "updated_at")//Update time//Change TODO time to int
 | |
| //	    9: string ChatId(api.body = "chat_id")
 | |
| //	    10: string ContentType(api.body = "content_type")
 | |
| //	    11: string Type(api.body = "type")
 | |
| //	}
 | |
| type ReferenceUpdateType int64
 | |
| 
 | |
| const (
 | |
| 	ReferenceUpdateType_ManualUpdate ReferenceUpdateType = 1
 | |
| 	ReferenceUpdateType_AutoUpdate   ReferenceUpdateType = 2
 | |
| )
 | |
| 
 | |
| func (p ReferenceUpdateType) String() string {
 | |
| 	switch p {
 | |
| 	case ReferenceUpdateType_ManualUpdate:
 | |
| 		return "ManualUpdate"
 | |
| 	case ReferenceUpdateType_AutoUpdate:
 | |
| 		return "AutoUpdate"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func ReferenceUpdateTypeFromString(s string) (ReferenceUpdateType, error) {
 | |
| 	switch s {
 | |
| 	case "ManualUpdate":
 | |
| 		return ReferenceUpdateType_ManualUpdate, nil
 | |
| 	case "AutoUpdate":
 | |
| 		return ReferenceUpdateType_AutoUpdate, nil
 | |
| 	}
 | |
| 	return ReferenceUpdateType(0), fmt.Errorf("not a valid ReferenceUpdateType string")
 | |
| }
 | |
| 
 | |
| func ReferenceUpdateTypePtr(v ReferenceUpdateType) *ReferenceUpdateType { return &v }
 | |
| func (p *ReferenceUpdateType) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = ReferenceUpdateType(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *ReferenceUpdateType) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type ReferenceInfoStatus int64
 | |
| 
 | |
| const (
 | |
| 	// 1: Updates are available
 | |
| 	ReferenceInfoStatus_HasUpdates ReferenceInfoStatus = 1
 | |
| 	// 2: Deleted
 | |
| 	ReferenceInfoStatus_IsDelete ReferenceInfoStatus = 2
 | |
| )
 | |
| 
 | |
| func (p ReferenceInfoStatus) String() string {
 | |
| 	switch p {
 | |
| 	case ReferenceInfoStatus_HasUpdates:
 | |
| 		return "HasUpdates"
 | |
| 	case ReferenceInfoStatus_IsDelete:
 | |
| 		return "IsDelete"
 | |
| 	}
 | |
| 	return "<UNSET>"
 | |
| }
 | |
| 
 | |
| func ReferenceInfoStatusFromString(s string) (ReferenceInfoStatus, error) {
 | |
| 	switch s {
 | |
| 	case "HasUpdates":
 | |
| 		return ReferenceInfoStatus_HasUpdates, nil
 | |
| 	case "IsDelete":
 | |
| 		return ReferenceInfoStatus_IsDelete, nil
 | |
| 	}
 | |
| 	return ReferenceInfoStatus(0), fmt.Errorf("not a valid ReferenceInfoStatus string")
 | |
| }
 | |
| 
 | |
| func ReferenceInfoStatusPtr(v ReferenceInfoStatus) *ReferenceInfoStatus { return &v }
 | |
| func (p *ReferenceInfoStatus) Scan(value interface{}) (err error) {
 | |
| 	var result sql.NullInt64
 | |
| 	err = result.Scan(value)
 | |
| 	*p = ReferenceInfoStatus(result.Int64)
 | |
| 	return
 | |
| }
 | |
| 
 | |
| func (p *ReferenceInfoStatus) Value() (driver.Value, error) {
 | |
| 	if p == nil {
 | |
| 		return nil, nil
 | |
| 	}
 | |
| 	return int64(*p), nil
 | |
| }
 | |
| 
 | |
| type AuthToken struct {
 | |
| 	ServiceID       string `thrift:"service_id,1" form:"service_id" json:"service_id" query:"service_id"`
 | |
| 	AccessKeyID     string `thrift:"access_key_id,2" form:"access_key_id" json:"access_key_id" query:"access_key_id"`
 | |
| 	SecretAccessKey string `thrift:"secret_access_key,3" form:"secret_access_key" json:"secret_access_key" query:"secret_access_key"`
 | |
| 	SessionToken    string `thrift:"session_token,4" form:"session_token" json:"session_token" query:"session_token"`
 | |
| 	ExpiredTime     string `thrift:"expired_time,5" form:"expired_time" json:"expired_time" query:"expired_time"`
 | |
| 	CurrentTime     string `thrift:"current_time,6" form:"current_time" json:"current_time" query:"current_time"`
 | |
| 	UploadHost      string `thrift:"upload_host,7" form:"upload_host" json:"upload_host" query:"upload_host"`
 | |
| 	HostScheme      string `thrift:"host_scheme,8" form:"host_scheme" json:"host_scheme" query:"host_scheme"`
 | |
| }
 | |
| 
 | |
| func NewAuthToken() *AuthToken {
 | |
| 	return &AuthToken{}
 | |
| }
 | |
| 
 | |
| func (p *AuthToken) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *AuthToken) GetServiceID() (v string) {
 | |
| 	return p.ServiceID
 | |
| }
 | |
| 
 | |
| func (p *AuthToken) GetAccessKeyID() (v string) {
 | |
| 	return p.AccessKeyID
 | |
| }
 | |
| 
 | |
| func (p *AuthToken) GetSecretAccessKey() (v string) {
 | |
| 	return p.SecretAccessKey
 | |
| }
 | |
| 
 | |
| func (p *AuthToken) GetSessionToken() (v string) {
 | |
| 	return p.SessionToken
 | |
| }
 | |
| 
 | |
| func (p *AuthToken) GetExpiredTime() (v string) {
 | |
| 	return p.ExpiredTime
 | |
| }
 | |
| 
 | |
| func (p *AuthToken) GetCurrentTime() (v string) {
 | |
| 	return p.CurrentTime
 | |
| }
 | |
| 
 | |
| func (p *AuthToken) GetUploadHost() (v string) {
 | |
| 	return p.UploadHost
 | |
| }
 | |
| 
 | |
| func (p *AuthToken) GetHostScheme() (v string) {
 | |
| 	return p.HostScheme
 | |
| }
 | |
| 
 | |
| var fieldIDToName_AuthToken = map[int16]string{
 | |
| 	1: "service_id",
 | |
| 	2: "access_key_id",
 | |
| 	3: "secret_access_key",
 | |
| 	4: "session_token",
 | |
| 	5: "expired_time",
 | |
| 	6: "current_time",
 | |
| 	7: "upload_host",
 | |
| 	8: "host_scheme",
 | |
| }
 | |
| 
 | |
| func (p *AuthToken) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField7(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 8:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField8(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_AuthToken[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 *AuthToken) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ServiceID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AuthToken) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.AccessKeyID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AuthToken) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.SecretAccessKey = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AuthToken) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.SessionToken = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AuthToken) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ExpiredTime = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AuthToken) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.CurrentTime = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AuthToken) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.UploadHost = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AuthToken) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.HostScheme = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *AuthToken) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("AuthToken"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField8(oprot); err != nil {
 | |
| 			fieldId = 8
 | |
| 			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 *AuthToken) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("service_id", thrift.STRING, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.ServiceID); 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 *AuthToken) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("access_key_id", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.AccessKeyID); 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 *AuthToken) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("secret_access_key", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.SecretAccessKey); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *AuthToken) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("session_token", thrift.STRING, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.SessionToken); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *AuthToken) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("expired_time", thrift.STRING, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.ExpiredTime); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *AuthToken) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("current_time", thrift.STRING, 6); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.CurrentTime); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *AuthToken) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("upload_host", thrift.STRING, 7); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.UploadHost); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *AuthToken) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("host_scheme", thrift.STRING, 8); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.HostScheme); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *AuthToken) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("AuthToken(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PromptInfo struct {
 | |
| 	// Text prompt
 | |
| 	Prompt *string `thrift:"Prompt,1,optional" form:"prompt" json:"prompt,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewPromptInfo() *PromptInfo {
 | |
| 	return &PromptInfo{}
 | |
| }
 | |
| 
 | |
| func (p *PromptInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PromptInfo_Prompt_DEFAULT string
 | |
| 
 | |
| func (p *PromptInfo) GetPrompt() (v string) {
 | |
| 	if !p.IsSetPrompt() {
 | |
| 		return PromptInfo_Prompt_DEFAULT
 | |
| 	}
 | |
| 	return *p.Prompt
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PromptInfo = map[int16]string{
 | |
| 	1: "Prompt",
 | |
| }
 | |
| 
 | |
| func (p *PromptInfo) IsSetPrompt() bool {
 | |
| 	return p.Prompt != nil
 | |
| }
 | |
| 
 | |
| func (p *PromptInfo) 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.STRING {
 | |
| 				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_PromptInfo[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 *PromptInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Prompt = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PromptInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("PromptInfo"); 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 *PromptInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPrompt() {
 | |
| 		if err = oprot.WriteFieldBegin("Prompt", thrift.STRING, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Prompt); 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 *PromptInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PromptInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type ModelInfo struct {
 | |
| 	// Model ID
 | |
| 	ModelId *int64 `thrift:"ModelId,1,optional" form:"model_id" json:"model_id,string,omitempty"`
 | |
| 	// Temperature, model output randomness, the larger the value, the more random, the smaller the more conservative (0-1]
 | |
| 	Temperature *float64 `thrift:"Temperature,2,optional" form:"temperature" json:"temperature,omitempty"`
 | |
| 	// Maximum Token Reply
 | |
| 	MaxTokens *int32 `thrift:"MaxTokens,3,optional" form:"max_tokens" json:"max_tokens,omitempty"`
 | |
| 	// Another model's output randomness, the larger the value, the more random [0, 1]
 | |
| 	TopP *float64 `thrift:"TopP,4,optional" form:"top_p" json:"top_p,omitempty"`
 | |
| 	// Frequency penalty, adjust the frequency of words in the generated content, the fewer positive words are [-1.0, 1.0]
 | |
| 	FrequencyPenalty *float64 `thrift:"FrequencyPenalty,5,optional" form:"frequency_penalty" json:"frequency_penalty,omitempty"`
 | |
| 	// There is a penalty, adjust the frequency of new words in the generated content, avoid repeating words with positive values, and use new words [-1.0, 1.0]
 | |
| 	PresencePenalty *float64 `thrift:"PresencePenalty,6,optional" form:"presence_penalty" json:"presence_penalty,omitempty"`
 | |
| 	// contextual policy
 | |
| 	ShortMemoryPolicy *ShortMemoryPolicy `thrift:"ShortMemoryPolicy,7,optional" form:"short_memory_policy" json:"short_memory_policy,omitempty"`
 | |
| 	// When generating, sample the size of the candidate set
 | |
| 	TopK *int32 `thrift:"TopK,8,optional" form:"top_k" json:"top_k,omitempty"`
 | |
| 	// model reply content format
 | |
| 	ResponseFormat *ModelResponseFormat `thrift:"ResponseFormat,9,optional" form:"response_format" json:"response_format,omitempty"`
 | |
| 	// User-selected model style
 | |
| 	ModelStyle *ModelStyle `thrift:"ModelStyle,10,optional" form:"model_style" json:"model_style,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewModelInfo() *ModelInfo {
 | |
| 	return &ModelInfo{}
 | |
| }
 | |
| 
 | |
| func (p *ModelInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var ModelInfo_ModelId_DEFAULT int64
 | |
| 
 | |
| func (p *ModelInfo) GetModelId() (v int64) {
 | |
| 	if !p.IsSetModelId() {
 | |
| 		return ModelInfo_ModelId_DEFAULT
 | |
| 	}
 | |
| 	return *p.ModelId
 | |
| }
 | |
| 
 | |
| var ModelInfo_Temperature_DEFAULT float64
 | |
| 
 | |
| func (p *ModelInfo) GetTemperature() (v float64) {
 | |
| 	if !p.IsSetTemperature() {
 | |
| 		return ModelInfo_Temperature_DEFAULT
 | |
| 	}
 | |
| 	return *p.Temperature
 | |
| }
 | |
| 
 | |
| var ModelInfo_MaxTokens_DEFAULT int32
 | |
| 
 | |
| func (p *ModelInfo) GetMaxTokens() (v int32) {
 | |
| 	if !p.IsSetMaxTokens() {
 | |
| 		return ModelInfo_MaxTokens_DEFAULT
 | |
| 	}
 | |
| 	return *p.MaxTokens
 | |
| }
 | |
| 
 | |
| var ModelInfo_TopP_DEFAULT float64
 | |
| 
 | |
| func (p *ModelInfo) GetTopP() (v float64) {
 | |
| 	if !p.IsSetTopP() {
 | |
| 		return ModelInfo_TopP_DEFAULT
 | |
| 	}
 | |
| 	return *p.TopP
 | |
| }
 | |
| 
 | |
| var ModelInfo_FrequencyPenalty_DEFAULT float64
 | |
| 
 | |
| func (p *ModelInfo) GetFrequencyPenalty() (v float64) {
 | |
| 	if !p.IsSetFrequencyPenalty() {
 | |
| 		return ModelInfo_FrequencyPenalty_DEFAULT
 | |
| 	}
 | |
| 	return *p.FrequencyPenalty
 | |
| }
 | |
| 
 | |
| var ModelInfo_PresencePenalty_DEFAULT float64
 | |
| 
 | |
| func (p *ModelInfo) GetPresencePenalty() (v float64) {
 | |
| 	if !p.IsSetPresencePenalty() {
 | |
| 		return ModelInfo_PresencePenalty_DEFAULT
 | |
| 	}
 | |
| 	return *p.PresencePenalty
 | |
| }
 | |
| 
 | |
| var ModelInfo_ShortMemoryPolicy_DEFAULT *ShortMemoryPolicy
 | |
| 
 | |
| func (p *ModelInfo) GetShortMemoryPolicy() (v *ShortMemoryPolicy) {
 | |
| 	if !p.IsSetShortMemoryPolicy() {
 | |
| 		return ModelInfo_ShortMemoryPolicy_DEFAULT
 | |
| 	}
 | |
| 	return p.ShortMemoryPolicy
 | |
| }
 | |
| 
 | |
| var ModelInfo_TopK_DEFAULT int32
 | |
| 
 | |
| func (p *ModelInfo) GetTopK() (v int32) {
 | |
| 	if !p.IsSetTopK() {
 | |
| 		return ModelInfo_TopK_DEFAULT
 | |
| 	}
 | |
| 	return *p.TopK
 | |
| }
 | |
| 
 | |
| var ModelInfo_ResponseFormat_DEFAULT ModelResponseFormat
 | |
| 
 | |
| func (p *ModelInfo) GetResponseFormat() (v ModelResponseFormat) {
 | |
| 	if !p.IsSetResponseFormat() {
 | |
| 		return ModelInfo_ResponseFormat_DEFAULT
 | |
| 	}
 | |
| 	return *p.ResponseFormat
 | |
| }
 | |
| 
 | |
| var ModelInfo_ModelStyle_DEFAULT ModelStyle
 | |
| 
 | |
| func (p *ModelInfo) GetModelStyle() (v ModelStyle) {
 | |
| 	if !p.IsSetModelStyle() {
 | |
| 		return ModelInfo_ModelStyle_DEFAULT
 | |
| 	}
 | |
| 	return *p.ModelStyle
 | |
| }
 | |
| 
 | |
| var fieldIDToName_ModelInfo = map[int16]string{
 | |
| 	1:  "ModelId",
 | |
| 	2:  "Temperature",
 | |
| 	3:  "MaxTokens",
 | |
| 	4:  "TopP",
 | |
| 	5:  "FrequencyPenalty",
 | |
| 	6:  "PresencePenalty",
 | |
| 	7:  "ShortMemoryPolicy",
 | |
| 	8:  "TopK",
 | |
| 	9:  "ResponseFormat",
 | |
| 	10: "ModelStyle",
 | |
| }
 | |
| 
 | |
| func (p *ModelInfo) IsSetModelId() bool {
 | |
| 	return p.ModelId != nil
 | |
| }
 | |
| 
 | |
| func (p *ModelInfo) IsSetTemperature() bool {
 | |
| 	return p.Temperature != nil
 | |
| }
 | |
| 
 | |
| func (p *ModelInfo) IsSetMaxTokens() bool {
 | |
| 	return p.MaxTokens != nil
 | |
| }
 | |
| 
 | |
| func (p *ModelInfo) IsSetTopP() bool {
 | |
| 	return p.TopP != nil
 | |
| }
 | |
| 
 | |
| func (p *ModelInfo) IsSetFrequencyPenalty() bool {
 | |
| 	return p.FrequencyPenalty != nil
 | |
| }
 | |
| 
 | |
| func (p *ModelInfo) IsSetPresencePenalty() bool {
 | |
| 	return p.PresencePenalty != nil
 | |
| }
 | |
| 
 | |
| func (p *ModelInfo) IsSetShortMemoryPolicy() bool {
 | |
| 	return p.ShortMemoryPolicy != nil
 | |
| }
 | |
| 
 | |
| func (p *ModelInfo) IsSetTopK() bool {
 | |
| 	return p.TopK != nil
 | |
| }
 | |
| 
 | |
| func (p *ModelInfo) IsSetResponseFormat() bool {
 | |
| 	return p.ResponseFormat != nil
 | |
| }
 | |
| 
 | |
| func (p *ModelInfo) IsSetModelStyle() bool {
 | |
| 	return p.ModelStyle != nil
 | |
| }
 | |
| 
 | |
| func (p *ModelInfo) 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.DOUBLE {
 | |
| 				if err = p.ReadField2(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.DOUBLE {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.DOUBLE {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.DOUBLE {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField7(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 8:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField8(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 9:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField9(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 10:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField10(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_ModelInfo[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 *ModelInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ModelId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ModelInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *float64
 | |
| 	if v, err := iprot.ReadDouble(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Temperature = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ModelInfo) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.MaxTokens = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ModelInfo) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *float64
 | |
| 	if v, err := iprot.ReadDouble(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TopP = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ModelInfo) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *float64
 | |
| 	if v, err := iprot.ReadDouble(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.FrequencyPenalty = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ModelInfo) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *float64
 | |
| 	if v, err := iprot.ReadDouble(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PresencePenalty = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ModelInfo) ReadField7(iprot thrift.TProtocol) error {
 | |
| 	_field := NewShortMemoryPolicy()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.ShortMemoryPolicy = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ModelInfo) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TopK = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ModelInfo) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *ModelResponseFormat
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := ModelResponseFormat(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.ResponseFormat = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ModelInfo) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *ModelStyle
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := ModelStyle(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.ModelStyle = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *ModelInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("ModelInfo"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField8(oprot); err != nil {
 | |
| 			fieldId = 8
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField9(oprot); err != nil {
 | |
| 			fieldId = 9
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField10(oprot); err != nil {
 | |
| 			fieldId = 10
 | |
| 			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 *ModelInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetModelId() {
 | |
| 		if err = oprot.WriteFieldBegin("ModelId", thrift.I64, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.ModelId); 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 *ModelInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTemperature() {
 | |
| 		if err = oprot.WriteFieldBegin("Temperature", thrift.DOUBLE, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteDouble(*p.Temperature); 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 *ModelInfo) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetMaxTokens() {
 | |
| 		if err = oprot.WriteFieldBegin("MaxTokens", thrift.I32, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.MaxTokens); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *ModelInfo) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTopP() {
 | |
| 		if err = oprot.WriteFieldBegin("TopP", thrift.DOUBLE, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteDouble(*p.TopP); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *ModelInfo) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetFrequencyPenalty() {
 | |
| 		if err = oprot.WriteFieldBegin("FrequencyPenalty", thrift.DOUBLE, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteDouble(*p.FrequencyPenalty); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *ModelInfo) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPresencePenalty() {
 | |
| 		if err = oprot.WriteFieldBegin("PresencePenalty", thrift.DOUBLE, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteDouble(*p.PresencePenalty); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *ModelInfo) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetShortMemoryPolicy() {
 | |
| 		if err = oprot.WriteFieldBegin("ShortMemoryPolicy", thrift.STRUCT, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.ShortMemoryPolicy.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 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *ModelInfo) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTopK() {
 | |
| 		if err = oprot.WriteFieldBegin("TopK", thrift.I32, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.TopK); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
 | |
| }
 | |
| func (p *ModelInfo) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetResponseFormat() {
 | |
| 		if err = oprot.WriteFieldBegin("ResponseFormat", thrift.I32, 9); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.ResponseFormat)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
 | |
| }
 | |
| func (p *ModelInfo) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetModelStyle() {
 | |
| 		if err = oprot.WriteFieldBegin("ModelStyle", thrift.I32, 10); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.ModelStyle)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *ModelInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("ModelInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type ShortMemoryPolicy struct {
 | |
| 	// The type of transmission allowed by the context
 | |
| 	ContextMode *ContextMode `thrift:"ContextMode,1,optional" form:"context_mode" json:"context_mode,omitempty"`
 | |
| 	// Number of rounds of context band
 | |
| 	HistoryRound *int32 `thrift:"HistoryRound,2,optional" form:"history_round" json:"history_round,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewShortMemoryPolicy() *ShortMemoryPolicy {
 | |
| 	return &ShortMemoryPolicy{}
 | |
| }
 | |
| 
 | |
| func (p *ShortMemoryPolicy) InitDefault() {
 | |
| }
 | |
| 
 | |
| var ShortMemoryPolicy_ContextMode_DEFAULT ContextMode
 | |
| 
 | |
| func (p *ShortMemoryPolicy) GetContextMode() (v ContextMode) {
 | |
| 	if !p.IsSetContextMode() {
 | |
| 		return ShortMemoryPolicy_ContextMode_DEFAULT
 | |
| 	}
 | |
| 	return *p.ContextMode
 | |
| }
 | |
| 
 | |
| var ShortMemoryPolicy_HistoryRound_DEFAULT int32
 | |
| 
 | |
| func (p *ShortMemoryPolicy) GetHistoryRound() (v int32) {
 | |
| 	if !p.IsSetHistoryRound() {
 | |
| 		return ShortMemoryPolicy_HistoryRound_DEFAULT
 | |
| 	}
 | |
| 	return *p.HistoryRound
 | |
| }
 | |
| 
 | |
| var fieldIDToName_ShortMemoryPolicy = map[int16]string{
 | |
| 	1: "ContextMode",
 | |
| 	2: "HistoryRound",
 | |
| }
 | |
| 
 | |
| func (p *ShortMemoryPolicy) IsSetContextMode() bool {
 | |
| 	return p.ContextMode != nil
 | |
| }
 | |
| 
 | |
| func (p *ShortMemoryPolicy) IsSetHistoryRound() bool {
 | |
| 	return p.HistoryRound != nil
 | |
| }
 | |
| 
 | |
| func (p *ShortMemoryPolicy) 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.I32 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				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_ShortMemoryPolicy[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 *ShortMemoryPolicy) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *ContextMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := ContextMode(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.ContextMode = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortMemoryPolicy) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.HistoryRound = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *ShortMemoryPolicy) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("ShortMemoryPolicy"); 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 *ShortMemoryPolicy) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetContextMode() {
 | |
| 		if err = oprot.WriteFieldBegin("ContextMode", thrift.I32, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.ContextMode)); 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 *ShortMemoryPolicy) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetHistoryRound() {
 | |
| 		if err = oprot.WriteFieldBegin("HistoryRound", thrift.I32, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.HistoryRound); 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 *ShortMemoryPolicy) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("ShortMemoryPolicy(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginInfo struct {
 | |
| 	// Plugin ID
 | |
| 	PluginId *int64 `thrift:"PluginId,1,optional" form:"plugin_id" json:"plugin_id,string,omitempty"`
 | |
| 	// api Id
 | |
| 	ApiId *int64 `thrift:"ApiId,2,optional" form:"api_id" json:"api_id,string,omitempty"`
 | |
| 	// API name O project
 | |
| 	ApiName *string `thrift:"ApiName,3,optional" form:"api_name" json:"api_name,omitempty"`
 | |
| 	// api version
 | |
| 	ApiVersionMs *int64 `thrift:"ApiVersionMs,100,optional" form:"api_version_ms" json:"api_version_ms,string,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewPluginInfo() *PluginInfo {
 | |
| 	return &PluginInfo{}
 | |
| }
 | |
| 
 | |
| func (p *PluginInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginInfo_PluginId_DEFAULT int64
 | |
| 
 | |
| func (p *PluginInfo) GetPluginId() (v int64) {
 | |
| 	if !p.IsSetPluginId() {
 | |
| 		return PluginInfo_PluginId_DEFAULT
 | |
| 	}
 | |
| 	return *p.PluginId
 | |
| }
 | |
| 
 | |
| var PluginInfo_ApiId_DEFAULT int64
 | |
| 
 | |
| func (p *PluginInfo) GetApiId() (v int64) {
 | |
| 	if !p.IsSetApiId() {
 | |
| 		return PluginInfo_ApiId_DEFAULT
 | |
| 	}
 | |
| 	return *p.ApiId
 | |
| }
 | |
| 
 | |
| var PluginInfo_ApiName_DEFAULT string
 | |
| 
 | |
| func (p *PluginInfo) GetApiName() (v string) {
 | |
| 	if !p.IsSetApiName() {
 | |
| 		return PluginInfo_ApiName_DEFAULT
 | |
| 	}
 | |
| 	return *p.ApiName
 | |
| }
 | |
| 
 | |
| var PluginInfo_ApiVersionMs_DEFAULT int64
 | |
| 
 | |
| func (p *PluginInfo) GetApiVersionMs() (v int64) {
 | |
| 	if !p.IsSetApiVersionMs() {
 | |
| 		return PluginInfo_ApiVersionMs_DEFAULT
 | |
| 	}
 | |
| 	return *p.ApiVersionMs
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginInfo = map[int16]string{
 | |
| 	1:   "PluginId",
 | |
| 	2:   "ApiId",
 | |
| 	3:   "ApiName",
 | |
| 	100: "ApiVersionMs",
 | |
| }
 | |
| 
 | |
| func (p *PluginInfo) IsSetPluginId() bool {
 | |
| 	return p.PluginId != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginInfo) IsSetApiId() bool {
 | |
| 	return p.ApiId != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginInfo) IsSetApiName() bool {
 | |
| 	return p.ApiName != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginInfo) IsSetApiVersionMs() bool {
 | |
| 	return p.ApiVersionMs != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginInfo) 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.I64 {
 | |
| 				if err = p.ReadField2(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 100:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField100(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_PluginInfo[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 *PluginInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PluginId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *PluginInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ApiId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *PluginInfo) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ApiName = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *PluginInfo) ReadField100(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ApiVersionMs = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("PluginInfo"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField100(oprot); err != nil {
 | |
| 			fieldId = 100
 | |
| 			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 *PluginInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginId() {
 | |
| 		if err = oprot.WriteFieldBegin("PluginId", thrift.I64, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.PluginId); 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 *PluginInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetApiId() {
 | |
| 		if err = oprot.WriteFieldBegin("ApiId", thrift.I64, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.ApiId); 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 *PluginInfo) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetApiName() {
 | |
| 		if err = oprot.WriteFieldBegin("ApiName", thrift.STRING, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ApiName); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *PluginInfo) writeField100(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetApiVersionMs() {
 | |
| 		if err = oprot.WriteFieldBegin("ApiVersionMs", thrift.I64, 100); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.ApiVersionMs); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 100 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 100 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type WorkflowInfo struct {
 | |
| 	// WorkflowId
 | |
| 	WorkflowId *int64 `thrift:"WorkflowId,1,optional" form:"workflow_id" json:"workflow_id,string,omitempty"`
 | |
| 	// Plugin ID
 | |
| 	PluginId *int64 `thrift:"PluginId,2,optional" form:"plugin_id" json:"plugin_id,string,omitempty"`
 | |
| 	// api Id
 | |
| 	ApiId *int64 `thrift:"ApiId,3,optional" form:"api_id" json:"api_id,string,omitempty"`
 | |
| 	// Workflow or imageflow, default to workflow
 | |
| 	FlowMode *WorkflowMode `thrift:"FlowMode,4,optional" form:"flow_mode" json:"flow_mode,omitempty"`
 | |
| 	// workflow name
 | |
| 	WorkflowName *string            `thrift:"WorkflowName,5,optional" form:"workflow_name" json:"workflow_name,omitempty"`
 | |
| 	Desc         *string            `thrift:"Desc,6,optional" form:"desc" form:"desc" json:"desc,omitempty"`
 | |
| 	Parameters   []*PluginParameter `thrift:"Parameters,7,optional" form:"parameters" form:"parameters" json:"parameters,omitempty"`
 | |
| 	PluginIcon   *string            `thrift:"PluginIcon,8,optional" form:"plugin_icon" form:"plugin_icon" json:"plugin_icon,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewWorkflowInfo() *WorkflowInfo {
 | |
| 	return &WorkflowInfo{}
 | |
| }
 | |
| 
 | |
| func (p *WorkflowInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var WorkflowInfo_WorkflowId_DEFAULT int64
 | |
| 
 | |
| func (p *WorkflowInfo) GetWorkflowId() (v int64) {
 | |
| 	if !p.IsSetWorkflowId() {
 | |
| 		return WorkflowInfo_WorkflowId_DEFAULT
 | |
| 	}
 | |
| 	return *p.WorkflowId
 | |
| }
 | |
| 
 | |
| var WorkflowInfo_PluginId_DEFAULT int64
 | |
| 
 | |
| func (p *WorkflowInfo) GetPluginId() (v int64) {
 | |
| 	if !p.IsSetPluginId() {
 | |
| 		return WorkflowInfo_PluginId_DEFAULT
 | |
| 	}
 | |
| 	return *p.PluginId
 | |
| }
 | |
| 
 | |
| var WorkflowInfo_ApiId_DEFAULT int64
 | |
| 
 | |
| func (p *WorkflowInfo) GetApiId() (v int64) {
 | |
| 	if !p.IsSetApiId() {
 | |
| 		return WorkflowInfo_ApiId_DEFAULT
 | |
| 	}
 | |
| 	return *p.ApiId
 | |
| }
 | |
| 
 | |
| var WorkflowInfo_FlowMode_DEFAULT WorkflowMode
 | |
| 
 | |
| func (p *WorkflowInfo) GetFlowMode() (v WorkflowMode) {
 | |
| 	if !p.IsSetFlowMode() {
 | |
| 		return WorkflowInfo_FlowMode_DEFAULT
 | |
| 	}
 | |
| 	return *p.FlowMode
 | |
| }
 | |
| 
 | |
| var WorkflowInfo_WorkflowName_DEFAULT string
 | |
| 
 | |
| func (p *WorkflowInfo) GetWorkflowName() (v string) {
 | |
| 	if !p.IsSetWorkflowName() {
 | |
| 		return WorkflowInfo_WorkflowName_DEFAULT
 | |
| 	}
 | |
| 	return *p.WorkflowName
 | |
| }
 | |
| 
 | |
| var WorkflowInfo_Desc_DEFAULT string
 | |
| 
 | |
| func (p *WorkflowInfo) GetDesc() (v string) {
 | |
| 	if !p.IsSetDesc() {
 | |
| 		return WorkflowInfo_Desc_DEFAULT
 | |
| 	}
 | |
| 	return *p.Desc
 | |
| }
 | |
| 
 | |
| var WorkflowInfo_Parameters_DEFAULT []*PluginParameter
 | |
| 
 | |
| func (p *WorkflowInfo) GetParameters() (v []*PluginParameter) {
 | |
| 	if !p.IsSetParameters() {
 | |
| 		return WorkflowInfo_Parameters_DEFAULT
 | |
| 	}
 | |
| 	return p.Parameters
 | |
| }
 | |
| 
 | |
| var WorkflowInfo_PluginIcon_DEFAULT string
 | |
| 
 | |
| func (p *WorkflowInfo) GetPluginIcon() (v string) {
 | |
| 	if !p.IsSetPluginIcon() {
 | |
| 		return WorkflowInfo_PluginIcon_DEFAULT
 | |
| 	}
 | |
| 	return *p.PluginIcon
 | |
| }
 | |
| 
 | |
| var fieldIDToName_WorkflowInfo = map[int16]string{
 | |
| 	1: "WorkflowId",
 | |
| 	2: "PluginId",
 | |
| 	3: "ApiId",
 | |
| 	4: "FlowMode",
 | |
| 	5: "WorkflowName",
 | |
| 	6: "Desc",
 | |
| 	7: "Parameters",
 | |
| 	8: "PluginIcon",
 | |
| }
 | |
| 
 | |
| func (p *WorkflowInfo) IsSetWorkflowId() bool {
 | |
| 	return p.WorkflowId != nil
 | |
| }
 | |
| 
 | |
| func (p *WorkflowInfo) IsSetPluginId() bool {
 | |
| 	return p.PluginId != nil
 | |
| }
 | |
| 
 | |
| func (p *WorkflowInfo) IsSetApiId() bool {
 | |
| 	return p.ApiId != nil
 | |
| }
 | |
| 
 | |
| func (p *WorkflowInfo) IsSetFlowMode() bool {
 | |
| 	return p.FlowMode != nil
 | |
| }
 | |
| 
 | |
| func (p *WorkflowInfo) IsSetWorkflowName() bool {
 | |
| 	return p.WorkflowName != nil
 | |
| }
 | |
| 
 | |
| func (p *WorkflowInfo) IsSetDesc() bool {
 | |
| 	return p.Desc != nil
 | |
| }
 | |
| 
 | |
| func (p *WorkflowInfo) IsSetParameters() bool {
 | |
| 	return p.Parameters != nil
 | |
| }
 | |
| 
 | |
| func (p *WorkflowInfo) IsSetPluginIcon() bool {
 | |
| 	return p.PluginIcon != nil
 | |
| }
 | |
| 
 | |
| func (p *WorkflowInfo) 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.I64 {
 | |
| 				if err = p.ReadField2(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField7(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 8:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField8(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_WorkflowInfo[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 *WorkflowInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.WorkflowId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *WorkflowInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PluginId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *WorkflowInfo) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ApiId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *WorkflowInfo) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *WorkflowMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := WorkflowMode(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.FlowMode = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *WorkflowInfo) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.WorkflowName = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *WorkflowInfo) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Desc = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *WorkflowInfo) ReadField7(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*PluginParameter, 0, size)
 | |
| 	values := make([]PluginParameter, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Parameters = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *WorkflowInfo) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PluginIcon = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *WorkflowInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("WorkflowInfo"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField8(oprot); err != nil {
 | |
| 			fieldId = 8
 | |
| 			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 *WorkflowInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetWorkflowId() {
 | |
| 		if err = oprot.WriteFieldBegin("WorkflowId", thrift.I64, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.WorkflowId); 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 *WorkflowInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginId() {
 | |
| 		if err = oprot.WriteFieldBegin("PluginId", thrift.I64, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.PluginId); 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 *WorkflowInfo) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetApiId() {
 | |
| 		if err = oprot.WriteFieldBegin("ApiId", thrift.I64, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.ApiId); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *WorkflowInfo) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetFlowMode() {
 | |
| 		if err = oprot.WriteFieldBegin("FlowMode", thrift.I32, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.FlowMode)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *WorkflowInfo) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetWorkflowName() {
 | |
| 		if err = oprot.WriteFieldBegin("WorkflowName", thrift.STRING, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.WorkflowName); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *WorkflowInfo) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDesc() {
 | |
| 		if err = oprot.WriteFieldBegin("Desc", thrift.STRING, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Desc); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *WorkflowInfo) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetParameters() {
 | |
| 		if err = oprot.WriteFieldBegin("Parameters", thrift.LIST, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Parameters)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.Parameters {
 | |
| 			if err := v.Write(oprot); 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 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *WorkflowInfo) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginIcon() {
 | |
| 		if err = oprot.WriteFieldBegin("PluginIcon", thrift.STRING, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.PluginIcon); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *WorkflowInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("WorkflowInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginParameter struct {
 | |
| 	Name          *string            `thrift:"Name,1,optional" form:"name" json:"name,omitempty"`
 | |
| 	Desc          *string            `thrift:"Desc,2,optional" form:"desc" json:"desc,omitempty"`
 | |
| 	Required      *bool              `thrift:"Required,3,optional" form:"required" json:"required,omitempty"`
 | |
| 	Type          *string            `thrift:"Type,4,optional" form:"type" json:"type,omitempty"`
 | |
| 	SubParameters []*PluginParameter `thrift:"SubParameters,5,optional" form:"sub_parameters" json:"sub_parameters,omitempty"`
 | |
| 	// If Type is an array, there is a subtype
 | |
| 	SubType *string `thrift:"SubType,6,optional" form:"sub_type" json:"sub_type,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewPluginParameter() *PluginParameter {
 | |
| 	return &PluginParameter{}
 | |
| }
 | |
| 
 | |
| func (p *PluginParameter) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginParameter_Name_DEFAULT string
 | |
| 
 | |
| func (p *PluginParameter) GetName() (v string) {
 | |
| 	if !p.IsSetName() {
 | |
| 		return PluginParameter_Name_DEFAULT
 | |
| 	}
 | |
| 	return *p.Name
 | |
| }
 | |
| 
 | |
| var PluginParameter_Desc_DEFAULT string
 | |
| 
 | |
| func (p *PluginParameter) GetDesc() (v string) {
 | |
| 	if !p.IsSetDesc() {
 | |
| 		return PluginParameter_Desc_DEFAULT
 | |
| 	}
 | |
| 	return *p.Desc
 | |
| }
 | |
| 
 | |
| var PluginParameter_Required_DEFAULT bool
 | |
| 
 | |
| func (p *PluginParameter) GetRequired() (v bool) {
 | |
| 	if !p.IsSetRequired() {
 | |
| 		return PluginParameter_Required_DEFAULT
 | |
| 	}
 | |
| 	return *p.Required
 | |
| }
 | |
| 
 | |
| var PluginParameter_Type_DEFAULT string
 | |
| 
 | |
| func (p *PluginParameter) GetType() (v string) {
 | |
| 	if !p.IsSetType() {
 | |
| 		return PluginParameter_Type_DEFAULT
 | |
| 	}
 | |
| 	return *p.Type
 | |
| }
 | |
| 
 | |
| var PluginParameter_SubParameters_DEFAULT []*PluginParameter
 | |
| 
 | |
| func (p *PluginParameter) GetSubParameters() (v []*PluginParameter) {
 | |
| 	if !p.IsSetSubParameters() {
 | |
| 		return PluginParameter_SubParameters_DEFAULT
 | |
| 	}
 | |
| 	return p.SubParameters
 | |
| }
 | |
| 
 | |
| var PluginParameter_SubType_DEFAULT string
 | |
| 
 | |
| func (p *PluginParameter) GetSubType() (v string) {
 | |
| 	if !p.IsSetSubType() {
 | |
| 		return PluginParameter_SubType_DEFAULT
 | |
| 	}
 | |
| 	return *p.SubType
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginParameter = map[int16]string{
 | |
| 	1: "Name",
 | |
| 	2: "Desc",
 | |
| 	3: "Required",
 | |
| 	4: "Type",
 | |
| 	5: "SubParameters",
 | |
| 	6: "SubType",
 | |
| }
 | |
| 
 | |
| func (p *PluginParameter) IsSetName() bool {
 | |
| 	return p.Name != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginParameter) IsSetDesc() bool {
 | |
| 	return p.Desc != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginParameter) IsSetRequired() bool {
 | |
| 	return p.Required != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginParameter) IsSetType() bool {
 | |
| 	return p.Type != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginParameter) IsSetSubParameters() bool {
 | |
| 	return p.SubParameters != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginParameter) IsSetSubType() bool {
 | |
| 	return p.SubType != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginParameter) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField6(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_PluginParameter[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 *PluginParameter) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Name = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *PluginParameter) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Desc = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *PluginParameter) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Required = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *PluginParameter) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Type = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *PluginParameter) ReadField5(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*PluginParameter, 0, size)
 | |
| 	values := make([]PluginParameter, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.SubParameters = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *PluginParameter) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.SubType = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginParameter) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("PluginParameter"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			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 *PluginParameter) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetName() {
 | |
| 		if err = oprot.WriteFieldBegin("Name", thrift.STRING, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Name); 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 *PluginParameter) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDesc() {
 | |
| 		if err = oprot.WriteFieldBegin("Desc", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Desc); 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 *PluginParameter) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetRequired() {
 | |
| 		if err = oprot.WriteFieldBegin("Required", thrift.BOOL, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.Required); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *PluginParameter) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetType() {
 | |
| 		if err = oprot.WriteFieldBegin("Type", thrift.STRING, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Type); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *PluginParameter) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSubParameters() {
 | |
| 		if err = oprot.WriteFieldBegin("SubParameters", thrift.LIST, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.SubParameters)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.SubParameters {
 | |
| 			if err := v.Write(oprot); 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 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *PluginParameter) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSubType() {
 | |
| 		if err = oprot.WriteFieldBegin("SubType", thrift.STRING, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.SubType); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginParameter) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginParameter(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type OnboardingInfo struct {
 | |
| 	// Coze Opening Dialog
 | |
| 	Prologue *string `thrift:"Prologue,1,optional" form:"prologue" json:"prologue,omitempty"`
 | |
| 	// suggestion question
 | |
| 	SuggestedQuestions []string `thrift:"SuggestedQuestions,2,optional" form:"suggested_questions" json:"suggested_questions,omitempty"`
 | |
| 	// Opener model
 | |
| 	OnboardingMode *OnboardingMode `thrift:"OnboardingMode,3,optional" form:"onboarding_mode" json:"onboarding_mode,omitempty"`
 | |
| 	// LLM Generation, User-defined Prompt
 | |
| 	CustomizedOnboardingPrompt *string `thrift:"CustomizedOnboardingPrompt,4,optional" form:"customized_onboarding_prompt" json:"customized_onboarding_prompt,omitempty"`
 | |
| 	// The opening statement presets the problem display method, and the default is 0 random display.
 | |
| 	SuggestedQuestionsShowMode *SuggestedQuestionsShowMode `thrift:"SuggestedQuestionsShowMode,5,optional" form:"suggested_questions_show_mode" json:"suggested_questions_show_mode,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewOnboardingInfo() *OnboardingInfo {
 | |
| 	return &OnboardingInfo{}
 | |
| }
 | |
| 
 | |
| func (p *OnboardingInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var OnboardingInfo_Prologue_DEFAULT string
 | |
| 
 | |
| func (p *OnboardingInfo) GetPrologue() (v string) {
 | |
| 	if !p.IsSetPrologue() {
 | |
| 		return OnboardingInfo_Prologue_DEFAULT
 | |
| 	}
 | |
| 	return *p.Prologue
 | |
| }
 | |
| 
 | |
| var OnboardingInfo_SuggestedQuestions_DEFAULT []string
 | |
| 
 | |
| func (p *OnboardingInfo) GetSuggestedQuestions() (v []string) {
 | |
| 	if !p.IsSetSuggestedQuestions() {
 | |
| 		return OnboardingInfo_SuggestedQuestions_DEFAULT
 | |
| 	}
 | |
| 	return p.SuggestedQuestions
 | |
| }
 | |
| 
 | |
| var OnboardingInfo_OnboardingMode_DEFAULT OnboardingMode
 | |
| 
 | |
| func (p *OnboardingInfo) GetOnboardingMode() (v OnboardingMode) {
 | |
| 	if !p.IsSetOnboardingMode() {
 | |
| 		return OnboardingInfo_OnboardingMode_DEFAULT
 | |
| 	}
 | |
| 	return *p.OnboardingMode
 | |
| }
 | |
| 
 | |
| var OnboardingInfo_CustomizedOnboardingPrompt_DEFAULT string
 | |
| 
 | |
| func (p *OnboardingInfo) GetCustomizedOnboardingPrompt() (v string) {
 | |
| 	if !p.IsSetCustomizedOnboardingPrompt() {
 | |
| 		return OnboardingInfo_CustomizedOnboardingPrompt_DEFAULT
 | |
| 	}
 | |
| 	return *p.CustomizedOnboardingPrompt
 | |
| }
 | |
| 
 | |
| var OnboardingInfo_SuggestedQuestionsShowMode_DEFAULT SuggestedQuestionsShowMode
 | |
| 
 | |
| func (p *OnboardingInfo) GetSuggestedQuestionsShowMode() (v SuggestedQuestionsShowMode) {
 | |
| 	if !p.IsSetSuggestedQuestionsShowMode() {
 | |
| 		return OnboardingInfo_SuggestedQuestionsShowMode_DEFAULT
 | |
| 	}
 | |
| 	return *p.SuggestedQuestionsShowMode
 | |
| }
 | |
| 
 | |
| var fieldIDToName_OnboardingInfo = map[int16]string{
 | |
| 	1: "Prologue",
 | |
| 	2: "SuggestedQuestions",
 | |
| 	3: "OnboardingMode",
 | |
| 	4: "CustomizedOnboardingPrompt",
 | |
| 	5: "SuggestedQuestionsShowMode",
 | |
| }
 | |
| 
 | |
| func (p *OnboardingInfo) IsSetPrologue() bool {
 | |
| 	return p.Prologue != nil
 | |
| }
 | |
| 
 | |
| func (p *OnboardingInfo) IsSetSuggestedQuestions() bool {
 | |
| 	return p.SuggestedQuestions != nil
 | |
| }
 | |
| 
 | |
| func (p *OnboardingInfo) IsSetOnboardingMode() bool {
 | |
| 	return p.OnboardingMode != nil
 | |
| }
 | |
| 
 | |
| func (p *OnboardingInfo) IsSetCustomizedOnboardingPrompt() bool {
 | |
| 	return p.CustomizedOnboardingPrompt != nil
 | |
| }
 | |
| 
 | |
| func (p *OnboardingInfo) IsSetSuggestedQuestionsShowMode() bool {
 | |
| 	return p.SuggestedQuestionsShowMode != nil
 | |
| }
 | |
| 
 | |
| func (p *OnboardingInfo) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField5(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_OnboardingInfo[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 *OnboardingInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Prologue = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OnboardingInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := 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
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.SuggestedQuestions = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OnboardingInfo) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *OnboardingMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := OnboardingMode(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.OnboardingMode = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OnboardingInfo) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.CustomizedOnboardingPrompt = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OnboardingInfo) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *SuggestedQuestionsShowMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := SuggestedQuestionsShowMode(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.SuggestedQuestionsShowMode = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *OnboardingInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("OnboardingInfo"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			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 *OnboardingInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPrologue() {
 | |
| 		if err = oprot.WriteFieldBegin("Prologue", thrift.STRING, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Prologue); 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 *OnboardingInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuggestedQuestions() {
 | |
| 		if err = oprot.WriteFieldBegin("SuggestedQuestions", thrift.LIST, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRING, len(p.SuggestedQuestions)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.SuggestedQuestions {
 | |
| 			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 *OnboardingInfo) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetOnboardingMode() {
 | |
| 		if err = oprot.WriteFieldBegin("OnboardingMode", thrift.I32, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.OnboardingMode)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *OnboardingInfo) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCustomizedOnboardingPrompt() {
 | |
| 		if err = oprot.WriteFieldBegin("CustomizedOnboardingPrompt", thrift.STRING, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.CustomizedOnboardingPrompt); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *OnboardingInfo) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuggestedQuestionsShowMode() {
 | |
| 		if err = oprot.WriteFieldBegin("SuggestedQuestionsShowMode", thrift.I32, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.SuggestedQuestionsShowMode)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *OnboardingInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("OnboardingInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| // suggest
 | |
| type SuggestReplyInfo struct {
 | |
| 	// Coze Auto-Suggestion
 | |
| 	SuggestReplyMode *SuggestReplyMode `thrift:"SuggestReplyMode,1,optional" form:"suggest_reply_mode" json:"suggest_reply_mode,omitempty"`
 | |
| 	// user-defined suggestion questions
 | |
| 	CustomizedSuggestPrompt *string `thrift:"CustomizedSuggestPrompt,2,optional" form:"customized_suggest_prompt" json:"customized_suggest_prompt,omitempty"`
 | |
| 	// The name of the ChainTask that runs the Prompt
 | |
| 	ChainTaskName *string `thrift:"ChainTaskName,3,optional" form:"chain_task_name" json:"chain_task_name,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewSuggestReplyInfo() *SuggestReplyInfo {
 | |
| 	return &SuggestReplyInfo{}
 | |
| }
 | |
| 
 | |
| func (p *SuggestReplyInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var SuggestReplyInfo_SuggestReplyMode_DEFAULT SuggestReplyMode
 | |
| 
 | |
| func (p *SuggestReplyInfo) GetSuggestReplyMode() (v SuggestReplyMode) {
 | |
| 	if !p.IsSetSuggestReplyMode() {
 | |
| 		return SuggestReplyInfo_SuggestReplyMode_DEFAULT
 | |
| 	}
 | |
| 	return *p.SuggestReplyMode
 | |
| }
 | |
| 
 | |
| var SuggestReplyInfo_CustomizedSuggestPrompt_DEFAULT string
 | |
| 
 | |
| func (p *SuggestReplyInfo) GetCustomizedSuggestPrompt() (v string) {
 | |
| 	if !p.IsSetCustomizedSuggestPrompt() {
 | |
| 		return SuggestReplyInfo_CustomizedSuggestPrompt_DEFAULT
 | |
| 	}
 | |
| 	return *p.CustomizedSuggestPrompt
 | |
| }
 | |
| 
 | |
| var SuggestReplyInfo_ChainTaskName_DEFAULT string
 | |
| 
 | |
| func (p *SuggestReplyInfo) GetChainTaskName() (v string) {
 | |
| 	if !p.IsSetChainTaskName() {
 | |
| 		return SuggestReplyInfo_ChainTaskName_DEFAULT
 | |
| 	}
 | |
| 	return *p.ChainTaskName
 | |
| }
 | |
| 
 | |
| var fieldIDToName_SuggestReplyInfo = map[int16]string{
 | |
| 	1: "SuggestReplyMode",
 | |
| 	2: "CustomizedSuggestPrompt",
 | |
| 	3: "ChainTaskName",
 | |
| }
 | |
| 
 | |
| func (p *SuggestReplyInfo) IsSetSuggestReplyMode() bool {
 | |
| 	return p.SuggestReplyMode != nil
 | |
| }
 | |
| 
 | |
| func (p *SuggestReplyInfo) IsSetCustomizedSuggestPrompt() bool {
 | |
| 	return p.CustomizedSuggestPrompt != nil
 | |
| }
 | |
| 
 | |
| func (p *SuggestReplyInfo) IsSetChainTaskName() bool {
 | |
| 	return p.ChainTaskName != nil
 | |
| }
 | |
| 
 | |
| func (p *SuggestReplyInfo) 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.I32 {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(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_SuggestReplyInfo[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 *SuggestReplyInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *SuggestReplyMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := SuggestReplyMode(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.SuggestReplyMode = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *SuggestReplyInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.CustomizedSuggestPrompt = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *SuggestReplyInfo) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ChainTaskName = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *SuggestReplyInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("SuggestReplyInfo"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			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 *SuggestReplyInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuggestReplyMode() {
 | |
| 		if err = oprot.WriteFieldBegin("SuggestReplyMode", thrift.I32, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.SuggestReplyMode)); 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 *SuggestReplyInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCustomizedSuggestPrompt() {
 | |
| 		if err = oprot.WriteFieldBegin("CustomizedSuggestPrompt", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.CustomizedSuggestPrompt); 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 *SuggestReplyInfo) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetChainTaskName() {
 | |
| 		if err = oprot.WriteFieldBegin("ChainTaskName", thrift.STRING, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ChainTaskName); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *SuggestReplyInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("SuggestReplyInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| // tts Voices
 | |
| type VoicesInfo struct {
 | |
| 	// Coze Voices
 | |
| 	Muted *bool `thrift:"Muted,1,optional" form:"muted" json:"muted,omitempty"`
 | |
| 	// Multi-voice voice configuration
 | |
| 	I18nLangVoice map[string]int64 `thrift:"I18nLangVoice,2,optional" form:"i18n_lang_voice" json:"i18n_lang_voice,omitempty"`
 | |
| 	// Multi-voice tone configuration, string type
 | |
| 	I18nLangVoiceStr map[string]string `thrift:"I18nLangVoiceStr,7,optional" form:"i18n_lang_voice_str" json:"i18n_lang_voice_str,omitempty"`
 | |
| 	// Whether to play automatically
 | |
| 	Autoplay *bool `thrift:"Autoplay,3,optional" form:"autoplay" json:"autoplay,omitempty"`
 | |
| 	// autoplay timbre
 | |
| 	AutoplayVoice map[string]int64 `thrift:"AutoplayVoice,4,optional" form:"autoplay_voice" json:"autoplay_voice,omitempty"`
 | |
| 	// Whether to turn off voice calls, true: turn off false: turn on, default is false
 | |
| 	CloseVoiceCall *bool `thrift:"CloseVoiceCall,5,optional" form:"voice_call" json:"voice_call,omitempty"`
 | |
| 	// Default user input type
 | |
| 	DefaultUserInputType *DefaultUserInputType `thrift:"DefaultUserInputType,6,optional" form:"default_user_input_type" json:"default_user_input_type,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewVoicesInfo() *VoicesInfo {
 | |
| 	return &VoicesInfo{}
 | |
| }
 | |
| 
 | |
| func (p *VoicesInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var VoicesInfo_Muted_DEFAULT bool
 | |
| 
 | |
| func (p *VoicesInfo) GetMuted() (v bool) {
 | |
| 	if !p.IsSetMuted() {
 | |
| 		return VoicesInfo_Muted_DEFAULT
 | |
| 	}
 | |
| 	return *p.Muted
 | |
| }
 | |
| 
 | |
| var VoicesInfo_I18nLangVoice_DEFAULT map[string]int64
 | |
| 
 | |
| func (p *VoicesInfo) GetI18nLangVoice() (v map[string]int64) {
 | |
| 	if !p.IsSetI18nLangVoice() {
 | |
| 		return VoicesInfo_I18nLangVoice_DEFAULT
 | |
| 	}
 | |
| 	return p.I18nLangVoice
 | |
| }
 | |
| 
 | |
| var VoicesInfo_I18nLangVoiceStr_DEFAULT map[string]string
 | |
| 
 | |
| func (p *VoicesInfo) GetI18nLangVoiceStr() (v map[string]string) {
 | |
| 	if !p.IsSetI18nLangVoiceStr() {
 | |
| 		return VoicesInfo_I18nLangVoiceStr_DEFAULT
 | |
| 	}
 | |
| 	return p.I18nLangVoiceStr
 | |
| }
 | |
| 
 | |
| var VoicesInfo_Autoplay_DEFAULT bool
 | |
| 
 | |
| func (p *VoicesInfo) GetAutoplay() (v bool) {
 | |
| 	if !p.IsSetAutoplay() {
 | |
| 		return VoicesInfo_Autoplay_DEFAULT
 | |
| 	}
 | |
| 	return *p.Autoplay
 | |
| }
 | |
| 
 | |
| var VoicesInfo_AutoplayVoice_DEFAULT map[string]int64
 | |
| 
 | |
| func (p *VoicesInfo) GetAutoplayVoice() (v map[string]int64) {
 | |
| 	if !p.IsSetAutoplayVoice() {
 | |
| 		return VoicesInfo_AutoplayVoice_DEFAULT
 | |
| 	}
 | |
| 	return p.AutoplayVoice
 | |
| }
 | |
| 
 | |
| var VoicesInfo_CloseVoiceCall_DEFAULT bool
 | |
| 
 | |
| func (p *VoicesInfo) GetCloseVoiceCall() (v bool) {
 | |
| 	if !p.IsSetCloseVoiceCall() {
 | |
| 		return VoicesInfo_CloseVoiceCall_DEFAULT
 | |
| 	}
 | |
| 	return *p.CloseVoiceCall
 | |
| }
 | |
| 
 | |
| var VoicesInfo_DefaultUserInputType_DEFAULT DefaultUserInputType
 | |
| 
 | |
| func (p *VoicesInfo) GetDefaultUserInputType() (v DefaultUserInputType) {
 | |
| 	if !p.IsSetDefaultUserInputType() {
 | |
| 		return VoicesInfo_DefaultUserInputType_DEFAULT
 | |
| 	}
 | |
| 	return *p.DefaultUserInputType
 | |
| }
 | |
| 
 | |
| var fieldIDToName_VoicesInfo = map[int16]string{
 | |
| 	1: "Muted",
 | |
| 	2: "I18nLangVoice",
 | |
| 	7: "I18nLangVoiceStr",
 | |
| 	3: "Autoplay",
 | |
| 	4: "AutoplayVoice",
 | |
| 	5: "CloseVoiceCall",
 | |
| 	6: "DefaultUserInputType",
 | |
| }
 | |
| 
 | |
| func (p *VoicesInfo) IsSetMuted() bool {
 | |
| 	return p.Muted != nil
 | |
| }
 | |
| 
 | |
| func (p *VoicesInfo) IsSetI18nLangVoice() bool {
 | |
| 	return p.I18nLangVoice != nil
 | |
| }
 | |
| 
 | |
| func (p *VoicesInfo) IsSetI18nLangVoiceStr() bool {
 | |
| 	return p.I18nLangVoiceStr != nil
 | |
| }
 | |
| 
 | |
| func (p *VoicesInfo) IsSetAutoplay() bool {
 | |
| 	return p.Autoplay != nil
 | |
| }
 | |
| 
 | |
| func (p *VoicesInfo) IsSetAutoplayVoice() bool {
 | |
| 	return p.AutoplayVoice != nil
 | |
| }
 | |
| 
 | |
| func (p *VoicesInfo) IsSetCloseVoiceCall() bool {
 | |
| 	return p.CloseVoiceCall != nil
 | |
| }
 | |
| 
 | |
| func (p *VoicesInfo) IsSetDefaultUserInputType() bool {
 | |
| 	return p.DefaultUserInputType != nil
 | |
| }
 | |
| 
 | |
| func (p *VoicesInfo) 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.BOOL {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.MAP {
 | |
| 				if err = p.ReadField2(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.MAP {
 | |
| 				if err = p.ReadField7(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.MAP {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField6(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_VoicesInfo[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 *VoicesInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Muted = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *VoicesInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 	_, _, size, err := iprot.ReadMapBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make(map[string]int64, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		var _key string
 | |
| 		if v, err := iprot.ReadString(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_key = v
 | |
| 		}
 | |
| 
 | |
| 		var _val int64
 | |
| 		if v, err := iprot.ReadI64(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_val = v
 | |
| 		}
 | |
| 
 | |
| 		_field[_key] = _val
 | |
| 	}
 | |
| 	if err := iprot.ReadMapEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.I18nLangVoice = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *VoicesInfo) ReadField7(iprot thrift.TProtocol) error {
 | |
| 	_, _, size, err := iprot.ReadMapBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make(map[string]string, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		var _key string
 | |
| 		if v, err := iprot.ReadString(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_key = v
 | |
| 		}
 | |
| 
 | |
| 		var _val string
 | |
| 		if v, err := iprot.ReadString(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_val = v
 | |
| 		}
 | |
| 
 | |
| 		_field[_key] = _val
 | |
| 	}
 | |
| 	if err := iprot.ReadMapEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.I18nLangVoiceStr = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *VoicesInfo) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Autoplay = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *VoicesInfo) ReadField4(iprot thrift.TProtocol) error {
 | |
| 	_, _, size, err := iprot.ReadMapBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make(map[string]int64, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		var _key string
 | |
| 		if v, err := iprot.ReadString(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_key = v
 | |
| 		}
 | |
| 
 | |
| 		var _val int64
 | |
| 		if v, err := iprot.ReadI64(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_val = v
 | |
| 		}
 | |
| 
 | |
| 		_field[_key] = _val
 | |
| 	}
 | |
| 	if err := iprot.ReadMapEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.AutoplayVoice = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *VoicesInfo) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.CloseVoiceCall = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *VoicesInfo) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *DefaultUserInputType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := DefaultUserInputType(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.DefaultUserInputType = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *VoicesInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("VoicesInfo"); 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 = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			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 *VoicesInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetMuted() {
 | |
| 		if err = oprot.WriteFieldBegin("Muted", thrift.BOOL, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.Muted); 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 *VoicesInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetI18nLangVoice() {
 | |
| 		if err = oprot.WriteFieldBegin("I18nLangVoice", thrift.MAP, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteMapBegin(thrift.STRING, thrift.I64, len(p.I18nLangVoice)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for k, v := range p.I18nLangVoice {
 | |
| 			if err := oprot.WriteString(k); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 			if err := oprot.WriteI64(v); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 		}
 | |
| 		if err := oprot.WriteMapEnd(); 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 *VoicesInfo) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetI18nLangVoiceStr() {
 | |
| 		if err = oprot.WriteFieldBegin("I18nLangVoiceStr", thrift.MAP, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.I18nLangVoiceStr)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for k, v := range p.I18nLangVoiceStr {
 | |
| 			if err := oprot.WriteString(k); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 			if err := oprot.WriteString(v); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 		}
 | |
| 		if err := oprot.WriteMapEnd(); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *VoicesInfo) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAutoplay() {
 | |
| 		if err = oprot.WriteFieldBegin("Autoplay", thrift.BOOL, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.Autoplay); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *VoicesInfo) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAutoplayVoice() {
 | |
| 		if err = oprot.WriteFieldBegin("AutoplayVoice", thrift.MAP, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteMapBegin(thrift.STRING, thrift.I64, len(p.AutoplayVoice)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for k, v := range p.AutoplayVoice {
 | |
| 			if err := oprot.WriteString(k); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 			if err := oprot.WriteI64(v); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 		}
 | |
| 		if err := oprot.WriteMapEnd(); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *VoicesInfo) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCloseVoiceCall() {
 | |
| 		if err = oprot.WriteFieldBegin("CloseVoiceCall", thrift.BOOL, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.CloseVoiceCall); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *VoicesInfo) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDefaultUserInputType() {
 | |
| 		if err = oprot.WriteFieldBegin("DefaultUserInputType", thrift.I32, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.DefaultUserInputType)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *VoicesInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("VoicesInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type AnswerActionTriggerRule struct {
 | |
| 	Type           AnswerActionTriggerType `thrift:"Type,1" form:"type" json:"type"`
 | |
| 	NeedPreloading bool                    `thrift:"NeedPreloading,2" form:"need_preloading" json:"need_preloading"`
 | |
| 	// According to AnswerActionTriggerType
 | |
| 	TriggerData map[string]string `thrift:"TriggerData,3" form:"trigger_data" json:"trigger_data"`
 | |
| }
 | |
| 
 | |
| func NewAnswerActionTriggerRule() *AnswerActionTriggerRule {
 | |
| 	return &AnswerActionTriggerRule{}
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionTriggerRule) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionTriggerRule) GetType() (v AnswerActionTriggerType) {
 | |
| 	return p.Type
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionTriggerRule) GetNeedPreloading() (v bool) {
 | |
| 	return p.NeedPreloading
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionTriggerRule) GetTriggerData() (v map[string]string) {
 | |
| 	return p.TriggerData
 | |
| }
 | |
| 
 | |
| var fieldIDToName_AnswerActionTriggerRule = map[int16]string{
 | |
| 	1: "Type",
 | |
| 	2: "NeedPreloading",
 | |
| 	3: "TriggerData",
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionTriggerRule) 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.I32 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField2(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.MAP {
 | |
| 				if err = p.ReadField3(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_AnswerActionTriggerRule[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 *AnswerActionTriggerRule) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field AnswerActionTriggerType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = AnswerActionTriggerType(v)
 | |
| 	}
 | |
| 	p.Type = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AnswerActionTriggerRule) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.NeedPreloading = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AnswerActionTriggerRule) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_, _, size, err := iprot.ReadMapBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make(map[string]string, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		var _key string
 | |
| 		if v, err := iprot.ReadString(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_key = v
 | |
| 		}
 | |
| 
 | |
| 		var _val string
 | |
| 		if v, err := iprot.ReadString(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_val = v
 | |
| 		}
 | |
| 
 | |
| 		_field[_key] = _val
 | |
| 	}
 | |
| 	if err := iprot.ReadMapEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.TriggerData = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionTriggerRule) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("AnswerActionTriggerRule"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			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 *AnswerActionTriggerRule) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Type", thrift.I32, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.Type)); 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 *AnswerActionTriggerRule) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("NeedPreloading", thrift.BOOL, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(p.NeedPreloading); 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 *AnswerActionTriggerRule) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("TriggerData", thrift.MAP, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.TriggerData)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for k, v := range p.TriggerData {
 | |
| 		if err := oprot.WriteString(k); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err := oprot.WriteString(v); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 	}
 | |
| 	if err := oprot.WriteMapEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionTriggerRule) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("AnswerActionTriggerRule(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type ActionIcon struct {
 | |
| 	// Customized button type does not need to be passed
 | |
| 	Type string `thrift:"Type,1" form:"type" json:"type"`
 | |
| 	// default state
 | |
| 	DefaultUrl string `thrift:"DefaultUrl,2" form:"default_url" json:"default_url"`
 | |
| 	// The state of pressing the button
 | |
| 	ActiveUrl string `thrift:"ActiveUrl,3" form:"active_url" json:"active_url"`
 | |
| 	// default state
 | |
| 	DefaultUri string `thrift:"DefaultUri,4" form:"default_uri" json:"default_uri"`
 | |
| 	// The state of pressing the button
 | |
| 	ActiveUri string `thrift:"ActiveUri,5" form:"active_uri" json:"active_uri"`
 | |
| }
 | |
| 
 | |
| func NewActionIcon() *ActionIcon {
 | |
| 	return &ActionIcon{}
 | |
| }
 | |
| 
 | |
| func (p *ActionIcon) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *ActionIcon) GetType() (v string) {
 | |
| 	return p.Type
 | |
| }
 | |
| 
 | |
| func (p *ActionIcon) GetDefaultUrl() (v string) {
 | |
| 	return p.DefaultUrl
 | |
| }
 | |
| 
 | |
| func (p *ActionIcon) GetActiveUrl() (v string) {
 | |
| 	return p.ActiveUrl
 | |
| }
 | |
| 
 | |
| func (p *ActionIcon) GetDefaultUri() (v string) {
 | |
| 	return p.DefaultUri
 | |
| }
 | |
| 
 | |
| func (p *ActionIcon) GetActiveUri() (v string) {
 | |
| 	return p.ActiveUri
 | |
| }
 | |
| 
 | |
| var fieldIDToName_ActionIcon = map[int16]string{
 | |
| 	1: "Type",
 | |
| 	2: "DefaultUrl",
 | |
| 	3: "ActiveUrl",
 | |
| 	4: "DefaultUri",
 | |
| 	5: "ActiveUri",
 | |
| }
 | |
| 
 | |
| func (p *ActionIcon) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField5(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_ActionIcon[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 *ActionIcon) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Type = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ActionIcon) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.DefaultUrl = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ActionIcon) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ActiveUrl = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ActionIcon) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.DefaultUri = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ActionIcon) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ActiveUri = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *ActionIcon) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("ActionIcon"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			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 *ActionIcon) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Type", thrift.STRING, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Type); 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 *ActionIcon) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("DefaultUrl", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.DefaultUrl); 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 *ActionIcon) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ActiveUrl", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.ActiveUrl); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *ActionIcon) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("DefaultUri", thrift.STRING, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.DefaultUri); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *ActionIcon) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ActiveUri", thrift.STRING, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.ActiveUri); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *ActionIcon) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("ActionIcon(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type AnswerActionConfig struct {
 | |
| 	// The prefabricated one only needs to pass the key.
 | |
| 	Key string `thrift:"Key,1" form:"key" json:"key"`
 | |
| 	// default
 | |
| 	Name string `thrift:"Name,2" form:"name" json:"name"`
 | |
| 	// Send uri.
 | |
| 	Icon *ActionIcon `thrift:"Icon,3" form:"icon" json:"icon"`
 | |
| 	// Store the name of user i18
 | |
| 	NameI18n map[string]string `thrift:"NameI18n,4" form:"name_i18n" json:"name_i18n"`
 | |
| 	// Direct has no value; WebView contains webview_url and webview_callback_psm keys; SendMessage contains send_message_prompt
 | |
| 	TriggerRule *AnswerActionTriggerRule `thrift:"TriggerRule,5" form:"trigger_rule" json:"trigger_rule"`
 | |
| 	// location
 | |
| 	Position int32 `thrift:"Position,6" form:"position" json:"position"`
 | |
| }
 | |
| 
 | |
| func NewAnswerActionConfig() *AnswerActionConfig {
 | |
| 	return &AnswerActionConfig{}
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionConfig) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionConfig) GetKey() (v string) {
 | |
| 	return p.Key
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionConfig) GetName() (v string) {
 | |
| 	return p.Name
 | |
| }
 | |
| 
 | |
| var AnswerActionConfig_Icon_DEFAULT *ActionIcon
 | |
| 
 | |
| func (p *AnswerActionConfig) GetIcon() (v *ActionIcon) {
 | |
| 	if !p.IsSetIcon() {
 | |
| 		return AnswerActionConfig_Icon_DEFAULT
 | |
| 	}
 | |
| 	return p.Icon
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionConfig) GetNameI18n() (v map[string]string) {
 | |
| 	return p.NameI18n
 | |
| }
 | |
| 
 | |
| var AnswerActionConfig_TriggerRule_DEFAULT *AnswerActionTriggerRule
 | |
| 
 | |
| func (p *AnswerActionConfig) GetTriggerRule() (v *AnswerActionTriggerRule) {
 | |
| 	if !p.IsSetTriggerRule() {
 | |
| 		return AnswerActionConfig_TriggerRule_DEFAULT
 | |
| 	}
 | |
| 	return p.TriggerRule
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionConfig) GetPosition() (v int32) {
 | |
| 	return p.Position
 | |
| }
 | |
| 
 | |
| var fieldIDToName_AnswerActionConfig = map[int16]string{
 | |
| 	1: "Key",
 | |
| 	2: "Name",
 | |
| 	3: "Icon",
 | |
| 	4: "NameI18n",
 | |
| 	5: "TriggerRule",
 | |
| 	6: "Position",
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionConfig) IsSetIcon() bool {
 | |
| 	return p.Icon != nil
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionConfig) IsSetTriggerRule() bool {
 | |
| 	return p.TriggerRule != nil
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionConfig) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.MAP {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField6(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_AnswerActionConfig[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 *AnswerActionConfig) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Key = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AnswerActionConfig) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Name = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AnswerActionConfig) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_field := NewActionIcon()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Icon = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AnswerActionConfig) ReadField4(iprot thrift.TProtocol) error {
 | |
| 	_, _, size, err := iprot.ReadMapBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make(map[string]string, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		var _key string
 | |
| 		if v, err := iprot.ReadString(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_key = v
 | |
| 		}
 | |
| 
 | |
| 		var _val string
 | |
| 		if v, err := iprot.ReadString(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_val = v
 | |
| 		}
 | |
| 
 | |
| 		_field[_key] = _val
 | |
| 	}
 | |
| 	if err := iprot.ReadMapEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.NameI18n = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AnswerActionConfig) ReadField5(iprot thrift.TProtocol) error {
 | |
| 	_field := NewAnswerActionTriggerRule()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.TriggerRule = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AnswerActionConfig) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Position = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionConfig) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("AnswerActionConfig"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			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 *AnswerActionConfig) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Key", thrift.STRING, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Key); 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 *AnswerActionConfig) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Name", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Name); 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 *AnswerActionConfig) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Icon", thrift.STRUCT, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Icon.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 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *AnswerActionConfig) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("NameI18n", thrift.MAP, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.NameI18n)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for k, v := range p.NameI18n {
 | |
| 		if err := oprot.WriteString(k); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err := oprot.WriteString(v); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 	}
 | |
| 	if err := oprot.WriteMapEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *AnswerActionConfig) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("TriggerRule", thrift.STRUCT, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.TriggerRule.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 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *AnswerActionConfig) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Position", thrift.I32, 6); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(p.Position); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *AnswerActionConfig) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("AnswerActionConfig(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type AnswerActions struct {
 | |
| 	AnswerActionsMode   AnswerActionsMode     `thrift:"AnswerActionsMode,1" form:"answer_actions_mode" json:"answer_actions_mode"`
 | |
| 	AnswerActionConfigs []*AnswerActionConfig `thrift:"AnswerActionConfigs,2" form:"answer_action_configs" json:"answer_action_configs"`
 | |
| }
 | |
| 
 | |
| func NewAnswerActions() *AnswerActions {
 | |
| 	return &AnswerActions{}
 | |
| }
 | |
| 
 | |
| func (p *AnswerActions) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *AnswerActions) GetAnswerActionsMode() (v AnswerActionsMode) {
 | |
| 	return p.AnswerActionsMode
 | |
| }
 | |
| 
 | |
| func (p *AnswerActions) GetAnswerActionConfigs() (v []*AnswerActionConfig) {
 | |
| 	return p.AnswerActionConfigs
 | |
| }
 | |
| 
 | |
| var fieldIDToName_AnswerActions = map[int16]string{
 | |
| 	1: "AnswerActionsMode",
 | |
| 	2: "AnswerActionConfigs",
 | |
| }
 | |
| 
 | |
| func (p *AnswerActions) 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.I32 {
 | |
| 				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_AnswerActions[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 *AnswerActions) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field AnswerActionsMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = AnswerActionsMode(v)
 | |
| 	}
 | |
| 	p.AnswerActionsMode = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AnswerActions) ReadField2(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*AnswerActionConfig, 0, size)
 | |
| 	values := make([]AnswerActionConfig, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.AnswerActionConfigs = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *AnswerActions) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("AnswerActions"); 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 *AnswerActions) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("AnswerActionsMode", thrift.I32, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.AnswerActionsMode)); 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 *AnswerActions) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("AnswerActionConfigs", thrift.LIST, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.AnswerActionConfigs)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.AnswerActionConfigs {
 | |
| 		if err := v.Write(oprot); 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 *AnswerActions) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("AnswerActions(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| // bot ext
 | |
| type BotExtInfo struct {
 | |
| 	AnswerActions   *AnswerActions `thrift:"AnswerActions,1,optional" form:"answer_actions" json:"answer_actions,omitempty"`
 | |
| 	CardIds         []int32        `thrift:"CardIds,2,optional" form:"card_ids" json:"card_ids,omitempty"`
 | |
| 	PromptId        *int32         `thrift:"PromptId,3,optional" form:"prompt_id" json:"prompt_id,omitempty"`
 | |
| 	BotTemplateName *string        `thrift:"BotTemplateName,4,optional" form:"bot_template_name" json:"bot_template_name,omitempty"`
 | |
| 	UseUGCVoice     *bool          `thrift:"UseUGCVoice,5,optional" form:"use_ugc_voice" json:"use_ugc_voice,omitempty"`
 | |
| 	AppId           *int32         `thrift:"AppId,6,optional" form:"app_id" json:"app_id,omitempty"`
 | |
| 	// Whether to bind the Mini Program logo
 | |
| 	BindingMp *bool `thrift:"BindingMp,7,optional" form:"binding_mp" json:"binding_mp,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewBotExtInfo() *BotExtInfo {
 | |
| 	return &BotExtInfo{}
 | |
| }
 | |
| 
 | |
| func (p *BotExtInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var BotExtInfo_AnswerActions_DEFAULT *AnswerActions
 | |
| 
 | |
| func (p *BotExtInfo) GetAnswerActions() (v *AnswerActions) {
 | |
| 	if !p.IsSetAnswerActions() {
 | |
| 		return BotExtInfo_AnswerActions_DEFAULT
 | |
| 	}
 | |
| 	return p.AnswerActions
 | |
| }
 | |
| 
 | |
| var BotExtInfo_CardIds_DEFAULT []int32
 | |
| 
 | |
| func (p *BotExtInfo) GetCardIds() (v []int32) {
 | |
| 	if !p.IsSetCardIds() {
 | |
| 		return BotExtInfo_CardIds_DEFAULT
 | |
| 	}
 | |
| 	return p.CardIds
 | |
| }
 | |
| 
 | |
| var BotExtInfo_PromptId_DEFAULT int32
 | |
| 
 | |
| func (p *BotExtInfo) GetPromptId() (v int32) {
 | |
| 	if !p.IsSetPromptId() {
 | |
| 		return BotExtInfo_PromptId_DEFAULT
 | |
| 	}
 | |
| 	return *p.PromptId
 | |
| }
 | |
| 
 | |
| var BotExtInfo_BotTemplateName_DEFAULT string
 | |
| 
 | |
| func (p *BotExtInfo) GetBotTemplateName() (v string) {
 | |
| 	if !p.IsSetBotTemplateName() {
 | |
| 		return BotExtInfo_BotTemplateName_DEFAULT
 | |
| 	}
 | |
| 	return *p.BotTemplateName
 | |
| }
 | |
| 
 | |
| var BotExtInfo_UseUGCVoice_DEFAULT bool
 | |
| 
 | |
| func (p *BotExtInfo) GetUseUGCVoice() (v bool) {
 | |
| 	if !p.IsSetUseUGCVoice() {
 | |
| 		return BotExtInfo_UseUGCVoice_DEFAULT
 | |
| 	}
 | |
| 	return *p.UseUGCVoice
 | |
| }
 | |
| 
 | |
| var BotExtInfo_AppId_DEFAULT int32
 | |
| 
 | |
| func (p *BotExtInfo) GetAppId() (v int32) {
 | |
| 	if !p.IsSetAppId() {
 | |
| 		return BotExtInfo_AppId_DEFAULT
 | |
| 	}
 | |
| 	return *p.AppId
 | |
| }
 | |
| 
 | |
| var BotExtInfo_BindingMp_DEFAULT bool
 | |
| 
 | |
| func (p *BotExtInfo) GetBindingMp() (v bool) {
 | |
| 	if !p.IsSetBindingMp() {
 | |
| 		return BotExtInfo_BindingMp_DEFAULT
 | |
| 	}
 | |
| 	return *p.BindingMp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_BotExtInfo = map[int16]string{
 | |
| 	1: "AnswerActions",
 | |
| 	2: "CardIds",
 | |
| 	3: "PromptId",
 | |
| 	4: "BotTemplateName",
 | |
| 	5: "UseUGCVoice",
 | |
| 	6: "AppId",
 | |
| 	7: "BindingMp",
 | |
| }
 | |
| 
 | |
| func (p *BotExtInfo) IsSetAnswerActions() bool {
 | |
| 	return p.AnswerActions != nil
 | |
| }
 | |
| 
 | |
| func (p *BotExtInfo) IsSetCardIds() bool {
 | |
| 	return p.CardIds != nil
 | |
| }
 | |
| 
 | |
| func (p *BotExtInfo) IsSetPromptId() bool {
 | |
| 	return p.PromptId != nil
 | |
| }
 | |
| 
 | |
| func (p *BotExtInfo) IsSetBotTemplateName() bool {
 | |
| 	return p.BotTemplateName != nil
 | |
| }
 | |
| 
 | |
| func (p *BotExtInfo) IsSetUseUGCVoice() bool {
 | |
| 	return p.UseUGCVoice != nil
 | |
| }
 | |
| 
 | |
| func (p *BotExtInfo) IsSetAppId() bool {
 | |
| 	return p.AppId != nil
 | |
| }
 | |
| 
 | |
| func (p *BotExtInfo) IsSetBindingMp() bool {
 | |
| 	return p.BindingMp != nil
 | |
| }
 | |
| 
 | |
| func (p *BotExtInfo) 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.LIST {
 | |
| 				if err = p.ReadField2(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField7(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_BotExtInfo[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 *BotExtInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewAnswerActions()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.AnswerActions = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotExtInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]int32, 0, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 
 | |
| 		var _elem int32
 | |
| 		if v, err := iprot.ReadI32(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_elem = v
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.CardIds = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotExtInfo) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PromptId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotExtInfo) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.BotTemplateName = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotExtInfo) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.UseUGCVoice = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotExtInfo) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.AppId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotExtInfo) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.BindingMp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *BotExtInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("BotExtInfo"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			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 *BotExtInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAnswerActions() {
 | |
| 		if err = oprot.WriteFieldBegin("AnswerActions", thrift.STRUCT, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.AnswerActions.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 *BotExtInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCardIds() {
 | |
| 		if err = oprot.WriteFieldBegin("CardIds", thrift.LIST, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.I32, len(p.CardIds)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.CardIds {
 | |
| 			if err := oprot.WriteI32(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 *BotExtInfo) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPromptId() {
 | |
| 		if err = oprot.WriteFieldBegin("PromptId", thrift.I32, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.PromptId); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *BotExtInfo) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBotTemplateName() {
 | |
| 		if err = oprot.WriteFieldBegin("BotTemplateName", thrift.STRING, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.BotTemplateName); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *BotExtInfo) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetUseUGCVoice() {
 | |
| 		if err = oprot.WriteFieldBegin("UseUGCVoice", thrift.BOOL, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.UseUGCVoice); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *BotExtInfo) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAppId() {
 | |
| 		if err = oprot.WriteFieldBegin("AppId", thrift.I32, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.AppId); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *BotExtInfo) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBindingMp() {
 | |
| 		if err = oprot.WriteFieldBegin("BindingMp", thrift.BOOL, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.BindingMp); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *BotExtInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("BotExtInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type KnowledgeInfo struct {
 | |
| 	// Knowledge ID
 | |
| 	Id *string `thrift:"Id,1,optional" form:"id" json:"id,omitempty"`
 | |
| 	// Knowledge base name
 | |
| 	Name *string `thrift:"Name,2,optional" form:"name" json:"name,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewKnowledgeInfo() *KnowledgeInfo {
 | |
| 	return &KnowledgeInfo{}
 | |
| }
 | |
| 
 | |
| func (p *KnowledgeInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var KnowledgeInfo_Id_DEFAULT string
 | |
| 
 | |
| func (p *KnowledgeInfo) GetId() (v string) {
 | |
| 	if !p.IsSetId() {
 | |
| 		return KnowledgeInfo_Id_DEFAULT
 | |
| 	}
 | |
| 	return *p.Id
 | |
| }
 | |
| 
 | |
| var KnowledgeInfo_Name_DEFAULT string
 | |
| 
 | |
| func (p *KnowledgeInfo) GetName() (v string) {
 | |
| 	if !p.IsSetName() {
 | |
| 		return KnowledgeInfo_Name_DEFAULT
 | |
| 	}
 | |
| 	return *p.Name
 | |
| }
 | |
| 
 | |
| var fieldIDToName_KnowledgeInfo = map[int16]string{
 | |
| 	1: "Id",
 | |
| 	2: "Name",
 | |
| }
 | |
| 
 | |
| func (p *KnowledgeInfo) IsSetId() bool {
 | |
| 	return p.Id != nil
 | |
| }
 | |
| 
 | |
| func (p *KnowledgeInfo) IsSetName() bool {
 | |
| 	return p.Name != nil
 | |
| }
 | |
| 
 | |
| func (p *KnowledgeInfo) 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.STRING {
 | |
| 				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_KnowledgeInfo[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 *KnowledgeInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Id = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *KnowledgeInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Name = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *KnowledgeInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("KnowledgeInfo"); 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 *KnowledgeInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetId() {
 | |
| 		if err = oprot.WriteFieldBegin("Id", thrift.STRING, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Id); 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 *KnowledgeInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetName() {
 | |
| 		if err = oprot.WriteFieldBegin("Name", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Name); 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 *KnowledgeInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("KnowledgeInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type Knowledge struct {
 | |
| 	// Knowledge Base Information
 | |
| 	KnowledgeInfo []*KnowledgeInfo `thrift:"KnowledgeInfo,1,optional" form:"knowledge_info" json:"knowledge_info,omitempty"`
 | |
| 	// recall maximum data volume
 | |
| 	TopK *int64 `thrift:"TopK,2,optional" form:"top_k" json:"top_k,omitempty"`
 | |
| 	// minimum match
 | |
| 	MinScore *float64 `thrift:"MinScore,3,optional" form:"min_score" json:"min_score,omitempty"`
 | |
| 	// automatic recall
 | |
| 	Auto *bool `thrift:"Auto,4,optional" form:"auto" json:"auto,omitempty"`
 | |
| 	// search strategy
 | |
| 	SearchStrategy *SearchStrategy `thrift:"SearchStrategy,5,optional" form:"search_strategy" json:"search_strategy,omitempty"`
 | |
| 	// Whether to show the source
 | |
| 	ShowSource *bool `thrift:"ShowSource,6,optional" form:"show_source" json:"show_source,omitempty"`
 | |
| 	// No recall reply mode, default 0
 | |
| 	NoRecallReplyMode *KnowledgeNoRecallReplyMode `thrift:"NoRecallReplyMode,7,optional" form:"no_recall_reply_mode" json:"no_recall_reply_mode,omitempty"`
 | |
| 	// Custom prompt for no recall reply, effective when NoRecallReplyMode = 1
 | |
| 	NoRecallReplyCustomizePrompt *string `thrift:"NoRecallReplyCustomizePrompt,8,optional" form:"no_recall_reply_customize_prompt" json:"no_recall_reply_customize_prompt,omitempty"`
 | |
| 	// Source display method, default value 0 card list method
 | |
| 	ShowSourceMode *KnowledgeShowSourceMode `thrift:"ShowSourceMode,9,optional" form:"show_source_mode" json:"show_source_mode,omitempty"`
 | |
| 	// Recall policy, default value is true
 | |
| 	RecallStrategy *RecallStrategy `thrift:"RecallStrategy,10,optional" form:"recall_strategy" json:"recall_strategy,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewKnowledge() *Knowledge {
 | |
| 	return &Knowledge{}
 | |
| }
 | |
| 
 | |
| func (p *Knowledge) InitDefault() {
 | |
| }
 | |
| 
 | |
| var Knowledge_KnowledgeInfo_DEFAULT []*KnowledgeInfo
 | |
| 
 | |
| func (p *Knowledge) GetKnowledgeInfo() (v []*KnowledgeInfo) {
 | |
| 	if !p.IsSetKnowledgeInfo() {
 | |
| 		return Knowledge_KnowledgeInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.KnowledgeInfo
 | |
| }
 | |
| 
 | |
| var Knowledge_TopK_DEFAULT int64
 | |
| 
 | |
| func (p *Knowledge) GetTopK() (v int64) {
 | |
| 	if !p.IsSetTopK() {
 | |
| 		return Knowledge_TopK_DEFAULT
 | |
| 	}
 | |
| 	return *p.TopK
 | |
| }
 | |
| 
 | |
| var Knowledge_MinScore_DEFAULT float64
 | |
| 
 | |
| func (p *Knowledge) GetMinScore() (v float64) {
 | |
| 	if !p.IsSetMinScore() {
 | |
| 		return Knowledge_MinScore_DEFAULT
 | |
| 	}
 | |
| 	return *p.MinScore
 | |
| }
 | |
| 
 | |
| var Knowledge_Auto_DEFAULT bool
 | |
| 
 | |
| func (p *Knowledge) GetAuto() (v bool) {
 | |
| 	if !p.IsSetAuto() {
 | |
| 		return Knowledge_Auto_DEFAULT
 | |
| 	}
 | |
| 	return *p.Auto
 | |
| }
 | |
| 
 | |
| var Knowledge_SearchStrategy_DEFAULT SearchStrategy
 | |
| 
 | |
| func (p *Knowledge) GetSearchStrategy() (v SearchStrategy) {
 | |
| 	if !p.IsSetSearchStrategy() {
 | |
| 		return Knowledge_SearchStrategy_DEFAULT
 | |
| 	}
 | |
| 	return *p.SearchStrategy
 | |
| }
 | |
| 
 | |
| var Knowledge_ShowSource_DEFAULT bool
 | |
| 
 | |
| func (p *Knowledge) GetShowSource() (v bool) {
 | |
| 	if !p.IsSetShowSource() {
 | |
| 		return Knowledge_ShowSource_DEFAULT
 | |
| 	}
 | |
| 	return *p.ShowSource
 | |
| }
 | |
| 
 | |
| var Knowledge_NoRecallReplyMode_DEFAULT KnowledgeNoRecallReplyMode
 | |
| 
 | |
| func (p *Knowledge) GetNoRecallReplyMode() (v KnowledgeNoRecallReplyMode) {
 | |
| 	if !p.IsSetNoRecallReplyMode() {
 | |
| 		return Knowledge_NoRecallReplyMode_DEFAULT
 | |
| 	}
 | |
| 	return *p.NoRecallReplyMode
 | |
| }
 | |
| 
 | |
| var Knowledge_NoRecallReplyCustomizePrompt_DEFAULT string
 | |
| 
 | |
| func (p *Knowledge) GetNoRecallReplyCustomizePrompt() (v string) {
 | |
| 	if !p.IsSetNoRecallReplyCustomizePrompt() {
 | |
| 		return Knowledge_NoRecallReplyCustomizePrompt_DEFAULT
 | |
| 	}
 | |
| 	return *p.NoRecallReplyCustomizePrompt
 | |
| }
 | |
| 
 | |
| var Knowledge_ShowSourceMode_DEFAULT KnowledgeShowSourceMode
 | |
| 
 | |
| func (p *Knowledge) GetShowSourceMode() (v KnowledgeShowSourceMode) {
 | |
| 	if !p.IsSetShowSourceMode() {
 | |
| 		return Knowledge_ShowSourceMode_DEFAULT
 | |
| 	}
 | |
| 	return *p.ShowSourceMode
 | |
| }
 | |
| 
 | |
| var Knowledge_RecallStrategy_DEFAULT *RecallStrategy
 | |
| 
 | |
| func (p *Knowledge) GetRecallStrategy() (v *RecallStrategy) {
 | |
| 	if !p.IsSetRecallStrategy() {
 | |
| 		return Knowledge_RecallStrategy_DEFAULT
 | |
| 	}
 | |
| 	return p.RecallStrategy
 | |
| }
 | |
| 
 | |
| var fieldIDToName_Knowledge = map[int16]string{
 | |
| 	1:  "KnowledgeInfo",
 | |
| 	2:  "TopK",
 | |
| 	3:  "MinScore",
 | |
| 	4:  "Auto",
 | |
| 	5:  "SearchStrategy",
 | |
| 	6:  "ShowSource",
 | |
| 	7:  "NoRecallReplyMode",
 | |
| 	8:  "NoRecallReplyCustomizePrompt",
 | |
| 	9:  "ShowSourceMode",
 | |
| 	10: "RecallStrategy",
 | |
| }
 | |
| 
 | |
| func (p *Knowledge) IsSetKnowledgeInfo() bool {
 | |
| 	return p.KnowledgeInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *Knowledge) IsSetTopK() bool {
 | |
| 	return p.TopK != nil
 | |
| }
 | |
| 
 | |
| func (p *Knowledge) IsSetMinScore() bool {
 | |
| 	return p.MinScore != nil
 | |
| }
 | |
| 
 | |
| func (p *Knowledge) IsSetAuto() bool {
 | |
| 	return p.Auto != nil
 | |
| }
 | |
| 
 | |
| func (p *Knowledge) IsSetSearchStrategy() bool {
 | |
| 	return p.SearchStrategy != nil
 | |
| }
 | |
| 
 | |
| func (p *Knowledge) IsSetShowSource() bool {
 | |
| 	return p.ShowSource != nil
 | |
| }
 | |
| 
 | |
| func (p *Knowledge) IsSetNoRecallReplyMode() bool {
 | |
| 	return p.NoRecallReplyMode != nil
 | |
| }
 | |
| 
 | |
| func (p *Knowledge) IsSetNoRecallReplyCustomizePrompt() bool {
 | |
| 	return p.NoRecallReplyCustomizePrompt != nil
 | |
| }
 | |
| 
 | |
| func (p *Knowledge) IsSetShowSourceMode() bool {
 | |
| 	return p.ShowSourceMode != nil
 | |
| }
 | |
| 
 | |
| func (p *Knowledge) IsSetRecallStrategy() bool {
 | |
| 	return p.RecallStrategy != nil
 | |
| }
 | |
| 
 | |
| func (p *Knowledge) 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.LIST {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField2(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.DOUBLE {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField7(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 8:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField8(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 9:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField9(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 10:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField10(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_Knowledge[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 *Knowledge) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*KnowledgeInfo, 0, size)
 | |
| 	values := make([]KnowledgeInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.KnowledgeInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Knowledge) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TopK = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Knowledge) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *float64
 | |
| 	if v, err := iprot.ReadDouble(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.MinScore = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Knowledge) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Auto = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Knowledge) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *SearchStrategy
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := SearchStrategy(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.SearchStrategy = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Knowledge) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ShowSource = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Knowledge) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *KnowledgeNoRecallReplyMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := KnowledgeNoRecallReplyMode(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.NoRecallReplyMode = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Knowledge) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.NoRecallReplyCustomizePrompt = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Knowledge) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *KnowledgeShowSourceMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := KnowledgeShowSourceMode(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.ShowSourceMode = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Knowledge) ReadField10(iprot thrift.TProtocol) error {
 | |
| 	_field := NewRecallStrategy()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.RecallStrategy = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *Knowledge) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("Knowledge"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField8(oprot); err != nil {
 | |
| 			fieldId = 8
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField9(oprot); err != nil {
 | |
| 			fieldId = 9
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField10(oprot); err != nil {
 | |
| 			fieldId = 10
 | |
| 			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 *Knowledge) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetKnowledgeInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("KnowledgeInfo", thrift.LIST, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.KnowledgeInfo)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.KnowledgeInfo {
 | |
| 			if err := v.Write(oprot); 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 1 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
 | |
| }
 | |
| func (p *Knowledge) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTopK() {
 | |
| 		if err = oprot.WriteFieldBegin("TopK", thrift.I64, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.TopK); 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 *Knowledge) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetMinScore() {
 | |
| 		if err = oprot.WriteFieldBegin("MinScore", thrift.DOUBLE, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteDouble(*p.MinScore); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *Knowledge) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAuto() {
 | |
| 		if err = oprot.WriteFieldBegin("Auto", thrift.BOOL, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.Auto); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *Knowledge) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSearchStrategy() {
 | |
| 		if err = oprot.WriteFieldBegin("SearchStrategy", thrift.I32, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.SearchStrategy)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *Knowledge) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetShowSource() {
 | |
| 		if err = oprot.WriteFieldBegin("ShowSource", thrift.BOOL, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.ShowSource); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *Knowledge) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetNoRecallReplyMode() {
 | |
| 		if err = oprot.WriteFieldBegin("NoRecallReplyMode", thrift.I32, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.NoRecallReplyMode)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *Knowledge) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetNoRecallReplyCustomizePrompt() {
 | |
| 		if err = oprot.WriteFieldBegin("NoRecallReplyCustomizePrompt", thrift.STRING, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.NoRecallReplyCustomizePrompt); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
 | |
| }
 | |
| func (p *Knowledge) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetShowSourceMode() {
 | |
| 		if err = oprot.WriteFieldBegin("ShowSourceMode", thrift.I32, 9); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.ShowSourceMode)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
 | |
| }
 | |
| func (p *Knowledge) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetRecallStrategy() {
 | |
| 		if err = oprot.WriteFieldBegin("RecallStrategy", thrift.STRUCT, 10); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.RecallStrategy.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 10 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *Knowledge) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("Knowledge(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type RecallStrategy struct {
 | |
| 	UseRerank  *bool `thrift:"UseRerank,1,optional" form:"use_rerank" json:"use_rerank,omitempty"`
 | |
| 	UseRewrite *bool `thrift:"UseRewrite,2,optional" form:"use_rewrite" json:"use_rewrite,omitempty"`
 | |
| 	UseNl2sql  *bool `thrift:"UseNl2sql,3,optional" form:"use_nl2sql" json:"use_nl2sql,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewRecallStrategy() *RecallStrategy {
 | |
| 	return &RecallStrategy{}
 | |
| }
 | |
| 
 | |
| func (p *RecallStrategy) InitDefault() {
 | |
| }
 | |
| 
 | |
| var RecallStrategy_UseRerank_DEFAULT bool
 | |
| 
 | |
| func (p *RecallStrategy) GetUseRerank() (v bool) {
 | |
| 	if !p.IsSetUseRerank() {
 | |
| 		return RecallStrategy_UseRerank_DEFAULT
 | |
| 	}
 | |
| 	return *p.UseRerank
 | |
| }
 | |
| 
 | |
| var RecallStrategy_UseRewrite_DEFAULT bool
 | |
| 
 | |
| func (p *RecallStrategy) GetUseRewrite() (v bool) {
 | |
| 	if !p.IsSetUseRewrite() {
 | |
| 		return RecallStrategy_UseRewrite_DEFAULT
 | |
| 	}
 | |
| 	return *p.UseRewrite
 | |
| }
 | |
| 
 | |
| var RecallStrategy_UseNl2sql_DEFAULT bool
 | |
| 
 | |
| func (p *RecallStrategy) GetUseNl2sql() (v bool) {
 | |
| 	if !p.IsSetUseNl2sql() {
 | |
| 		return RecallStrategy_UseNl2sql_DEFAULT
 | |
| 	}
 | |
| 	return *p.UseNl2sql
 | |
| }
 | |
| 
 | |
| var fieldIDToName_RecallStrategy = map[int16]string{
 | |
| 	1: "UseRerank",
 | |
| 	2: "UseRewrite",
 | |
| 	3: "UseNl2sql",
 | |
| }
 | |
| 
 | |
| func (p *RecallStrategy) IsSetUseRerank() bool {
 | |
| 	return p.UseRerank != nil
 | |
| }
 | |
| 
 | |
| func (p *RecallStrategy) IsSetUseRewrite() bool {
 | |
| 	return p.UseRewrite != nil
 | |
| }
 | |
| 
 | |
| func (p *RecallStrategy) IsSetUseNl2sql() bool {
 | |
| 	return p.UseNl2sql != nil
 | |
| }
 | |
| 
 | |
| func (p *RecallStrategy) 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.BOOL {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField2(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField3(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_RecallStrategy[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 *RecallStrategy) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.UseRerank = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RecallStrategy) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.UseRewrite = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RecallStrategy) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.UseNl2sql = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *RecallStrategy) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("RecallStrategy"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			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 *RecallStrategy) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetUseRerank() {
 | |
| 		if err = oprot.WriteFieldBegin("UseRerank", thrift.BOOL, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.UseRerank); 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 *RecallStrategy) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetUseRewrite() {
 | |
| 		if err = oprot.WriteFieldBegin("UseRewrite", thrift.BOOL, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.UseRewrite); 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 *RecallStrategy) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetUseNl2sql() {
 | |
| 		if err = oprot.WriteFieldBegin("UseNl2sql", thrift.BOOL, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.UseNl2sql); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *RecallStrategy) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("RecallStrategy(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type SocietyVisibiltyConfig struct {
 | |
| 	// Visibility in Social Scene: Public = 1, Anonymous = 2
 | |
| 	VisibilityType SocietyVisibility `thrift:"VisibilityType,1" json:"visibility_type,omitempty" form:"visibility_type" `
 | |
| 	// list of visible characters
 | |
| 	VisibilityRoles []string `thrift:"VisibilityRoles,2" json:"visibility_roles,omitempty" form:"visibility_roles" `
 | |
| }
 | |
| 
 | |
| func NewSocietyVisibiltyConfig() *SocietyVisibiltyConfig {
 | |
| 	return &SocietyVisibiltyConfig{}
 | |
| }
 | |
| 
 | |
| func (p *SocietyVisibiltyConfig) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *SocietyVisibiltyConfig) GetVisibilityType() (v SocietyVisibility) {
 | |
| 	return p.VisibilityType
 | |
| }
 | |
| 
 | |
| func (p *SocietyVisibiltyConfig) GetVisibilityRoles() (v []string) {
 | |
| 	return p.VisibilityRoles
 | |
| }
 | |
| 
 | |
| var fieldIDToName_SocietyVisibiltyConfig = map[int16]string{
 | |
| 	1: "VisibilityType",
 | |
| 	2: "VisibilityRoles",
 | |
| }
 | |
| 
 | |
| func (p *SocietyVisibiltyConfig) 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.I32 {
 | |
| 				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_SocietyVisibiltyConfig[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 *SocietyVisibiltyConfig) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field SocietyVisibility
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = SocietyVisibility(v)
 | |
| 	}
 | |
| 	p.VisibilityType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *SocietyVisibiltyConfig) ReadField2(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := 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
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.VisibilityRoles = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *SocietyVisibiltyConfig) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("SocietyVisibiltyConfig"); 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 *SocietyVisibiltyConfig) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("VisibilityType", thrift.I32, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.VisibilityType)); 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 *SocietyVisibiltyConfig) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("VisibilityRoles", thrift.LIST, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRING, len(p.VisibilityRoles)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.VisibilityRoles {
 | |
| 		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 *SocietyVisibiltyConfig) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("SocietyVisibiltyConfig(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type Variable struct {
 | |
| 	// key, Field
 | |
| 	Key *string `thrift:"Key,1,optional" form:"key" json:"key,omitempty"`
 | |
| 	// describe
 | |
| 	Description *string `thrift:"Description,2,optional" form:"description" json:"description,omitempty"`
 | |
| 	// default value
 | |
| 	DefaultValue *string `thrift:"DefaultValue,3,optional" form:"default_value" json:"default_value,omitempty"`
 | |
| 	// Whether the system value is the system value
 | |
| 	IsSystem *bool `thrift:"IsSystem,4,optional" form:"is_system" json:"is_system,omitempty"`
 | |
| 	// Whether to support calling in Prompt, the default is supported
 | |
| 	PromptDisabled *bool `thrift:"PromptDisabled,5,optional" form:"prompt_disabled" json:"prompt_disabled,omitempty"`
 | |
| 	// Visibility in Social Scene: Public = 1, Anonymous = 2
 | |
| 	SocietyVisibilityConfig *SocietyVisibiltyConfig `thrift:"SocietyVisibilityConfig,6,optional" json:"society_visibility_config,omitempty" form:"society_visibility_config" `
 | |
| 	// Whether to disable, the default is false to enable
 | |
| 	IsDisabled *bool `thrift:"IsDisabled,7,optional" form:"is_disabled" json:"is_disabled,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewVariable() *Variable {
 | |
| 	return &Variable{}
 | |
| }
 | |
| 
 | |
| func (p *Variable) InitDefault() {
 | |
| }
 | |
| 
 | |
| var Variable_Key_DEFAULT string
 | |
| 
 | |
| func (p *Variable) GetKey() (v string) {
 | |
| 	if !p.IsSetKey() {
 | |
| 		return Variable_Key_DEFAULT
 | |
| 	}
 | |
| 	return *p.Key
 | |
| }
 | |
| 
 | |
| var Variable_Description_DEFAULT string
 | |
| 
 | |
| func (p *Variable) GetDescription() (v string) {
 | |
| 	if !p.IsSetDescription() {
 | |
| 		return Variable_Description_DEFAULT
 | |
| 	}
 | |
| 	return *p.Description
 | |
| }
 | |
| 
 | |
| var Variable_DefaultValue_DEFAULT string
 | |
| 
 | |
| func (p *Variable) GetDefaultValue() (v string) {
 | |
| 	if !p.IsSetDefaultValue() {
 | |
| 		return Variable_DefaultValue_DEFAULT
 | |
| 	}
 | |
| 	return *p.DefaultValue
 | |
| }
 | |
| 
 | |
| var Variable_IsSystem_DEFAULT bool
 | |
| 
 | |
| func (p *Variable) GetIsSystem() (v bool) {
 | |
| 	if !p.IsSetIsSystem() {
 | |
| 		return Variable_IsSystem_DEFAULT
 | |
| 	}
 | |
| 	return *p.IsSystem
 | |
| }
 | |
| 
 | |
| var Variable_PromptDisabled_DEFAULT bool
 | |
| 
 | |
| func (p *Variable) GetPromptDisabled() (v bool) {
 | |
| 	if !p.IsSetPromptDisabled() {
 | |
| 		return Variable_PromptDisabled_DEFAULT
 | |
| 	}
 | |
| 	return *p.PromptDisabled
 | |
| }
 | |
| 
 | |
| var Variable_SocietyVisibilityConfig_DEFAULT *SocietyVisibiltyConfig
 | |
| 
 | |
| func (p *Variable) GetSocietyVisibilityConfig() (v *SocietyVisibiltyConfig) {
 | |
| 	if !p.IsSetSocietyVisibilityConfig() {
 | |
| 		return Variable_SocietyVisibilityConfig_DEFAULT
 | |
| 	}
 | |
| 	return p.SocietyVisibilityConfig
 | |
| }
 | |
| 
 | |
| var Variable_IsDisabled_DEFAULT bool
 | |
| 
 | |
| func (p *Variable) GetIsDisabled() (v bool) {
 | |
| 	if !p.IsSetIsDisabled() {
 | |
| 		return Variable_IsDisabled_DEFAULT
 | |
| 	}
 | |
| 	return *p.IsDisabled
 | |
| }
 | |
| 
 | |
| var fieldIDToName_Variable = map[int16]string{
 | |
| 	1: "Key",
 | |
| 	2: "Description",
 | |
| 	3: "DefaultValue",
 | |
| 	4: "IsSystem",
 | |
| 	5: "PromptDisabled",
 | |
| 	6: "SocietyVisibilityConfig",
 | |
| 	7: "IsDisabled",
 | |
| }
 | |
| 
 | |
| func (p *Variable) IsSetKey() bool {
 | |
| 	return p.Key != nil
 | |
| }
 | |
| 
 | |
| func (p *Variable) IsSetDescription() bool {
 | |
| 	return p.Description != nil
 | |
| }
 | |
| 
 | |
| func (p *Variable) IsSetDefaultValue() bool {
 | |
| 	return p.DefaultValue != nil
 | |
| }
 | |
| 
 | |
| func (p *Variable) IsSetIsSystem() bool {
 | |
| 	return p.IsSystem != nil
 | |
| }
 | |
| 
 | |
| func (p *Variable) IsSetPromptDisabled() bool {
 | |
| 	return p.PromptDisabled != nil
 | |
| }
 | |
| 
 | |
| func (p *Variable) IsSetSocietyVisibilityConfig() bool {
 | |
| 	return p.SocietyVisibilityConfig != nil
 | |
| }
 | |
| 
 | |
| func (p *Variable) IsSetIsDisabled() bool {
 | |
| 	return p.IsDisabled != nil
 | |
| }
 | |
| 
 | |
| func (p *Variable) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField7(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_Variable[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 *Variable) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Key = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Variable) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Description = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Variable) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.DefaultValue = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Variable) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.IsSystem = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Variable) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PromptDisabled = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Variable) ReadField6(iprot thrift.TProtocol) error {
 | |
| 	_field := NewSocietyVisibiltyConfig()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.SocietyVisibilityConfig = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Variable) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.IsDisabled = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *Variable) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("Variable"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			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 *Variable) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetKey() {
 | |
| 		if err = oprot.WriteFieldBegin("Key", thrift.STRING, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Key); 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 *Variable) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDescription() {
 | |
| 		if err = oprot.WriteFieldBegin("Description", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Description); 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 *Variable) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDefaultValue() {
 | |
| 		if err = oprot.WriteFieldBegin("DefaultValue", thrift.STRING, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.DefaultValue); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *Variable) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetIsSystem() {
 | |
| 		if err = oprot.WriteFieldBegin("IsSystem", thrift.BOOL, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.IsSystem); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *Variable) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPromptDisabled() {
 | |
| 		if err = oprot.WriteFieldBegin("PromptDisabled", thrift.BOOL, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.PromptDisabled); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *Variable) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSocietyVisibilityConfig() {
 | |
| 		if err = oprot.WriteFieldBegin("SocietyVisibilityConfig", thrift.STRUCT, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.SocietyVisibilityConfig.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 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *Variable) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetIsDisabled() {
 | |
| 		if err = oprot.WriteFieldBegin("IsDisabled", thrift.BOOL, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.IsDisabled); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *Variable) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("Variable(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type TaskInfo struct {
 | |
| 	// Scheduled Tasks on Coze
 | |
| 	UserTaskAllowed *bool `thrift:"UserTaskAllowed,1,optional" form:"user_task_allowed" json:"user_task_allowed,omitempty"`
 | |
| 	// Allow preset tasks
 | |
| 	EnablePresetTask *int64 `thrift:"EnablePresetTask,2,optional" form:"enable_preset_task" json:"enable_preset_task,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewTaskInfo() *TaskInfo {
 | |
| 	return &TaskInfo{}
 | |
| }
 | |
| 
 | |
| func (p *TaskInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var TaskInfo_UserTaskAllowed_DEFAULT bool
 | |
| 
 | |
| func (p *TaskInfo) GetUserTaskAllowed() (v bool) {
 | |
| 	if !p.IsSetUserTaskAllowed() {
 | |
| 		return TaskInfo_UserTaskAllowed_DEFAULT
 | |
| 	}
 | |
| 	return *p.UserTaskAllowed
 | |
| }
 | |
| 
 | |
| var TaskInfo_EnablePresetTask_DEFAULT int64
 | |
| 
 | |
| func (p *TaskInfo) GetEnablePresetTask() (v int64) {
 | |
| 	if !p.IsSetEnablePresetTask() {
 | |
| 		return TaskInfo_EnablePresetTask_DEFAULT
 | |
| 	}
 | |
| 	return *p.EnablePresetTask
 | |
| }
 | |
| 
 | |
| var fieldIDToName_TaskInfo = map[int16]string{
 | |
| 	1: "UserTaskAllowed",
 | |
| 	2: "EnablePresetTask",
 | |
| }
 | |
| 
 | |
| func (p *TaskInfo) IsSetUserTaskAllowed() bool {
 | |
| 	return p.UserTaskAllowed != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfo) IsSetEnablePresetTask() bool {
 | |
| 	return p.EnablePresetTask != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfo) 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.BOOL {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				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_TaskInfo[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 *TaskInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.UserTaskAllowed = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.EnablePresetTask = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("TaskInfo"); 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 *TaskInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetUserTaskAllowed() {
 | |
| 		if err = oprot.WriteFieldBegin("UserTaskAllowed", thrift.BOOL, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.UserTaskAllowed); 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 *TaskInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetEnablePresetTask() {
 | |
| 		if err = oprot.WriteFieldBegin("EnablePresetTask", thrift.I64, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.EnablePresetTask); 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 *TaskInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("TaskInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type FieldItem struct {
 | |
| 	// field name
 | |
| 	Name *string `thrift:"Name,1,optional" form:"name" json:"name,omitempty"`
 | |
| 	// Field description
 | |
| 	Desc *string `thrift:"Desc,2,optional" form:"desc" json:"desc,omitempty"`
 | |
| 	// field type
 | |
| 	Type *FieldItemType `thrift:"Type,3,optional" form:"type" json:"type,omitempty"`
 | |
| 	// Is it required?
 | |
| 	MustRequired *bool `thrift:"MustRequired,4,optional" form:"must_required" json:"must_required,omitempty"`
 | |
| 	// The field Id is added as 0.
 | |
| 	Id *int64 `thrift:"Id,5,optional" form:"id" json:"id,string,omitempty"`
 | |
| 	// Field type str
 | |
| 	TypeStr *string `thrift:"TypeStr,6,optional" form:"type_str" json:"type_str,omitempty"`
 | |
| 	// Field type str
 | |
| 	AlterId *int64 `thrift:"AlterId,7,optional" form:"alterId" json:"alterId,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewFieldItem() *FieldItem {
 | |
| 	return &FieldItem{}
 | |
| }
 | |
| 
 | |
| func (p *FieldItem) InitDefault() {
 | |
| }
 | |
| 
 | |
| var FieldItem_Name_DEFAULT string
 | |
| 
 | |
| func (p *FieldItem) GetName() (v string) {
 | |
| 	if !p.IsSetName() {
 | |
| 		return FieldItem_Name_DEFAULT
 | |
| 	}
 | |
| 	return *p.Name
 | |
| }
 | |
| 
 | |
| var FieldItem_Desc_DEFAULT string
 | |
| 
 | |
| func (p *FieldItem) GetDesc() (v string) {
 | |
| 	if !p.IsSetDesc() {
 | |
| 		return FieldItem_Desc_DEFAULT
 | |
| 	}
 | |
| 	return *p.Desc
 | |
| }
 | |
| 
 | |
| var FieldItem_Type_DEFAULT FieldItemType
 | |
| 
 | |
| func (p *FieldItem) GetType() (v FieldItemType) {
 | |
| 	if !p.IsSetType() {
 | |
| 		return FieldItem_Type_DEFAULT
 | |
| 	}
 | |
| 	return *p.Type
 | |
| }
 | |
| 
 | |
| var FieldItem_MustRequired_DEFAULT bool
 | |
| 
 | |
| func (p *FieldItem) GetMustRequired() (v bool) {
 | |
| 	if !p.IsSetMustRequired() {
 | |
| 		return FieldItem_MustRequired_DEFAULT
 | |
| 	}
 | |
| 	return *p.MustRequired
 | |
| }
 | |
| 
 | |
| var FieldItem_Id_DEFAULT int64
 | |
| 
 | |
| func (p *FieldItem) GetId() (v int64) {
 | |
| 	if !p.IsSetId() {
 | |
| 		return FieldItem_Id_DEFAULT
 | |
| 	}
 | |
| 	return *p.Id
 | |
| }
 | |
| 
 | |
| var FieldItem_TypeStr_DEFAULT string
 | |
| 
 | |
| func (p *FieldItem) GetTypeStr() (v string) {
 | |
| 	if !p.IsSetTypeStr() {
 | |
| 		return FieldItem_TypeStr_DEFAULT
 | |
| 	}
 | |
| 	return *p.TypeStr
 | |
| }
 | |
| 
 | |
| var FieldItem_AlterId_DEFAULT int64
 | |
| 
 | |
| func (p *FieldItem) GetAlterId() (v int64) {
 | |
| 	if !p.IsSetAlterId() {
 | |
| 		return FieldItem_AlterId_DEFAULT
 | |
| 	}
 | |
| 	return *p.AlterId
 | |
| }
 | |
| 
 | |
| var fieldIDToName_FieldItem = map[int16]string{
 | |
| 	1: "Name",
 | |
| 	2: "Desc",
 | |
| 	3: "Type",
 | |
| 	4: "MustRequired",
 | |
| 	5: "Id",
 | |
| 	6: "TypeStr",
 | |
| 	7: "AlterId",
 | |
| }
 | |
| 
 | |
| func (p *FieldItem) IsSetName() bool {
 | |
| 	return p.Name != nil
 | |
| }
 | |
| 
 | |
| func (p *FieldItem) IsSetDesc() bool {
 | |
| 	return p.Desc != nil
 | |
| }
 | |
| 
 | |
| func (p *FieldItem) IsSetType() bool {
 | |
| 	return p.Type != nil
 | |
| }
 | |
| 
 | |
| func (p *FieldItem) IsSetMustRequired() bool {
 | |
| 	return p.MustRequired != nil
 | |
| }
 | |
| 
 | |
| func (p *FieldItem) IsSetId() bool {
 | |
| 	return p.Id != nil
 | |
| }
 | |
| 
 | |
| func (p *FieldItem) IsSetTypeStr() bool {
 | |
| 	return p.TypeStr != nil
 | |
| }
 | |
| 
 | |
| func (p *FieldItem) IsSetAlterId() bool {
 | |
| 	return p.AlterId != nil
 | |
| }
 | |
| 
 | |
| func (p *FieldItem) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField7(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_FieldItem[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 *FieldItem) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Name = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *FieldItem) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Desc = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *FieldItem) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *FieldItemType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := FieldItemType(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.Type = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *FieldItem) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.MustRequired = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *FieldItem) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Id = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *FieldItem) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TypeStr = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *FieldItem) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.AlterId = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *FieldItem) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("FieldItem"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			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 *FieldItem) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetName() {
 | |
| 		if err = oprot.WriteFieldBegin("Name", thrift.STRING, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Name); 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 *FieldItem) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDesc() {
 | |
| 		if err = oprot.WriteFieldBegin("Desc", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Desc); 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 *FieldItem) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetType() {
 | |
| 		if err = oprot.WriteFieldBegin("Type", thrift.I32, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.Type)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *FieldItem) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetMustRequired() {
 | |
| 		if err = oprot.WriteFieldBegin("MustRequired", thrift.BOOL, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.MustRequired); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *FieldItem) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetId() {
 | |
| 		if err = oprot.WriteFieldBegin("Id", thrift.I64, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.Id); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *FieldItem) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTypeStr() {
 | |
| 		if err = oprot.WriteFieldBegin("TypeStr", thrift.STRING, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.TypeStr); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *FieldItem) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAlterId() {
 | |
| 		if err = oprot.WriteFieldBegin("AlterId", thrift.I64, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.AlterId); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *FieldItem) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("FieldItem(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type Database struct {
 | |
| 	// table id
 | |
| 	TableId *string `thrift:"TableId,1,optional" form:"table_id" json:"table_id,omitempty"`
 | |
| 	// Table name
 | |
| 	TableName *string `thrift:"TableName,2,optional" form:"table_name" json:"table_name,omitempty"`
 | |
| 	// Table Introduction
 | |
| 	TableDesc *string `thrift:"TableDesc,3,optional" form:"table_desc" json:"table_desc,omitempty"`
 | |
| 	// Table field information
 | |
| 	FieldList []*FieldItem `thrift:"FieldList,4,optional" form:"field_list" json:"field_list,omitempty"`
 | |
| 	// Whether to support calling in Prompt, the default is supported
 | |
| 	PromptDisabled *bool           `thrift:"PromptDisabled,5,optional" form:"prompt_disabled" json:"prompt_disabled,omitempty"`
 | |
| 	RWMode         *BotTableRWMode `thrift:"RWMode,6,optional" form:"rw_mode" json:"rw_mode,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewDatabase() *Database {
 | |
| 	return &Database{}
 | |
| }
 | |
| 
 | |
| func (p *Database) InitDefault() {
 | |
| }
 | |
| 
 | |
| var Database_TableId_DEFAULT string
 | |
| 
 | |
| func (p *Database) GetTableId() (v string) {
 | |
| 	if !p.IsSetTableId() {
 | |
| 		return Database_TableId_DEFAULT
 | |
| 	}
 | |
| 	return *p.TableId
 | |
| }
 | |
| 
 | |
| var Database_TableName_DEFAULT string
 | |
| 
 | |
| func (p *Database) GetTableName() (v string) {
 | |
| 	if !p.IsSetTableName() {
 | |
| 		return Database_TableName_DEFAULT
 | |
| 	}
 | |
| 	return *p.TableName
 | |
| }
 | |
| 
 | |
| var Database_TableDesc_DEFAULT string
 | |
| 
 | |
| func (p *Database) GetTableDesc() (v string) {
 | |
| 	if !p.IsSetTableDesc() {
 | |
| 		return Database_TableDesc_DEFAULT
 | |
| 	}
 | |
| 	return *p.TableDesc
 | |
| }
 | |
| 
 | |
| var Database_FieldList_DEFAULT []*FieldItem
 | |
| 
 | |
| func (p *Database) GetFieldList() (v []*FieldItem) {
 | |
| 	if !p.IsSetFieldList() {
 | |
| 		return Database_FieldList_DEFAULT
 | |
| 	}
 | |
| 	return p.FieldList
 | |
| }
 | |
| 
 | |
| var Database_PromptDisabled_DEFAULT bool
 | |
| 
 | |
| func (p *Database) GetPromptDisabled() (v bool) {
 | |
| 	if !p.IsSetPromptDisabled() {
 | |
| 		return Database_PromptDisabled_DEFAULT
 | |
| 	}
 | |
| 	return *p.PromptDisabled
 | |
| }
 | |
| 
 | |
| var Database_RWMode_DEFAULT BotTableRWMode
 | |
| 
 | |
| func (p *Database) GetRWMode() (v BotTableRWMode) {
 | |
| 	if !p.IsSetRWMode() {
 | |
| 		return Database_RWMode_DEFAULT
 | |
| 	}
 | |
| 	return *p.RWMode
 | |
| }
 | |
| 
 | |
| var fieldIDToName_Database = map[int16]string{
 | |
| 	1: "TableId",
 | |
| 	2: "TableName",
 | |
| 	3: "TableDesc",
 | |
| 	4: "FieldList",
 | |
| 	5: "PromptDisabled",
 | |
| 	6: "RWMode",
 | |
| }
 | |
| 
 | |
| func (p *Database) IsSetTableId() bool {
 | |
| 	return p.TableId != nil
 | |
| }
 | |
| 
 | |
| func (p *Database) IsSetTableName() bool {
 | |
| 	return p.TableName != nil
 | |
| }
 | |
| 
 | |
| func (p *Database) IsSetTableDesc() bool {
 | |
| 	return p.TableDesc != nil
 | |
| }
 | |
| 
 | |
| func (p *Database) IsSetFieldList() bool {
 | |
| 	return p.FieldList != nil
 | |
| }
 | |
| 
 | |
| func (p *Database) IsSetPromptDisabled() bool {
 | |
| 	return p.PromptDisabled != nil
 | |
| }
 | |
| 
 | |
| func (p *Database) IsSetRWMode() bool {
 | |
| 	return p.RWMode != nil
 | |
| }
 | |
| 
 | |
| func (p *Database) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField6(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_Database[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 *Database) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TableId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Database) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TableName = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Database) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TableDesc = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Database) ReadField4(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*FieldItem, 0, size)
 | |
| 	values := make([]FieldItem, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.FieldList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Database) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PromptDisabled = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Database) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *BotTableRWMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := BotTableRWMode(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.RWMode = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *Database) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("Database"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			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 *Database) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTableId() {
 | |
| 		if err = oprot.WriteFieldBegin("TableId", thrift.STRING, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.TableId); 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 *Database) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTableName() {
 | |
| 		if err = oprot.WriteFieldBegin("TableName", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.TableName); 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 *Database) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTableDesc() {
 | |
| 		if err = oprot.WriteFieldBegin("TableDesc", thrift.STRING, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.TableDesc); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *Database) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetFieldList() {
 | |
| 		if err = oprot.WriteFieldBegin("FieldList", thrift.LIST, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.FieldList)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.FieldList {
 | |
| 			if err := v.Write(oprot); 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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *Database) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPromptDisabled() {
 | |
| 		if err = oprot.WriteFieldBegin("PromptDisabled", thrift.BOOL, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.PromptDisabled); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *Database) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetRWMode() {
 | |
| 		if err = oprot.WriteFieldBegin("RWMode", thrift.I32, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.RWMode)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *Database) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("Database(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type Agent struct {
 | |
| 	AgentId   int64  `thrift:"AgentId,1" form:"agent_id" json:"agent_id,string"`
 | |
| 	AgentName string `thrift:"AgentName,2" form:"agent_name" json:"agent_name"`
 | |
| 	// Prompt message
 | |
| 	PromptInfo *PromptInfo `thrift:"PromptInfo,3" form:"prompt_info" json:"prompt_info"`
 | |
| 	// List of plugins
 | |
| 	PluginInfoList []*PluginInfo `thrift:"PluginInfoList,4" form:"plugin_info_list" json:"plugin_info_list"`
 | |
| 	// dataset
 | |
| 	Knowledge *Knowledge `thrift:"Knowledge,5" form:"knowledge" json:"knowledge"`
 | |
| 	// Workflow List
 | |
| 	WorkflowInfoList []*WorkflowInfo `thrift:"WorkflowInfoList,6" form:"workflow_info_list" json:"workflow_info_list"`
 | |
| 	// model configuration
 | |
| 	ModelInfo *ModelInfo `thrift:"ModelInfo,7" form:"model_info" json:"model_info"`
 | |
| 	// intent information
 | |
| 	Intents   []*Intent `thrift:"Intents,8" form:"intents" json:"intents"`
 | |
| 	AgentType AgentType `thrift:"AgentType,9" form:"agent_type" json:"agent_type"`
 | |
| 	// Is it a rootagent?
 | |
| 	RootAgent        bool              `thrift:"RootAgent,10" form:"root_agent" json:"root_agent"`
 | |
| 	ReferenceId      int64             `thrift:"ReferenceId,11" form:"reference_id" json:"reference_id,string"`
 | |
| 	FirstVersion     string            `thrift:"FirstVersion,12" form:"first_version" json:"first_version"`
 | |
| 	LastVersion      string            `thrift:"LastVersion,13" form:"last_version" json:"last_version"`
 | |
| 	AgentPosition    *AgentPosition    `thrift:"AgentPosition,14" form:"agent_position" json:"agent_position"`
 | |
| 	IconUri          string            `thrift:"IconUri,15" form:"icon_uri" json:"icon_uri"`
 | |
| 	JumpConfig       *JumpConfig       `thrift:"JumpConfig,16" form:"jump_config" json:"jump_config"`
 | |
| 	SuggestReplyInfo *SuggestReplyInfo `thrift:"SuggestReplyInfo,17" form:"suggest_reply_info" json:"suggest_reply_info"`
 | |
| 	Description      string            `thrift:"Description,18" form:"description" json:"description"`
 | |
| 	// multi_agent version compatibility field
 | |
| 	VersionCompat AgentVersionCompat `thrift:"VersionCompat,19" form:"version_compat" json:"version_compat"`
 | |
| 	HookInfo      *HookInfo          `thrift:"HookInfo,20,optional" form:"hook_info" json:"hook_info,omitempty"`
 | |
| 	//The current version of the subbot
 | |
| 	CurrentVersion *string `thrift:"CurrentVersion,21,optional" form:"current_version" json:"current_version,omitempty"`
 | |
| 	// 1: Available update 2: Removed
 | |
| 	ReferenceInfoStatus *ReferenceInfoStatus `thrift:"ReferenceInfoStatus,22,optional" form:"reference_info_status" json:"reference_info_status,omitempty"`
 | |
| 	//Subbot update type
 | |
| 	UpdateType *ReferenceUpdateType `thrift:"UpdateType,23,optional" form:"update_type" json:"update_type,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewAgent() *Agent {
 | |
| 	return &Agent{}
 | |
| }
 | |
| 
 | |
| func (p *Agent) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *Agent) GetAgentId() (v int64) {
 | |
| 	return p.AgentId
 | |
| }
 | |
| 
 | |
| func (p *Agent) GetAgentName() (v string) {
 | |
| 	return p.AgentName
 | |
| }
 | |
| 
 | |
| var Agent_PromptInfo_DEFAULT *PromptInfo
 | |
| 
 | |
| func (p *Agent) GetPromptInfo() (v *PromptInfo) {
 | |
| 	if !p.IsSetPromptInfo() {
 | |
| 		return Agent_PromptInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.PromptInfo
 | |
| }
 | |
| 
 | |
| func (p *Agent) GetPluginInfoList() (v []*PluginInfo) {
 | |
| 	return p.PluginInfoList
 | |
| }
 | |
| 
 | |
| var Agent_Knowledge_DEFAULT *Knowledge
 | |
| 
 | |
| func (p *Agent) GetKnowledge() (v *Knowledge) {
 | |
| 	if !p.IsSetKnowledge() {
 | |
| 		return Agent_Knowledge_DEFAULT
 | |
| 	}
 | |
| 	return p.Knowledge
 | |
| }
 | |
| 
 | |
| func (p *Agent) GetWorkflowInfoList() (v []*WorkflowInfo) {
 | |
| 	return p.WorkflowInfoList
 | |
| }
 | |
| 
 | |
| var Agent_ModelInfo_DEFAULT *ModelInfo
 | |
| 
 | |
| func (p *Agent) GetModelInfo() (v *ModelInfo) {
 | |
| 	if !p.IsSetModelInfo() {
 | |
| 		return Agent_ModelInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.ModelInfo
 | |
| }
 | |
| 
 | |
| func (p *Agent) GetIntents() (v []*Intent) {
 | |
| 	return p.Intents
 | |
| }
 | |
| 
 | |
| func (p *Agent) GetAgentType() (v AgentType) {
 | |
| 	return p.AgentType
 | |
| }
 | |
| 
 | |
| func (p *Agent) GetRootAgent() (v bool) {
 | |
| 	return p.RootAgent
 | |
| }
 | |
| 
 | |
| func (p *Agent) GetReferenceId() (v int64) {
 | |
| 	return p.ReferenceId
 | |
| }
 | |
| 
 | |
| func (p *Agent) GetFirstVersion() (v string) {
 | |
| 	return p.FirstVersion
 | |
| }
 | |
| 
 | |
| func (p *Agent) GetLastVersion() (v string) {
 | |
| 	return p.LastVersion
 | |
| }
 | |
| 
 | |
| var Agent_AgentPosition_DEFAULT *AgentPosition
 | |
| 
 | |
| func (p *Agent) GetAgentPosition() (v *AgentPosition) {
 | |
| 	if !p.IsSetAgentPosition() {
 | |
| 		return Agent_AgentPosition_DEFAULT
 | |
| 	}
 | |
| 	return p.AgentPosition
 | |
| }
 | |
| 
 | |
| func (p *Agent) GetIconUri() (v string) {
 | |
| 	return p.IconUri
 | |
| }
 | |
| 
 | |
| var Agent_JumpConfig_DEFAULT *JumpConfig
 | |
| 
 | |
| func (p *Agent) GetJumpConfig() (v *JumpConfig) {
 | |
| 	if !p.IsSetJumpConfig() {
 | |
| 		return Agent_JumpConfig_DEFAULT
 | |
| 	}
 | |
| 	return p.JumpConfig
 | |
| }
 | |
| 
 | |
| var Agent_SuggestReplyInfo_DEFAULT *SuggestReplyInfo
 | |
| 
 | |
| func (p *Agent) GetSuggestReplyInfo() (v *SuggestReplyInfo) {
 | |
| 	if !p.IsSetSuggestReplyInfo() {
 | |
| 		return Agent_SuggestReplyInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.SuggestReplyInfo
 | |
| }
 | |
| 
 | |
| func (p *Agent) GetDescription() (v string) {
 | |
| 	return p.Description
 | |
| }
 | |
| 
 | |
| func (p *Agent) GetVersionCompat() (v AgentVersionCompat) {
 | |
| 	return p.VersionCompat
 | |
| }
 | |
| 
 | |
| var Agent_HookInfo_DEFAULT *HookInfo
 | |
| 
 | |
| func (p *Agent) GetHookInfo() (v *HookInfo) {
 | |
| 	if !p.IsSetHookInfo() {
 | |
| 		return Agent_HookInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.HookInfo
 | |
| }
 | |
| 
 | |
| var Agent_CurrentVersion_DEFAULT string
 | |
| 
 | |
| func (p *Agent) GetCurrentVersion() (v string) {
 | |
| 	if !p.IsSetCurrentVersion() {
 | |
| 		return Agent_CurrentVersion_DEFAULT
 | |
| 	}
 | |
| 	return *p.CurrentVersion
 | |
| }
 | |
| 
 | |
| var Agent_ReferenceInfoStatus_DEFAULT ReferenceInfoStatus
 | |
| 
 | |
| func (p *Agent) GetReferenceInfoStatus() (v ReferenceInfoStatus) {
 | |
| 	if !p.IsSetReferenceInfoStatus() {
 | |
| 		return Agent_ReferenceInfoStatus_DEFAULT
 | |
| 	}
 | |
| 	return *p.ReferenceInfoStatus
 | |
| }
 | |
| 
 | |
| var Agent_UpdateType_DEFAULT ReferenceUpdateType
 | |
| 
 | |
| func (p *Agent) GetUpdateType() (v ReferenceUpdateType) {
 | |
| 	if !p.IsSetUpdateType() {
 | |
| 		return Agent_UpdateType_DEFAULT
 | |
| 	}
 | |
| 	return *p.UpdateType
 | |
| }
 | |
| 
 | |
| var fieldIDToName_Agent = map[int16]string{
 | |
| 	1:  "AgentId",
 | |
| 	2:  "AgentName",
 | |
| 	3:  "PromptInfo",
 | |
| 	4:  "PluginInfoList",
 | |
| 	5:  "Knowledge",
 | |
| 	6:  "WorkflowInfoList",
 | |
| 	7:  "ModelInfo",
 | |
| 	8:  "Intents",
 | |
| 	9:  "AgentType",
 | |
| 	10: "RootAgent",
 | |
| 	11: "ReferenceId",
 | |
| 	12: "FirstVersion",
 | |
| 	13: "LastVersion",
 | |
| 	14: "AgentPosition",
 | |
| 	15: "IconUri",
 | |
| 	16: "JumpConfig",
 | |
| 	17: "SuggestReplyInfo",
 | |
| 	18: "Description",
 | |
| 	19: "VersionCompat",
 | |
| 	20: "HookInfo",
 | |
| 	21: "CurrentVersion",
 | |
| 	22: "ReferenceInfoStatus",
 | |
| 	23: "UpdateType",
 | |
| }
 | |
| 
 | |
| func (p *Agent) IsSetPromptInfo() bool {
 | |
| 	return p.PromptInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *Agent) IsSetKnowledge() bool {
 | |
| 	return p.Knowledge != nil
 | |
| }
 | |
| 
 | |
| func (p *Agent) IsSetModelInfo() bool {
 | |
| 	return p.ModelInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *Agent) IsSetAgentPosition() bool {
 | |
| 	return p.AgentPosition != nil
 | |
| }
 | |
| 
 | |
| func (p *Agent) IsSetJumpConfig() bool {
 | |
| 	return p.JumpConfig != nil
 | |
| }
 | |
| 
 | |
| func (p *Agent) IsSetSuggestReplyInfo() bool {
 | |
| 	return p.SuggestReplyInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *Agent) IsSetHookInfo() bool {
 | |
| 	return p.HookInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *Agent) IsSetCurrentVersion() bool {
 | |
| 	return p.CurrentVersion != nil
 | |
| }
 | |
| 
 | |
| func (p *Agent) IsSetReferenceInfoStatus() bool {
 | |
| 	return p.ReferenceInfoStatus != nil
 | |
| }
 | |
| 
 | |
| func (p *Agent) IsSetUpdateType() bool {
 | |
| 	return p.UpdateType != nil
 | |
| }
 | |
| 
 | |
| func (p *Agent) 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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField7(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 8:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField8(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 9:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField9(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 10:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField10(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 11:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField11(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 12:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField12(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 13:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField13(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 14:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField14(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 15:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField15(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 16:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField16(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 17:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField17(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 18:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField18(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 19:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField19(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 20:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField20(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 21:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField21(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 22:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField22(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 23:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField23(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_Agent[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 *Agent) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.AgentId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.AgentName = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_field := NewPromptInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.PromptInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField4(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*PluginInfo, 0, size)
 | |
| 	values := make([]PluginInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.PluginInfoList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField5(iprot thrift.TProtocol) error {
 | |
| 	_field := NewKnowledge()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Knowledge = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField6(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*WorkflowInfo, 0, size)
 | |
| 	values := make([]WorkflowInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.WorkflowInfoList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField7(iprot thrift.TProtocol) error {
 | |
| 	_field := NewModelInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.ModelInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField8(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*Intent, 0, size)
 | |
| 	values := make([]Intent, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Intents = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field AgentType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = AgentType(v)
 | |
| 	}
 | |
| 	p.AgentType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.RootAgent = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField11(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ReferenceId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField12(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.FirstVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField13(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.LastVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField14(iprot thrift.TProtocol) error {
 | |
| 	_field := NewAgentPosition()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.AgentPosition = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField15(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.IconUri = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField16(iprot thrift.TProtocol) error {
 | |
| 	_field := NewJumpConfig()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.JumpConfig = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField17(iprot thrift.TProtocol) error {
 | |
| 	_field := NewSuggestReplyInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.SuggestReplyInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField18(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Description = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField19(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field AgentVersionCompat
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = AgentVersionCompat(v)
 | |
| 	}
 | |
| 	p.VersionCompat = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField20(iprot thrift.TProtocol) error {
 | |
| 	_field := NewHookInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.HookInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField21(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.CurrentVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField22(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *ReferenceInfoStatus
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := ReferenceInfoStatus(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.ReferenceInfoStatus = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Agent) ReadField23(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *ReferenceUpdateType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := ReferenceUpdateType(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.UpdateType = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *Agent) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("Agent"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField8(oprot); err != nil {
 | |
| 			fieldId = 8
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField9(oprot); err != nil {
 | |
| 			fieldId = 9
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField10(oprot); err != nil {
 | |
| 			fieldId = 10
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField11(oprot); err != nil {
 | |
| 			fieldId = 11
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField12(oprot); err != nil {
 | |
| 			fieldId = 12
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField13(oprot); err != nil {
 | |
| 			fieldId = 13
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField14(oprot); err != nil {
 | |
| 			fieldId = 14
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField15(oprot); err != nil {
 | |
| 			fieldId = 15
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField16(oprot); err != nil {
 | |
| 			fieldId = 16
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField17(oprot); err != nil {
 | |
| 			fieldId = 17
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField18(oprot); err != nil {
 | |
| 			fieldId = 18
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField19(oprot); err != nil {
 | |
| 			fieldId = 19
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField20(oprot); err != nil {
 | |
| 			fieldId = 20
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField21(oprot); err != nil {
 | |
| 			fieldId = 21
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField22(oprot); err != nil {
 | |
| 			fieldId = 22
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField23(oprot); err != nil {
 | |
| 			fieldId = 23
 | |
| 			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 *Agent) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("AgentId", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.AgentId); 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 *Agent) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("AgentName", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.AgentName); 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 *Agent) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("PromptInfo", thrift.STRUCT, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.PromptInfo.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 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("PluginInfoList", thrift.LIST, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.PluginInfoList)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.PluginInfoList {
 | |
| 		if err := v.Write(oprot); 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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Knowledge", thrift.STRUCT, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Knowledge.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 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("WorkflowInfoList", thrift.LIST, 6); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.WorkflowInfoList)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.WorkflowInfoList {
 | |
| 		if err := v.Write(oprot); 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 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ModelInfo", thrift.STRUCT, 7); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.ModelInfo.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 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Intents", thrift.LIST, 8); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Intents)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.Intents {
 | |
| 		if err := v.Write(oprot); 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 8 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("AgentType", thrift.I32, 9); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.AgentType)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("RootAgent", thrift.BOOL, 10); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(p.RootAgent); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ReferenceId", thrift.I64, 11); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.ReferenceId); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 11 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 11 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField12(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("FirstVersion", thrift.STRING, 12); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.FirstVersion); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 12 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 12 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField13(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("LastVersion", thrift.STRING, 13); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.LastVersion); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 13 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 13 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField14(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("AgentPosition", thrift.STRUCT, 14); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.AgentPosition.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 14 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 14 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField15(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("IconUri", thrift.STRING, 15); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.IconUri); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 15 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 15 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField16(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("JumpConfig", thrift.STRUCT, 16); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.JumpConfig.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 16 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 16 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField17(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("SuggestReplyInfo", thrift.STRUCT, 17); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.SuggestReplyInfo.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 17 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 17 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField18(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Description", thrift.STRING, 18); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Description); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 18 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 18 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField19(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("VersionCompat", thrift.I32, 19); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.VersionCompat)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 19 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 19 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField20(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetHookInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("HookInfo", thrift.STRUCT, 20); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.HookInfo.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 20 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 20 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField21(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCurrentVersion() {
 | |
| 		if err = oprot.WriteFieldBegin("CurrentVersion", thrift.STRING, 21); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.CurrentVersion); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 21 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 21 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField22(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetReferenceInfoStatus() {
 | |
| 		if err = oprot.WriteFieldBegin("ReferenceInfoStatus", thrift.I32, 22); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.ReferenceInfoStatus)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 22 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 22 end error: ", p), err)
 | |
| }
 | |
| func (p *Agent) writeField23(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetUpdateType() {
 | |
| 		if err = oprot.WriteFieldBegin("UpdateType", thrift.I32, 23); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.UpdateType)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 23 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 23 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *Agent) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("Agent(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type AgentPosition struct {
 | |
| 	X float64 `thrift:"x,1" form:"x" json:"x" query:"x"`
 | |
| 	Y float64 `thrift:"y,2" form:"y" json:"y" query:"y"`
 | |
| }
 | |
| 
 | |
| func NewAgentPosition() *AgentPosition {
 | |
| 	return &AgentPosition{}
 | |
| }
 | |
| 
 | |
| func (p *AgentPosition) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *AgentPosition) GetX() (v float64) {
 | |
| 	return p.X
 | |
| }
 | |
| 
 | |
| func (p *AgentPosition) GetY() (v float64) {
 | |
| 	return p.Y
 | |
| }
 | |
| 
 | |
| var fieldIDToName_AgentPosition = map[int16]string{
 | |
| 	1: "x",
 | |
| 	2: "y",
 | |
| }
 | |
| 
 | |
| func (p *AgentPosition) 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.DOUBLE {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.DOUBLE {
 | |
| 				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_AgentPosition[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 *AgentPosition) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field float64
 | |
| 	if v, err := iprot.ReadDouble(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.X = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentPosition) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field float64
 | |
| 	if v, err := iprot.ReadDouble(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Y = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *AgentPosition) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("AgentPosition"); 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 *AgentPosition) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("x", thrift.DOUBLE, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteDouble(p.X); 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 *AgentPosition) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("y", thrift.DOUBLE, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteDouble(p.Y); 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 *AgentPosition) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("AgentPosition(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type Intent struct {
 | |
| 	IntentId    string                `thrift:"IntentId,1" form:"intent_id" json:"intent_id"`
 | |
| 	Prompt      string                `thrift:"Prompt,2" form:"prompt" json:"prompt"`
 | |
| 	NextAgentId int64                 `thrift:"NextAgentId,3" form:"next_agent_id" json:"next_agent_id,string"`
 | |
| 	SessionType MultiAgentSessionType `thrift:"SessionType,4" form:"session_type" json:"session_type"`
 | |
| }
 | |
| 
 | |
| func NewIntent() *Intent {
 | |
| 	return &Intent{}
 | |
| }
 | |
| 
 | |
| func (p *Intent) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *Intent) GetIntentId() (v string) {
 | |
| 	return p.IntentId
 | |
| }
 | |
| 
 | |
| func (p *Intent) GetPrompt() (v string) {
 | |
| 	return p.Prompt
 | |
| }
 | |
| 
 | |
| func (p *Intent) GetNextAgentId() (v int64) {
 | |
| 	return p.NextAgentId
 | |
| }
 | |
| 
 | |
| func (p *Intent) GetSessionType() (v MultiAgentSessionType) {
 | |
| 	return p.SessionType
 | |
| }
 | |
| 
 | |
| var fieldIDToName_Intent = map[int16]string{
 | |
| 	1: "IntentId",
 | |
| 	2: "Prompt",
 | |
| 	3: "NextAgentId",
 | |
| 	4: "SessionType",
 | |
| }
 | |
| 
 | |
| func (p *Intent) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField4(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_Intent[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 *Intent) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.IntentId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Intent) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Prompt = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Intent) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.NextAgentId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Intent) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field MultiAgentSessionType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = MultiAgentSessionType(v)
 | |
| 	}
 | |
| 	p.SessionType = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *Intent) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("Intent"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			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 *Intent) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("IntentId", thrift.STRING, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.IntentId); 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 *Intent) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Prompt", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Prompt); 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 *Intent) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("NextAgentId", thrift.I64, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.NextAgentId); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *Intent) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("SessionType", thrift.I32, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.SessionType)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *Intent) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("Intent(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| // Time Capsule Information
 | |
| type TimeCapsuleInfo struct {
 | |
| 	TimeCapsuleMode      *TimeCapsuleMode      `thrift:"TimeCapsuleMode,1,optional" form:"time_capsule_mode" json:"time_capsule_mode,omitempty"`
 | |
| 	DisablePromptCalling *DisablePromptCalling `thrift:"DisablePromptCalling,2,optional" form:"disable_prompt_calling" json:"disable_prompt_calling,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewTimeCapsuleInfo() *TimeCapsuleInfo {
 | |
| 	return &TimeCapsuleInfo{}
 | |
| }
 | |
| 
 | |
| func (p *TimeCapsuleInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var TimeCapsuleInfo_TimeCapsuleMode_DEFAULT TimeCapsuleMode
 | |
| 
 | |
| func (p *TimeCapsuleInfo) GetTimeCapsuleMode() (v TimeCapsuleMode) {
 | |
| 	if !p.IsSetTimeCapsuleMode() {
 | |
| 		return TimeCapsuleInfo_TimeCapsuleMode_DEFAULT
 | |
| 	}
 | |
| 	return *p.TimeCapsuleMode
 | |
| }
 | |
| 
 | |
| var TimeCapsuleInfo_DisablePromptCalling_DEFAULT DisablePromptCalling
 | |
| 
 | |
| func (p *TimeCapsuleInfo) GetDisablePromptCalling() (v DisablePromptCalling) {
 | |
| 	if !p.IsSetDisablePromptCalling() {
 | |
| 		return TimeCapsuleInfo_DisablePromptCalling_DEFAULT
 | |
| 	}
 | |
| 	return *p.DisablePromptCalling
 | |
| }
 | |
| 
 | |
| var fieldIDToName_TimeCapsuleInfo = map[int16]string{
 | |
| 	1: "TimeCapsuleMode",
 | |
| 	2: "DisablePromptCalling",
 | |
| }
 | |
| 
 | |
| func (p *TimeCapsuleInfo) IsSetTimeCapsuleMode() bool {
 | |
| 	return p.TimeCapsuleMode != nil
 | |
| }
 | |
| 
 | |
| func (p *TimeCapsuleInfo) IsSetDisablePromptCalling() bool {
 | |
| 	return p.DisablePromptCalling != nil
 | |
| }
 | |
| 
 | |
| func (p *TimeCapsuleInfo) 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.I32 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				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_TimeCapsuleInfo[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 *TimeCapsuleInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *TimeCapsuleMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := TimeCapsuleMode(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.TimeCapsuleMode = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TimeCapsuleInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *DisablePromptCalling
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := DisablePromptCalling(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.DisablePromptCalling = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *TimeCapsuleInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("TimeCapsuleInfo"); 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 *TimeCapsuleInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTimeCapsuleMode() {
 | |
| 		if err = oprot.WriteFieldBegin("TimeCapsuleMode", thrift.I32, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.TimeCapsuleMode)); 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 *TimeCapsuleInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDisablePromptCalling() {
 | |
| 		if err = oprot.WriteFieldBegin("DisablePromptCalling", thrift.I32, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.DisablePromptCalling)); 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 *TimeCapsuleInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("TimeCapsuleInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type BotTagInfo struct {
 | |
| 	// Time capsule information tag key: time_capsule
 | |
| 	TimeCapsuleInfo *TimeCapsuleInfo `thrift:"TimeCapsuleInfo,1,optional" form:"time_capsule_info" json:"time_capsule_info,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewBotTagInfo() *BotTagInfo {
 | |
| 	return &BotTagInfo{}
 | |
| }
 | |
| 
 | |
| func (p *BotTagInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var BotTagInfo_TimeCapsuleInfo_DEFAULT *TimeCapsuleInfo
 | |
| 
 | |
| func (p *BotTagInfo) GetTimeCapsuleInfo() (v *TimeCapsuleInfo) {
 | |
| 	if !p.IsSetTimeCapsuleInfo() {
 | |
| 		return BotTagInfo_TimeCapsuleInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.TimeCapsuleInfo
 | |
| }
 | |
| 
 | |
| var fieldIDToName_BotTagInfo = map[int16]string{
 | |
| 	1: "TimeCapsuleInfo",
 | |
| }
 | |
| 
 | |
| func (p *BotTagInfo) IsSetTimeCapsuleInfo() bool {
 | |
| 	return p.TimeCapsuleInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotTagInfo) 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_BotTagInfo[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 *BotTagInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewTimeCapsuleInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.TimeCapsuleInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *BotTagInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("BotTagInfo"); 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 *BotTagInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTimeCapsuleInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("TimeCapsuleInfo", thrift.STRUCT, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.TimeCapsuleInfo.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 *BotTagInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("BotTagInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type FileboxInfo struct {
 | |
| 	Mode *FileboxInfoMode `thrift:"Mode,1,optional" form:"Mode" json:"Mode,omitempty" query:"Mode"`
 | |
| }
 | |
| 
 | |
| func NewFileboxInfo() *FileboxInfo {
 | |
| 	return &FileboxInfo{}
 | |
| }
 | |
| 
 | |
| func (p *FileboxInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var FileboxInfo_Mode_DEFAULT FileboxInfoMode
 | |
| 
 | |
| func (p *FileboxInfo) GetMode() (v FileboxInfoMode) {
 | |
| 	if !p.IsSetMode() {
 | |
| 		return FileboxInfo_Mode_DEFAULT
 | |
| 	}
 | |
| 	return *p.Mode
 | |
| }
 | |
| 
 | |
| var fieldIDToName_FileboxInfo = map[int16]string{
 | |
| 	1: "Mode",
 | |
| }
 | |
| 
 | |
| func (p *FileboxInfo) IsSetMode() bool {
 | |
| 	return p.Mode != nil
 | |
| }
 | |
| 
 | |
| func (p *FileboxInfo) 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.I32 {
 | |
| 				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_FileboxInfo[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 *FileboxInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *FileboxInfoMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := FileboxInfoMode(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.Mode = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *FileboxInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("FileboxInfo"); 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 *FileboxInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetMode() {
 | |
| 		if err = oprot.WriteFieldBegin("Mode", thrift.I32, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.Mode)); 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 *FileboxInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("FileboxInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| // bot information
 | |
| type BotInfo struct {
 | |
| 	// bot id
 | |
| 	BotId int64 `thrift:"BotId,1" form:"bot_id" json:"bot_id,string"`
 | |
| 	// bot name
 | |
| 	Name string `thrift:"Name,2" form:"name" json:"name"`
 | |
| 	// Bot description
 | |
| 	Description string `thrift:"Description,3" form:"description" json:"description"`
 | |
| 	// Bot icon uri
 | |
| 	IconUri string `thrift:"IconUri,4" form:"icon_uri" json:"icon_uri"`
 | |
| 	// Bot icon url
 | |
| 	IconUrl string `thrift:"IconUrl,5" form:"icon_url" json:"icon_url"`
 | |
| 	// creator id
 | |
| 	CreatorId int64 `thrift:"CreatorId,6" form:"creator_id" json:"creator_id,string"`
 | |
| 	// create_time
 | |
| 	CreateTime int64 `thrift:"CreateTime,7" form:"create_time" json:"create_time,string"`
 | |
| 	// update time
 | |
| 	UpdateTime int64 `thrift:"UpdateTime,8" form:"update_time" json:"update_time,string"`
 | |
| 	// line of business
 | |
| 	ConnectorId int64 `thrift:"ConnectorId,9" form:"connector_id" json:"connector_id,string"`
 | |
| 	// Version, ms
 | |
| 	Version string `thrift:"Version,10" form:"version" json:"version"`
 | |
| 	// model configuration
 | |
| 	ModelInfo *ModelInfo `thrift:"ModelInfo,11" form:"model_info" json:"model_info"`
 | |
| 	// Prompt message
 | |
| 	PromptInfo *PromptInfo `thrift:"PromptInfo,12" form:"prompt_info" json:"prompt_info"`
 | |
| 	// List of plugins
 | |
| 	PluginInfoList []*PluginInfo `thrift:"PluginInfoList,13" form:"plugin_info_list" json:"plugin_info_list"`
 | |
| 	// Workflow List
 | |
| 	WorkflowInfoList []*WorkflowInfo `thrift:"WorkflowInfoList,14" form:"workflow_info_list" json:"workflow_info_list"`
 | |
| 	// opening statement
 | |
| 	OnboardingInfo *OnboardingInfo `thrift:"OnboardingInfo,15" form:"onboarding_info" json:"onboarding_info"`
 | |
| 	// dataset
 | |
| 	Knowledge *Knowledge `thrift:"Knowledge,16" form:"knowledge" json:"knowledge"`
 | |
| 	// KV storage
 | |
| 	VariableList []*Variable `thrift:"VariableList,17" form:"variable_list" json:"variable_list"`
 | |
| 	// Task management/preset tasks
 | |
| 	TaskInfo *TaskInfo `thrift:"TaskInfo,18" form:"task_info" json:"task_info"`
 | |
| 	// data table
 | |
| 	DatabaseList []*Database `thrift:"DatabaseList,19" form:"database_list" json:"database_list"`
 | |
| 	// referral question
 | |
| 	SuggestReplyInfo *SuggestReplyInfo `thrift:"SuggestReplyInfo,20" form:"suggest_reply_info" json:"suggest_reply_info"`
 | |
| 	// Timbre Configuration
 | |
| 	VoicesInfo *VoicesInfo `thrift:"VoicesInfo,21" form:"voices_info" json:"voices_info"`
 | |
| 	// Additional information, extended fields
 | |
| 	BotExtInfo *BotExtInfo `thrift:"BotExtInfo,22" form:"bot_ext_info" json:"bot_ext_info"`
 | |
| 	// Bot type, single agent or multi agent
 | |
| 	BotMode BotMode `thrift:"BotMode,23" form:"bot_mode" json:"bot_mode"`
 | |
| 	// Multi agent mode agent information
 | |
| 	Agents []*Agent `thrift:"Agents,24" form:"agents" json:"agents"`
 | |
| 	// Bot type
 | |
| 	BotSpecies BotSpecies `thrift:"BotSpecies,25" form:"bot_species" json:"bot_species"`
 | |
| 	// Bot tag information, user new field
 | |
| 	BotTagInfo *BotTagInfo `thrift:"BotTagInfo,26" form:"bot_tag_info" json:"bot_tag_info"`
 | |
| 	// FileBox Information
 | |
| 	FileboxInfo *FileboxInfo `thrift:"FileboxInfo,27" form:"filebox_info" json:"filebox_info"`
 | |
| 	// multi_agent structure
 | |
| 	MultiAgentInfo *MultiAgentInfo `thrift:"MultiAgentInfo,28" form:"multi_agent_info" json:"multi_agent_info"`
 | |
| 	// Background cover list structure
 | |
| 	BackgroundImageInfoList []*BackgroundImageInfo `thrift:"BackgroundImageInfoList,29" form:"background_image_info_list" json:"background_image_info_list"`
 | |
| 	ShortcutSort            []string               `thrift:"ShortcutSort,30" form:"shortcut_sort" json:"shortcut_sort"`
 | |
| 	// bot state
 | |
| 	Status BotStatus `thrift:"Status,31" form:"status" json:"status"`
 | |
| 	// Hook information
 | |
| 	HookInfo *HookInfo `thrift:"HookInfo,32,optional" form:"hook_info" json:"hook_info,omitempty"`
 | |
| 	// User query collection configuration
 | |
| 	UserQueryCollectConf *UserQueryCollectConf `thrift:"UserQueryCollectConf,33" form:"user_query_collect_conf" json:"user_query_collect_conf"`
 | |
| 	// Orchestration information for workflow patterns
 | |
| 	LayoutInfo   *LayoutInfo  `thrift:"LayoutInfo,34" form:"layout_info" json:"layout_info"`
 | |
| 	BusinessType BusinessType `thrift:"BusinessType,35" form:"business_type" json:"business_type"`
 | |
| }
 | |
| 
 | |
| func NewBotInfo() *BotInfo {
 | |
| 	return &BotInfo{}
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetBotId() (v int64) {
 | |
| 	return p.BotId
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetName() (v string) {
 | |
| 	return p.Name
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetDescription() (v string) {
 | |
| 	return p.Description
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetIconUri() (v string) {
 | |
| 	return p.IconUri
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetIconUrl() (v string) {
 | |
| 	return p.IconUrl
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetCreatorId() (v int64) {
 | |
| 	return p.CreatorId
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetCreateTime() (v int64) {
 | |
| 	return p.CreateTime
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetUpdateTime() (v int64) {
 | |
| 	return p.UpdateTime
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetConnectorId() (v int64) {
 | |
| 	return p.ConnectorId
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetVersion() (v string) {
 | |
| 	return p.Version
 | |
| }
 | |
| 
 | |
| var BotInfo_ModelInfo_DEFAULT *ModelInfo
 | |
| 
 | |
| func (p *BotInfo) GetModelInfo() (v *ModelInfo) {
 | |
| 	if !p.IsSetModelInfo() {
 | |
| 		return BotInfo_ModelInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.ModelInfo
 | |
| }
 | |
| 
 | |
| var BotInfo_PromptInfo_DEFAULT *PromptInfo
 | |
| 
 | |
| func (p *BotInfo) GetPromptInfo() (v *PromptInfo) {
 | |
| 	if !p.IsSetPromptInfo() {
 | |
| 		return BotInfo_PromptInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.PromptInfo
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetPluginInfoList() (v []*PluginInfo) {
 | |
| 	return p.PluginInfoList
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetWorkflowInfoList() (v []*WorkflowInfo) {
 | |
| 	return p.WorkflowInfoList
 | |
| }
 | |
| 
 | |
| var BotInfo_OnboardingInfo_DEFAULT *OnboardingInfo
 | |
| 
 | |
| func (p *BotInfo) GetOnboardingInfo() (v *OnboardingInfo) {
 | |
| 	if !p.IsSetOnboardingInfo() {
 | |
| 		return BotInfo_OnboardingInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.OnboardingInfo
 | |
| }
 | |
| 
 | |
| var BotInfo_Knowledge_DEFAULT *Knowledge
 | |
| 
 | |
| func (p *BotInfo) GetKnowledge() (v *Knowledge) {
 | |
| 	if !p.IsSetKnowledge() {
 | |
| 		return BotInfo_Knowledge_DEFAULT
 | |
| 	}
 | |
| 	return p.Knowledge
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetVariableList() (v []*Variable) {
 | |
| 	return p.VariableList
 | |
| }
 | |
| 
 | |
| var BotInfo_TaskInfo_DEFAULT *TaskInfo
 | |
| 
 | |
| func (p *BotInfo) GetTaskInfo() (v *TaskInfo) {
 | |
| 	if !p.IsSetTaskInfo() {
 | |
| 		return BotInfo_TaskInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.TaskInfo
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetDatabaseList() (v []*Database) {
 | |
| 	return p.DatabaseList
 | |
| }
 | |
| 
 | |
| var BotInfo_SuggestReplyInfo_DEFAULT *SuggestReplyInfo
 | |
| 
 | |
| func (p *BotInfo) GetSuggestReplyInfo() (v *SuggestReplyInfo) {
 | |
| 	if !p.IsSetSuggestReplyInfo() {
 | |
| 		return BotInfo_SuggestReplyInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.SuggestReplyInfo
 | |
| }
 | |
| 
 | |
| var BotInfo_VoicesInfo_DEFAULT *VoicesInfo
 | |
| 
 | |
| func (p *BotInfo) GetVoicesInfo() (v *VoicesInfo) {
 | |
| 	if !p.IsSetVoicesInfo() {
 | |
| 		return BotInfo_VoicesInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.VoicesInfo
 | |
| }
 | |
| 
 | |
| var BotInfo_BotExtInfo_DEFAULT *BotExtInfo
 | |
| 
 | |
| func (p *BotInfo) GetBotExtInfo() (v *BotExtInfo) {
 | |
| 	if !p.IsSetBotExtInfo() {
 | |
| 		return BotInfo_BotExtInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.BotExtInfo
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetBotMode() (v BotMode) {
 | |
| 	return p.BotMode
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetAgents() (v []*Agent) {
 | |
| 	return p.Agents
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetBotSpecies() (v BotSpecies) {
 | |
| 	return p.BotSpecies
 | |
| }
 | |
| 
 | |
| var BotInfo_BotTagInfo_DEFAULT *BotTagInfo
 | |
| 
 | |
| func (p *BotInfo) GetBotTagInfo() (v *BotTagInfo) {
 | |
| 	if !p.IsSetBotTagInfo() {
 | |
| 		return BotInfo_BotTagInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.BotTagInfo
 | |
| }
 | |
| 
 | |
| var BotInfo_FileboxInfo_DEFAULT *FileboxInfo
 | |
| 
 | |
| func (p *BotInfo) GetFileboxInfo() (v *FileboxInfo) {
 | |
| 	if !p.IsSetFileboxInfo() {
 | |
| 		return BotInfo_FileboxInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.FileboxInfo
 | |
| }
 | |
| 
 | |
| var BotInfo_MultiAgentInfo_DEFAULT *MultiAgentInfo
 | |
| 
 | |
| func (p *BotInfo) GetMultiAgentInfo() (v *MultiAgentInfo) {
 | |
| 	if !p.IsSetMultiAgentInfo() {
 | |
| 		return BotInfo_MultiAgentInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.MultiAgentInfo
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetBackgroundImageInfoList() (v []*BackgroundImageInfo) {
 | |
| 	return p.BackgroundImageInfoList
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetShortcutSort() (v []string) {
 | |
| 	return p.ShortcutSort
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetStatus() (v BotStatus) {
 | |
| 	return p.Status
 | |
| }
 | |
| 
 | |
| var BotInfo_HookInfo_DEFAULT *HookInfo
 | |
| 
 | |
| func (p *BotInfo) GetHookInfo() (v *HookInfo) {
 | |
| 	if !p.IsSetHookInfo() {
 | |
| 		return BotInfo_HookInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.HookInfo
 | |
| }
 | |
| 
 | |
| var BotInfo_UserQueryCollectConf_DEFAULT *UserQueryCollectConf
 | |
| 
 | |
| func (p *BotInfo) GetUserQueryCollectConf() (v *UserQueryCollectConf) {
 | |
| 	if !p.IsSetUserQueryCollectConf() {
 | |
| 		return BotInfo_UserQueryCollectConf_DEFAULT
 | |
| 	}
 | |
| 	return p.UserQueryCollectConf
 | |
| }
 | |
| 
 | |
| var BotInfo_LayoutInfo_DEFAULT *LayoutInfo
 | |
| 
 | |
| func (p *BotInfo) GetLayoutInfo() (v *LayoutInfo) {
 | |
| 	if !p.IsSetLayoutInfo() {
 | |
| 		return BotInfo_LayoutInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.LayoutInfo
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) GetBusinessType() (v BusinessType) {
 | |
| 	return p.BusinessType
 | |
| }
 | |
| 
 | |
| var fieldIDToName_BotInfo = map[int16]string{
 | |
| 	1:  "BotId",
 | |
| 	2:  "Name",
 | |
| 	3:  "Description",
 | |
| 	4:  "IconUri",
 | |
| 	5:  "IconUrl",
 | |
| 	6:  "CreatorId",
 | |
| 	7:  "CreateTime",
 | |
| 	8:  "UpdateTime",
 | |
| 	9:  "ConnectorId",
 | |
| 	10: "Version",
 | |
| 	11: "ModelInfo",
 | |
| 	12: "PromptInfo",
 | |
| 	13: "PluginInfoList",
 | |
| 	14: "WorkflowInfoList",
 | |
| 	15: "OnboardingInfo",
 | |
| 	16: "Knowledge",
 | |
| 	17: "VariableList",
 | |
| 	18: "TaskInfo",
 | |
| 	19: "DatabaseList",
 | |
| 	20: "SuggestReplyInfo",
 | |
| 	21: "VoicesInfo",
 | |
| 	22: "BotExtInfo",
 | |
| 	23: "BotMode",
 | |
| 	24: "Agents",
 | |
| 	25: "BotSpecies",
 | |
| 	26: "BotTagInfo",
 | |
| 	27: "FileboxInfo",
 | |
| 	28: "MultiAgentInfo",
 | |
| 	29: "BackgroundImageInfoList",
 | |
| 	30: "ShortcutSort",
 | |
| 	31: "Status",
 | |
| 	32: "HookInfo",
 | |
| 	33: "UserQueryCollectConf",
 | |
| 	34: "LayoutInfo",
 | |
| 	35: "BusinessType",
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) IsSetModelInfo() bool {
 | |
| 	return p.ModelInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) IsSetPromptInfo() bool {
 | |
| 	return p.PromptInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) IsSetOnboardingInfo() bool {
 | |
| 	return p.OnboardingInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) IsSetKnowledge() bool {
 | |
| 	return p.Knowledge != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) IsSetTaskInfo() bool {
 | |
| 	return p.TaskInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) IsSetSuggestReplyInfo() bool {
 | |
| 	return p.SuggestReplyInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) IsSetVoicesInfo() bool {
 | |
| 	return p.VoicesInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) IsSetBotExtInfo() bool {
 | |
| 	return p.BotExtInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) IsSetBotTagInfo() bool {
 | |
| 	return p.BotTagInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) IsSetFileboxInfo() bool {
 | |
| 	return p.FileboxInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) IsSetMultiAgentInfo() bool {
 | |
| 	return p.MultiAgentInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) IsSetHookInfo() bool {
 | |
| 	return p.HookInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) IsSetUserQueryCollectConf() bool {
 | |
| 	return p.UserQueryCollectConf != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) IsSetLayoutInfo() bool {
 | |
| 	return p.LayoutInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) 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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField7(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 8:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField8(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 9:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField9(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 10:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField10(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 11:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField11(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 12:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField12(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 13:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField13(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 14:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField14(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 15:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField15(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 16:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField16(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 17:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField17(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 18:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField18(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 19:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField19(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 20:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField20(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 21:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField21(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 22:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField22(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 23:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField23(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 24:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField24(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 25:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField25(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 26:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField26(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 27:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField27(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 28:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField28(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 29:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField29(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 30:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField30(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 31:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField31(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 32:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField32(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 33:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField33(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 34:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField34(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 35:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField35(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_BotInfo[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 *BotInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.BotId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Name = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Description = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.IconUri = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.IconUrl = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.CreatorId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.CreateTime = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.UpdateTime = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ConnectorId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Version = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField11(iprot thrift.TProtocol) error {
 | |
| 	_field := NewModelInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.ModelInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField12(iprot thrift.TProtocol) error {
 | |
| 	_field := NewPromptInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.PromptInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField13(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*PluginInfo, 0, size)
 | |
| 	values := make([]PluginInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.PluginInfoList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField14(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*WorkflowInfo, 0, size)
 | |
| 	values := make([]WorkflowInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.WorkflowInfoList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField15(iprot thrift.TProtocol) error {
 | |
| 	_field := NewOnboardingInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.OnboardingInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField16(iprot thrift.TProtocol) error {
 | |
| 	_field := NewKnowledge()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Knowledge = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField17(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*Variable, 0, size)
 | |
| 	values := make([]Variable, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.VariableList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField18(iprot thrift.TProtocol) error {
 | |
| 	_field := NewTaskInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.TaskInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField19(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*Database, 0, size)
 | |
| 	values := make([]Database, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.DatabaseList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField20(iprot thrift.TProtocol) error {
 | |
| 	_field := NewSuggestReplyInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.SuggestReplyInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField21(iprot thrift.TProtocol) error {
 | |
| 	_field := NewVoicesInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.VoicesInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField22(iprot thrift.TProtocol) error {
 | |
| 	_field := NewBotExtInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BotExtInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField23(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field BotMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = BotMode(v)
 | |
| 	}
 | |
| 	p.BotMode = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField24(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*Agent, 0, size)
 | |
| 	values := make([]Agent, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Agents = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField25(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field BotSpecies
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = BotSpecies(v)
 | |
| 	}
 | |
| 	p.BotSpecies = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField26(iprot thrift.TProtocol) error {
 | |
| 	_field := NewBotTagInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BotTagInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField27(iprot thrift.TProtocol) error {
 | |
| 	_field := NewFileboxInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.FileboxInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField28(iprot thrift.TProtocol) error {
 | |
| 	_field := NewMultiAgentInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.MultiAgentInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField29(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*BackgroundImageInfo, 0, size)
 | |
| 	values := make([]BackgroundImageInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BackgroundImageInfoList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField30(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := 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
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.ShortcutSort = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField31(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field BotStatus
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = BotStatus(v)
 | |
| 	}
 | |
| 	p.Status = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField32(iprot thrift.TProtocol) error {
 | |
| 	_field := NewHookInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.HookInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField33(iprot thrift.TProtocol) error {
 | |
| 	_field := NewUserQueryCollectConf()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.UserQueryCollectConf = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField34(iprot thrift.TProtocol) error {
 | |
| 	_field := NewLayoutInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.LayoutInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfo) ReadField35(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field BusinessType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = BusinessType(v)
 | |
| 	}
 | |
| 	p.BusinessType = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("BotInfo"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField8(oprot); err != nil {
 | |
| 			fieldId = 8
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField9(oprot); err != nil {
 | |
| 			fieldId = 9
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField10(oprot); err != nil {
 | |
| 			fieldId = 10
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField11(oprot); err != nil {
 | |
| 			fieldId = 11
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField12(oprot); err != nil {
 | |
| 			fieldId = 12
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField13(oprot); err != nil {
 | |
| 			fieldId = 13
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField14(oprot); err != nil {
 | |
| 			fieldId = 14
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField15(oprot); err != nil {
 | |
| 			fieldId = 15
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField16(oprot); err != nil {
 | |
| 			fieldId = 16
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField17(oprot); err != nil {
 | |
| 			fieldId = 17
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField18(oprot); err != nil {
 | |
| 			fieldId = 18
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField19(oprot); err != nil {
 | |
| 			fieldId = 19
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField20(oprot); err != nil {
 | |
| 			fieldId = 20
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField21(oprot); err != nil {
 | |
| 			fieldId = 21
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField22(oprot); err != nil {
 | |
| 			fieldId = 22
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField23(oprot); err != nil {
 | |
| 			fieldId = 23
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField24(oprot); err != nil {
 | |
| 			fieldId = 24
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField25(oprot); err != nil {
 | |
| 			fieldId = 25
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField26(oprot); err != nil {
 | |
| 			fieldId = 26
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField27(oprot); err != nil {
 | |
| 			fieldId = 27
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField28(oprot); err != nil {
 | |
| 			fieldId = 28
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField29(oprot); err != nil {
 | |
| 			fieldId = 29
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField30(oprot); err != nil {
 | |
| 			fieldId = 30
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField31(oprot); err != nil {
 | |
| 			fieldId = 31
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField32(oprot); err != nil {
 | |
| 			fieldId = 32
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField33(oprot); err != nil {
 | |
| 			fieldId = 33
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField34(oprot); err != nil {
 | |
| 			fieldId = 34
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField35(oprot); err != nil {
 | |
| 			fieldId = 35
 | |
| 			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 *BotInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BotId", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.BotId); 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 *BotInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Name", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Name); 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 *BotInfo) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Description", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Description); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("IconUri", thrift.STRING, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.IconUri); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("IconUrl", thrift.STRING, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.IconUrl); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("CreatorId", thrift.I64, 6); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.CreatorId); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("CreateTime", thrift.I64, 7); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.CreateTime); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("UpdateTime", thrift.I64, 8); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.UpdateTime); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ConnectorId", thrift.I64, 9); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.ConnectorId); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Version", thrift.STRING, 10); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Version); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ModelInfo", thrift.STRUCT, 11); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.ModelInfo.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 11 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 11 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField12(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("PromptInfo", thrift.STRUCT, 12); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.PromptInfo.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 12 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 12 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField13(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("PluginInfoList", thrift.LIST, 13); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.PluginInfoList)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.PluginInfoList {
 | |
| 		if err := v.Write(oprot); 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 13 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 13 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField14(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("WorkflowInfoList", thrift.LIST, 14); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.WorkflowInfoList)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.WorkflowInfoList {
 | |
| 		if err := v.Write(oprot); 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 14 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 14 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField15(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("OnboardingInfo", thrift.STRUCT, 15); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.OnboardingInfo.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 15 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 15 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField16(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Knowledge", thrift.STRUCT, 16); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Knowledge.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 16 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 16 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField17(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("VariableList", thrift.LIST, 17); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.VariableList)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.VariableList {
 | |
| 		if err := v.Write(oprot); 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 17 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 17 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField18(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("TaskInfo", thrift.STRUCT, 18); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.TaskInfo.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 18 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 18 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField19(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("DatabaseList", thrift.LIST, 19); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.DatabaseList)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.DatabaseList {
 | |
| 		if err := v.Write(oprot); 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 19 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 19 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField20(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("SuggestReplyInfo", thrift.STRUCT, 20); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.SuggestReplyInfo.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 20 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 20 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField21(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("VoicesInfo", thrift.STRUCT, 21); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.VoicesInfo.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 21 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 21 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField22(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BotExtInfo", thrift.STRUCT, 22); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.BotExtInfo.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 22 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 22 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField23(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BotMode", thrift.I32, 23); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.BotMode)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 23 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 23 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField24(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Agents", thrift.LIST, 24); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Agents)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.Agents {
 | |
| 		if err := v.Write(oprot); 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 24 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 24 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField25(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BotSpecies", thrift.I32, 25); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.BotSpecies)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 25 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 25 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField26(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BotTagInfo", thrift.STRUCT, 26); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.BotTagInfo.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 26 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 26 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField27(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("FileboxInfo", thrift.STRUCT, 27); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.FileboxInfo.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 27 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 27 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField28(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("MultiAgentInfo", thrift.STRUCT, 28); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.MultiAgentInfo.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 28 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 28 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField29(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BackgroundImageInfoList", thrift.LIST, 29); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.BackgroundImageInfoList)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.BackgroundImageInfoList {
 | |
| 		if err := v.Write(oprot); 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 29 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 29 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField30(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ShortcutSort", thrift.LIST, 30); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRING, len(p.ShortcutSort)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.ShortcutSort {
 | |
| 		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 30 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 30 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField31(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Status", thrift.I32, 31); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.Status)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 31 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 31 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField32(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetHookInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("HookInfo", thrift.STRUCT, 32); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.HookInfo.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 32 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 32 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField33(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("UserQueryCollectConf", thrift.STRUCT, 33); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.UserQueryCollectConf.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 33 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 33 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField34(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("LayoutInfo", thrift.STRUCT, 34); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.LayoutInfo.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 34 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 34 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfo) writeField35(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BusinessType", thrift.I32, 35); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.BusinessType)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 35 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 35 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *BotInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("BotInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type CommonKnowledge struct {
 | |
| 	// Knowledge Base Information
 | |
| 	KnowledgeInfos []*KnowledgeInfo `thrift:"knowledge_infos,1" form:"knowledge_infos" json:"knowledge_infos" query:"knowledge_infos"`
 | |
| }
 | |
| 
 | |
| func NewCommonKnowledge() *CommonKnowledge {
 | |
| 	return &CommonKnowledge{}
 | |
| }
 | |
| 
 | |
| func (p *CommonKnowledge) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *CommonKnowledge) GetKnowledgeInfos() (v []*KnowledgeInfo) {
 | |
| 	return p.KnowledgeInfos
 | |
| }
 | |
| 
 | |
| var fieldIDToName_CommonKnowledge = map[int16]string{
 | |
| 	1: "knowledge_infos",
 | |
| }
 | |
| 
 | |
| func (p *CommonKnowledge) 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.LIST {
 | |
| 				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_CommonKnowledge[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 *CommonKnowledge) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*KnowledgeInfo, 0, size)
 | |
| 	values := make([]KnowledgeInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.KnowledgeInfos = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *CommonKnowledge) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("CommonKnowledge"); 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 *CommonKnowledge) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("knowledge_infos", thrift.LIST, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.KnowledgeInfos)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.KnowledgeInfos {
 | |
| 		if err := v.Write(oprot); 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 1 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *CommonKnowledge) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("CommonKnowledge(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type ShortcutCommandComponent struct {
 | |
| 	// Panel parameters
 | |
| 	Name string `thrift:"name,1" form:"name" json:"name" query:"name"`
 | |
| 	//parameter description
 | |
| 	Description string `thrift:"description,2" form:"description" json:"description" query:"description"`
 | |
| 	// Input type text, select, file
 | |
| 	Type string `thrift:"type,3" form:"type" json:"type" query:"type"`
 | |
| 	// When requesting a tool, the key of the parameter corresponds to the parameter name of the tool. If not, it will not be returned.
 | |
| 	ToolParameter *string `thrift:"tool_parameter,4,optional" form:"tool_parameter" json:"tool_parameter,omitempty" query:"tool_parameter"`
 | |
| 	// Options list when type is select or what types are supported when type is file image, doc, table, audio, video, zip, code, txt, ppt
 | |
| 	Options []string `thrift:"options,5,optional" form:"options" json:"options,omitempty" query:"options"`
 | |
| 	// Default value, not returned when not configured
 | |
| 	DefaultValue *string `thrift:"default_value,6,optional" form:"default_value" json:"default_value,omitempty" query:"default_value"`
 | |
| 	// Whether to hide or not to show, the shortcut command of the online bot tool type does not return the component with hide = true
 | |
| 	IsHide bool `thrift:"is_hide,7" form:"is_hide" json:"is_hide" query:"is_hide"`
 | |
| }
 | |
| 
 | |
| func NewShortcutCommandComponent() *ShortcutCommandComponent {
 | |
| 	return &ShortcutCommandComponent{}
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandComponent) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandComponent) GetName() (v string) {
 | |
| 	return p.Name
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandComponent) GetDescription() (v string) {
 | |
| 	return p.Description
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandComponent) GetType() (v string) {
 | |
| 	return p.Type
 | |
| }
 | |
| 
 | |
| var ShortcutCommandComponent_ToolParameter_DEFAULT string
 | |
| 
 | |
| func (p *ShortcutCommandComponent) GetToolParameter() (v string) {
 | |
| 	if !p.IsSetToolParameter() {
 | |
| 		return ShortcutCommandComponent_ToolParameter_DEFAULT
 | |
| 	}
 | |
| 	return *p.ToolParameter
 | |
| }
 | |
| 
 | |
| var ShortcutCommandComponent_Options_DEFAULT []string
 | |
| 
 | |
| func (p *ShortcutCommandComponent) GetOptions() (v []string) {
 | |
| 	if !p.IsSetOptions() {
 | |
| 		return ShortcutCommandComponent_Options_DEFAULT
 | |
| 	}
 | |
| 	return p.Options
 | |
| }
 | |
| 
 | |
| var ShortcutCommandComponent_DefaultValue_DEFAULT string
 | |
| 
 | |
| func (p *ShortcutCommandComponent) GetDefaultValue() (v string) {
 | |
| 	if !p.IsSetDefaultValue() {
 | |
| 		return ShortcutCommandComponent_DefaultValue_DEFAULT
 | |
| 	}
 | |
| 	return *p.DefaultValue
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandComponent) GetIsHide() (v bool) {
 | |
| 	return p.IsHide
 | |
| }
 | |
| 
 | |
| var fieldIDToName_ShortcutCommandComponent = map[int16]string{
 | |
| 	1: "name",
 | |
| 	2: "description",
 | |
| 	3: "type",
 | |
| 	4: "tool_parameter",
 | |
| 	5: "options",
 | |
| 	6: "default_value",
 | |
| 	7: "is_hide",
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandComponent) IsSetToolParameter() bool {
 | |
| 	return p.ToolParameter != nil
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandComponent) IsSetOptions() bool {
 | |
| 	return p.Options != nil
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandComponent) IsSetDefaultValue() bool {
 | |
| 	return p.DefaultValue != nil
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandComponent) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField7(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_ShortcutCommandComponent[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 *ShortcutCommandComponent) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Name = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandComponent) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Description = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandComponent) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Type = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandComponent) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ToolParameter = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandComponent) ReadField5(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := 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
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Options = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandComponent) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.DefaultValue = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandComponent) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.IsHide = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandComponent) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("ShortcutCommandComponent"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			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 *ShortcutCommandComponent) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Name); 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 *ShortcutCommandComponent) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("description", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Description); 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 *ShortcutCommandComponent) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("type", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Type); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *ShortcutCommandComponent) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetToolParameter() {
 | |
| 		if err = oprot.WriteFieldBegin("tool_parameter", thrift.STRING, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ToolParameter); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *ShortcutCommandComponent) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetOptions() {
 | |
| 		if err = oprot.WriteFieldBegin("options", thrift.LIST, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRING, len(p.Options)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.Options {
 | |
| 			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 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *ShortcutCommandComponent) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDefaultValue() {
 | |
| 		if err = oprot.WriteFieldBegin("default_value", thrift.STRING, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.DefaultValue); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *ShortcutCommandComponent) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("is_hide", thrift.BOOL, 7); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(p.IsHide); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandComponent) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("ShortcutCommandComponent(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type ShortcutCommandToolInfo struct {
 | |
| 	//
 | |
| 	Name string `thrift:"name,1" form:"name" json:"name" query:"name"`
 | |
| 	// Tool type workflow plugin
 | |
| 	Type string `thrift:"type,2" form:"type" json:"type" query:"type"`
 | |
| }
 | |
| 
 | |
| func NewShortcutCommandToolInfo() *ShortcutCommandToolInfo {
 | |
| 	return &ShortcutCommandToolInfo{}
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandToolInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandToolInfo) GetName() (v string) {
 | |
| 	return p.Name
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandToolInfo) GetType() (v string) {
 | |
| 	return p.Type
 | |
| }
 | |
| 
 | |
| var fieldIDToName_ShortcutCommandToolInfo = map[int16]string{
 | |
| 	1: "name",
 | |
| 	2: "type",
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandToolInfo) 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.STRING {
 | |
| 				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_ShortcutCommandToolInfo[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 *ShortcutCommandToolInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Name = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandToolInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Type = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandToolInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("ShortcutCommandToolInfo"); 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 *ShortcutCommandToolInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Name); 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 *ShortcutCommandToolInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("type", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Type); 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 *ShortcutCommandToolInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("ShortcutCommandToolInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type ShortcutCommandInfo struct {
 | |
| 	// Quick Command ID
 | |
| 	ID int64 `thrift:"id,1" form:"id" json:"id,string" query:"id"`
 | |
| 	// Shortcut button name
 | |
| 	Name string `thrift:"name,2" form:"name" json:"name" query:"name"`
 | |
| 	// Quick Instruction
 | |
| 	Command string `thrift:"command,3" form:"command" json:"command" query:"command"`
 | |
| 	// shortcut description
 | |
| 	Description string `thrift:"description,4" form:"description" json:"description" query:"description"`
 | |
| 	// Command query template
 | |
| 	QueryTemplate string `thrift:"query_template,5" form:"query_template" json:"query_template" query:"query_template"`
 | |
| 	// Quick command icon
 | |
| 	IconURL string `thrift:"icon_url,6" form:"icon_url" json:"icon_url" query:"icon_url"`
 | |
| 	// Component list (parameter list)
 | |
| 	Components []*ShortcutCommandComponent `thrift:"components,7,optional" form:"components" json:"components,omitempty" query:"components"`
 | |
| 	// Tool information
 | |
| 	Tool *ShortcutCommandToolInfo `thrift:"tool,8,optional" form:"tool" json:"tool,omitempty" query:"tool"`
 | |
| 	//When the multi instruction is executed by which node, it will not be returned without configuration
 | |
| 	AgentID *int64 `thrift:"agent_id,9,optional" form:"agent_id" json:"agent_id,string,omitempty" query:"agent_id"`
 | |
| }
 | |
| 
 | |
| func NewShortcutCommandInfo() *ShortcutCommandInfo {
 | |
| 	return &ShortcutCommandInfo{}
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandInfo) GetID() (v int64) {
 | |
| 	return p.ID
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandInfo) GetName() (v string) {
 | |
| 	return p.Name
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandInfo) GetCommand() (v string) {
 | |
| 	return p.Command
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandInfo) GetDescription() (v string) {
 | |
| 	return p.Description
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandInfo) GetQueryTemplate() (v string) {
 | |
| 	return p.QueryTemplate
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandInfo) GetIconURL() (v string) {
 | |
| 	return p.IconURL
 | |
| }
 | |
| 
 | |
| var ShortcutCommandInfo_Components_DEFAULT []*ShortcutCommandComponent
 | |
| 
 | |
| func (p *ShortcutCommandInfo) GetComponents() (v []*ShortcutCommandComponent) {
 | |
| 	if !p.IsSetComponents() {
 | |
| 		return ShortcutCommandInfo_Components_DEFAULT
 | |
| 	}
 | |
| 	return p.Components
 | |
| }
 | |
| 
 | |
| var ShortcutCommandInfo_Tool_DEFAULT *ShortcutCommandToolInfo
 | |
| 
 | |
| func (p *ShortcutCommandInfo) GetTool() (v *ShortcutCommandToolInfo) {
 | |
| 	if !p.IsSetTool() {
 | |
| 		return ShortcutCommandInfo_Tool_DEFAULT
 | |
| 	}
 | |
| 	return p.Tool
 | |
| }
 | |
| 
 | |
| var ShortcutCommandInfo_AgentID_DEFAULT int64
 | |
| 
 | |
| func (p *ShortcutCommandInfo) GetAgentID() (v int64) {
 | |
| 	if !p.IsSetAgentID() {
 | |
| 		return ShortcutCommandInfo_AgentID_DEFAULT
 | |
| 	}
 | |
| 	return *p.AgentID
 | |
| }
 | |
| 
 | |
| var fieldIDToName_ShortcutCommandInfo = map[int16]string{
 | |
| 	1: "id",
 | |
| 	2: "name",
 | |
| 	3: "command",
 | |
| 	4: "description",
 | |
| 	5: "query_template",
 | |
| 	6: "icon_url",
 | |
| 	7: "components",
 | |
| 	8: "tool",
 | |
| 	9: "agent_id",
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandInfo) IsSetComponents() bool {
 | |
| 	return p.Components != nil
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandInfo) IsSetTool() bool {
 | |
| 	return p.Tool != nil
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandInfo) IsSetAgentID() bool {
 | |
| 	return p.AgentID != nil
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandInfo) 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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField7(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 8:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField8(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 9:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField9(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_ShortcutCommandInfo[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 *ShortcutCommandInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Name = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandInfo) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Command = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandInfo) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Description = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandInfo) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.QueryTemplate = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandInfo) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.IconURL = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandInfo) ReadField7(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*ShortcutCommandComponent, 0, size)
 | |
| 	values := make([]ShortcutCommandComponent, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Components = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandInfo) ReadField8(iprot thrift.TProtocol) error {
 | |
| 	_field := NewShortcutCommandToolInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Tool = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ShortcutCommandInfo) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.AgentID = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("ShortcutCommandInfo"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField8(oprot); err != nil {
 | |
| 			fieldId = 8
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField9(oprot); err != nil {
 | |
| 			fieldId = 9
 | |
| 			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 *ShortcutCommandInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("id", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.ID); 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 *ShortcutCommandInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("name", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Name); 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 *ShortcutCommandInfo) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("command", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Command); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *ShortcutCommandInfo) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("description", thrift.STRING, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Description); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *ShortcutCommandInfo) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("query_template", thrift.STRING, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.QueryTemplate); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *ShortcutCommandInfo) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("icon_url", thrift.STRING, 6); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.IconURL); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *ShortcutCommandInfo) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetComponents() {
 | |
| 		if err = oprot.WriteFieldBegin("components", thrift.LIST, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Components)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.Components {
 | |
| 			if err := v.Write(oprot); 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 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *ShortcutCommandInfo) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTool() {
 | |
| 		if err = oprot.WriteFieldBegin("tool", thrift.STRUCT, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Tool.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 8 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
 | |
| }
 | |
| func (p *ShortcutCommandInfo) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAgentID() {
 | |
| 		if err = oprot.WriteFieldBegin("agent_id", thrift.I64, 9); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.AgentID); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *ShortcutCommandInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("ShortcutCommandInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type OpenAPIBotInfo struct {
 | |
| 	// bot id
 | |
| 	BotID int64 `thrift:"bot_id,1" form:"bot_id" json:"bot_id,string" query:"bot_id"`
 | |
| 	// bot name
 | |
| 	Name string `thrift:"name,2" form:"name" json:"name" query:"name"`
 | |
| 	// Bot description
 | |
| 	Description string `thrift:"description,3" form:"description" json:"description" query:"description"`
 | |
| 	// Bot image url
 | |
| 	IconURL string `thrift:"icon_url,4" form:"icon_url" json:"icon_url" query:"icon_url"`
 | |
| 	// create_time
 | |
| 	CreateTime int64 `thrift:"create_time,5" form:"create_time" json:"create_time" query:"create_time"`
 | |
| 	// update time
 | |
| 	UpdateTime int64 `thrift:"update_time,6" form:"update_time" json:"update_time" query:"update_time"`
 | |
| 	// version
 | |
| 	Version string `thrift:"version,7" form:"version" json:"version" query:"version"`
 | |
| 	// Prompt message
 | |
| 	PromptInfo *PromptInfo `thrift:"prompt_info,8" form:"prompt_info" json:"prompt_info" query:"prompt_info"`
 | |
| 	// opening statement
 | |
| 	OnboardingInfo *OnboardingInfo `thrift:"onboarding_info,9" form:"onboarding_info" json:"onboarding_info" query:"onboarding_info"`
 | |
| 	// Bot type, single agent or multi agent
 | |
| 	BotMode BotMode `thrift:"bot_mode,10" form:"bot_mode" json:"bot_mode" query:"bot_mode"`
 | |
| 	//    11: optional list < VoiceData > voice_data_list,//selected voice message
 | |
| 	ModelInfo *ModelInfo `thrift:"model_info,12,optional" form:"model_info" json:"model_info,omitempty" query:"model_info"`
 | |
| 	// Plugin information list
 | |
| 	PluginInfoList []*PluginInfo `thrift:"plugin_info_list,13" form:"plugin_info_list" json:"plugin_info_list" query:"plugin_info_list"`
 | |
| 	// Knowledge Base Information
 | |
| 	Knowledge *CommonKnowledge `thrift:"knowledge,14,optional" form:"knowledge" json:"knowledge,omitempty" query:"knowledge"`
 | |
| 	// Workflow information list
 | |
| 	WorkflowInfoList []*WorkflowInfo `thrift:"workflow_info_list,15" form:"workflow_info_list" json:"workflow_info_list" query:"workflow_info_list"`
 | |
| 	// Quick Command Information List
 | |
| 	ShortcutCommands []*ShortcutCommandInfo `thrift:"shortcut_commands,16" form:"shortcut_commands" json:"shortcut_commands" query:"shortcut_commands"`
 | |
| 	//    17: list < Voice > voice_info_list,//Tone Configuration
 | |
| 	DefaultUserInputType string `thrift:"default_user_input_type,18" form:"default_user_input_type" json:"default_user_input_type" query:"default_user_input_type"`
 | |
| 	// User Question Suggestions
 | |
| 	SuggestReplyInfo *SuggestReplyInfo `thrift:"suggest_reply_info,19" form:"suggest_reply_info" json:"suggest_reply_info" query:"suggest_reply_info"`
 | |
| 	// background image
 | |
| 	BackgroundImageInfo *BackgroundImageInfo `thrift:"background_image_info,20" form:"background_image_info" json:"background_image_info" query:"background_image_info"`
 | |
| 	// Variable list
 | |
| 	Variables []*Variable `thrift:"variables,21" form:"variables" json:"variables" query:"variables"`
 | |
| }
 | |
| 
 | |
| func NewOpenAPIBotInfo() *OpenAPIBotInfo {
 | |
| 	return &OpenAPIBotInfo{}
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetBotID() (v int64) {
 | |
| 	return p.BotID
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetName() (v string) {
 | |
| 	return p.Name
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetDescription() (v string) {
 | |
| 	return p.Description
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetIconURL() (v string) {
 | |
| 	return p.IconURL
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetCreateTime() (v int64) {
 | |
| 	return p.CreateTime
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetUpdateTime() (v int64) {
 | |
| 	return p.UpdateTime
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetVersion() (v string) {
 | |
| 	return p.Version
 | |
| }
 | |
| 
 | |
| var OpenAPIBotInfo_PromptInfo_DEFAULT *PromptInfo
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetPromptInfo() (v *PromptInfo) {
 | |
| 	if !p.IsSetPromptInfo() {
 | |
| 		return OpenAPIBotInfo_PromptInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.PromptInfo
 | |
| }
 | |
| 
 | |
| var OpenAPIBotInfo_OnboardingInfo_DEFAULT *OnboardingInfo
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetOnboardingInfo() (v *OnboardingInfo) {
 | |
| 	if !p.IsSetOnboardingInfo() {
 | |
| 		return OpenAPIBotInfo_OnboardingInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.OnboardingInfo
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetBotMode() (v BotMode) {
 | |
| 	return p.BotMode
 | |
| }
 | |
| 
 | |
| var OpenAPIBotInfo_ModelInfo_DEFAULT *ModelInfo
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetModelInfo() (v *ModelInfo) {
 | |
| 	if !p.IsSetModelInfo() {
 | |
| 		return OpenAPIBotInfo_ModelInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.ModelInfo
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetPluginInfoList() (v []*PluginInfo) {
 | |
| 	return p.PluginInfoList
 | |
| }
 | |
| 
 | |
| var OpenAPIBotInfo_Knowledge_DEFAULT *CommonKnowledge
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetKnowledge() (v *CommonKnowledge) {
 | |
| 	if !p.IsSetKnowledge() {
 | |
| 		return OpenAPIBotInfo_Knowledge_DEFAULT
 | |
| 	}
 | |
| 	return p.Knowledge
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetWorkflowInfoList() (v []*WorkflowInfo) {
 | |
| 	return p.WorkflowInfoList
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetShortcutCommands() (v []*ShortcutCommandInfo) {
 | |
| 	return p.ShortcutCommands
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetDefaultUserInputType() (v string) {
 | |
| 	return p.DefaultUserInputType
 | |
| }
 | |
| 
 | |
| var OpenAPIBotInfo_SuggestReplyInfo_DEFAULT *SuggestReplyInfo
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetSuggestReplyInfo() (v *SuggestReplyInfo) {
 | |
| 	if !p.IsSetSuggestReplyInfo() {
 | |
| 		return OpenAPIBotInfo_SuggestReplyInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.SuggestReplyInfo
 | |
| }
 | |
| 
 | |
| var OpenAPIBotInfo_BackgroundImageInfo_DEFAULT *BackgroundImageInfo
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetBackgroundImageInfo() (v *BackgroundImageInfo) {
 | |
| 	if !p.IsSetBackgroundImageInfo() {
 | |
| 		return OpenAPIBotInfo_BackgroundImageInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.BackgroundImageInfo
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) GetVariables() (v []*Variable) {
 | |
| 	return p.Variables
 | |
| }
 | |
| 
 | |
| var fieldIDToName_OpenAPIBotInfo = map[int16]string{
 | |
| 	1:  "bot_id",
 | |
| 	2:  "name",
 | |
| 	3:  "description",
 | |
| 	4:  "icon_url",
 | |
| 	5:  "create_time",
 | |
| 	6:  "update_time",
 | |
| 	7:  "version",
 | |
| 	8:  "prompt_info",
 | |
| 	9:  "onboarding_info",
 | |
| 	10: "bot_mode",
 | |
| 	12: "model_info",
 | |
| 	13: "plugin_info_list",
 | |
| 	14: "knowledge",
 | |
| 	15: "workflow_info_list",
 | |
| 	16: "shortcut_commands",
 | |
| 	18: "default_user_input_type",
 | |
| 	19: "suggest_reply_info",
 | |
| 	20: "background_image_info",
 | |
| 	21: "variables",
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) IsSetPromptInfo() bool {
 | |
| 	return p.PromptInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) IsSetOnboardingInfo() bool {
 | |
| 	return p.OnboardingInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) IsSetModelInfo() bool {
 | |
| 	return p.ModelInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) IsSetKnowledge() bool {
 | |
| 	return p.Knowledge != nil
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) IsSetSuggestReplyInfo() bool {
 | |
| 	return p.SuggestReplyInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) IsSetBackgroundImageInfo() bool {
 | |
| 	return p.BackgroundImageInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) 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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField7(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 8:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField8(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 9:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField9(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 10:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField10(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 12:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField12(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 13:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField13(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 14:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField14(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 15:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField15(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 16:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField16(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 18:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField18(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 19:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField19(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 20:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField20(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 21:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField21(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_OpenAPIBotInfo[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 *OpenAPIBotInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.BotID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Name = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Description = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.IconURL = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.CreateTime = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.UpdateTime = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Version = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField8(iprot thrift.TProtocol) error {
 | |
| 	_field := NewPromptInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.PromptInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField9(iprot thrift.TProtocol) error {
 | |
| 	_field := NewOnboardingInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.OnboardingInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field BotMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = BotMode(v)
 | |
| 	}
 | |
| 	p.BotMode = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField12(iprot thrift.TProtocol) error {
 | |
| 	_field := NewModelInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.ModelInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField13(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*PluginInfo, 0, size)
 | |
| 	values := make([]PluginInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.PluginInfoList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField14(iprot thrift.TProtocol) error {
 | |
| 	_field := NewCommonKnowledge()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Knowledge = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField15(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*WorkflowInfo, 0, size)
 | |
| 	values := make([]WorkflowInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.WorkflowInfoList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField16(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*ShortcutCommandInfo, 0, size)
 | |
| 	values := make([]ShortcutCommandInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.ShortcutCommands = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField18(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.DefaultUserInputType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField19(iprot thrift.TProtocol) error {
 | |
| 	_field := NewSuggestReplyInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.SuggestReplyInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField20(iprot thrift.TProtocol) error {
 | |
| 	_field := NewBackgroundImageInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BackgroundImageInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OpenAPIBotInfo) ReadField21(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*Variable, 0, size)
 | |
| 	values := make([]Variable, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Variables = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("OpenAPIBotInfo"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField8(oprot); err != nil {
 | |
| 			fieldId = 8
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField9(oprot); err != nil {
 | |
| 			fieldId = 9
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField10(oprot); err != nil {
 | |
| 			fieldId = 10
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField12(oprot); err != nil {
 | |
| 			fieldId = 12
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField13(oprot); err != nil {
 | |
| 			fieldId = 13
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField14(oprot); err != nil {
 | |
| 			fieldId = 14
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField15(oprot); err != nil {
 | |
| 			fieldId = 15
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField16(oprot); err != nil {
 | |
| 			fieldId = 16
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField18(oprot); err != nil {
 | |
| 			fieldId = 18
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField19(oprot); err != nil {
 | |
| 			fieldId = 19
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField20(oprot); err != nil {
 | |
| 			fieldId = 20
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField21(oprot); err != nil {
 | |
| 			fieldId = 21
 | |
| 			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 *OpenAPIBotInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("bot_id", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.BotID); 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 *OpenAPIBotInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("name", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Name); 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 *OpenAPIBotInfo) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("description", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Description); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("icon_url", thrift.STRING, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.IconURL); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("create_time", thrift.I64, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.CreateTime); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("update_time", thrift.I64, 6); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.UpdateTime); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("version", thrift.STRING, 7); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Version); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("prompt_info", thrift.STRUCT, 8); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.PromptInfo.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 8 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("onboarding_info", thrift.STRUCT, 9); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.OnboardingInfo.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 9 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("bot_mode", thrift.I32, 10); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.BotMode)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField12(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetModelInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("model_info", thrift.STRUCT, 12); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.ModelInfo.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 12 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 12 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField13(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_info_list", thrift.LIST, 13); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.PluginInfoList)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.PluginInfoList {
 | |
| 		if err := v.Write(oprot); 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 13 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 13 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField14(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetKnowledge() {
 | |
| 		if err = oprot.WriteFieldBegin("knowledge", thrift.STRUCT, 14); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Knowledge.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 14 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 14 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField15(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("workflow_info_list", thrift.LIST, 15); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.WorkflowInfoList)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.WorkflowInfoList {
 | |
| 		if err := v.Write(oprot); 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 15 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 15 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField16(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("shortcut_commands", thrift.LIST, 16); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ShortcutCommands)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.ShortcutCommands {
 | |
| 		if err := v.Write(oprot); 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 16 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 16 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField18(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("default_user_input_type", thrift.STRING, 18); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.DefaultUserInputType); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 18 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 18 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField19(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("suggest_reply_info", thrift.STRUCT, 19); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.SuggestReplyInfo.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 19 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 19 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField20(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("background_image_info", thrift.STRUCT, 20); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.BackgroundImageInfo.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 20 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 20 end error: ", p), err)
 | |
| }
 | |
| func (p *OpenAPIBotInfo) writeField21(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("variables", thrift.LIST, 21); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Variables)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.Variables {
 | |
| 		if err := v.Write(oprot); 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 21 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 21 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *OpenAPIBotInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("OpenAPIBotInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type LayoutInfo struct {
 | |
| 	// workflowId
 | |
| 	WorkflowId string `thrift:"WorkflowId,1" form:"workflow_id" json:"workflow_id"`
 | |
| 	// PluginId
 | |
| 	PluginId string `thrift:"PluginId,2" form:"plugin_id" json:"plugin_id"`
 | |
| }
 | |
| 
 | |
| func NewLayoutInfo() *LayoutInfo {
 | |
| 	return &LayoutInfo{}
 | |
| }
 | |
| 
 | |
| func (p *LayoutInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *LayoutInfo) GetWorkflowId() (v string) {
 | |
| 	return p.WorkflowId
 | |
| }
 | |
| 
 | |
| func (p *LayoutInfo) GetPluginId() (v string) {
 | |
| 	return p.PluginId
 | |
| }
 | |
| 
 | |
| var fieldIDToName_LayoutInfo = map[int16]string{
 | |
| 	1: "WorkflowId",
 | |
| 	2: "PluginId",
 | |
| }
 | |
| 
 | |
| func (p *LayoutInfo) 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.STRING {
 | |
| 				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_LayoutInfo[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 *LayoutInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.WorkflowId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *LayoutInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.PluginId = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *LayoutInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("LayoutInfo"); 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 *LayoutInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("WorkflowId", thrift.STRING, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.WorkflowId); 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 *LayoutInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("PluginId", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.PluginId); 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 *LayoutInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("LayoutInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type UserQueryCollectConf struct {
 | |
| 	// Whether to turn on the collection switch
 | |
| 	IsCollected bool `thrift:"IsCollected,1" form:"is_collected" json:"is_collected"`
 | |
| 	// Privacy Policy Link
 | |
| 	PrivatePolicy string `thrift:"PrivatePolicy,2" form:"private_policy" json:"private_policy"`
 | |
| }
 | |
| 
 | |
| func NewUserQueryCollectConf() *UserQueryCollectConf {
 | |
| 	return &UserQueryCollectConf{}
 | |
| }
 | |
| 
 | |
| func (p *UserQueryCollectConf) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *UserQueryCollectConf) GetIsCollected() (v bool) {
 | |
| 	return p.IsCollected
 | |
| }
 | |
| 
 | |
| func (p *UserQueryCollectConf) GetPrivatePolicy() (v string) {
 | |
| 	return p.PrivatePolicy
 | |
| }
 | |
| 
 | |
| var fieldIDToName_UserQueryCollectConf = map[int16]string{
 | |
| 	1: "IsCollected",
 | |
| 	2: "PrivatePolicy",
 | |
| }
 | |
| 
 | |
| func (p *UserQueryCollectConf) 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.BOOL {
 | |
| 				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_UserQueryCollectConf[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 *UserQueryCollectConf) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.IsCollected = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UserQueryCollectConf) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.PrivatePolicy = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *UserQueryCollectConf) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UserQueryCollectConf"); 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 *UserQueryCollectConf) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("IsCollected", thrift.BOOL, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(p.IsCollected); 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 *UserQueryCollectConf) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("PrivatePolicy", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.PrivatePolicy); 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 *UserQueryCollectConf) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("UserQueryCollectConf(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type MultiAgentInfo struct {
 | |
| 	// multi_agent session takeover
 | |
| 	SessionType MultiAgentSessionType `thrift:"SessionType,1" form:"session_type" json:"session_type"`
 | |
| 	// multi_agent version compatibility field, front-end use
 | |
| 	VersionCompatInfo *AgentVersionCompatInfo `thrift:"VersionCompatInfo,2" form:"version_compat_info" json:"version_compat_info"`
 | |
| 	// multi_agent connection type, front end
 | |
| 	ConnectorType MultiAgentConnectorType `thrift:"ConnectorType,3" form:"connector_type" json:"connector_type"`
 | |
| }
 | |
| 
 | |
| func NewMultiAgentInfo() *MultiAgentInfo {
 | |
| 	return &MultiAgentInfo{}
 | |
| }
 | |
| 
 | |
| func (p *MultiAgentInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *MultiAgentInfo) GetSessionType() (v MultiAgentSessionType) {
 | |
| 	return p.SessionType
 | |
| }
 | |
| 
 | |
| var MultiAgentInfo_VersionCompatInfo_DEFAULT *AgentVersionCompatInfo
 | |
| 
 | |
| func (p *MultiAgentInfo) GetVersionCompatInfo() (v *AgentVersionCompatInfo) {
 | |
| 	if !p.IsSetVersionCompatInfo() {
 | |
| 		return MultiAgentInfo_VersionCompatInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.VersionCompatInfo
 | |
| }
 | |
| 
 | |
| func (p *MultiAgentInfo) GetConnectorType() (v MultiAgentConnectorType) {
 | |
| 	return p.ConnectorType
 | |
| }
 | |
| 
 | |
| var fieldIDToName_MultiAgentInfo = map[int16]string{
 | |
| 	1: "SessionType",
 | |
| 	2: "VersionCompatInfo",
 | |
| 	3: "ConnectorType",
 | |
| }
 | |
| 
 | |
| func (p *MultiAgentInfo) IsSetVersionCompatInfo() bool {
 | |
| 	return p.VersionCompatInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *MultiAgentInfo) 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.I32 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField2(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField3(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_MultiAgentInfo[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 *MultiAgentInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field MultiAgentSessionType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = MultiAgentSessionType(v)
 | |
| 	}
 | |
| 	p.SessionType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *MultiAgentInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 	_field := NewAgentVersionCompatInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.VersionCompatInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *MultiAgentInfo) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field MultiAgentConnectorType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = MultiAgentConnectorType(v)
 | |
| 	}
 | |
| 	p.ConnectorType = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *MultiAgentInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("MultiAgentInfo"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			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 *MultiAgentInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("SessionType", thrift.I32, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.SessionType)); 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 *MultiAgentInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("VersionCompatInfo", thrift.STRUCT, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.VersionCompatInfo.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 2 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
 | |
| }
 | |
| func (p *MultiAgentInfo) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ConnectorType", thrift.I32, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.ConnectorType)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *MultiAgentInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("MultiAgentInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type AgentVersionCompatInfo struct {
 | |
| 	VersionCompat AgentVersionCompat `thrift:"VersionCompat,1" form:"version_compat" json:"version_compat"`
 | |
| 	Version       string             `thrift:"version,2" form:"version" json:"version" query:"version"`
 | |
| }
 | |
| 
 | |
| func NewAgentVersionCompatInfo() *AgentVersionCompatInfo {
 | |
| 	return &AgentVersionCompatInfo{}
 | |
| }
 | |
| 
 | |
| func (p *AgentVersionCompatInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *AgentVersionCompatInfo) GetVersionCompat() (v AgentVersionCompat) {
 | |
| 	return p.VersionCompat
 | |
| }
 | |
| 
 | |
| func (p *AgentVersionCompatInfo) GetVersion() (v string) {
 | |
| 	return p.Version
 | |
| }
 | |
| 
 | |
| var fieldIDToName_AgentVersionCompatInfo = map[int16]string{
 | |
| 	1: "VersionCompat",
 | |
| 	2: "version",
 | |
| }
 | |
| 
 | |
| func (p *AgentVersionCompatInfo) 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.I32 {
 | |
| 				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_AgentVersionCompatInfo[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 *AgentVersionCompatInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field AgentVersionCompat
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = AgentVersionCompat(v)
 | |
| 	}
 | |
| 	p.VersionCompat = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentVersionCompatInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Version = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *AgentVersionCompatInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("AgentVersionCompatInfo"); 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 *AgentVersionCompatInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("VersionCompat", thrift.I32, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.VersionCompat)); 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 *AgentVersionCompatInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("version", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Version); 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 *AgentVersionCompatInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("AgentVersionCompatInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type BackgroundImageInfo struct {
 | |
| 	// Web background cover
 | |
| 	WebBackgroundImage *BackgroundImageDetail `thrift:"WebBackgroundImage,1,optional" form:"web_background_image" json:"web_background_image,omitempty"`
 | |
| 	// Mobile end background cover
 | |
| 	MobileBackgroundImage *BackgroundImageDetail `thrift:"MobileBackgroundImage,2,optional" form:"mobile_background_image" json:"mobile_background_image,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewBackgroundImageInfo() *BackgroundImageInfo {
 | |
| 	return &BackgroundImageInfo{}
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var BackgroundImageInfo_WebBackgroundImage_DEFAULT *BackgroundImageDetail
 | |
| 
 | |
| func (p *BackgroundImageInfo) GetWebBackgroundImage() (v *BackgroundImageDetail) {
 | |
| 	if !p.IsSetWebBackgroundImage() {
 | |
| 		return BackgroundImageInfo_WebBackgroundImage_DEFAULT
 | |
| 	}
 | |
| 	return p.WebBackgroundImage
 | |
| }
 | |
| 
 | |
| var BackgroundImageInfo_MobileBackgroundImage_DEFAULT *BackgroundImageDetail
 | |
| 
 | |
| func (p *BackgroundImageInfo) GetMobileBackgroundImage() (v *BackgroundImageDetail) {
 | |
| 	if !p.IsSetMobileBackgroundImage() {
 | |
| 		return BackgroundImageInfo_MobileBackgroundImage_DEFAULT
 | |
| 	}
 | |
| 	return p.MobileBackgroundImage
 | |
| }
 | |
| 
 | |
| var fieldIDToName_BackgroundImageInfo = map[int16]string{
 | |
| 	1: "WebBackgroundImage",
 | |
| 	2: "MobileBackgroundImage",
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageInfo) IsSetWebBackgroundImage() bool {
 | |
| 	return p.WebBackgroundImage != nil
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageInfo) IsSetMobileBackgroundImage() bool {
 | |
| 	return p.MobileBackgroundImage != nil
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageInfo) 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.STRUCT {
 | |
| 				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_BackgroundImageInfo[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 *BackgroundImageInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewBackgroundImageDetail()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.WebBackgroundImage = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BackgroundImageInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 	_field := NewBackgroundImageDetail()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.MobileBackgroundImage = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("BackgroundImageInfo"); 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 *BackgroundImageInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetWebBackgroundImage() {
 | |
| 		if err = oprot.WriteFieldBegin("WebBackgroundImage", thrift.STRUCT, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.WebBackgroundImage.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 *BackgroundImageInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetMobileBackgroundImage() {
 | |
| 		if err = oprot.WriteFieldBegin("MobileBackgroundImage", thrift.STRUCT, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.MobileBackgroundImage.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 2 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("BackgroundImageInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type BackgroundImageDetail struct {
 | |
| 	// original image
 | |
| 	OriginImageUri *string `thrift:"OriginImageUri,1,optional" form:"origin_image_uri" json:"origin_image_uri,omitempty"`
 | |
| 	OriginImageUrl *string `thrift:"OriginImageUrl,2,optional" form:"origin_image_url" json:"origin_image_url,omitempty"`
 | |
| 	// Actual use of pictures
 | |
| 	ImageUri   *string `thrift:"ImageUri,3,optional" form:"image_uri" json:"image_uri,omitempty"`
 | |
| 	ImageUrl   *string `thrift:"ImageUrl,4,optional" form:"image_url" json:"image_url,omitempty"`
 | |
| 	ThemeColor *string `thrift:"ThemeColor,5,optional" form:"theme_color" json:"theme_color,omitempty"`
 | |
| 	// Gradual change of position
 | |
| 	GradientPosition *GradientPosition `thrift:"GradientPosition,6,optional" form:"gradient_position" json:"gradient_position,omitempty"`
 | |
| 	// Crop canvas position
 | |
| 	CanvasPosition *CanvasPosition `thrift:"CanvasPosition,7,optional" form:"canvas_position" json:"canvas_position,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewBackgroundImageDetail() *BackgroundImageDetail {
 | |
| 	return &BackgroundImageDetail{}
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageDetail) InitDefault() {
 | |
| }
 | |
| 
 | |
| var BackgroundImageDetail_OriginImageUri_DEFAULT string
 | |
| 
 | |
| func (p *BackgroundImageDetail) GetOriginImageUri() (v string) {
 | |
| 	if !p.IsSetOriginImageUri() {
 | |
| 		return BackgroundImageDetail_OriginImageUri_DEFAULT
 | |
| 	}
 | |
| 	return *p.OriginImageUri
 | |
| }
 | |
| 
 | |
| var BackgroundImageDetail_OriginImageUrl_DEFAULT string
 | |
| 
 | |
| func (p *BackgroundImageDetail) GetOriginImageUrl() (v string) {
 | |
| 	if !p.IsSetOriginImageUrl() {
 | |
| 		return BackgroundImageDetail_OriginImageUrl_DEFAULT
 | |
| 	}
 | |
| 	return *p.OriginImageUrl
 | |
| }
 | |
| 
 | |
| var BackgroundImageDetail_ImageUri_DEFAULT string
 | |
| 
 | |
| func (p *BackgroundImageDetail) GetImageUri() (v string) {
 | |
| 	if !p.IsSetImageUri() {
 | |
| 		return BackgroundImageDetail_ImageUri_DEFAULT
 | |
| 	}
 | |
| 	return *p.ImageUri
 | |
| }
 | |
| 
 | |
| var BackgroundImageDetail_ImageUrl_DEFAULT string
 | |
| 
 | |
| func (p *BackgroundImageDetail) GetImageUrl() (v string) {
 | |
| 	if !p.IsSetImageUrl() {
 | |
| 		return BackgroundImageDetail_ImageUrl_DEFAULT
 | |
| 	}
 | |
| 	return *p.ImageUrl
 | |
| }
 | |
| 
 | |
| var BackgroundImageDetail_ThemeColor_DEFAULT string
 | |
| 
 | |
| func (p *BackgroundImageDetail) GetThemeColor() (v string) {
 | |
| 	if !p.IsSetThemeColor() {
 | |
| 		return BackgroundImageDetail_ThemeColor_DEFAULT
 | |
| 	}
 | |
| 	return *p.ThemeColor
 | |
| }
 | |
| 
 | |
| var BackgroundImageDetail_GradientPosition_DEFAULT *GradientPosition
 | |
| 
 | |
| func (p *BackgroundImageDetail) GetGradientPosition() (v *GradientPosition) {
 | |
| 	if !p.IsSetGradientPosition() {
 | |
| 		return BackgroundImageDetail_GradientPosition_DEFAULT
 | |
| 	}
 | |
| 	return p.GradientPosition
 | |
| }
 | |
| 
 | |
| var BackgroundImageDetail_CanvasPosition_DEFAULT *CanvasPosition
 | |
| 
 | |
| func (p *BackgroundImageDetail) GetCanvasPosition() (v *CanvasPosition) {
 | |
| 	if !p.IsSetCanvasPosition() {
 | |
| 		return BackgroundImageDetail_CanvasPosition_DEFAULT
 | |
| 	}
 | |
| 	return p.CanvasPosition
 | |
| }
 | |
| 
 | |
| var fieldIDToName_BackgroundImageDetail = map[int16]string{
 | |
| 	1: "OriginImageUri",
 | |
| 	2: "OriginImageUrl",
 | |
| 	3: "ImageUri",
 | |
| 	4: "ImageUrl",
 | |
| 	5: "ThemeColor",
 | |
| 	6: "GradientPosition",
 | |
| 	7: "CanvasPosition",
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageDetail) IsSetOriginImageUri() bool {
 | |
| 	return p.OriginImageUri != nil
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageDetail) IsSetOriginImageUrl() bool {
 | |
| 	return p.OriginImageUrl != nil
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageDetail) IsSetImageUri() bool {
 | |
| 	return p.ImageUri != nil
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageDetail) IsSetImageUrl() bool {
 | |
| 	return p.ImageUrl != nil
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageDetail) IsSetThemeColor() bool {
 | |
| 	return p.ThemeColor != nil
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageDetail) IsSetGradientPosition() bool {
 | |
| 	return p.GradientPosition != nil
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageDetail) IsSetCanvasPosition() bool {
 | |
| 	return p.CanvasPosition != nil
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageDetail) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField7(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_BackgroundImageDetail[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 *BackgroundImageDetail) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.OriginImageUri = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BackgroundImageDetail) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.OriginImageUrl = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BackgroundImageDetail) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ImageUri = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BackgroundImageDetail) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ImageUrl = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BackgroundImageDetail) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ThemeColor = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BackgroundImageDetail) ReadField6(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGradientPosition()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.GradientPosition = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BackgroundImageDetail) ReadField7(iprot thrift.TProtocol) error {
 | |
| 	_field := NewCanvasPosition()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.CanvasPosition = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageDetail) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("BackgroundImageDetail"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			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 *BackgroundImageDetail) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetOriginImageUri() {
 | |
| 		if err = oprot.WriteFieldBegin("OriginImageUri", thrift.STRING, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.OriginImageUri); 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 *BackgroundImageDetail) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetOriginImageUrl() {
 | |
| 		if err = oprot.WriteFieldBegin("OriginImageUrl", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.OriginImageUrl); 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 *BackgroundImageDetail) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetImageUri() {
 | |
| 		if err = oprot.WriteFieldBegin("ImageUri", thrift.STRING, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ImageUri); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *BackgroundImageDetail) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetImageUrl() {
 | |
| 		if err = oprot.WriteFieldBegin("ImageUrl", thrift.STRING, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ImageUrl); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *BackgroundImageDetail) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetThemeColor() {
 | |
| 		if err = oprot.WriteFieldBegin("ThemeColor", thrift.STRING, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ThemeColor); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *BackgroundImageDetail) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetGradientPosition() {
 | |
| 		if err = oprot.WriteFieldBegin("GradientPosition", thrift.STRUCT, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.GradientPosition.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 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *BackgroundImageDetail) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCanvasPosition() {
 | |
| 		if err = oprot.WriteFieldBegin("CanvasPosition", thrift.STRUCT, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.CanvasPosition.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 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *BackgroundImageDetail) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("BackgroundImageDetail(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GradientPosition struct {
 | |
| 	Left  *float64 `thrift:"Left,1,optional" form:"left" json:"left,omitempty"`
 | |
| 	Right *float64 `thrift:"Right,2,optional" form:"right" json:"right,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewGradientPosition() *GradientPosition {
 | |
| 	return &GradientPosition{}
 | |
| }
 | |
| 
 | |
| func (p *GradientPosition) InitDefault() {
 | |
| }
 | |
| 
 | |
| var GradientPosition_Left_DEFAULT float64
 | |
| 
 | |
| func (p *GradientPosition) GetLeft() (v float64) {
 | |
| 	if !p.IsSetLeft() {
 | |
| 		return GradientPosition_Left_DEFAULT
 | |
| 	}
 | |
| 	return *p.Left
 | |
| }
 | |
| 
 | |
| var GradientPosition_Right_DEFAULT float64
 | |
| 
 | |
| func (p *GradientPosition) GetRight() (v float64) {
 | |
| 	if !p.IsSetRight() {
 | |
| 		return GradientPosition_Right_DEFAULT
 | |
| 	}
 | |
| 	return *p.Right
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GradientPosition = map[int16]string{
 | |
| 	1: "Left",
 | |
| 	2: "Right",
 | |
| }
 | |
| 
 | |
| func (p *GradientPosition) IsSetLeft() bool {
 | |
| 	return p.Left != nil
 | |
| }
 | |
| 
 | |
| func (p *GradientPosition) IsSetRight() bool {
 | |
| 	return p.Right != nil
 | |
| }
 | |
| 
 | |
| func (p *GradientPosition) 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.DOUBLE {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.DOUBLE {
 | |
| 				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_GradientPosition[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 *GradientPosition) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *float64
 | |
| 	if v, err := iprot.ReadDouble(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Left = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GradientPosition) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *float64
 | |
| 	if v, err := iprot.ReadDouble(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Right = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GradientPosition) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GradientPosition"); 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 *GradientPosition) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetLeft() {
 | |
| 		if err = oprot.WriteFieldBegin("Left", thrift.DOUBLE, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteDouble(*p.Left); 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 *GradientPosition) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetRight() {
 | |
| 		if err = oprot.WriteFieldBegin("Right", thrift.DOUBLE, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteDouble(*p.Right); 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 *GradientPosition) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GradientPosition(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type CanvasPosition struct {
 | |
| 	Width  *float64 `thrift:"Width,1,optional" form:"width" json:"width,omitempty"`
 | |
| 	Height *float64 `thrift:"Height,2,optional" form:"height" json:"height,omitempty"`
 | |
| 	Left   *float64 `thrift:"Left,3,optional" form:"left" json:"left,omitempty"`
 | |
| 	Top    *float64 `thrift:"Top,4,optional" form:"top" json:"top,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewCanvasPosition() *CanvasPosition {
 | |
| 	return &CanvasPosition{}
 | |
| }
 | |
| 
 | |
| func (p *CanvasPosition) InitDefault() {
 | |
| }
 | |
| 
 | |
| var CanvasPosition_Width_DEFAULT float64
 | |
| 
 | |
| func (p *CanvasPosition) GetWidth() (v float64) {
 | |
| 	if !p.IsSetWidth() {
 | |
| 		return CanvasPosition_Width_DEFAULT
 | |
| 	}
 | |
| 	return *p.Width
 | |
| }
 | |
| 
 | |
| var CanvasPosition_Height_DEFAULT float64
 | |
| 
 | |
| func (p *CanvasPosition) GetHeight() (v float64) {
 | |
| 	if !p.IsSetHeight() {
 | |
| 		return CanvasPosition_Height_DEFAULT
 | |
| 	}
 | |
| 	return *p.Height
 | |
| }
 | |
| 
 | |
| var CanvasPosition_Left_DEFAULT float64
 | |
| 
 | |
| func (p *CanvasPosition) GetLeft() (v float64) {
 | |
| 	if !p.IsSetLeft() {
 | |
| 		return CanvasPosition_Left_DEFAULT
 | |
| 	}
 | |
| 	return *p.Left
 | |
| }
 | |
| 
 | |
| var CanvasPosition_Top_DEFAULT float64
 | |
| 
 | |
| func (p *CanvasPosition) GetTop() (v float64) {
 | |
| 	if !p.IsSetTop() {
 | |
| 		return CanvasPosition_Top_DEFAULT
 | |
| 	}
 | |
| 	return *p.Top
 | |
| }
 | |
| 
 | |
| var fieldIDToName_CanvasPosition = map[int16]string{
 | |
| 	1: "Width",
 | |
| 	2: "Height",
 | |
| 	3: "Left",
 | |
| 	4: "Top",
 | |
| }
 | |
| 
 | |
| func (p *CanvasPosition) IsSetWidth() bool {
 | |
| 	return p.Width != nil
 | |
| }
 | |
| 
 | |
| func (p *CanvasPosition) IsSetHeight() bool {
 | |
| 	return p.Height != nil
 | |
| }
 | |
| 
 | |
| func (p *CanvasPosition) IsSetLeft() bool {
 | |
| 	return p.Left != nil
 | |
| }
 | |
| 
 | |
| func (p *CanvasPosition) IsSetTop() bool {
 | |
| 	return p.Top != nil
 | |
| }
 | |
| 
 | |
| func (p *CanvasPosition) 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.DOUBLE {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.DOUBLE {
 | |
| 				if err = p.ReadField2(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.DOUBLE {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.DOUBLE {
 | |
| 				if err = p.ReadField4(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_CanvasPosition[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 *CanvasPosition) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *float64
 | |
| 	if v, err := iprot.ReadDouble(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Width = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CanvasPosition) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *float64
 | |
| 	if v, err := iprot.ReadDouble(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Height = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CanvasPosition) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *float64
 | |
| 	if v, err := iprot.ReadDouble(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Left = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CanvasPosition) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *float64
 | |
| 	if v, err := iprot.ReadDouble(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Top = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *CanvasPosition) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("CanvasPosition"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			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 *CanvasPosition) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetWidth() {
 | |
| 		if err = oprot.WriteFieldBegin("Width", thrift.DOUBLE, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteDouble(*p.Width); 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 *CanvasPosition) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetHeight() {
 | |
| 		if err = oprot.WriteFieldBegin("Height", thrift.DOUBLE, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteDouble(*p.Height); 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 *CanvasPosition) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetLeft() {
 | |
| 		if err = oprot.WriteFieldBegin("Left", thrift.DOUBLE, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteDouble(*p.Left); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *CanvasPosition) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTop() {
 | |
| 		if err = oprot.WriteFieldBegin("Top", thrift.DOUBLE, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteDouble(*p.Top); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *CanvasPosition) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("CanvasPosition(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| // Update for bot information
 | |
| type BotInfoForUpdate struct {
 | |
| 	// bot id
 | |
| 	BotId *int64 `thrift:"BotId,1,optional" form:"bot_id" json:"bot_id,string,omitempty"`
 | |
| 	// bot name
 | |
| 	Name *string `thrift:"Name,2,optional" form:"name" json:"name,omitempty"`
 | |
| 	// Bot description
 | |
| 	Description *string `thrift:"Description,3,optional" form:"description" json:"description,omitempty"`
 | |
| 	// Bot icon uri
 | |
| 	IconUri *string `thrift:"IconUri,4,optional" form:"icon_uri" json:"icon_uri,omitempty"`
 | |
| 	// Bot icon url
 | |
| 	IconUrl *string `thrift:"IconUrl,5,optional" form:"icon_url" json:"icon_url,omitempty"`
 | |
| 	// creator id
 | |
| 	CreatorId *int64 `thrift:"CreatorId,6,optional" form:"creator_id" json:"creator_id,string,omitempty"`
 | |
| 	// create_time
 | |
| 	CreateTime *int64 `thrift:"CreateTime,7,optional" form:"create_time" json:"create_time,string,omitempty"`
 | |
| 	// update time
 | |
| 	UpdateTime *int64 `thrift:"UpdateTime,8,optional" form:"update_time" json:"update_time,string,omitempty"`
 | |
| 	// line of business
 | |
| 	ConnectorId *int64 `thrift:"ConnectorId,9,optional" form:"connector_id" json:"connector_id,string,omitempty"`
 | |
| 	// Version, ms
 | |
| 	Version *string `thrift:"Version,10,optional" form:"version" json:"version,omitempty"`
 | |
| 	// model configuration
 | |
| 	ModelInfo *ModelInfo `thrift:"ModelInfo,11,optional" form:"model_info" json:"model_info,omitempty"`
 | |
| 	// Prompt message
 | |
| 	PromptInfo *PromptInfo `thrift:"PromptInfo,12,optional" form:"prompt_info" json:"prompt_info,omitempty"`
 | |
| 	// List of plugins
 | |
| 	PluginInfoList []*PluginInfo `thrift:"PluginInfoList,13,optional" form:"plugin_info_list" json:"plugin_info_list,omitempty"`
 | |
| 	// Workflow List
 | |
| 	WorkflowInfoList []*WorkflowInfo `thrift:"WorkflowInfoList,14,optional" form:"workflow_info_list" json:"workflow_info_list,omitempty"`
 | |
| 	// opening statement
 | |
| 	OnboardingInfo *OnboardingInfo `thrift:"OnboardingInfo,15,optional" form:"onboarding_info" json:"onboarding_info,omitempty"`
 | |
| 	// dataset
 | |
| 	Knowledge *Knowledge `thrift:"Knowledge,16,optional" form:"knowledge" json:"knowledge,omitempty"`
 | |
| 	// KV storage
 | |
| 	VariableList []*Variable `thrift:"VariableList,17,optional" form:"variable_list" json:"variable_list,omitempty"`
 | |
| 	// Task management/preset tasks
 | |
| 	TaskInfo *TaskInfo `thrift:"TaskInfo,18,optional" form:"task_info" json:"task_info,omitempty"`
 | |
| 	// data table
 | |
| 	DatabaseList []*Database `thrift:"DatabaseList,19,optional" form:"database_list" json:"database_list,omitempty"`
 | |
| 	// referral question
 | |
| 	SuggestReplyInfo *SuggestReplyInfo `thrift:"SuggestReplyInfo,20,optional" form:"suggest_reply_info" json:"suggest_reply_info,omitempty"`
 | |
| 	// Timbre Configuration
 | |
| 	VoicesInfo *VoicesInfo `thrift:"VoicesInfo,21,optional" form:"voices_info" json:"voices_info,omitempty"`
 | |
| 	// Additional information, extended fields
 | |
| 	BotExtInfo *BotExtInfo `thrift:"BotExtInfo,22,optional" form:"bot_ext_info" json:"bot_ext_info,omitempty"`
 | |
| 	// Bot type, single agent or multi agent
 | |
| 	BotMode *BotMode `thrift:"BotMode,23,optional" form:"bot_mode" json:"bot_mode,omitempty"`
 | |
| 	// Multi agent mode agent information
 | |
| 	Agents []*AgentForUpdate `thrift:"Agents,24,optional" form:"agents" json:"agents,omitempty"`
 | |
| 	// Bot type
 | |
| 	BotSpecies BotSpecies `thrift:"BotSpecies,25" form:"bot_species" json:"bot_species"`
 | |
| 	// Bot tag information, user new field
 | |
| 	BotTagInfo *BotTagInfo `thrift:"BotTagInfo,26,optional" form:"bot_tag_info" json:"bot_tag_info,omitempty"`
 | |
| 	// FileBox Information
 | |
| 	FileboxInfo *FileboxInfo `thrift:"FileboxInfo,27,optional" form:"filebox_info" json:"filebox_info,omitempty"`
 | |
| 	// multi_agent structure
 | |
| 	MultiAgentInfo *MultiAgentInfo `thrift:"MultiAgentInfo,28,optional" form:"multi_agent_info" json:"multi_agent_info,omitempty"`
 | |
| 	// Background cover list structure
 | |
| 	BackgroundImageInfoList []*BackgroundImageInfo `thrift:"BackgroundImageInfoList,29,optional" form:"background_image_info_list" json:"background_image_info_list,omitempty"`
 | |
| 	ShortcutSort            []string               `thrift:"ShortcutSort,30,optional" form:"shortcut_sort" json:"shortcut_sort,omitempty"`
 | |
| 	HookInfo                *HookInfo              `thrift:"HookInfo,31,optional" form:"hook_info" json:"hook_info,omitempty"`
 | |
| 	// User query collection configuration
 | |
| 	UserQueryCollectConf *UserQueryCollectConf `thrift:"UserQueryCollectConf,32,optional" form:"user_query_collect_conf" json:"user_query_collect_conf,omitempty"`
 | |
| 	// Orchestration information for workflow patterns
 | |
| 	LayoutInfo *LayoutInfo `thrift:"LayoutInfo,33,optional" form:"layout_info" json:"layout_info,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewBotInfoForUpdate() *BotInfoForUpdate {
 | |
| 	return &BotInfoForUpdate{}
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) InitDefault() {
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_BotId_DEFAULT int64
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetBotId() (v int64) {
 | |
| 	if !p.IsSetBotId() {
 | |
| 		return BotInfoForUpdate_BotId_DEFAULT
 | |
| 	}
 | |
| 	return *p.BotId
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_Name_DEFAULT string
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetName() (v string) {
 | |
| 	if !p.IsSetName() {
 | |
| 		return BotInfoForUpdate_Name_DEFAULT
 | |
| 	}
 | |
| 	return *p.Name
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_Description_DEFAULT string
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetDescription() (v string) {
 | |
| 	if !p.IsSetDescription() {
 | |
| 		return BotInfoForUpdate_Description_DEFAULT
 | |
| 	}
 | |
| 	return *p.Description
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_IconUri_DEFAULT string
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetIconUri() (v string) {
 | |
| 	if !p.IsSetIconUri() {
 | |
| 		return BotInfoForUpdate_IconUri_DEFAULT
 | |
| 	}
 | |
| 	return *p.IconUri
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_IconUrl_DEFAULT string
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetIconUrl() (v string) {
 | |
| 	if !p.IsSetIconUrl() {
 | |
| 		return BotInfoForUpdate_IconUrl_DEFAULT
 | |
| 	}
 | |
| 	return *p.IconUrl
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_CreatorId_DEFAULT int64
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetCreatorId() (v int64) {
 | |
| 	if !p.IsSetCreatorId() {
 | |
| 		return BotInfoForUpdate_CreatorId_DEFAULT
 | |
| 	}
 | |
| 	return *p.CreatorId
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_CreateTime_DEFAULT int64
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetCreateTime() (v int64) {
 | |
| 	if !p.IsSetCreateTime() {
 | |
| 		return BotInfoForUpdate_CreateTime_DEFAULT
 | |
| 	}
 | |
| 	return *p.CreateTime
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_UpdateTime_DEFAULT int64
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetUpdateTime() (v int64) {
 | |
| 	if !p.IsSetUpdateTime() {
 | |
| 		return BotInfoForUpdate_UpdateTime_DEFAULT
 | |
| 	}
 | |
| 	return *p.UpdateTime
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_ConnectorId_DEFAULT int64
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetConnectorId() (v int64) {
 | |
| 	if !p.IsSetConnectorId() {
 | |
| 		return BotInfoForUpdate_ConnectorId_DEFAULT
 | |
| 	}
 | |
| 	return *p.ConnectorId
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_Version_DEFAULT string
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetVersion() (v string) {
 | |
| 	if !p.IsSetVersion() {
 | |
| 		return BotInfoForUpdate_Version_DEFAULT
 | |
| 	}
 | |
| 	return *p.Version
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_ModelInfo_DEFAULT *ModelInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetModelInfo() (v *ModelInfo) {
 | |
| 	if !p.IsSetModelInfo() {
 | |
| 		return BotInfoForUpdate_ModelInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.ModelInfo
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_PromptInfo_DEFAULT *PromptInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetPromptInfo() (v *PromptInfo) {
 | |
| 	if !p.IsSetPromptInfo() {
 | |
| 		return BotInfoForUpdate_PromptInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.PromptInfo
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_PluginInfoList_DEFAULT []*PluginInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetPluginInfoList() (v []*PluginInfo) {
 | |
| 	if !p.IsSetPluginInfoList() {
 | |
| 		return BotInfoForUpdate_PluginInfoList_DEFAULT
 | |
| 	}
 | |
| 	return p.PluginInfoList
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_WorkflowInfoList_DEFAULT []*WorkflowInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetWorkflowInfoList() (v []*WorkflowInfo) {
 | |
| 	if !p.IsSetWorkflowInfoList() {
 | |
| 		return BotInfoForUpdate_WorkflowInfoList_DEFAULT
 | |
| 	}
 | |
| 	return p.WorkflowInfoList
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_OnboardingInfo_DEFAULT *OnboardingInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetOnboardingInfo() (v *OnboardingInfo) {
 | |
| 	if !p.IsSetOnboardingInfo() {
 | |
| 		return BotInfoForUpdate_OnboardingInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.OnboardingInfo
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_Knowledge_DEFAULT *Knowledge
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetKnowledge() (v *Knowledge) {
 | |
| 	if !p.IsSetKnowledge() {
 | |
| 		return BotInfoForUpdate_Knowledge_DEFAULT
 | |
| 	}
 | |
| 	return p.Knowledge
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_VariableList_DEFAULT []*Variable
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetVariableList() (v []*Variable) {
 | |
| 	if !p.IsSetVariableList() {
 | |
| 		return BotInfoForUpdate_VariableList_DEFAULT
 | |
| 	}
 | |
| 	return p.VariableList
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_TaskInfo_DEFAULT *TaskInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetTaskInfo() (v *TaskInfo) {
 | |
| 	if !p.IsSetTaskInfo() {
 | |
| 		return BotInfoForUpdate_TaskInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.TaskInfo
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_DatabaseList_DEFAULT []*Database
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetDatabaseList() (v []*Database) {
 | |
| 	if !p.IsSetDatabaseList() {
 | |
| 		return BotInfoForUpdate_DatabaseList_DEFAULT
 | |
| 	}
 | |
| 	return p.DatabaseList
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_SuggestReplyInfo_DEFAULT *SuggestReplyInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetSuggestReplyInfo() (v *SuggestReplyInfo) {
 | |
| 	if !p.IsSetSuggestReplyInfo() {
 | |
| 		return BotInfoForUpdate_SuggestReplyInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.SuggestReplyInfo
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_VoicesInfo_DEFAULT *VoicesInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetVoicesInfo() (v *VoicesInfo) {
 | |
| 	if !p.IsSetVoicesInfo() {
 | |
| 		return BotInfoForUpdate_VoicesInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.VoicesInfo
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_BotExtInfo_DEFAULT *BotExtInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetBotExtInfo() (v *BotExtInfo) {
 | |
| 	if !p.IsSetBotExtInfo() {
 | |
| 		return BotInfoForUpdate_BotExtInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.BotExtInfo
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_BotMode_DEFAULT BotMode
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetBotMode() (v BotMode) {
 | |
| 	if !p.IsSetBotMode() {
 | |
| 		return BotInfoForUpdate_BotMode_DEFAULT
 | |
| 	}
 | |
| 	return *p.BotMode
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_Agents_DEFAULT []*AgentForUpdate
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetAgents() (v []*AgentForUpdate) {
 | |
| 	if !p.IsSetAgents() {
 | |
| 		return BotInfoForUpdate_Agents_DEFAULT
 | |
| 	}
 | |
| 	return p.Agents
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetBotSpecies() (v BotSpecies) {
 | |
| 	return p.BotSpecies
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_BotTagInfo_DEFAULT *BotTagInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetBotTagInfo() (v *BotTagInfo) {
 | |
| 	if !p.IsSetBotTagInfo() {
 | |
| 		return BotInfoForUpdate_BotTagInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.BotTagInfo
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_FileboxInfo_DEFAULT *FileboxInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetFileboxInfo() (v *FileboxInfo) {
 | |
| 	if !p.IsSetFileboxInfo() {
 | |
| 		return BotInfoForUpdate_FileboxInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.FileboxInfo
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_MultiAgentInfo_DEFAULT *MultiAgentInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetMultiAgentInfo() (v *MultiAgentInfo) {
 | |
| 	if !p.IsSetMultiAgentInfo() {
 | |
| 		return BotInfoForUpdate_MultiAgentInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.MultiAgentInfo
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_BackgroundImageInfoList_DEFAULT []*BackgroundImageInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetBackgroundImageInfoList() (v []*BackgroundImageInfo) {
 | |
| 	if !p.IsSetBackgroundImageInfoList() {
 | |
| 		return BotInfoForUpdate_BackgroundImageInfoList_DEFAULT
 | |
| 	}
 | |
| 	return p.BackgroundImageInfoList
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_ShortcutSort_DEFAULT []string
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetShortcutSort() (v []string) {
 | |
| 	if !p.IsSetShortcutSort() {
 | |
| 		return BotInfoForUpdate_ShortcutSort_DEFAULT
 | |
| 	}
 | |
| 	return p.ShortcutSort
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_HookInfo_DEFAULT *HookInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetHookInfo() (v *HookInfo) {
 | |
| 	if !p.IsSetHookInfo() {
 | |
| 		return BotInfoForUpdate_HookInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.HookInfo
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_UserQueryCollectConf_DEFAULT *UserQueryCollectConf
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetUserQueryCollectConf() (v *UserQueryCollectConf) {
 | |
| 	if !p.IsSetUserQueryCollectConf() {
 | |
| 		return BotInfoForUpdate_UserQueryCollectConf_DEFAULT
 | |
| 	}
 | |
| 	return p.UserQueryCollectConf
 | |
| }
 | |
| 
 | |
| var BotInfoForUpdate_LayoutInfo_DEFAULT *LayoutInfo
 | |
| 
 | |
| func (p *BotInfoForUpdate) GetLayoutInfo() (v *LayoutInfo) {
 | |
| 	if !p.IsSetLayoutInfo() {
 | |
| 		return BotInfoForUpdate_LayoutInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.LayoutInfo
 | |
| }
 | |
| 
 | |
| var fieldIDToName_BotInfoForUpdate = map[int16]string{
 | |
| 	1:  "BotId",
 | |
| 	2:  "Name",
 | |
| 	3:  "Description",
 | |
| 	4:  "IconUri",
 | |
| 	5:  "IconUrl",
 | |
| 	6:  "CreatorId",
 | |
| 	7:  "CreateTime",
 | |
| 	8:  "UpdateTime",
 | |
| 	9:  "ConnectorId",
 | |
| 	10: "Version",
 | |
| 	11: "ModelInfo",
 | |
| 	12: "PromptInfo",
 | |
| 	13: "PluginInfoList",
 | |
| 	14: "WorkflowInfoList",
 | |
| 	15: "OnboardingInfo",
 | |
| 	16: "Knowledge",
 | |
| 	17: "VariableList",
 | |
| 	18: "TaskInfo",
 | |
| 	19: "DatabaseList",
 | |
| 	20: "SuggestReplyInfo",
 | |
| 	21: "VoicesInfo",
 | |
| 	22: "BotExtInfo",
 | |
| 	23: "BotMode",
 | |
| 	24: "Agents",
 | |
| 	25: "BotSpecies",
 | |
| 	26: "BotTagInfo",
 | |
| 	27: "FileboxInfo",
 | |
| 	28: "MultiAgentInfo",
 | |
| 	29: "BackgroundImageInfoList",
 | |
| 	30: "ShortcutSort",
 | |
| 	31: "HookInfo",
 | |
| 	32: "UserQueryCollectConf",
 | |
| 	33: "LayoutInfo",
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetBotId() bool {
 | |
| 	return p.BotId != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetName() bool {
 | |
| 	return p.Name != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetDescription() bool {
 | |
| 	return p.Description != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetIconUri() bool {
 | |
| 	return p.IconUri != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetIconUrl() bool {
 | |
| 	return p.IconUrl != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetCreatorId() bool {
 | |
| 	return p.CreatorId != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetCreateTime() bool {
 | |
| 	return p.CreateTime != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetUpdateTime() bool {
 | |
| 	return p.UpdateTime != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetConnectorId() bool {
 | |
| 	return p.ConnectorId != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetVersion() bool {
 | |
| 	return p.Version != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetModelInfo() bool {
 | |
| 	return p.ModelInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetPromptInfo() bool {
 | |
| 	return p.PromptInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetPluginInfoList() bool {
 | |
| 	return p.PluginInfoList != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetWorkflowInfoList() bool {
 | |
| 	return p.WorkflowInfoList != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetOnboardingInfo() bool {
 | |
| 	return p.OnboardingInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetKnowledge() bool {
 | |
| 	return p.Knowledge != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetVariableList() bool {
 | |
| 	return p.VariableList != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetTaskInfo() bool {
 | |
| 	return p.TaskInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetDatabaseList() bool {
 | |
| 	return p.DatabaseList != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetSuggestReplyInfo() bool {
 | |
| 	return p.SuggestReplyInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetVoicesInfo() bool {
 | |
| 	return p.VoicesInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetBotExtInfo() bool {
 | |
| 	return p.BotExtInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetBotMode() bool {
 | |
| 	return p.BotMode != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetAgents() bool {
 | |
| 	return p.Agents != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetBotTagInfo() bool {
 | |
| 	return p.BotTagInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetFileboxInfo() bool {
 | |
| 	return p.FileboxInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetMultiAgentInfo() bool {
 | |
| 	return p.MultiAgentInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetBackgroundImageInfoList() bool {
 | |
| 	return p.BackgroundImageInfoList != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetShortcutSort() bool {
 | |
| 	return p.ShortcutSort != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetHookInfo() bool {
 | |
| 	return p.HookInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetUserQueryCollectConf() bool {
 | |
| 	return p.UserQueryCollectConf != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) IsSetLayoutInfo() bool {
 | |
| 	return p.LayoutInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) 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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField7(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 8:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField8(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 9:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField9(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 10:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField10(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 11:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField11(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 12:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField12(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 13:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField13(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 14:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField14(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 15:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField15(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 16:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField16(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 17:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField17(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 18:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField18(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 19:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField19(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 20:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField20(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 21:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField21(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 22:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField22(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 23:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField23(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 24:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField24(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 25:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField25(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 26:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField26(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 27:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField27(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 28:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField28(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 29:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField29(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 30:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField30(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 31:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField31(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 32:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField32(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 33:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField33(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_BotInfoForUpdate[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 *BotInfoForUpdate) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.BotId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Name = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Description = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.IconUri = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.IconUrl = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.CreatorId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.CreateTime = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.UpdateTime = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ConnectorId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Version = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField11(iprot thrift.TProtocol) error {
 | |
| 	_field := NewModelInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.ModelInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField12(iprot thrift.TProtocol) error {
 | |
| 	_field := NewPromptInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.PromptInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField13(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*PluginInfo, 0, size)
 | |
| 	values := make([]PluginInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.PluginInfoList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField14(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*WorkflowInfo, 0, size)
 | |
| 	values := make([]WorkflowInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.WorkflowInfoList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField15(iprot thrift.TProtocol) error {
 | |
| 	_field := NewOnboardingInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.OnboardingInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField16(iprot thrift.TProtocol) error {
 | |
| 	_field := NewKnowledge()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Knowledge = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField17(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*Variable, 0, size)
 | |
| 	values := make([]Variable, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.VariableList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField18(iprot thrift.TProtocol) error {
 | |
| 	_field := NewTaskInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.TaskInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField19(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*Database, 0, size)
 | |
| 	values := make([]Database, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.DatabaseList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField20(iprot thrift.TProtocol) error {
 | |
| 	_field := NewSuggestReplyInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.SuggestReplyInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField21(iprot thrift.TProtocol) error {
 | |
| 	_field := NewVoicesInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.VoicesInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField22(iprot thrift.TProtocol) error {
 | |
| 	_field := NewBotExtInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BotExtInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField23(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *BotMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := BotMode(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.BotMode = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField24(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*AgentForUpdate, 0, size)
 | |
| 	values := make([]AgentForUpdate, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Agents = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField25(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field BotSpecies
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = BotSpecies(v)
 | |
| 	}
 | |
| 	p.BotSpecies = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField26(iprot thrift.TProtocol) error {
 | |
| 	_field := NewBotTagInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BotTagInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField27(iprot thrift.TProtocol) error {
 | |
| 	_field := NewFileboxInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.FileboxInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField28(iprot thrift.TProtocol) error {
 | |
| 	_field := NewMultiAgentInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.MultiAgentInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField29(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*BackgroundImageInfo, 0, size)
 | |
| 	values := make([]BackgroundImageInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BackgroundImageInfoList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField30(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := 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
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.ShortcutSort = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField31(iprot thrift.TProtocol) error {
 | |
| 	_field := NewHookInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.HookInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField32(iprot thrift.TProtocol) error {
 | |
| 	_field := NewUserQueryCollectConf()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.UserQueryCollectConf = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BotInfoForUpdate) ReadField33(iprot thrift.TProtocol) error {
 | |
| 	_field := NewLayoutInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.LayoutInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("BotInfoForUpdate"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField8(oprot); err != nil {
 | |
| 			fieldId = 8
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField9(oprot); err != nil {
 | |
| 			fieldId = 9
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField10(oprot); err != nil {
 | |
| 			fieldId = 10
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField11(oprot); err != nil {
 | |
| 			fieldId = 11
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField12(oprot); err != nil {
 | |
| 			fieldId = 12
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField13(oprot); err != nil {
 | |
| 			fieldId = 13
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField14(oprot); err != nil {
 | |
| 			fieldId = 14
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField15(oprot); err != nil {
 | |
| 			fieldId = 15
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField16(oprot); err != nil {
 | |
| 			fieldId = 16
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField17(oprot); err != nil {
 | |
| 			fieldId = 17
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField18(oprot); err != nil {
 | |
| 			fieldId = 18
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField19(oprot); err != nil {
 | |
| 			fieldId = 19
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField20(oprot); err != nil {
 | |
| 			fieldId = 20
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField21(oprot); err != nil {
 | |
| 			fieldId = 21
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField22(oprot); err != nil {
 | |
| 			fieldId = 22
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField23(oprot); err != nil {
 | |
| 			fieldId = 23
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField24(oprot); err != nil {
 | |
| 			fieldId = 24
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField25(oprot); err != nil {
 | |
| 			fieldId = 25
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField26(oprot); err != nil {
 | |
| 			fieldId = 26
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField27(oprot); err != nil {
 | |
| 			fieldId = 27
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField28(oprot); err != nil {
 | |
| 			fieldId = 28
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField29(oprot); err != nil {
 | |
| 			fieldId = 29
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField30(oprot); err != nil {
 | |
| 			fieldId = 30
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField31(oprot); err != nil {
 | |
| 			fieldId = 31
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField32(oprot); err != nil {
 | |
| 			fieldId = 32
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField33(oprot); err != nil {
 | |
| 			fieldId = 33
 | |
| 			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 *BotInfoForUpdate) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBotId() {
 | |
| 		if err = oprot.WriteFieldBegin("BotId", thrift.I64, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.BotId); 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 *BotInfoForUpdate) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetName() {
 | |
| 		if err = oprot.WriteFieldBegin("Name", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Name); 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 *BotInfoForUpdate) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDescription() {
 | |
| 		if err = oprot.WriteFieldBegin("Description", thrift.STRING, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Description); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetIconUri() {
 | |
| 		if err = oprot.WriteFieldBegin("IconUri", thrift.STRING, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.IconUri); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetIconUrl() {
 | |
| 		if err = oprot.WriteFieldBegin("IconUrl", thrift.STRING, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.IconUrl); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCreatorId() {
 | |
| 		if err = oprot.WriteFieldBegin("CreatorId", thrift.I64, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.CreatorId); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCreateTime() {
 | |
| 		if err = oprot.WriteFieldBegin("CreateTime", thrift.I64, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.CreateTime); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetUpdateTime() {
 | |
| 		if err = oprot.WriteFieldBegin("UpdateTime", thrift.I64, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.UpdateTime); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetConnectorId() {
 | |
| 		if err = oprot.WriteFieldBegin("ConnectorId", thrift.I64, 9); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.ConnectorId); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetVersion() {
 | |
| 		if err = oprot.WriteFieldBegin("Version", thrift.STRING, 10); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Version); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetModelInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("ModelInfo", thrift.STRUCT, 11); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.ModelInfo.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 11 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 11 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField12(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPromptInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("PromptInfo", thrift.STRUCT, 12); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.PromptInfo.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 12 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 12 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField13(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginInfoList() {
 | |
| 		if err = oprot.WriteFieldBegin("PluginInfoList", thrift.LIST, 13); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.PluginInfoList)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.PluginInfoList {
 | |
| 			if err := v.Write(oprot); 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 13 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 13 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField14(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetWorkflowInfoList() {
 | |
| 		if err = oprot.WriteFieldBegin("WorkflowInfoList", thrift.LIST, 14); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.WorkflowInfoList)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.WorkflowInfoList {
 | |
| 			if err := v.Write(oprot); 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 14 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 14 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField15(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetOnboardingInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("OnboardingInfo", thrift.STRUCT, 15); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.OnboardingInfo.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 15 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 15 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField16(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetKnowledge() {
 | |
| 		if err = oprot.WriteFieldBegin("Knowledge", thrift.STRUCT, 16); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Knowledge.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 16 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 16 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField17(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetVariableList() {
 | |
| 		if err = oprot.WriteFieldBegin("VariableList", thrift.LIST, 17); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.VariableList)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.VariableList {
 | |
| 			if err := v.Write(oprot); 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 17 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 17 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField18(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTaskInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("TaskInfo", thrift.STRUCT, 18); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.TaskInfo.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 18 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 18 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField19(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDatabaseList() {
 | |
| 		if err = oprot.WriteFieldBegin("DatabaseList", thrift.LIST, 19); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.DatabaseList)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.DatabaseList {
 | |
| 			if err := v.Write(oprot); 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 19 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 19 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField20(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuggestReplyInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("SuggestReplyInfo", thrift.STRUCT, 20); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.SuggestReplyInfo.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 20 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 20 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField21(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetVoicesInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("VoicesInfo", thrift.STRUCT, 21); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.VoicesInfo.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 21 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 21 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField22(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBotExtInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("BotExtInfo", thrift.STRUCT, 22); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BotExtInfo.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 22 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 22 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField23(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBotMode() {
 | |
| 		if err = oprot.WriteFieldBegin("BotMode", thrift.I32, 23); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.BotMode)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 23 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 23 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField24(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAgents() {
 | |
| 		if err = oprot.WriteFieldBegin("Agents", thrift.LIST, 24); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Agents)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.Agents {
 | |
| 			if err := v.Write(oprot); 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 24 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 24 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField25(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BotSpecies", thrift.I32, 25); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.BotSpecies)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 25 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 25 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField26(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBotTagInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("BotTagInfo", thrift.STRUCT, 26); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BotTagInfo.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 26 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 26 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField27(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetFileboxInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("FileboxInfo", thrift.STRUCT, 27); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.FileboxInfo.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 27 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 27 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField28(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetMultiAgentInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("MultiAgentInfo", thrift.STRUCT, 28); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.MultiAgentInfo.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 28 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 28 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField29(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBackgroundImageInfoList() {
 | |
| 		if err = oprot.WriteFieldBegin("BackgroundImageInfoList", thrift.LIST, 29); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.BackgroundImageInfoList)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.BackgroundImageInfoList {
 | |
| 			if err := v.Write(oprot); 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 29 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 29 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField30(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetShortcutSort() {
 | |
| 		if err = oprot.WriteFieldBegin("ShortcutSort", thrift.LIST, 30); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRING, len(p.ShortcutSort)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.ShortcutSort {
 | |
| 			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 30 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 30 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField31(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetHookInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("HookInfo", thrift.STRUCT, 31); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.HookInfo.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 31 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 31 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField32(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetUserQueryCollectConf() {
 | |
| 		if err = oprot.WriteFieldBegin("UserQueryCollectConf", thrift.STRUCT, 32); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.UserQueryCollectConf.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 32 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 32 end error: ", p), err)
 | |
| }
 | |
| func (p *BotInfoForUpdate) writeField33(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetLayoutInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("LayoutInfo", thrift.STRUCT, 33); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.LayoutInfo.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 33 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 33 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *BotInfoForUpdate) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("BotInfoForUpdate(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type AgentForUpdate struct {
 | |
| 	// The agw field names are specially mapped, note that
 | |
| 	AgentId *int64 `thrift:"AgentId,1,optional" form:"id" json:"id,string,omitempty"`
 | |
| 	// The agw field names are specially mapped, note that
 | |
| 	AgentName *string `thrift:"AgentName,2,optional" form:"name" json:"name,omitempty"`
 | |
| 	// Prompt message
 | |
| 	PromptInfo *PromptInfo `thrift:"PromptInfo,3,optional" form:"prompt_info" json:"prompt_info,omitempty"`
 | |
| 	// List of plugins
 | |
| 	PluginInfoList []*PluginInfo `thrift:"PluginInfoList,4,optional" form:"plugin_info_list" json:"plugin_info_list,omitempty"`
 | |
| 	// dataset
 | |
| 	Knowledge *Knowledge `thrift:"Knowledge,5,optional" form:"knowledge" json:"knowledge,omitempty"`
 | |
| 	// Workflow List
 | |
| 	WorkflowInfoList []*WorkflowInfo `thrift:"WorkflowInfoList,6,optional" form:"workflow_info_list" json:"workflow_info_list,omitempty"`
 | |
| 	// model configuration
 | |
| 	ModelInfo *ModelInfo `thrift:"ModelInfo,7,optional" form:"model_info" json:"model_info,omitempty"`
 | |
| 	// intent information
 | |
| 	Intents   []*Intent  `thrift:"Intents,8,optional" form:"intents" json:"intents,omitempty"`
 | |
| 	AgentType *AgentType `thrift:"AgentType,9,optional" form:"agent_type" json:"agent_type,omitempty"`
 | |
| 	// Is it a rootagent?
 | |
| 	RootAgent        *bool             `thrift:"RootAgent,10,optional" form:"root_agent" json:"root_agent,omitempty"`
 | |
| 	ReferenceId      *int64            `thrift:"ReferenceId,11,optional" form:"reference_id" json:"reference_id,string,omitempty"`
 | |
| 	FirstVersion     *string           `thrift:"FirstVersion,12,optional" form:"first_version" json:"first_version,omitempty"`
 | |
| 	LastVersion      *string           `thrift:"LastVersion,13,optional" form:"last_version" json:"last_version,omitempty"`
 | |
| 	Position         *AgentPosition    `thrift:"Position,14,optional" form:"agent_position" json:"agent_position,omitempty"`
 | |
| 	IconUri          *string           `thrift:"IconUri,15,optional" form:"icon_uri" json:"icon_uri,omitempty"`
 | |
| 	JumpConfig       *JumpConfig       `thrift:"JumpConfig,16,optional" form:"jump_config" json:"jump_config,omitempty"`
 | |
| 	SuggestReplyInfo *SuggestReplyInfo `thrift:"SuggestReplyInfo,17,optional" form:"suggest_reply_info" json:"suggest_reply_info,omitempty"`
 | |
| 	Description      *string           `thrift:"Description,18,optional" form:"description" json:"description,omitempty"`
 | |
| 	// multi_agent version compatibility field
 | |
| 	VersionCompat *AgentVersionCompat `thrift:"VersionCompat,19,optional" form:"version_compat" json:"version_compat,omitempty"`
 | |
| 	HookInfo      *HookInfo           `thrift:"HookInfo,20,optional" form:"hook_info" json:"hook_info,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewAgentForUpdate() *AgentForUpdate {
 | |
| 	return &AgentForUpdate{}
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) InitDefault() {
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_AgentId_DEFAULT int64
 | |
| 
 | |
| func (p *AgentForUpdate) GetAgentId() (v int64) {
 | |
| 	if !p.IsSetAgentId() {
 | |
| 		return AgentForUpdate_AgentId_DEFAULT
 | |
| 	}
 | |
| 	return *p.AgentId
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_AgentName_DEFAULT string
 | |
| 
 | |
| func (p *AgentForUpdate) GetAgentName() (v string) {
 | |
| 	if !p.IsSetAgentName() {
 | |
| 		return AgentForUpdate_AgentName_DEFAULT
 | |
| 	}
 | |
| 	return *p.AgentName
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_PromptInfo_DEFAULT *PromptInfo
 | |
| 
 | |
| func (p *AgentForUpdate) GetPromptInfo() (v *PromptInfo) {
 | |
| 	if !p.IsSetPromptInfo() {
 | |
| 		return AgentForUpdate_PromptInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.PromptInfo
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_PluginInfoList_DEFAULT []*PluginInfo
 | |
| 
 | |
| func (p *AgentForUpdate) GetPluginInfoList() (v []*PluginInfo) {
 | |
| 	if !p.IsSetPluginInfoList() {
 | |
| 		return AgentForUpdate_PluginInfoList_DEFAULT
 | |
| 	}
 | |
| 	return p.PluginInfoList
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_Knowledge_DEFAULT *Knowledge
 | |
| 
 | |
| func (p *AgentForUpdate) GetKnowledge() (v *Knowledge) {
 | |
| 	if !p.IsSetKnowledge() {
 | |
| 		return AgentForUpdate_Knowledge_DEFAULT
 | |
| 	}
 | |
| 	return p.Knowledge
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_WorkflowInfoList_DEFAULT []*WorkflowInfo
 | |
| 
 | |
| func (p *AgentForUpdate) GetWorkflowInfoList() (v []*WorkflowInfo) {
 | |
| 	if !p.IsSetWorkflowInfoList() {
 | |
| 		return AgentForUpdate_WorkflowInfoList_DEFAULT
 | |
| 	}
 | |
| 	return p.WorkflowInfoList
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_ModelInfo_DEFAULT *ModelInfo
 | |
| 
 | |
| func (p *AgentForUpdate) GetModelInfo() (v *ModelInfo) {
 | |
| 	if !p.IsSetModelInfo() {
 | |
| 		return AgentForUpdate_ModelInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.ModelInfo
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_Intents_DEFAULT []*Intent
 | |
| 
 | |
| func (p *AgentForUpdate) GetIntents() (v []*Intent) {
 | |
| 	if !p.IsSetIntents() {
 | |
| 		return AgentForUpdate_Intents_DEFAULT
 | |
| 	}
 | |
| 	return p.Intents
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_AgentType_DEFAULT AgentType
 | |
| 
 | |
| func (p *AgentForUpdate) GetAgentType() (v AgentType) {
 | |
| 	if !p.IsSetAgentType() {
 | |
| 		return AgentForUpdate_AgentType_DEFAULT
 | |
| 	}
 | |
| 	return *p.AgentType
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_RootAgent_DEFAULT bool
 | |
| 
 | |
| func (p *AgentForUpdate) GetRootAgent() (v bool) {
 | |
| 	if !p.IsSetRootAgent() {
 | |
| 		return AgentForUpdate_RootAgent_DEFAULT
 | |
| 	}
 | |
| 	return *p.RootAgent
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_ReferenceId_DEFAULT int64
 | |
| 
 | |
| func (p *AgentForUpdate) GetReferenceId() (v int64) {
 | |
| 	if !p.IsSetReferenceId() {
 | |
| 		return AgentForUpdate_ReferenceId_DEFAULT
 | |
| 	}
 | |
| 	return *p.ReferenceId
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_FirstVersion_DEFAULT string
 | |
| 
 | |
| func (p *AgentForUpdate) GetFirstVersion() (v string) {
 | |
| 	if !p.IsSetFirstVersion() {
 | |
| 		return AgentForUpdate_FirstVersion_DEFAULT
 | |
| 	}
 | |
| 	return *p.FirstVersion
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_LastVersion_DEFAULT string
 | |
| 
 | |
| func (p *AgentForUpdate) GetLastVersion() (v string) {
 | |
| 	if !p.IsSetLastVersion() {
 | |
| 		return AgentForUpdate_LastVersion_DEFAULT
 | |
| 	}
 | |
| 	return *p.LastVersion
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_Position_DEFAULT *AgentPosition
 | |
| 
 | |
| func (p *AgentForUpdate) GetPosition() (v *AgentPosition) {
 | |
| 	if !p.IsSetPosition() {
 | |
| 		return AgentForUpdate_Position_DEFAULT
 | |
| 	}
 | |
| 	return p.Position
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_IconUri_DEFAULT string
 | |
| 
 | |
| func (p *AgentForUpdate) GetIconUri() (v string) {
 | |
| 	if !p.IsSetIconUri() {
 | |
| 		return AgentForUpdate_IconUri_DEFAULT
 | |
| 	}
 | |
| 	return *p.IconUri
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_JumpConfig_DEFAULT *JumpConfig
 | |
| 
 | |
| func (p *AgentForUpdate) GetJumpConfig() (v *JumpConfig) {
 | |
| 	if !p.IsSetJumpConfig() {
 | |
| 		return AgentForUpdate_JumpConfig_DEFAULT
 | |
| 	}
 | |
| 	return p.JumpConfig
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_SuggestReplyInfo_DEFAULT *SuggestReplyInfo
 | |
| 
 | |
| func (p *AgentForUpdate) GetSuggestReplyInfo() (v *SuggestReplyInfo) {
 | |
| 	if !p.IsSetSuggestReplyInfo() {
 | |
| 		return AgentForUpdate_SuggestReplyInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.SuggestReplyInfo
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_Description_DEFAULT string
 | |
| 
 | |
| func (p *AgentForUpdate) GetDescription() (v string) {
 | |
| 	if !p.IsSetDescription() {
 | |
| 		return AgentForUpdate_Description_DEFAULT
 | |
| 	}
 | |
| 	return *p.Description
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_VersionCompat_DEFAULT AgentVersionCompat
 | |
| 
 | |
| func (p *AgentForUpdate) GetVersionCompat() (v AgentVersionCompat) {
 | |
| 	if !p.IsSetVersionCompat() {
 | |
| 		return AgentForUpdate_VersionCompat_DEFAULT
 | |
| 	}
 | |
| 	return *p.VersionCompat
 | |
| }
 | |
| 
 | |
| var AgentForUpdate_HookInfo_DEFAULT *HookInfo
 | |
| 
 | |
| func (p *AgentForUpdate) GetHookInfo() (v *HookInfo) {
 | |
| 	if !p.IsSetHookInfo() {
 | |
| 		return AgentForUpdate_HookInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.HookInfo
 | |
| }
 | |
| 
 | |
| var fieldIDToName_AgentForUpdate = map[int16]string{
 | |
| 	1:  "AgentId",
 | |
| 	2:  "AgentName",
 | |
| 	3:  "PromptInfo",
 | |
| 	4:  "PluginInfoList",
 | |
| 	5:  "Knowledge",
 | |
| 	6:  "WorkflowInfoList",
 | |
| 	7:  "ModelInfo",
 | |
| 	8:  "Intents",
 | |
| 	9:  "AgentType",
 | |
| 	10: "RootAgent",
 | |
| 	11: "ReferenceId",
 | |
| 	12: "FirstVersion",
 | |
| 	13: "LastVersion",
 | |
| 	14: "Position",
 | |
| 	15: "IconUri",
 | |
| 	16: "JumpConfig",
 | |
| 	17: "SuggestReplyInfo",
 | |
| 	18: "Description",
 | |
| 	19: "VersionCompat",
 | |
| 	20: "HookInfo",
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetAgentId() bool {
 | |
| 	return p.AgentId != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetAgentName() bool {
 | |
| 	return p.AgentName != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetPromptInfo() bool {
 | |
| 	return p.PromptInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetPluginInfoList() bool {
 | |
| 	return p.PluginInfoList != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetKnowledge() bool {
 | |
| 	return p.Knowledge != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetWorkflowInfoList() bool {
 | |
| 	return p.WorkflowInfoList != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetModelInfo() bool {
 | |
| 	return p.ModelInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetIntents() bool {
 | |
| 	return p.Intents != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetAgentType() bool {
 | |
| 	return p.AgentType != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetRootAgent() bool {
 | |
| 	return p.RootAgent != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetReferenceId() bool {
 | |
| 	return p.ReferenceId != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetFirstVersion() bool {
 | |
| 	return p.FirstVersion != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetLastVersion() bool {
 | |
| 	return p.LastVersion != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetPosition() bool {
 | |
| 	return p.Position != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetIconUri() bool {
 | |
| 	return p.IconUri != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetJumpConfig() bool {
 | |
| 	return p.JumpConfig != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetSuggestReplyInfo() bool {
 | |
| 	return p.SuggestReplyInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetDescription() bool {
 | |
| 	return p.Description != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetVersionCompat() bool {
 | |
| 	return p.VersionCompat != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) IsSetHookInfo() bool {
 | |
| 	return p.HookInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) 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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField7(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 8:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField8(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 9:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField9(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 10:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField10(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 11:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField11(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 12:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField12(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 13:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField13(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 14:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField14(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 15:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField15(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 16:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField16(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 17:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField17(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 18:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField18(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 19:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField19(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 20:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField20(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_AgentForUpdate[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 *AgentForUpdate) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.AgentId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.AgentName = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_field := NewPromptInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.PromptInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField4(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*PluginInfo, 0, size)
 | |
| 	values := make([]PluginInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.PluginInfoList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField5(iprot thrift.TProtocol) error {
 | |
| 	_field := NewKnowledge()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Knowledge = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField6(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*WorkflowInfo, 0, size)
 | |
| 	values := make([]WorkflowInfo, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.WorkflowInfoList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField7(iprot thrift.TProtocol) error {
 | |
| 	_field := NewModelInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.ModelInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField8(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*Intent, 0, size)
 | |
| 	values := make([]Intent, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Intents = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *AgentType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := AgentType(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.AgentType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.RootAgent = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField11(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ReferenceId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField12(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.FirstVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField13(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.LastVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField14(iprot thrift.TProtocol) error {
 | |
| 	_field := NewAgentPosition()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Position = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField15(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.IconUri = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField16(iprot thrift.TProtocol) error {
 | |
| 	_field := NewJumpConfig()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.JumpConfig = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField17(iprot thrift.TProtocol) error {
 | |
| 	_field := NewSuggestReplyInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.SuggestReplyInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField18(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Description = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField19(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *AgentVersionCompat
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := AgentVersionCompat(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.VersionCompat = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *AgentForUpdate) ReadField20(iprot thrift.TProtocol) error {
 | |
| 	_field := NewHookInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.HookInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("AgentForUpdate"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField8(oprot); err != nil {
 | |
| 			fieldId = 8
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField9(oprot); err != nil {
 | |
| 			fieldId = 9
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField10(oprot); err != nil {
 | |
| 			fieldId = 10
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField11(oprot); err != nil {
 | |
| 			fieldId = 11
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField12(oprot); err != nil {
 | |
| 			fieldId = 12
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField13(oprot); err != nil {
 | |
| 			fieldId = 13
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField14(oprot); err != nil {
 | |
| 			fieldId = 14
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField15(oprot); err != nil {
 | |
| 			fieldId = 15
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField16(oprot); err != nil {
 | |
| 			fieldId = 16
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField17(oprot); err != nil {
 | |
| 			fieldId = 17
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField18(oprot); err != nil {
 | |
| 			fieldId = 18
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField19(oprot); err != nil {
 | |
| 			fieldId = 19
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField20(oprot); err != nil {
 | |
| 			fieldId = 20
 | |
| 			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 *AgentForUpdate) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAgentId() {
 | |
| 		if err = oprot.WriteFieldBegin("AgentId", thrift.I64, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.AgentId); 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 *AgentForUpdate) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAgentName() {
 | |
| 		if err = oprot.WriteFieldBegin("AgentName", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.AgentName); 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 *AgentForUpdate) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPromptInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("PromptInfo", thrift.STRUCT, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.PromptInfo.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 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginInfoList() {
 | |
| 		if err = oprot.WriteFieldBegin("PluginInfoList", thrift.LIST, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.PluginInfoList)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.PluginInfoList {
 | |
| 			if err := v.Write(oprot); 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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetKnowledge() {
 | |
| 		if err = oprot.WriteFieldBegin("Knowledge", thrift.STRUCT, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Knowledge.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 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetWorkflowInfoList() {
 | |
| 		if err = oprot.WriteFieldBegin("WorkflowInfoList", thrift.LIST, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.WorkflowInfoList)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.WorkflowInfoList {
 | |
| 			if err := v.Write(oprot); 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 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetModelInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("ModelInfo", thrift.STRUCT, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.ModelInfo.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 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetIntents() {
 | |
| 		if err = oprot.WriteFieldBegin("Intents", thrift.LIST, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Intents)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.Intents {
 | |
| 			if err := v.Write(oprot); 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 8 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAgentType() {
 | |
| 		if err = oprot.WriteFieldBegin("AgentType", thrift.I32, 9); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.AgentType)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetRootAgent() {
 | |
| 		if err = oprot.WriteFieldBegin("RootAgent", thrift.BOOL, 10); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.RootAgent); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetReferenceId() {
 | |
| 		if err = oprot.WriteFieldBegin("ReferenceId", thrift.I64, 11); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.ReferenceId); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 11 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 11 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField12(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetFirstVersion() {
 | |
| 		if err = oprot.WriteFieldBegin("FirstVersion", thrift.STRING, 12); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.FirstVersion); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 12 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 12 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField13(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetLastVersion() {
 | |
| 		if err = oprot.WriteFieldBegin("LastVersion", thrift.STRING, 13); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.LastVersion); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 13 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 13 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField14(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPosition() {
 | |
| 		if err = oprot.WriteFieldBegin("Position", thrift.STRUCT, 14); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Position.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 14 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 14 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField15(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetIconUri() {
 | |
| 		if err = oprot.WriteFieldBegin("IconUri", thrift.STRING, 15); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.IconUri); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 15 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 15 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField16(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetJumpConfig() {
 | |
| 		if err = oprot.WriteFieldBegin("JumpConfig", thrift.STRUCT, 16); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.JumpConfig.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 16 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 16 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField17(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuggestReplyInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("SuggestReplyInfo", thrift.STRUCT, 17); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.SuggestReplyInfo.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 17 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 17 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField18(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDescription() {
 | |
| 		if err = oprot.WriteFieldBegin("Description", thrift.STRING, 18); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Description); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 18 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 18 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField19(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetVersionCompat() {
 | |
| 		if err = oprot.WriteFieldBegin("VersionCompat", thrift.I32, 19); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.VersionCompat)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 19 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 19 end error: ", p), err)
 | |
| }
 | |
| func (p *AgentForUpdate) writeField20(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetHookInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("HookInfo", thrift.STRUCT, 20); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.HookInfo.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 20 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 20 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *AgentForUpdate) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("AgentForUpdate(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type TableDetail struct {
 | |
| 	// table id
 | |
| 	TableId *string `thrift:"TableId,1,optional" form:"TableId" json:"TableId,omitempty" query:"TableId"`
 | |
| 	// Table name
 | |
| 	TableName *string `thrift:"TableName,2,optional" form:"TableName" json:"TableName,omitempty" query:"TableName"`
 | |
| 	// Table Introduction
 | |
| 	TableDesc *string `thrift:"TableDesc,3,optional" form:"TableDesc" json:"TableDesc,omitempty" query:"TableDesc"`
 | |
| 	// Table field information
 | |
| 	FieldList []*FieldItem `thrift:"FieldList,4,optional" form:"FieldList" json:"FieldList,omitempty" query:"FieldList"`
 | |
| 	// Whether to support calling in Prompt, the default is supported
 | |
| 	PromptDisabled *bool `thrift:"PromptDisabled,5,optional" form:"prompt_disabled" json:"prompt_disabled,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewTableDetail() *TableDetail {
 | |
| 	return &TableDetail{}
 | |
| }
 | |
| 
 | |
| func (p *TableDetail) InitDefault() {
 | |
| }
 | |
| 
 | |
| var TableDetail_TableId_DEFAULT string
 | |
| 
 | |
| func (p *TableDetail) GetTableId() (v string) {
 | |
| 	if !p.IsSetTableId() {
 | |
| 		return TableDetail_TableId_DEFAULT
 | |
| 	}
 | |
| 	return *p.TableId
 | |
| }
 | |
| 
 | |
| var TableDetail_TableName_DEFAULT string
 | |
| 
 | |
| func (p *TableDetail) GetTableName() (v string) {
 | |
| 	if !p.IsSetTableName() {
 | |
| 		return TableDetail_TableName_DEFAULT
 | |
| 	}
 | |
| 	return *p.TableName
 | |
| }
 | |
| 
 | |
| var TableDetail_TableDesc_DEFAULT string
 | |
| 
 | |
| func (p *TableDetail) GetTableDesc() (v string) {
 | |
| 	if !p.IsSetTableDesc() {
 | |
| 		return TableDetail_TableDesc_DEFAULT
 | |
| 	}
 | |
| 	return *p.TableDesc
 | |
| }
 | |
| 
 | |
| var TableDetail_FieldList_DEFAULT []*FieldItem
 | |
| 
 | |
| func (p *TableDetail) GetFieldList() (v []*FieldItem) {
 | |
| 	if !p.IsSetFieldList() {
 | |
| 		return TableDetail_FieldList_DEFAULT
 | |
| 	}
 | |
| 	return p.FieldList
 | |
| }
 | |
| 
 | |
| var TableDetail_PromptDisabled_DEFAULT bool
 | |
| 
 | |
| func (p *TableDetail) GetPromptDisabled() (v bool) {
 | |
| 	if !p.IsSetPromptDisabled() {
 | |
| 		return TableDetail_PromptDisabled_DEFAULT
 | |
| 	}
 | |
| 	return *p.PromptDisabled
 | |
| }
 | |
| 
 | |
| var fieldIDToName_TableDetail = map[int16]string{
 | |
| 	1: "TableId",
 | |
| 	2: "TableName",
 | |
| 	3: "TableDesc",
 | |
| 	4: "FieldList",
 | |
| 	5: "PromptDisabled",
 | |
| }
 | |
| 
 | |
| func (p *TableDetail) IsSetTableId() bool {
 | |
| 	return p.TableId != nil
 | |
| }
 | |
| 
 | |
| func (p *TableDetail) IsSetTableName() bool {
 | |
| 	return p.TableName != nil
 | |
| }
 | |
| 
 | |
| func (p *TableDetail) IsSetTableDesc() bool {
 | |
| 	return p.TableDesc != nil
 | |
| }
 | |
| 
 | |
| func (p *TableDetail) IsSetFieldList() bool {
 | |
| 	return p.FieldList != nil
 | |
| }
 | |
| 
 | |
| func (p *TableDetail) IsSetPromptDisabled() bool {
 | |
| 	return p.PromptDisabled != nil
 | |
| }
 | |
| 
 | |
| func (p *TableDetail) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField5(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_TableDetail[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 *TableDetail) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TableId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TableDetail) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TableName = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TableDetail) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TableDesc = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TableDetail) ReadField4(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*FieldItem, 0, size)
 | |
| 	values := make([]FieldItem, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.FieldList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TableDetail) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PromptDisabled = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *TableDetail) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("TableDetail"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			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 *TableDetail) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTableId() {
 | |
| 		if err = oprot.WriteFieldBegin("TableId", thrift.STRING, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.TableId); 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 *TableDetail) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTableName() {
 | |
| 		if err = oprot.WriteFieldBegin("TableName", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.TableName); 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 *TableDetail) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTableDesc() {
 | |
| 		if err = oprot.WriteFieldBegin("TableDesc", thrift.STRING, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.TableDesc); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *TableDetail) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetFieldList() {
 | |
| 		if err = oprot.WriteFieldBegin("FieldList", thrift.LIST, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.FieldList)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.FieldList {
 | |
| 			if err := v.Write(oprot); 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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *TableDetail) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPromptDisabled() {
 | |
| 		if err = oprot.WriteFieldBegin("PromptDisabled", thrift.BOOL, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.PromptDisabled); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *TableDetail) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("TableDetail(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type TaskPluginInputField struct {
 | |
| 	Name *string `thrift:"Name,1,optional" form:"Name" json:"Name,omitempty" query:"Name"`
 | |
| 	// "Input", "Reference"
 | |
| 	Type  *string `thrift:"Type,2,optional" form:"Type" json:"Type,omitempty" query:"Type"`
 | |
| 	Value *string `thrift:"Value,3,optional" form:"Value" json:"Value,omitempty" query:"Value"`
 | |
| }
 | |
| 
 | |
| func NewTaskPluginInputField() *TaskPluginInputField {
 | |
| 	return &TaskPluginInputField{}
 | |
| }
 | |
| 
 | |
| func (p *TaskPluginInputField) InitDefault() {
 | |
| }
 | |
| 
 | |
| var TaskPluginInputField_Name_DEFAULT string
 | |
| 
 | |
| func (p *TaskPluginInputField) GetName() (v string) {
 | |
| 	if !p.IsSetName() {
 | |
| 		return TaskPluginInputField_Name_DEFAULT
 | |
| 	}
 | |
| 	return *p.Name
 | |
| }
 | |
| 
 | |
| var TaskPluginInputField_Type_DEFAULT string
 | |
| 
 | |
| func (p *TaskPluginInputField) GetType() (v string) {
 | |
| 	if !p.IsSetType() {
 | |
| 		return TaskPluginInputField_Type_DEFAULT
 | |
| 	}
 | |
| 	return *p.Type
 | |
| }
 | |
| 
 | |
| var TaskPluginInputField_Value_DEFAULT string
 | |
| 
 | |
| func (p *TaskPluginInputField) GetValue() (v string) {
 | |
| 	if !p.IsSetValue() {
 | |
| 		return TaskPluginInputField_Value_DEFAULT
 | |
| 	}
 | |
| 	return *p.Value
 | |
| }
 | |
| 
 | |
| var fieldIDToName_TaskPluginInputField = map[int16]string{
 | |
| 	1: "Name",
 | |
| 	2: "Type",
 | |
| 	3: "Value",
 | |
| }
 | |
| 
 | |
| func (p *TaskPluginInputField) IsSetName() bool {
 | |
| 	return p.Name != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskPluginInputField) IsSetType() bool {
 | |
| 	return p.Type != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskPluginInputField) IsSetValue() bool {
 | |
| 	return p.Value != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskPluginInputField) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(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_TaskPluginInputField[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 *TaskPluginInputField) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Name = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskPluginInputField) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Type = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskPluginInputField) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Value = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *TaskPluginInputField) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("TaskPluginInputField"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			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 *TaskPluginInputField) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetName() {
 | |
| 		if err = oprot.WriteFieldBegin("Name", thrift.STRING, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Name); 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 *TaskPluginInputField) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetType() {
 | |
| 		if err = oprot.WriteFieldBegin("Type", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Type); 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 *TaskPluginInputField) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetValue() {
 | |
| 		if err = oprot.WriteFieldBegin("Value", thrift.STRING, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Value); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *TaskPluginInputField) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("TaskPluginInputField(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type TaskPluginInput struct {
 | |
| 	Params []*TaskPluginInputField `thrift:"Params,1,optional" form:"Params" json:"Params,omitempty" query:"Params"`
 | |
| }
 | |
| 
 | |
| func NewTaskPluginInput() *TaskPluginInput {
 | |
| 	return &TaskPluginInput{}
 | |
| }
 | |
| 
 | |
| func (p *TaskPluginInput) InitDefault() {
 | |
| }
 | |
| 
 | |
| var TaskPluginInput_Params_DEFAULT []*TaskPluginInputField
 | |
| 
 | |
| func (p *TaskPluginInput) GetParams() (v []*TaskPluginInputField) {
 | |
| 	if !p.IsSetParams() {
 | |
| 		return TaskPluginInput_Params_DEFAULT
 | |
| 	}
 | |
| 	return p.Params
 | |
| }
 | |
| 
 | |
| var fieldIDToName_TaskPluginInput = map[int16]string{
 | |
| 	1: "Params",
 | |
| }
 | |
| 
 | |
| func (p *TaskPluginInput) IsSetParams() bool {
 | |
| 	return p.Params != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskPluginInput) 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.LIST {
 | |
| 				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_TaskPluginInput[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 *TaskPluginInput) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*TaskPluginInputField, 0, size)
 | |
| 	values := make([]TaskPluginInputField, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Params = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *TaskPluginInput) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("TaskPluginInput"); 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 *TaskPluginInput) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetParams() {
 | |
| 		if err = oprot.WriteFieldBegin("Params", thrift.LIST, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Params)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.Params {
 | |
| 			if err := v.Write(oprot); 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 1 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *TaskPluginInput) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("TaskPluginInput(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type TaskWebhookField struct {
 | |
| 	Name        *string             `thrift:"Name,1,optional" form:"Name" json:"Name,omitempty" query:"Name"`
 | |
| 	Type        *string             `thrift:"Type,2,optional" form:"Type" json:"Type,omitempty" query:"Type"`
 | |
| 	Description *string             `thrift:"Description,3,optional" form:"Description" json:"Description,omitempty" query:"Description"`
 | |
| 	Children    []*TaskWebhookField `thrift:"Children,4,optional" form:"Children" json:"Children,omitempty" query:"Children"`
 | |
| }
 | |
| 
 | |
| func NewTaskWebhookField() *TaskWebhookField {
 | |
| 	return &TaskWebhookField{}
 | |
| }
 | |
| 
 | |
| func (p *TaskWebhookField) InitDefault() {
 | |
| }
 | |
| 
 | |
| var TaskWebhookField_Name_DEFAULT string
 | |
| 
 | |
| func (p *TaskWebhookField) GetName() (v string) {
 | |
| 	if !p.IsSetName() {
 | |
| 		return TaskWebhookField_Name_DEFAULT
 | |
| 	}
 | |
| 	return *p.Name
 | |
| }
 | |
| 
 | |
| var TaskWebhookField_Type_DEFAULT string
 | |
| 
 | |
| func (p *TaskWebhookField) GetType() (v string) {
 | |
| 	if !p.IsSetType() {
 | |
| 		return TaskWebhookField_Type_DEFAULT
 | |
| 	}
 | |
| 	return *p.Type
 | |
| }
 | |
| 
 | |
| var TaskWebhookField_Description_DEFAULT string
 | |
| 
 | |
| func (p *TaskWebhookField) GetDescription() (v string) {
 | |
| 	if !p.IsSetDescription() {
 | |
| 		return TaskWebhookField_Description_DEFAULT
 | |
| 	}
 | |
| 	return *p.Description
 | |
| }
 | |
| 
 | |
| var TaskWebhookField_Children_DEFAULT []*TaskWebhookField
 | |
| 
 | |
| func (p *TaskWebhookField) GetChildren() (v []*TaskWebhookField) {
 | |
| 	if !p.IsSetChildren() {
 | |
| 		return TaskWebhookField_Children_DEFAULT
 | |
| 	}
 | |
| 	return p.Children
 | |
| }
 | |
| 
 | |
| var fieldIDToName_TaskWebhookField = map[int16]string{
 | |
| 	1: "Name",
 | |
| 	2: "Type",
 | |
| 	3: "Description",
 | |
| 	4: "Children",
 | |
| }
 | |
| 
 | |
| func (p *TaskWebhookField) IsSetName() bool {
 | |
| 	return p.Name != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskWebhookField) IsSetType() bool {
 | |
| 	return p.Type != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskWebhookField) IsSetDescription() bool {
 | |
| 	return p.Description != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskWebhookField) IsSetChildren() bool {
 | |
| 	return p.Children != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskWebhookField) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField4(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_TaskWebhookField[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 *TaskWebhookField) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Name = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskWebhookField) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Type = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskWebhookField) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Description = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskWebhookField) ReadField4(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*TaskWebhookField, 0, size)
 | |
| 	values := make([]TaskWebhookField, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Children = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *TaskWebhookField) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("TaskWebhookField"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			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 *TaskWebhookField) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetName() {
 | |
| 		if err = oprot.WriteFieldBegin("Name", thrift.STRING, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Name); 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 *TaskWebhookField) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetType() {
 | |
| 		if err = oprot.WriteFieldBegin("Type", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Type); 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 *TaskWebhookField) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDescription() {
 | |
| 		if err = oprot.WriteFieldBegin("Description", thrift.STRING, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Description); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskWebhookField) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetChildren() {
 | |
| 		if err = oprot.WriteFieldBegin("Children", thrift.LIST, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Children)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.Children {
 | |
| 			if err := v.Write(oprot); 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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *TaskWebhookField) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("TaskWebhookField(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type TaskWebhookOutput struct {
 | |
| 	Params []*TaskWebhookField `thrift:"Params,1,optional" form:"Params" json:"Params,omitempty" query:"Params"`
 | |
| }
 | |
| 
 | |
| func NewTaskWebhookOutput() *TaskWebhookOutput {
 | |
| 	return &TaskWebhookOutput{}
 | |
| }
 | |
| 
 | |
| func (p *TaskWebhookOutput) InitDefault() {
 | |
| }
 | |
| 
 | |
| var TaskWebhookOutput_Params_DEFAULT []*TaskWebhookField
 | |
| 
 | |
| func (p *TaskWebhookOutput) GetParams() (v []*TaskWebhookField) {
 | |
| 	if !p.IsSetParams() {
 | |
| 		return TaskWebhookOutput_Params_DEFAULT
 | |
| 	}
 | |
| 	return p.Params
 | |
| }
 | |
| 
 | |
| var fieldIDToName_TaskWebhookOutput = map[int16]string{
 | |
| 	1: "Params",
 | |
| }
 | |
| 
 | |
| func (p *TaskWebhookOutput) IsSetParams() bool {
 | |
| 	return p.Params != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskWebhookOutput) 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.LIST {
 | |
| 				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_TaskWebhookOutput[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 *TaskWebhookOutput) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*TaskWebhookField, 0, size)
 | |
| 	values := make([]TaskWebhookField, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Params = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *TaskWebhookOutput) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("TaskWebhookOutput"); 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 *TaskWebhookOutput) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetParams() {
 | |
| 		if err = oprot.WriteFieldBegin("Params", thrift.LIST, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Params)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.Params {
 | |
| 			if err := v.Write(oprot); 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 1 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *TaskWebhookOutput) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("TaskWebhookOutput(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type TaskInfoDetail struct {
 | |
| 	// Tasks Detail
 | |
| 	TaskId *string `thrift:"TaskId,1,optional" form:"TaskId" json:"TaskId,omitempty" query:"TaskId"`
 | |
| 	// The query executed when the timer fires, for example: Remind me to drink water. Phase 2: TriggerType == "Time"
 | |
| 	UserQuestion *string `thrift:"UserQuestion,2,optional" form:"UserQuestion" json:"UserQuestion,omitempty" query:"UserQuestion"`
 | |
| 	// Timed task create_time
 | |
| 	CreateTime *string `thrift:"CreateTime,3,optional" form:"CreateTime" json:"CreateTime,omitempty" query:"CreateTime"`
 | |
| 	// The time when the scheduled task will next execute
 | |
| 	NextTime *string `thrift:"NextTime,4,optional" form:"NextTime" json:"NextTime,omitempty" query:"NextTime"`
 | |
| 	// Task Status: Valid/Invalid
 | |
| 	Status *int64 `thrift:"Status,5,optional" form:"Status" json:"Status,omitempty" query:"Status"`
 | |
| 	// 1-Draft, 2-Online
 | |
| 	PresetType *int32 `thrift:"PresetType,6,optional" form:"PresetType" json:"PresetType,omitempty" query:"PresetType"`
 | |
| 	// crontab expression for timed tasks
 | |
| 	CronExpr *string `thrift:"CronExpr,7,optional" form:"CronExpr" json:"CronExpr,omitempty" query:"CronExpr"`
 | |
| 	// Treated UserQuestions, such as Drinking Water
 | |
| 	TaskContent *string `thrift:"TaskContent,8,optional" form:"TaskContent" json:"TaskContent,omitempty" query:"TaskContent"`
 | |
| 	// Time Zone
 | |
| 	TimeZone *string `thrift:"TimeZone,9,optional" form:"TimeZone" json:"TimeZone,omitempty" query:"TimeZone"`
 | |
| 	// task name
 | |
| 	TaskName *string `thrift:"TaskName,10,optional" form:"TaskName" json:"TaskName,omitempty" query:"TaskName"`
 | |
| 	// "Time", "Event"
 | |
| 	TriggerType *string `thrift:"TriggerType,11,optional" form:"TriggerType" json:"TriggerType,omitempty" query:"TriggerType"`
 | |
| 	// "Bot query", "Plugin", "Workflow"
 | |
| 	Action *string `thrift:"Action,12,optional" form:"Action" json:"Action,omitempty" query:"Action"`
 | |
| 	// Action == "Bot query"
 | |
| 	BotQuery *string `thrift:"BotQuery,13,optional" form:"BotQuery" json:"BotQuery,omitempty" query:"BotQuery"`
 | |
| 	// Both plugins and workflows use this field
 | |
| 	PluginName *string `thrift:"PluginName,14,optional" form:"PluginName" json:"PluginName,omitempty" query:"PluginName"`
 | |
| 	// Both plugins and workflows use this field
 | |
| 	PluginInput *TaskPluginInput `thrift:"PluginInput,15,optional" form:"PluginInput" json:"PluginInput,omitempty" query:"PluginInput"`
 | |
| 	// TriggerType == "Event"
 | |
| 	WebhookUrl *string `thrift:"WebhookUrl,16,optional" form:"WebhookUrl" json:"WebhookUrl,omitempty" query:"WebhookUrl"`
 | |
| 	// TriggerType == "Event"
 | |
| 	WebhookBearerToken *string `thrift:"WebhookBearerToken,17,optional" form:"WebhookBearerToken" json:"WebhookBearerToken,omitempty" query:"WebhookBearerToken"`
 | |
| 	// TriggerType == "Event"
 | |
| 	WebhookOutput *TaskWebhookOutput `thrift:"WebhookOutput,18,optional" form:"WebhookOutput" json:"WebhookOutput,omitempty" query:"WebhookOutput"`
 | |
| 	// Traceability ID. Generated when created, updated/released unchanged
 | |
| 	OriginId *string `thrift:"OriginId,19,optional" form:"OriginId" json:"OriginId,omitempty" query:"OriginId"`
 | |
| }
 | |
| 
 | |
| func NewTaskInfoDetail() *TaskInfoDetail {
 | |
| 	return &TaskInfoDetail{}
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) InitDefault() {
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_TaskId_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetTaskId() (v string) {
 | |
| 	if !p.IsSetTaskId() {
 | |
| 		return TaskInfoDetail_TaskId_DEFAULT
 | |
| 	}
 | |
| 	return *p.TaskId
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_UserQuestion_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetUserQuestion() (v string) {
 | |
| 	if !p.IsSetUserQuestion() {
 | |
| 		return TaskInfoDetail_UserQuestion_DEFAULT
 | |
| 	}
 | |
| 	return *p.UserQuestion
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_CreateTime_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetCreateTime() (v string) {
 | |
| 	if !p.IsSetCreateTime() {
 | |
| 		return TaskInfoDetail_CreateTime_DEFAULT
 | |
| 	}
 | |
| 	return *p.CreateTime
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_NextTime_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetNextTime() (v string) {
 | |
| 	if !p.IsSetNextTime() {
 | |
| 		return TaskInfoDetail_NextTime_DEFAULT
 | |
| 	}
 | |
| 	return *p.NextTime
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_Status_DEFAULT int64
 | |
| 
 | |
| func (p *TaskInfoDetail) GetStatus() (v int64) {
 | |
| 	if !p.IsSetStatus() {
 | |
| 		return TaskInfoDetail_Status_DEFAULT
 | |
| 	}
 | |
| 	return *p.Status
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_PresetType_DEFAULT int32
 | |
| 
 | |
| func (p *TaskInfoDetail) GetPresetType() (v int32) {
 | |
| 	if !p.IsSetPresetType() {
 | |
| 		return TaskInfoDetail_PresetType_DEFAULT
 | |
| 	}
 | |
| 	return *p.PresetType
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_CronExpr_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetCronExpr() (v string) {
 | |
| 	if !p.IsSetCronExpr() {
 | |
| 		return TaskInfoDetail_CronExpr_DEFAULT
 | |
| 	}
 | |
| 	return *p.CronExpr
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_TaskContent_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetTaskContent() (v string) {
 | |
| 	if !p.IsSetTaskContent() {
 | |
| 		return TaskInfoDetail_TaskContent_DEFAULT
 | |
| 	}
 | |
| 	return *p.TaskContent
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_TimeZone_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetTimeZone() (v string) {
 | |
| 	if !p.IsSetTimeZone() {
 | |
| 		return TaskInfoDetail_TimeZone_DEFAULT
 | |
| 	}
 | |
| 	return *p.TimeZone
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_TaskName_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetTaskName() (v string) {
 | |
| 	if !p.IsSetTaskName() {
 | |
| 		return TaskInfoDetail_TaskName_DEFAULT
 | |
| 	}
 | |
| 	return *p.TaskName
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_TriggerType_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetTriggerType() (v string) {
 | |
| 	if !p.IsSetTriggerType() {
 | |
| 		return TaskInfoDetail_TriggerType_DEFAULT
 | |
| 	}
 | |
| 	return *p.TriggerType
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_Action_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetAction() (v string) {
 | |
| 	if !p.IsSetAction() {
 | |
| 		return TaskInfoDetail_Action_DEFAULT
 | |
| 	}
 | |
| 	return *p.Action
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_BotQuery_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetBotQuery() (v string) {
 | |
| 	if !p.IsSetBotQuery() {
 | |
| 		return TaskInfoDetail_BotQuery_DEFAULT
 | |
| 	}
 | |
| 	return *p.BotQuery
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_PluginName_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetPluginName() (v string) {
 | |
| 	if !p.IsSetPluginName() {
 | |
| 		return TaskInfoDetail_PluginName_DEFAULT
 | |
| 	}
 | |
| 	return *p.PluginName
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_PluginInput_DEFAULT *TaskPluginInput
 | |
| 
 | |
| func (p *TaskInfoDetail) GetPluginInput() (v *TaskPluginInput) {
 | |
| 	if !p.IsSetPluginInput() {
 | |
| 		return TaskInfoDetail_PluginInput_DEFAULT
 | |
| 	}
 | |
| 	return p.PluginInput
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_WebhookUrl_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetWebhookUrl() (v string) {
 | |
| 	if !p.IsSetWebhookUrl() {
 | |
| 		return TaskInfoDetail_WebhookUrl_DEFAULT
 | |
| 	}
 | |
| 	return *p.WebhookUrl
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_WebhookBearerToken_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetWebhookBearerToken() (v string) {
 | |
| 	if !p.IsSetWebhookBearerToken() {
 | |
| 		return TaskInfoDetail_WebhookBearerToken_DEFAULT
 | |
| 	}
 | |
| 	return *p.WebhookBearerToken
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_WebhookOutput_DEFAULT *TaskWebhookOutput
 | |
| 
 | |
| func (p *TaskInfoDetail) GetWebhookOutput() (v *TaskWebhookOutput) {
 | |
| 	if !p.IsSetWebhookOutput() {
 | |
| 		return TaskInfoDetail_WebhookOutput_DEFAULT
 | |
| 	}
 | |
| 	return p.WebhookOutput
 | |
| }
 | |
| 
 | |
| var TaskInfoDetail_OriginId_DEFAULT string
 | |
| 
 | |
| func (p *TaskInfoDetail) GetOriginId() (v string) {
 | |
| 	if !p.IsSetOriginId() {
 | |
| 		return TaskInfoDetail_OriginId_DEFAULT
 | |
| 	}
 | |
| 	return *p.OriginId
 | |
| }
 | |
| 
 | |
| var fieldIDToName_TaskInfoDetail = map[int16]string{
 | |
| 	1:  "TaskId",
 | |
| 	2:  "UserQuestion",
 | |
| 	3:  "CreateTime",
 | |
| 	4:  "NextTime",
 | |
| 	5:  "Status",
 | |
| 	6:  "PresetType",
 | |
| 	7:  "CronExpr",
 | |
| 	8:  "TaskContent",
 | |
| 	9:  "TimeZone",
 | |
| 	10: "TaskName",
 | |
| 	11: "TriggerType",
 | |
| 	12: "Action",
 | |
| 	13: "BotQuery",
 | |
| 	14: "PluginName",
 | |
| 	15: "PluginInput",
 | |
| 	16: "WebhookUrl",
 | |
| 	17: "WebhookBearerToken",
 | |
| 	18: "WebhookOutput",
 | |
| 	19: "OriginId",
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetTaskId() bool {
 | |
| 	return p.TaskId != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetUserQuestion() bool {
 | |
| 	return p.UserQuestion != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetCreateTime() bool {
 | |
| 	return p.CreateTime != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetNextTime() bool {
 | |
| 	return p.NextTime != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetStatus() bool {
 | |
| 	return p.Status != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetPresetType() bool {
 | |
| 	return p.PresetType != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetCronExpr() bool {
 | |
| 	return p.CronExpr != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetTaskContent() bool {
 | |
| 	return p.TaskContent != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetTimeZone() bool {
 | |
| 	return p.TimeZone != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetTaskName() bool {
 | |
| 	return p.TaskName != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetTriggerType() bool {
 | |
| 	return p.TriggerType != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetAction() bool {
 | |
| 	return p.Action != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetBotQuery() bool {
 | |
| 	return p.BotQuery != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetPluginName() bool {
 | |
| 	return p.PluginName != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetPluginInput() bool {
 | |
| 	return p.PluginInput != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetWebhookUrl() bool {
 | |
| 	return p.WebhookUrl != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetWebhookBearerToken() bool {
 | |
| 	return p.WebhookBearerToken != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetWebhookOutput() bool {
 | |
| 	return p.WebhookOutput != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) IsSetOriginId() bool {
 | |
| 	return p.OriginId != nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField7(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 8:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField8(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 9:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField9(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 10:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField10(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 11:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField11(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 12:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField12(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 13:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField13(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 14:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField14(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 15:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField15(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 16:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField16(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 17:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField17(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 18:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField18(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 19:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField19(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_TaskInfoDetail[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 *TaskInfoDetail) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TaskId = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.UserQuestion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.CreateTime = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.NextTime = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Status = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PresetType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.CronExpr = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TaskContent = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TimeZone = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TaskName = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField11(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TriggerType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField12(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Action = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField13(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.BotQuery = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField14(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PluginName = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField15(iprot thrift.TProtocol) error {
 | |
| 	_field := NewTaskPluginInput()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.PluginInput = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField16(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.WebhookUrl = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField17(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.WebhookBearerToken = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField18(iprot thrift.TProtocol) error {
 | |
| 	_field := NewTaskWebhookOutput()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.WebhookOutput = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *TaskInfoDetail) ReadField19(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.OriginId = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("TaskInfoDetail"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField8(oprot); err != nil {
 | |
| 			fieldId = 8
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField9(oprot); err != nil {
 | |
| 			fieldId = 9
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField10(oprot); err != nil {
 | |
| 			fieldId = 10
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField11(oprot); err != nil {
 | |
| 			fieldId = 11
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField12(oprot); err != nil {
 | |
| 			fieldId = 12
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField13(oprot); err != nil {
 | |
| 			fieldId = 13
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField14(oprot); err != nil {
 | |
| 			fieldId = 14
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField15(oprot); err != nil {
 | |
| 			fieldId = 15
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField16(oprot); err != nil {
 | |
| 			fieldId = 16
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField17(oprot); err != nil {
 | |
| 			fieldId = 17
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField18(oprot); err != nil {
 | |
| 			fieldId = 18
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField19(oprot); err != nil {
 | |
| 			fieldId = 19
 | |
| 			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 *TaskInfoDetail) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTaskId() {
 | |
| 		if err = oprot.WriteFieldBegin("TaskId", thrift.STRING, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.TaskId); 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 *TaskInfoDetail) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetUserQuestion() {
 | |
| 		if err = oprot.WriteFieldBegin("UserQuestion", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.UserQuestion); 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 *TaskInfoDetail) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCreateTime() {
 | |
| 		if err = oprot.WriteFieldBegin("CreateTime", thrift.STRING, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.CreateTime); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetNextTime() {
 | |
| 		if err = oprot.WriteFieldBegin("NextTime", thrift.STRING, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.NextTime); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetStatus() {
 | |
| 		if err = oprot.WriteFieldBegin("Status", thrift.I64, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.Status); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPresetType() {
 | |
| 		if err = oprot.WriteFieldBegin("PresetType", thrift.I32, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.PresetType); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCronExpr() {
 | |
| 		if err = oprot.WriteFieldBegin("CronExpr", thrift.STRING, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.CronExpr); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTaskContent() {
 | |
| 		if err = oprot.WriteFieldBegin("TaskContent", thrift.STRING, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.TaskContent); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTimeZone() {
 | |
| 		if err = oprot.WriteFieldBegin("TimeZone", thrift.STRING, 9); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.TimeZone); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTaskName() {
 | |
| 		if err = oprot.WriteFieldBegin("TaskName", thrift.STRING, 10); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.TaskName); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTriggerType() {
 | |
| 		if err = oprot.WriteFieldBegin("TriggerType", thrift.STRING, 11); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.TriggerType); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 11 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 11 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField12(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAction() {
 | |
| 		if err = oprot.WriteFieldBegin("Action", thrift.STRING, 12); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Action); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 12 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 12 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField13(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBotQuery() {
 | |
| 		if err = oprot.WriteFieldBegin("BotQuery", thrift.STRING, 13); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.BotQuery); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 13 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 13 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField14(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginName() {
 | |
| 		if err = oprot.WriteFieldBegin("PluginName", thrift.STRING, 14); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.PluginName); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 14 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 14 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField15(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginInput() {
 | |
| 		if err = oprot.WriteFieldBegin("PluginInput", thrift.STRUCT, 15); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.PluginInput.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 15 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 15 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField16(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetWebhookUrl() {
 | |
| 		if err = oprot.WriteFieldBegin("WebhookUrl", thrift.STRING, 16); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.WebhookUrl); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 16 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 16 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField17(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetWebhookBearerToken() {
 | |
| 		if err = oprot.WriteFieldBegin("WebhookBearerToken", thrift.STRING, 17); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.WebhookBearerToken); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 17 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 17 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField18(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetWebhookOutput() {
 | |
| 		if err = oprot.WriteFieldBegin("WebhookOutput", thrift.STRUCT, 18); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.WebhookOutput.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 18 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 18 end error: ", p), err)
 | |
| }
 | |
| func (p *TaskInfoDetail) writeField19(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetOriginId() {
 | |
| 		if err = oprot.WriteFieldBegin("OriginId", thrift.STRING, 19); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.OriginId); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 19 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 19 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *TaskInfoDetail) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("TaskInfoDetail(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type DraftBotInfoV2 struct {
 | |
| 	BotInfo           *BotInfo `thrift:"BotInfo,1" form:"BotInfo" json:"BotInfo" query:"BotInfo"`
 | |
| 	CanvasData        *string  `thrift:"CanvasData,2,optional" form:"CanvasData" json:"CanvasData,omitempty" query:"CanvasData"`
 | |
| 	BaseCommitVersion *int64   `thrift:"BaseCommitVersion,3,optional" form:"BaseCommitVersion" json:"BaseCommitVersion,omitempty" query:"BaseCommitVersion"`
 | |
| 	CommitVersion     *int64   `thrift:"CommitVersion,4,optional" form:"CommitVersion" json:"CommitVersion,omitempty" query:"CommitVersion"`
 | |
| 	// TableInfo
 | |
| 	TableInfo map[string]*TableDetail `thrift:"TableInfo,5,optional" form:"TableInfo" json:"TableInfo,omitempty" query:"TableInfo"`
 | |
| 	// taskInfo
 | |
| 	TaskInfo map[string]*TaskInfoDetail `thrift:"TaskInfo,6,optional" form:"TaskInfo" json:"TaskInfo,omitempty" query:"TaskInfo"`
 | |
| }
 | |
| 
 | |
| func NewDraftBotInfoV2() *DraftBotInfoV2 {
 | |
| 	return &DraftBotInfoV2{}
 | |
| }
 | |
| 
 | |
| func (p *DraftBotInfoV2) InitDefault() {
 | |
| }
 | |
| 
 | |
| var DraftBotInfoV2_BotInfo_DEFAULT *BotInfo
 | |
| 
 | |
| func (p *DraftBotInfoV2) GetBotInfo() (v *BotInfo) {
 | |
| 	if !p.IsSetBotInfo() {
 | |
| 		return DraftBotInfoV2_BotInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.BotInfo
 | |
| }
 | |
| 
 | |
| var DraftBotInfoV2_CanvasData_DEFAULT string
 | |
| 
 | |
| func (p *DraftBotInfoV2) GetCanvasData() (v string) {
 | |
| 	if !p.IsSetCanvasData() {
 | |
| 		return DraftBotInfoV2_CanvasData_DEFAULT
 | |
| 	}
 | |
| 	return *p.CanvasData
 | |
| }
 | |
| 
 | |
| var DraftBotInfoV2_BaseCommitVersion_DEFAULT int64
 | |
| 
 | |
| func (p *DraftBotInfoV2) GetBaseCommitVersion() (v int64) {
 | |
| 	if !p.IsSetBaseCommitVersion() {
 | |
| 		return DraftBotInfoV2_BaseCommitVersion_DEFAULT
 | |
| 	}
 | |
| 	return *p.BaseCommitVersion
 | |
| }
 | |
| 
 | |
| var DraftBotInfoV2_CommitVersion_DEFAULT int64
 | |
| 
 | |
| func (p *DraftBotInfoV2) GetCommitVersion() (v int64) {
 | |
| 	if !p.IsSetCommitVersion() {
 | |
| 		return DraftBotInfoV2_CommitVersion_DEFAULT
 | |
| 	}
 | |
| 	return *p.CommitVersion
 | |
| }
 | |
| 
 | |
| var DraftBotInfoV2_TableInfo_DEFAULT map[string]*TableDetail
 | |
| 
 | |
| func (p *DraftBotInfoV2) GetTableInfo() (v map[string]*TableDetail) {
 | |
| 	if !p.IsSetTableInfo() {
 | |
| 		return DraftBotInfoV2_TableInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.TableInfo
 | |
| }
 | |
| 
 | |
| var DraftBotInfoV2_TaskInfo_DEFAULT map[string]*TaskInfoDetail
 | |
| 
 | |
| func (p *DraftBotInfoV2) GetTaskInfo() (v map[string]*TaskInfoDetail) {
 | |
| 	if !p.IsSetTaskInfo() {
 | |
| 		return DraftBotInfoV2_TaskInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.TaskInfo
 | |
| }
 | |
| 
 | |
| var fieldIDToName_DraftBotInfoV2 = map[int16]string{
 | |
| 	1: "BotInfo",
 | |
| 	2: "CanvasData",
 | |
| 	3: "BaseCommitVersion",
 | |
| 	4: "CommitVersion",
 | |
| 	5: "TableInfo",
 | |
| 	6: "TaskInfo",
 | |
| }
 | |
| 
 | |
| func (p *DraftBotInfoV2) IsSetBotInfo() bool {
 | |
| 	return p.BotInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *DraftBotInfoV2) IsSetCanvasData() bool {
 | |
| 	return p.CanvasData != nil
 | |
| }
 | |
| 
 | |
| func (p *DraftBotInfoV2) IsSetBaseCommitVersion() bool {
 | |
| 	return p.BaseCommitVersion != nil
 | |
| }
 | |
| 
 | |
| func (p *DraftBotInfoV2) IsSetCommitVersion() bool {
 | |
| 	return p.CommitVersion != nil
 | |
| }
 | |
| 
 | |
| func (p *DraftBotInfoV2) IsSetTableInfo() bool {
 | |
| 	return p.TableInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *DraftBotInfoV2) IsSetTaskInfo() bool {
 | |
| 	return p.TaskInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *DraftBotInfoV2) 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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.MAP {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.MAP {
 | |
| 				if err = p.ReadField6(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_DraftBotInfoV2[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 *DraftBotInfoV2) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewBotInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BotInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DraftBotInfoV2) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.CanvasData = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DraftBotInfoV2) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.BaseCommitVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DraftBotInfoV2) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.CommitVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DraftBotInfoV2) ReadField5(iprot thrift.TProtocol) error {
 | |
| 	_, _, size, err := iprot.ReadMapBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make(map[string]*TableDetail, size)
 | |
| 	values := make([]TableDetail, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		var _key string
 | |
| 		if v, err := iprot.ReadString(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_key = v
 | |
| 		}
 | |
| 
 | |
| 		_val := &values[i]
 | |
| 		_val.InitDefault()
 | |
| 		if err := _val.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field[_key] = _val
 | |
| 	}
 | |
| 	if err := iprot.ReadMapEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.TableInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DraftBotInfoV2) ReadField6(iprot thrift.TProtocol) error {
 | |
| 	_, _, size, err := iprot.ReadMapBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make(map[string]*TaskInfoDetail, size)
 | |
| 	values := make([]TaskInfoDetail, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		var _key string
 | |
| 		if v, err := iprot.ReadString(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_key = v
 | |
| 		}
 | |
| 
 | |
| 		_val := &values[i]
 | |
| 		_val.InitDefault()
 | |
| 		if err := _val.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field[_key] = _val
 | |
| 	}
 | |
| 	if err := iprot.ReadMapEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.TaskInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *DraftBotInfoV2) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DraftBotInfoV2"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			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 *DraftBotInfoV2) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BotInfo", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.BotInfo.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 *DraftBotInfoV2) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCanvasData() {
 | |
| 		if err = oprot.WriteFieldBegin("CanvasData", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.CanvasData); 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 *DraftBotInfoV2) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseCommitVersion() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseCommitVersion", thrift.I64, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.BaseCommitVersion); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *DraftBotInfoV2) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCommitVersion() {
 | |
| 		if err = oprot.WriteFieldBegin("CommitVersion", thrift.I64, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.CommitVersion); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *DraftBotInfoV2) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTableInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("TableInfo", thrift.MAP, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRUCT, len(p.TableInfo)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for k, v := range p.TableInfo {
 | |
| 			if err := oprot.WriteString(k); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 			if err := v.Write(oprot); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 		}
 | |
| 		if err := oprot.WriteMapEnd(); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *DraftBotInfoV2) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTaskInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("TaskInfo", thrift.MAP, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRUCT, len(p.TaskInfo)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for k, v := range p.TaskInfo {
 | |
| 			if err := oprot.WriteString(k); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 			if err := v.Write(oprot); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 		}
 | |
| 		if err := oprot.WriteMapEnd(); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *DraftBotInfoV2) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("DraftBotInfoV2(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type JumpConfig struct {
 | |
| 	Backtrack       BacktrackMode          `thrift:"backtrack,1" form:"backtrack" json:"backtrack" query:"backtrack"`
 | |
| 	Recognition     RecognitionMode        `thrift:"recognition,2" form:"recognition" json:"recognition" query:"recognition"`
 | |
| 	IndependentConf *IndependentModeConfig `thrift:"independent_conf,3,optional" form:"independent_conf" json:"independent_conf,omitempty" query:"independent_conf"`
 | |
| }
 | |
| 
 | |
| func NewJumpConfig() *JumpConfig {
 | |
| 	return &JumpConfig{}
 | |
| }
 | |
| 
 | |
| func (p *JumpConfig) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *JumpConfig) GetBacktrack() (v BacktrackMode) {
 | |
| 	return p.Backtrack
 | |
| }
 | |
| 
 | |
| func (p *JumpConfig) GetRecognition() (v RecognitionMode) {
 | |
| 	return p.Recognition
 | |
| }
 | |
| 
 | |
| var JumpConfig_IndependentConf_DEFAULT *IndependentModeConfig
 | |
| 
 | |
| func (p *JumpConfig) GetIndependentConf() (v *IndependentModeConfig) {
 | |
| 	if !p.IsSetIndependentConf() {
 | |
| 		return JumpConfig_IndependentConf_DEFAULT
 | |
| 	}
 | |
| 	return p.IndependentConf
 | |
| }
 | |
| 
 | |
| var fieldIDToName_JumpConfig = map[int16]string{
 | |
| 	1: "backtrack",
 | |
| 	2: "recognition",
 | |
| 	3: "independent_conf",
 | |
| }
 | |
| 
 | |
| func (p *JumpConfig) IsSetIndependentConf() bool {
 | |
| 	return p.IndependentConf != nil
 | |
| }
 | |
| 
 | |
| func (p *JumpConfig) 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.I32 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField2(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField3(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_JumpConfig[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 *JumpConfig) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field BacktrackMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = BacktrackMode(v)
 | |
| 	}
 | |
| 	p.Backtrack = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *JumpConfig) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field RecognitionMode
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = RecognitionMode(v)
 | |
| 	}
 | |
| 	p.Recognition = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *JumpConfig) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_field := NewIndependentModeConfig()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.IndependentConf = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *JumpConfig) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("JumpConfig"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			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 *JumpConfig) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("backtrack", thrift.I32, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.Backtrack)); 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 *JumpConfig) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("recognition", thrift.I32, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.Recognition)); 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 *JumpConfig) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetIndependentConf() {
 | |
| 		if err = oprot.WriteFieldBegin("independent_conf", thrift.STRUCT, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.IndependentConf.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 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *JumpConfig) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("JumpConfig(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type IndependentModeConfig struct {
 | |
| 	// judge timing
 | |
| 	JudgeTiming  IndependentTiming               `thrift:"judge_timing,1" form:"judge_timing" json:"judge_timing" query:"judge_timing"`
 | |
| 	HistoryRound int32                           `thrift:"history_round,2" form:"history_round" json:"history_round" query:"history_round"`
 | |
| 	ModelType    IndependentRecognitionModelType `thrift:"model_type,3" form:"model_type" json:"model_type" query:"model_type"`
 | |
| 	ModelID      *string                         `thrift:"model_id,4,optional" form:"model_id" json:"model_id,omitempty" query:"model_id"`
 | |
| 	Prompt       *string                         `thrift:"prompt,5,optional" form:"prompt" json:"prompt,omitempty" query:"prompt"`
 | |
| }
 | |
| 
 | |
| func NewIndependentModeConfig() *IndependentModeConfig {
 | |
| 	return &IndependentModeConfig{}
 | |
| }
 | |
| 
 | |
| func (p *IndependentModeConfig) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *IndependentModeConfig) GetJudgeTiming() (v IndependentTiming) {
 | |
| 	return p.JudgeTiming
 | |
| }
 | |
| 
 | |
| func (p *IndependentModeConfig) GetHistoryRound() (v int32) {
 | |
| 	return p.HistoryRound
 | |
| }
 | |
| 
 | |
| func (p *IndependentModeConfig) GetModelType() (v IndependentRecognitionModelType) {
 | |
| 	return p.ModelType
 | |
| }
 | |
| 
 | |
| var IndependentModeConfig_ModelID_DEFAULT string
 | |
| 
 | |
| func (p *IndependentModeConfig) GetModelID() (v string) {
 | |
| 	if !p.IsSetModelID() {
 | |
| 		return IndependentModeConfig_ModelID_DEFAULT
 | |
| 	}
 | |
| 	return *p.ModelID
 | |
| }
 | |
| 
 | |
| var IndependentModeConfig_Prompt_DEFAULT string
 | |
| 
 | |
| func (p *IndependentModeConfig) GetPrompt() (v string) {
 | |
| 	if !p.IsSetPrompt() {
 | |
| 		return IndependentModeConfig_Prompt_DEFAULT
 | |
| 	}
 | |
| 	return *p.Prompt
 | |
| }
 | |
| 
 | |
| var fieldIDToName_IndependentModeConfig = map[int16]string{
 | |
| 	1: "judge_timing",
 | |
| 	2: "history_round",
 | |
| 	3: "model_type",
 | |
| 	4: "model_id",
 | |
| 	5: "prompt",
 | |
| }
 | |
| 
 | |
| func (p *IndependentModeConfig) IsSetModelID() bool {
 | |
| 	return p.ModelID != nil
 | |
| }
 | |
| 
 | |
| func (p *IndependentModeConfig) IsSetPrompt() bool {
 | |
| 	return p.Prompt != nil
 | |
| }
 | |
| 
 | |
| func (p *IndependentModeConfig) 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.I32 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField2(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField5(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_IndependentModeConfig[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 *IndependentModeConfig) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field IndependentTiming
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = IndependentTiming(v)
 | |
| 	}
 | |
| 	p.JudgeTiming = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *IndependentModeConfig) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.HistoryRound = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *IndependentModeConfig) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field IndependentRecognitionModelType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = IndependentRecognitionModelType(v)
 | |
| 	}
 | |
| 	p.ModelType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *IndependentModeConfig) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ModelID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *IndependentModeConfig) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Prompt = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *IndependentModeConfig) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("IndependentModeConfig"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			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 *IndependentModeConfig) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("judge_timing", thrift.I32, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.JudgeTiming)); 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 *IndependentModeConfig) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("history_round", thrift.I32, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(p.HistoryRound); 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 *IndependentModeConfig) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("model_type", thrift.I32, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.ModelType)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *IndependentModeConfig) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetModelID() {
 | |
| 		if err = oprot.WriteFieldBegin("model_id", thrift.STRING, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ModelID); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *IndependentModeConfig) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPrompt() {
 | |
| 		if err = oprot.WriteFieldBegin("prompt", thrift.STRING, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Prompt); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *IndependentModeConfig) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("IndependentModeConfig(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type MessageFeedback struct {
 | |
| 	// feedback type
 | |
| 	FeedbackType MessageFeedbackType `thrift:"feedback_type,1" form:"feedback_type" json:"feedback_type" query:"feedback_type"`
 | |
| 	// segmentation type
 | |
| 	DetailTypes []MessageFeedbackDetailType `thrift:"detail_types,2" form:"detail_types" json:"detail_types" query:"detail_types"`
 | |
| 	// Negative feedback custom content, corresponding to user selection Others
 | |
| 	DetailContent string `thrift:"detail_content,3" form:"detail_content" json:"detail_content" query:"detail_content"`
 | |
| }
 | |
| 
 | |
| func NewMessageFeedback() *MessageFeedback {
 | |
| 	return &MessageFeedback{}
 | |
| }
 | |
| 
 | |
| func (p *MessageFeedback) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *MessageFeedback) GetFeedbackType() (v MessageFeedbackType) {
 | |
| 	return p.FeedbackType
 | |
| }
 | |
| 
 | |
| func (p *MessageFeedback) GetDetailTypes() (v []MessageFeedbackDetailType) {
 | |
| 	return p.DetailTypes
 | |
| }
 | |
| 
 | |
| func (p *MessageFeedback) GetDetailContent() (v string) {
 | |
| 	return p.DetailContent
 | |
| }
 | |
| 
 | |
| var fieldIDToName_MessageFeedback = map[int16]string{
 | |
| 	1: "feedback_type",
 | |
| 	2: "detail_types",
 | |
| 	3: "detail_content",
 | |
| }
 | |
| 
 | |
| func (p *MessageFeedback) 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.I32 {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(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_MessageFeedback[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 *MessageFeedback) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field MessageFeedbackType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = MessageFeedbackType(v)
 | |
| 	}
 | |
| 	p.FeedbackType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *MessageFeedback) ReadField2(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]MessageFeedbackDetailType, 0, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 
 | |
| 		var _elem MessageFeedbackDetailType
 | |
| 		if v, err := iprot.ReadI32(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_elem = MessageFeedbackDetailType(v)
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.DetailTypes = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *MessageFeedback) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.DetailContent = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *MessageFeedback) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("MessageFeedback"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			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 *MessageFeedback) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("feedback_type", thrift.I32, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.FeedbackType)); 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 *MessageFeedback) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("detail_types", thrift.LIST, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.I32, len(p.DetailTypes)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.DetailTypes {
 | |
| 		if err := oprot.WriteI32(int32(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 *MessageFeedback) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("detail_content", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.DetailContent); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *MessageFeedback) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("MessageFeedback(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type UserLabel struct {
 | |
| 	LabelID   string `thrift:"label_id,1" form:"label_id" json:"label_id" query:"label_id"`
 | |
| 	LabelName string `thrift:"label_name,2" form:"label_name" json:"label_name" query:"label_name"`
 | |
| 	IconURI   string `thrift:"icon_uri,3" form:"icon_uri" json:"icon_uri" query:"icon_uri"`
 | |
| 	IconURL   string `thrift:"icon_url,4" form:"icon_url" json:"icon_url" query:"icon_url"`
 | |
| 	JumpLink  string `thrift:"jump_link,5" form:"jump_link" json:"jump_link" query:"jump_link"`
 | |
| }
 | |
| 
 | |
| func NewUserLabel() *UserLabel {
 | |
| 	return &UserLabel{}
 | |
| }
 | |
| 
 | |
| func (p *UserLabel) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *UserLabel) GetLabelID() (v string) {
 | |
| 	return p.LabelID
 | |
| }
 | |
| 
 | |
| func (p *UserLabel) GetLabelName() (v string) {
 | |
| 	return p.LabelName
 | |
| }
 | |
| 
 | |
| func (p *UserLabel) GetIconURI() (v string) {
 | |
| 	return p.IconURI
 | |
| }
 | |
| 
 | |
| func (p *UserLabel) GetIconURL() (v string) {
 | |
| 	return p.IconURL
 | |
| }
 | |
| 
 | |
| func (p *UserLabel) GetJumpLink() (v string) {
 | |
| 	return p.JumpLink
 | |
| }
 | |
| 
 | |
| var fieldIDToName_UserLabel = map[int16]string{
 | |
| 	1: "label_id",
 | |
| 	2: "label_name",
 | |
| 	3: "icon_uri",
 | |
| 	4: "icon_url",
 | |
| 	5: "jump_link",
 | |
| }
 | |
| 
 | |
| func (p *UserLabel) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField5(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_UserLabel[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 *UserLabel) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.LabelID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UserLabel) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.LabelName = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UserLabel) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.IconURI = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UserLabel) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.IconURL = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UserLabel) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.JumpLink = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *UserLabel) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UserLabel"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			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 *UserLabel) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("label_id", thrift.STRING, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.LabelID); 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 *UserLabel) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("label_name", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.LabelName); 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 *UserLabel) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("icon_uri", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.IconURI); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *UserLabel) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("icon_url", thrift.STRING, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.IconURL); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *UserLabel) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("jump_link", thrift.STRING, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.JumpLink); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *UserLabel) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("UserLabel(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type ChatV3ChatDetail struct {
 | |
| 	ID             string            `thrift:"ID,1,required" form:"id,required" json:"id,required"`
 | |
| 	ConversationID string            `thrift:"ConversationID,2,required" form:"conversation_id,required" json:"conversation_id,required"`
 | |
| 	BotID          string            `thrift:"BotID,3,required" form:"bot_id,required" json:"bot_id,required"`
 | |
| 	CreatedAt      *int32            `thrift:"CreatedAt,4,optional" form:"created_at" json:"created_at,omitempty"`
 | |
| 	CompletedAt    *int32            `thrift:"CompletedAt,5,optional" form:"completed_at" json:"completed_at,omitempty"`
 | |
| 	FailedAt       *int32            `thrift:"FailedAt,6,optional" form:"failed_at" json:"failed_at,omitempty"`
 | |
| 	MetaData       map[string]string `thrift:"MetaData,7,optional" form:"meta_data" json:"meta_data,omitempty"`
 | |
| 	LastError      *LastError        `thrift:"LastError,8,optional" form:"last_error" json:"last_error,omitempty"`
 | |
| 	Status         string            `thrift:"Status,9,required" form:"status,required" json:"status,required"`
 | |
| 	Usage          *Usage            `thrift:"Usage,10,optional" form:"usage" json:"usage,omitempty"`
 | |
| 	RequiredAction *RequiredAction   `thrift:"RequiredAction,11,optional" form:"required_action" json:"required_action,omitempty"`
 | |
| 	SectionID      *string           `thrift:"SectionID,12,optional" form:"section_id" json:"section_id,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewChatV3ChatDetail() *ChatV3ChatDetail {
 | |
| 	return &ChatV3ChatDetail{}
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) GetID() (v string) {
 | |
| 	return p.ID
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) GetConversationID() (v string) {
 | |
| 	return p.ConversationID
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) GetBotID() (v string) {
 | |
| 	return p.BotID
 | |
| }
 | |
| 
 | |
| var ChatV3ChatDetail_CreatedAt_DEFAULT int32
 | |
| 
 | |
| func (p *ChatV3ChatDetail) GetCreatedAt() (v int32) {
 | |
| 	if !p.IsSetCreatedAt() {
 | |
| 		return ChatV3ChatDetail_CreatedAt_DEFAULT
 | |
| 	}
 | |
| 	return *p.CreatedAt
 | |
| }
 | |
| 
 | |
| var ChatV3ChatDetail_CompletedAt_DEFAULT int32
 | |
| 
 | |
| func (p *ChatV3ChatDetail) GetCompletedAt() (v int32) {
 | |
| 	if !p.IsSetCompletedAt() {
 | |
| 		return ChatV3ChatDetail_CompletedAt_DEFAULT
 | |
| 	}
 | |
| 	return *p.CompletedAt
 | |
| }
 | |
| 
 | |
| var ChatV3ChatDetail_FailedAt_DEFAULT int32
 | |
| 
 | |
| func (p *ChatV3ChatDetail) GetFailedAt() (v int32) {
 | |
| 	if !p.IsSetFailedAt() {
 | |
| 		return ChatV3ChatDetail_FailedAt_DEFAULT
 | |
| 	}
 | |
| 	return *p.FailedAt
 | |
| }
 | |
| 
 | |
| var ChatV3ChatDetail_MetaData_DEFAULT map[string]string
 | |
| 
 | |
| func (p *ChatV3ChatDetail) GetMetaData() (v map[string]string) {
 | |
| 	if !p.IsSetMetaData() {
 | |
| 		return ChatV3ChatDetail_MetaData_DEFAULT
 | |
| 	}
 | |
| 	return p.MetaData
 | |
| }
 | |
| 
 | |
| var ChatV3ChatDetail_LastError_DEFAULT *LastError
 | |
| 
 | |
| func (p *ChatV3ChatDetail) GetLastError() (v *LastError) {
 | |
| 	if !p.IsSetLastError() {
 | |
| 		return ChatV3ChatDetail_LastError_DEFAULT
 | |
| 	}
 | |
| 	return p.LastError
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) GetStatus() (v string) {
 | |
| 	return p.Status
 | |
| }
 | |
| 
 | |
| var ChatV3ChatDetail_Usage_DEFAULT *Usage
 | |
| 
 | |
| func (p *ChatV3ChatDetail) GetUsage() (v *Usage) {
 | |
| 	if !p.IsSetUsage() {
 | |
| 		return ChatV3ChatDetail_Usage_DEFAULT
 | |
| 	}
 | |
| 	return p.Usage
 | |
| }
 | |
| 
 | |
| var ChatV3ChatDetail_RequiredAction_DEFAULT *RequiredAction
 | |
| 
 | |
| func (p *ChatV3ChatDetail) GetRequiredAction() (v *RequiredAction) {
 | |
| 	if !p.IsSetRequiredAction() {
 | |
| 		return ChatV3ChatDetail_RequiredAction_DEFAULT
 | |
| 	}
 | |
| 	return p.RequiredAction
 | |
| }
 | |
| 
 | |
| var ChatV3ChatDetail_SectionID_DEFAULT string
 | |
| 
 | |
| func (p *ChatV3ChatDetail) GetSectionID() (v string) {
 | |
| 	if !p.IsSetSectionID() {
 | |
| 		return ChatV3ChatDetail_SectionID_DEFAULT
 | |
| 	}
 | |
| 	return *p.SectionID
 | |
| }
 | |
| 
 | |
| var fieldIDToName_ChatV3ChatDetail = map[int16]string{
 | |
| 	1:  "ID",
 | |
| 	2:  "ConversationID",
 | |
| 	3:  "BotID",
 | |
| 	4:  "CreatedAt",
 | |
| 	5:  "CompletedAt",
 | |
| 	6:  "FailedAt",
 | |
| 	7:  "MetaData",
 | |
| 	8:  "LastError",
 | |
| 	9:  "Status",
 | |
| 	10: "Usage",
 | |
| 	11: "RequiredAction",
 | |
| 	12: "SectionID",
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) IsSetCreatedAt() bool {
 | |
| 	return p.CreatedAt != nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) IsSetCompletedAt() bool {
 | |
| 	return p.CompletedAt != nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) IsSetFailedAt() bool {
 | |
| 	return p.FailedAt != nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) IsSetMetaData() bool {
 | |
| 	return p.MetaData != nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) IsSetLastError() bool {
 | |
| 	return p.LastError != nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) IsSetUsage() bool {
 | |
| 	return p.Usage != nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) IsSetRequiredAction() bool {
 | |
| 	return p.RequiredAction != nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) IsSetSectionID() bool {
 | |
| 	return p.SectionID != nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetID bool = false
 | |
| 	var issetConversationID bool = false
 | |
| 	var issetBotID bool = false
 | |
| 	var issetStatus bool = false
 | |
| 
 | |
| 	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.STRING {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetID = true
 | |
| 			} 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
 | |
| 				}
 | |
| 				issetConversationID = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetBotID = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.MAP {
 | |
| 				if err = p.ReadField7(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 8:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField8(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 9:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField9(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetStatus = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 10:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField10(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 11:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField11(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 12:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField12(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
 | |
| 	}
 | |
| 
 | |
| 	if !issetID {
 | |
| 		fieldId = 1
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetConversationID {
 | |
| 		fieldId = 2
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetBotID {
 | |
| 		fieldId = 3
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetStatus {
 | |
| 		fieldId = 9
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 	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_ChatV3ChatDetail[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)
 | |
| RequiredFieldNotSetError:
 | |
| 	return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("required field %s is not set", fieldIDToName_ChatV3ChatDetail[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3ChatDetail) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ConversationID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3ChatDetail) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.BotID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3ChatDetail) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.CreatedAt = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3ChatDetail) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.CompletedAt = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3ChatDetail) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.FailedAt = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3ChatDetail) ReadField7(iprot thrift.TProtocol) error {
 | |
| 	_, _, size, err := iprot.ReadMapBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make(map[string]string, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		var _key string
 | |
| 		if v, err := iprot.ReadString(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_key = v
 | |
| 		}
 | |
| 
 | |
| 		var _val string
 | |
| 		if v, err := iprot.ReadString(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_val = v
 | |
| 		}
 | |
| 
 | |
| 		_field[_key] = _val
 | |
| 	}
 | |
| 	if err := iprot.ReadMapEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.MetaData = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3ChatDetail) ReadField8(iprot thrift.TProtocol) error {
 | |
| 	_field := NewLastError()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.LastError = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3ChatDetail) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Status = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3ChatDetail) ReadField10(iprot thrift.TProtocol) error {
 | |
| 	_field := NewUsage()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Usage = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3ChatDetail) ReadField11(iprot thrift.TProtocol) error {
 | |
| 	_field := NewRequiredAction()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.RequiredAction = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3ChatDetail) ReadField12(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.SectionID = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("ChatV3ChatDetail"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField8(oprot); err != nil {
 | |
| 			fieldId = 8
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField9(oprot); err != nil {
 | |
| 			fieldId = 9
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField10(oprot); err != nil {
 | |
| 			fieldId = 10
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField11(oprot); err != nil {
 | |
| 			fieldId = 11
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField12(oprot); err != nil {
 | |
| 			fieldId = 12
 | |
| 			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 *ChatV3ChatDetail) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ID", thrift.STRING, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.ID); 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 *ChatV3ChatDetail) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ConversationID", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.ConversationID); 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 *ChatV3ChatDetail) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BotID", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.BotID); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3ChatDetail) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCreatedAt() {
 | |
| 		if err = oprot.WriteFieldBegin("CreatedAt", thrift.I32, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.CreatedAt); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3ChatDetail) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCompletedAt() {
 | |
| 		if err = oprot.WriteFieldBegin("CompletedAt", thrift.I32, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.CompletedAt); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3ChatDetail) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetFailedAt() {
 | |
| 		if err = oprot.WriteFieldBegin("FailedAt", thrift.I32, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.FailedAt); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3ChatDetail) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetMetaData() {
 | |
| 		if err = oprot.WriteFieldBegin("MetaData", thrift.MAP, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.MetaData)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for k, v := range p.MetaData {
 | |
| 			if err := oprot.WriteString(k); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 			if err := oprot.WriteString(v); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 		}
 | |
| 		if err := oprot.WriteMapEnd(); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3ChatDetail) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetLastError() {
 | |
| 		if err = oprot.WriteFieldBegin("LastError", thrift.STRUCT, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.LastError.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 8 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3ChatDetail) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Status", thrift.STRING, 9); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Status); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3ChatDetail) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetUsage() {
 | |
| 		if err = oprot.WriteFieldBegin("Usage", thrift.STRUCT, 10); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Usage.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 10 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3ChatDetail) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetRequiredAction() {
 | |
| 		if err = oprot.WriteFieldBegin("RequiredAction", thrift.STRUCT, 11); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.RequiredAction.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 11 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 11 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3ChatDetail) writeField12(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSectionID() {
 | |
| 		if err = oprot.WriteFieldBegin("SectionID", thrift.STRING, 12); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.SectionID); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 12 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 12 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *ChatV3ChatDetail) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("ChatV3ChatDetail(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type LastError struct {
 | |
| 	Code int32  `thrift:"Code,1,required" form:"code,required" json:"code,required"`
 | |
| 	Msg  string `thrift:"Msg,2,required" form:"msg,required" json:"msg,required"`
 | |
| }
 | |
| 
 | |
| func NewLastError() *LastError {
 | |
| 	return &LastError{}
 | |
| }
 | |
| 
 | |
| func (p *LastError) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *LastError) GetCode() (v int32) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *LastError) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| var fieldIDToName_LastError = map[int16]string{
 | |
| 	1: "Code",
 | |
| 	2: "Msg",
 | |
| }
 | |
| 
 | |
| func (p *LastError) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetCode bool = false
 | |
| 	var issetMsg bool = false
 | |
| 
 | |
| 	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.I32 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetCode = true
 | |
| 			} 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
 | |
| 				}
 | |
| 				issetMsg = true
 | |
| 			} 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
 | |
| 	}
 | |
| 
 | |
| 	if !issetCode {
 | |
| 		fieldId = 1
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetMsg {
 | |
| 		fieldId = 2
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 	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_LastError[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)
 | |
| RequiredFieldNotSetError:
 | |
| 	return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("required field %s is not set", fieldIDToName_LastError[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *LastError) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *LastError) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Msg = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *LastError) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("LastError"); 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 *LastError) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Code", thrift.I32, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(p.Code); 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 *LastError) 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 *LastError) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("LastError(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type Usage struct {
 | |
| 	TokenCount   *int32 `thrift:"TokenCount,1,optional" form:"token_count" json:"token_count,omitempty"`
 | |
| 	OutputTokens *int32 `thrift:"OutputTokens,2,optional" form:"output_count" json:"output_count,omitempty"`
 | |
| 	InputTokens  *int32 `thrift:"InputTokens,3,optional" form:"input_count" json:"input_count,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewUsage() *Usage {
 | |
| 	return &Usage{}
 | |
| }
 | |
| 
 | |
| func (p *Usage) InitDefault() {
 | |
| }
 | |
| 
 | |
| var Usage_TokenCount_DEFAULT int32
 | |
| 
 | |
| func (p *Usage) GetTokenCount() (v int32) {
 | |
| 	if !p.IsSetTokenCount() {
 | |
| 		return Usage_TokenCount_DEFAULT
 | |
| 	}
 | |
| 	return *p.TokenCount
 | |
| }
 | |
| 
 | |
| var Usage_OutputTokens_DEFAULT int32
 | |
| 
 | |
| func (p *Usage) GetOutputTokens() (v int32) {
 | |
| 	if !p.IsSetOutputTokens() {
 | |
| 		return Usage_OutputTokens_DEFAULT
 | |
| 	}
 | |
| 	return *p.OutputTokens
 | |
| }
 | |
| 
 | |
| var Usage_InputTokens_DEFAULT int32
 | |
| 
 | |
| func (p *Usage) GetInputTokens() (v int32) {
 | |
| 	if !p.IsSetInputTokens() {
 | |
| 		return Usage_InputTokens_DEFAULT
 | |
| 	}
 | |
| 	return *p.InputTokens
 | |
| }
 | |
| 
 | |
| var fieldIDToName_Usage = map[int16]string{
 | |
| 	1: "TokenCount",
 | |
| 	2: "OutputTokens",
 | |
| 	3: "InputTokens",
 | |
| }
 | |
| 
 | |
| func (p *Usage) IsSetTokenCount() bool {
 | |
| 	return p.TokenCount != nil
 | |
| }
 | |
| 
 | |
| func (p *Usage) IsSetOutputTokens() bool {
 | |
| 	return p.OutputTokens != nil
 | |
| }
 | |
| 
 | |
| func (p *Usage) IsSetInputTokens() bool {
 | |
| 	return p.InputTokens != nil
 | |
| }
 | |
| 
 | |
| func (p *Usage) 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.I32 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField2(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField3(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_Usage[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 *Usage) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TokenCount = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Usage) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.OutputTokens = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Usage) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.InputTokens = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *Usage) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("Usage"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			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 *Usage) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTokenCount() {
 | |
| 		if err = oprot.WriteFieldBegin("TokenCount", thrift.I32, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.TokenCount); 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 *Usage) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetOutputTokens() {
 | |
| 		if err = oprot.WriteFieldBegin("OutputTokens", thrift.I32, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.OutputTokens); 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 *Usage) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetInputTokens() {
 | |
| 		if err = oprot.WriteFieldBegin("InputTokens", thrift.I32, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.InputTokens); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *Usage) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("Usage(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type RequiredAction struct {
 | |
| 	Type              string             `thrift:"Type,1" form:"type" json:"type"`
 | |
| 	SubmitToolOutputs *SubmitToolOutputs `thrift:"SubmitToolOutputs,2" form:"submit_tool_outputs" json:"submit_tool_outputs"`
 | |
| }
 | |
| 
 | |
| func NewRequiredAction() *RequiredAction {
 | |
| 	return &RequiredAction{}
 | |
| }
 | |
| 
 | |
| func (p *RequiredAction) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *RequiredAction) GetType() (v string) {
 | |
| 	return p.Type
 | |
| }
 | |
| 
 | |
| var RequiredAction_SubmitToolOutputs_DEFAULT *SubmitToolOutputs
 | |
| 
 | |
| func (p *RequiredAction) GetSubmitToolOutputs() (v *SubmitToolOutputs) {
 | |
| 	if !p.IsSetSubmitToolOutputs() {
 | |
| 		return RequiredAction_SubmitToolOutputs_DEFAULT
 | |
| 	}
 | |
| 	return p.SubmitToolOutputs
 | |
| }
 | |
| 
 | |
| var fieldIDToName_RequiredAction = map[int16]string{
 | |
| 	1: "Type",
 | |
| 	2: "SubmitToolOutputs",
 | |
| }
 | |
| 
 | |
| func (p *RequiredAction) IsSetSubmitToolOutputs() bool {
 | |
| 	return p.SubmitToolOutputs != nil
 | |
| }
 | |
| 
 | |
| func (p *RequiredAction) 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.STRING {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 2:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				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_RequiredAction[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 *RequiredAction) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Type = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RequiredAction) ReadField2(iprot thrift.TProtocol) error {
 | |
| 	_field := NewSubmitToolOutputs()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.SubmitToolOutputs = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *RequiredAction) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("RequiredAction"); 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 *RequiredAction) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Type", thrift.STRING, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Type); 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 *RequiredAction) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("SubmitToolOutputs", thrift.STRUCT, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.SubmitToolOutputs.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 2 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *RequiredAction) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("RequiredAction(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type SubmitToolOutputs struct {
 | |
| 	ToolCalls []*InterruptPlugin `thrift:"ToolCalls,1" form:"tool_calls" json:"tool_calls"`
 | |
| }
 | |
| 
 | |
| func NewSubmitToolOutputs() *SubmitToolOutputs {
 | |
| 	return &SubmitToolOutputs{}
 | |
| }
 | |
| 
 | |
| func (p *SubmitToolOutputs) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *SubmitToolOutputs) GetToolCalls() (v []*InterruptPlugin) {
 | |
| 	return p.ToolCalls
 | |
| }
 | |
| 
 | |
| var fieldIDToName_SubmitToolOutputs = map[int16]string{
 | |
| 	1: "ToolCalls",
 | |
| }
 | |
| 
 | |
| func (p *SubmitToolOutputs) 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.LIST {
 | |
| 				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_SubmitToolOutputs[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 *SubmitToolOutputs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*InterruptPlugin, 0, size)
 | |
| 	values := make([]InterruptPlugin, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.ToolCalls = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *SubmitToolOutputs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("SubmitToolOutputs"); 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 *SubmitToolOutputs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ToolCalls", thrift.LIST, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ToolCalls)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.ToolCalls {
 | |
| 		if err := v.Write(oprot); 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 1 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *SubmitToolOutputs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("SubmitToolOutputs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type InterruptPlugin struct {
 | |
| 	ID          string                `thrift:"id,1" form:"id" json:"id" query:"id"`
 | |
| 	Type        string                `thrift:"type,2" form:"type" json:"type" query:"type"`
 | |
| 	Function    *InterruptFunction    `thrift:"function,3" form:"function" json:"function" query:"function"`
 | |
| 	RequireInfo *InterruptRequireInfo `thrift:"require_info,4" form:"require_info" json:"require_info" query:"require_info"`
 | |
| }
 | |
| 
 | |
| func NewInterruptPlugin() *InterruptPlugin {
 | |
| 	return &InterruptPlugin{}
 | |
| }
 | |
| 
 | |
| func (p *InterruptPlugin) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *InterruptPlugin) GetID() (v string) {
 | |
| 	return p.ID
 | |
| }
 | |
| 
 | |
| func (p *InterruptPlugin) GetType() (v string) {
 | |
| 	return p.Type
 | |
| }
 | |
| 
 | |
| var InterruptPlugin_Function_DEFAULT *InterruptFunction
 | |
| 
 | |
| func (p *InterruptPlugin) GetFunction() (v *InterruptFunction) {
 | |
| 	if !p.IsSetFunction() {
 | |
| 		return InterruptPlugin_Function_DEFAULT
 | |
| 	}
 | |
| 	return p.Function
 | |
| }
 | |
| 
 | |
| var InterruptPlugin_RequireInfo_DEFAULT *InterruptRequireInfo
 | |
| 
 | |
| func (p *InterruptPlugin) GetRequireInfo() (v *InterruptRequireInfo) {
 | |
| 	if !p.IsSetRequireInfo() {
 | |
| 		return InterruptPlugin_RequireInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.RequireInfo
 | |
| }
 | |
| 
 | |
| var fieldIDToName_InterruptPlugin = map[int16]string{
 | |
| 	1: "id",
 | |
| 	2: "type",
 | |
| 	3: "function",
 | |
| 	4: "require_info",
 | |
| }
 | |
| 
 | |
| func (p *InterruptPlugin) IsSetFunction() bool {
 | |
| 	return p.Function != nil
 | |
| }
 | |
| 
 | |
| func (p *InterruptPlugin) IsSetRequireInfo() bool {
 | |
| 	return p.RequireInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *InterruptPlugin) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField4(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_InterruptPlugin[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 *InterruptPlugin) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *InterruptPlugin) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Type = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *InterruptPlugin) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_field := NewInterruptFunction()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Function = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *InterruptPlugin) ReadField4(iprot thrift.TProtocol) error {
 | |
| 	_field := NewInterruptRequireInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.RequireInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *InterruptPlugin) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("InterruptPlugin"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			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 *InterruptPlugin) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("id", thrift.STRING, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.ID); 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 *InterruptPlugin) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("type", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Type); 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 *InterruptPlugin) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("function", thrift.STRUCT, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Function.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 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *InterruptPlugin) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("require_info", thrift.STRUCT, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.RequireInfo.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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *InterruptPlugin) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("InterruptPlugin(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type InterruptFunction struct {
 | |
| 	Name      string `thrift:"name,1" form:"name" json:"name" query:"name"`
 | |
| 	Arguments string `thrift:"arguments,2" form:"arguments" json:"arguments" query:"arguments"`
 | |
| }
 | |
| 
 | |
| func NewInterruptFunction() *InterruptFunction {
 | |
| 	return &InterruptFunction{}
 | |
| }
 | |
| 
 | |
| func (p *InterruptFunction) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *InterruptFunction) GetName() (v string) {
 | |
| 	return p.Name
 | |
| }
 | |
| 
 | |
| func (p *InterruptFunction) GetArguments() (v string) {
 | |
| 	return p.Arguments
 | |
| }
 | |
| 
 | |
| var fieldIDToName_InterruptFunction = map[int16]string{
 | |
| 	1: "name",
 | |
| 	2: "arguments",
 | |
| }
 | |
| 
 | |
| func (p *InterruptFunction) 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.STRING {
 | |
| 				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_InterruptFunction[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 *InterruptFunction) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Name = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *InterruptFunction) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Arguments = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *InterruptFunction) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("InterruptFunction"); 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 *InterruptFunction) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Name); 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 *InterruptFunction) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("arguments", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Arguments); 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 *InterruptFunction) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("InterruptFunction(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type InterruptRequireInfo struct {
 | |
| 	Infos []string `thrift:"infos,1" form:"infos" json:"infos" query:"infos"`
 | |
| }
 | |
| 
 | |
| func NewInterruptRequireInfo() *InterruptRequireInfo {
 | |
| 	return &InterruptRequireInfo{}
 | |
| }
 | |
| 
 | |
| func (p *InterruptRequireInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *InterruptRequireInfo) GetInfos() (v []string) {
 | |
| 	return p.Infos
 | |
| }
 | |
| 
 | |
| var fieldIDToName_InterruptRequireInfo = map[int16]string{
 | |
| 	1: "infos",
 | |
| }
 | |
| 
 | |
| func (p *InterruptRequireInfo) 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.LIST {
 | |
| 				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_InterruptRequireInfo[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 *InterruptRequireInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := 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
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Infos = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *InterruptRequireInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("InterruptRequireInfo"); 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 *InterruptRequireInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("infos", thrift.LIST, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRING, len(p.Infos)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.Infos {
 | |
| 		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 1 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *InterruptRequireInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("InterruptRequireInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type ChatV3MessageDetail struct {
 | |
| 	ID               string            `thrift:"ID,1,required" form:"id,required" json:"id,required"`
 | |
| 	ConversationID   string            `thrift:"ConversationID,2,required" form:"conversation_id,required" json:"conversation_id,required"`
 | |
| 	BotID            string            `thrift:"BotID,3,required" form:"bot_id,required" json:"bot_id,required"`
 | |
| 	Role             string            `thrift:"Role,4,required" form:"role,required" json:"role,required"`
 | |
| 	Type             string            `thrift:"Type,5,required" form:"type,required" json:"type,required"`
 | |
| 	Content          string            `thrift:"Content,6,required" form:"content,required" json:"content,required"`
 | |
| 	ContentType      string            `thrift:"ContentType,7,required" form:"content_type,required" json:"content_type,required"`
 | |
| 	MetaData         map[string]string `thrift:"MetaData,8,optional" form:"meta_data" json:"meta_data,omitempty"`
 | |
| 	ChatID           string            `thrift:"ChatID,9,required" form:"chat_id,required" json:"chat_id,required"`
 | |
| 	SectionID        *string           `thrift:"SectionID,10,optional" form:"section_id" json:"section_id,omitempty"`
 | |
| 	CreatedAt        *int64            `thrift:"CreatedAt,11,optional" form:"created_at" json:"created_at,omitempty"`
 | |
| 	UpdatedAt        *int64            `thrift:"UpdatedAt,12,optional" form:"updated_at" json:"updated_at,omitempty"`
 | |
| 	ReasoningContent *string           `thrift:"ReasoningContent,13,optional" form:"reasoning_content" json:"reasoning_content,omitempty"`
 | |
| }
 | |
| 
 | |
| func NewChatV3MessageDetail() *ChatV3MessageDetail {
 | |
| 	return &ChatV3MessageDetail{}
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) GetID() (v string) {
 | |
| 	return p.ID
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) GetConversationID() (v string) {
 | |
| 	return p.ConversationID
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) GetBotID() (v string) {
 | |
| 	return p.BotID
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) GetRole() (v string) {
 | |
| 	return p.Role
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) GetType() (v string) {
 | |
| 	return p.Type
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) GetContent() (v string) {
 | |
| 	return p.Content
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) GetContentType() (v string) {
 | |
| 	return p.ContentType
 | |
| }
 | |
| 
 | |
| var ChatV3MessageDetail_MetaData_DEFAULT map[string]string
 | |
| 
 | |
| func (p *ChatV3MessageDetail) GetMetaData() (v map[string]string) {
 | |
| 	if !p.IsSetMetaData() {
 | |
| 		return ChatV3MessageDetail_MetaData_DEFAULT
 | |
| 	}
 | |
| 	return p.MetaData
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) GetChatID() (v string) {
 | |
| 	return p.ChatID
 | |
| }
 | |
| 
 | |
| var ChatV3MessageDetail_SectionID_DEFAULT string
 | |
| 
 | |
| func (p *ChatV3MessageDetail) GetSectionID() (v string) {
 | |
| 	if !p.IsSetSectionID() {
 | |
| 		return ChatV3MessageDetail_SectionID_DEFAULT
 | |
| 	}
 | |
| 	return *p.SectionID
 | |
| }
 | |
| 
 | |
| var ChatV3MessageDetail_CreatedAt_DEFAULT int64
 | |
| 
 | |
| func (p *ChatV3MessageDetail) GetCreatedAt() (v int64) {
 | |
| 	if !p.IsSetCreatedAt() {
 | |
| 		return ChatV3MessageDetail_CreatedAt_DEFAULT
 | |
| 	}
 | |
| 	return *p.CreatedAt
 | |
| }
 | |
| 
 | |
| var ChatV3MessageDetail_UpdatedAt_DEFAULT int64
 | |
| 
 | |
| func (p *ChatV3MessageDetail) GetUpdatedAt() (v int64) {
 | |
| 	if !p.IsSetUpdatedAt() {
 | |
| 		return ChatV3MessageDetail_UpdatedAt_DEFAULT
 | |
| 	}
 | |
| 	return *p.UpdatedAt
 | |
| }
 | |
| 
 | |
| var ChatV3MessageDetail_ReasoningContent_DEFAULT string
 | |
| 
 | |
| func (p *ChatV3MessageDetail) GetReasoningContent() (v string) {
 | |
| 	if !p.IsSetReasoningContent() {
 | |
| 		return ChatV3MessageDetail_ReasoningContent_DEFAULT
 | |
| 	}
 | |
| 	return *p.ReasoningContent
 | |
| }
 | |
| 
 | |
| var fieldIDToName_ChatV3MessageDetail = map[int16]string{
 | |
| 	1:  "ID",
 | |
| 	2:  "ConversationID",
 | |
| 	3:  "BotID",
 | |
| 	4:  "Role",
 | |
| 	5:  "Type",
 | |
| 	6:  "Content",
 | |
| 	7:  "ContentType",
 | |
| 	8:  "MetaData",
 | |
| 	9:  "ChatID",
 | |
| 	10: "SectionID",
 | |
| 	11: "CreatedAt",
 | |
| 	12: "UpdatedAt",
 | |
| 	13: "ReasoningContent",
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) IsSetMetaData() bool {
 | |
| 	return p.MetaData != nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) IsSetSectionID() bool {
 | |
| 	return p.SectionID != nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) IsSetCreatedAt() bool {
 | |
| 	return p.CreatedAt != nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) IsSetUpdatedAt() bool {
 | |
| 	return p.UpdatedAt != nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) IsSetReasoningContent() bool {
 | |
| 	return p.ReasoningContent != nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetID bool = false
 | |
| 	var issetConversationID bool = false
 | |
| 	var issetBotID bool = false
 | |
| 	var issetRole bool = false
 | |
| 	var issetType bool = false
 | |
| 	var issetContent bool = false
 | |
| 	var issetContentType bool = false
 | |
| 	var issetChatID bool = false
 | |
| 
 | |
| 	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.STRING {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetID = true
 | |
| 			} 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
 | |
| 				}
 | |
| 				issetConversationID = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetBotID = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetRole = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetType = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetContent = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField7(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetContentType = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 8:
 | |
| 			if fieldTypeId == thrift.MAP {
 | |
| 				if err = p.ReadField8(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 9:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField9(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetChatID = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 10:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField10(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 11:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField11(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 12:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField12(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 13:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField13(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
 | |
| 	}
 | |
| 
 | |
| 	if !issetID {
 | |
| 		fieldId = 1
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetConversationID {
 | |
| 		fieldId = 2
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetBotID {
 | |
| 		fieldId = 3
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetRole {
 | |
| 		fieldId = 4
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetType {
 | |
| 		fieldId = 5
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetContent {
 | |
| 		fieldId = 6
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetContentType {
 | |
| 		fieldId = 7
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetChatID {
 | |
| 		fieldId = 9
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 	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_ChatV3MessageDetail[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)
 | |
| RequiredFieldNotSetError:
 | |
| 	return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("required field %s is not set", fieldIDToName_ChatV3MessageDetail[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3MessageDetail) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ConversationID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3MessageDetail) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.BotID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3MessageDetail) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Role = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3MessageDetail) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Type = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3MessageDetail) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Content = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3MessageDetail) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ContentType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3MessageDetail) ReadField8(iprot thrift.TProtocol) error {
 | |
| 	_, _, size, err := iprot.ReadMapBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make(map[string]string, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		var _key string
 | |
| 		if v, err := iprot.ReadString(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_key = v
 | |
| 		}
 | |
| 
 | |
| 		var _val string
 | |
| 		if v, err := iprot.ReadString(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_val = v
 | |
| 		}
 | |
| 
 | |
| 		_field[_key] = _val
 | |
| 	}
 | |
| 	if err := iprot.ReadMapEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.MetaData = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3MessageDetail) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ChatID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3MessageDetail) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.SectionID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3MessageDetail) ReadField11(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.CreatedAt = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3MessageDetail) ReadField12(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.UpdatedAt = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *ChatV3MessageDetail) ReadField13(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ReasoningContent = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("ChatV3MessageDetail"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField8(oprot); err != nil {
 | |
| 			fieldId = 8
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField9(oprot); err != nil {
 | |
| 			fieldId = 9
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField10(oprot); err != nil {
 | |
| 			fieldId = 10
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField11(oprot); err != nil {
 | |
| 			fieldId = 11
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField12(oprot); err != nil {
 | |
| 			fieldId = 12
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField13(oprot); err != nil {
 | |
| 			fieldId = 13
 | |
| 			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 *ChatV3MessageDetail) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ID", thrift.STRING, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.ID); 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 *ChatV3MessageDetail) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ConversationID", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.ConversationID); 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 *ChatV3MessageDetail) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BotID", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.BotID); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3MessageDetail) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Role", thrift.STRING, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Role); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3MessageDetail) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Type", thrift.STRING, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Type); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3MessageDetail) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Content", thrift.STRING, 6); 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 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3MessageDetail) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ContentType", thrift.STRING, 7); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.ContentType); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3MessageDetail) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetMetaData() {
 | |
| 		if err = oprot.WriteFieldBegin("MetaData", thrift.MAP, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.MetaData)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for k, v := range p.MetaData {
 | |
| 			if err := oprot.WriteString(k); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 			if err := oprot.WriteString(v); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 		}
 | |
| 		if err := oprot.WriteMapEnd(); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3MessageDetail) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ChatID", thrift.STRING, 9); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.ChatID); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3MessageDetail) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSectionID() {
 | |
| 		if err = oprot.WriteFieldBegin("SectionID", thrift.STRING, 10); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.SectionID); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3MessageDetail) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCreatedAt() {
 | |
| 		if err = oprot.WriteFieldBegin("CreatedAt", thrift.I64, 11); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.CreatedAt); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 11 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 11 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3MessageDetail) writeField12(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetUpdatedAt() {
 | |
| 		if err = oprot.WriteFieldBegin("UpdatedAt", thrift.I64, 12); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.UpdatedAt); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 12 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 12 end error: ", p), err)
 | |
| }
 | |
| func (p *ChatV3MessageDetail) writeField13(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetReasoningContent() {
 | |
| 		if err = oprot.WriteFieldBegin("ReasoningContent", thrift.STRING, 13); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ReasoningContent); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 13 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 13 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *ChatV3MessageDetail) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("ChatV3MessageDetail(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type HookInfo struct {
 | |
| 	// Pre agent jump hook
 | |
| 	PreAgentJumpHook []*HookItem `thrift:"pre_agent_jump_hook,1,optional" form:"pre_agent_jump_hook" json:"pre_agent_jump_hook,omitempty" query:"pre_agent_jump_hook"`
 | |
| 	// Post agent jump hook
 | |
| 	PostAgentJumpHook []*HookItem `thrift:"post_agent_jump_hook,2,optional" form:"post_agent_jump_hook" json:"post_agent_jump_hook,omitempty" query:"post_agent_jump_hook"`
 | |
| 	// Process hook
 | |
| 	FlowHook []*HookItem `thrift:"flow_hook,3,optional" form:"flow_hook" json:"flow_hook,omitempty" query:"flow_hook"`
 | |
| 	// Atomic power hook
 | |
| 	AtomicHook []*HookItem `thrift:"atomic_hook,4,optional" form:"atomic_hook" json:"atomic_hook,omitempty" query:"atomic_hook"`
 | |
| 	// Model call hook
 | |
| 	LlmCallHook []*HookItem `thrift:"llm_call_hook,5,optional" form:"llm_call_hook" json:"llm_call_hook,omitempty" query:"llm_call_hook"`
 | |
| 	// Conversation result hook
 | |
| 	ResParsingHook []*HookItem `thrift:"res_parsing_hook,6,optional" form:"res_parsing_hook" json:"res_parsing_hook,omitempty" query:"res_parsing_hook"`
 | |
| 	// suggesion hook
 | |
| 	SuggestionHook []*HookItem `thrift:"suggestion_hook,7,optional" form:"suggestion_hook" json:"suggestion_hook,omitempty" query:"suggestion_hook"`
 | |
| }
 | |
| 
 | |
| func NewHookInfo() *HookInfo {
 | |
| 	return &HookInfo{}
 | |
| }
 | |
| 
 | |
| func (p *HookInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| var HookInfo_PreAgentJumpHook_DEFAULT []*HookItem
 | |
| 
 | |
| func (p *HookInfo) GetPreAgentJumpHook() (v []*HookItem) {
 | |
| 	if !p.IsSetPreAgentJumpHook() {
 | |
| 		return HookInfo_PreAgentJumpHook_DEFAULT
 | |
| 	}
 | |
| 	return p.PreAgentJumpHook
 | |
| }
 | |
| 
 | |
| var HookInfo_PostAgentJumpHook_DEFAULT []*HookItem
 | |
| 
 | |
| func (p *HookInfo) GetPostAgentJumpHook() (v []*HookItem) {
 | |
| 	if !p.IsSetPostAgentJumpHook() {
 | |
| 		return HookInfo_PostAgentJumpHook_DEFAULT
 | |
| 	}
 | |
| 	return p.PostAgentJumpHook
 | |
| }
 | |
| 
 | |
| var HookInfo_FlowHook_DEFAULT []*HookItem
 | |
| 
 | |
| func (p *HookInfo) GetFlowHook() (v []*HookItem) {
 | |
| 	if !p.IsSetFlowHook() {
 | |
| 		return HookInfo_FlowHook_DEFAULT
 | |
| 	}
 | |
| 	return p.FlowHook
 | |
| }
 | |
| 
 | |
| var HookInfo_AtomicHook_DEFAULT []*HookItem
 | |
| 
 | |
| func (p *HookInfo) GetAtomicHook() (v []*HookItem) {
 | |
| 	if !p.IsSetAtomicHook() {
 | |
| 		return HookInfo_AtomicHook_DEFAULT
 | |
| 	}
 | |
| 	return p.AtomicHook
 | |
| }
 | |
| 
 | |
| var HookInfo_LlmCallHook_DEFAULT []*HookItem
 | |
| 
 | |
| func (p *HookInfo) GetLlmCallHook() (v []*HookItem) {
 | |
| 	if !p.IsSetLlmCallHook() {
 | |
| 		return HookInfo_LlmCallHook_DEFAULT
 | |
| 	}
 | |
| 	return p.LlmCallHook
 | |
| }
 | |
| 
 | |
| var HookInfo_ResParsingHook_DEFAULT []*HookItem
 | |
| 
 | |
| func (p *HookInfo) GetResParsingHook() (v []*HookItem) {
 | |
| 	if !p.IsSetResParsingHook() {
 | |
| 		return HookInfo_ResParsingHook_DEFAULT
 | |
| 	}
 | |
| 	return p.ResParsingHook
 | |
| }
 | |
| 
 | |
| var HookInfo_SuggestionHook_DEFAULT []*HookItem
 | |
| 
 | |
| func (p *HookInfo) GetSuggestionHook() (v []*HookItem) {
 | |
| 	if !p.IsSetSuggestionHook() {
 | |
| 		return HookInfo_SuggestionHook_DEFAULT
 | |
| 	}
 | |
| 	return p.SuggestionHook
 | |
| }
 | |
| 
 | |
| var fieldIDToName_HookInfo = map[int16]string{
 | |
| 	1: "pre_agent_jump_hook",
 | |
| 	2: "post_agent_jump_hook",
 | |
| 	3: "flow_hook",
 | |
| 	4: "atomic_hook",
 | |
| 	5: "llm_call_hook",
 | |
| 	6: "res_parsing_hook",
 | |
| 	7: "suggestion_hook",
 | |
| }
 | |
| 
 | |
| func (p *HookInfo) IsSetPreAgentJumpHook() bool {
 | |
| 	return p.PreAgentJumpHook != nil
 | |
| }
 | |
| 
 | |
| func (p *HookInfo) IsSetPostAgentJumpHook() bool {
 | |
| 	return p.PostAgentJumpHook != nil
 | |
| }
 | |
| 
 | |
| func (p *HookInfo) IsSetFlowHook() bool {
 | |
| 	return p.FlowHook != nil
 | |
| }
 | |
| 
 | |
| func (p *HookInfo) IsSetAtomicHook() bool {
 | |
| 	return p.AtomicHook != nil
 | |
| }
 | |
| 
 | |
| func (p *HookInfo) IsSetLlmCallHook() bool {
 | |
| 	return p.LlmCallHook != nil
 | |
| }
 | |
| 
 | |
| func (p *HookInfo) IsSetResParsingHook() bool {
 | |
| 	return p.ResParsingHook != nil
 | |
| }
 | |
| 
 | |
| func (p *HookInfo) IsSetSuggestionHook() bool {
 | |
| 	return p.SuggestionHook != nil
 | |
| }
 | |
| 
 | |
| func (p *HookInfo) 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.LIST {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 5:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 6:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 7:
 | |
| 			if fieldTypeId == thrift.LIST {
 | |
| 				if err = p.ReadField7(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_HookInfo[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 *HookInfo) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*HookItem, 0, size)
 | |
| 	values := make([]HookItem, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.PreAgentJumpHook = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *HookInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*HookItem, 0, size)
 | |
| 	values := make([]HookItem, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.PostAgentJumpHook = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *HookInfo) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*HookItem, 0, size)
 | |
| 	values := make([]HookItem, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.FlowHook = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *HookInfo) ReadField4(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*HookItem, 0, size)
 | |
| 	values := make([]HookItem, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.AtomicHook = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *HookInfo) ReadField5(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*HookItem, 0, size)
 | |
| 	values := make([]HookItem, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.LlmCallHook = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *HookInfo) ReadField6(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*HookItem, 0, size)
 | |
| 	values := make([]HookItem, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.ResParsingHook = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *HookInfo) ReadField7(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*HookItem, 0, size)
 | |
| 	values := make([]HookItem, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		_elem := &values[i]
 | |
| 		_elem.InitDefault()
 | |
| 
 | |
| 		if err := _elem.Read(iprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.SuggestionHook = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *HookInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("HookInfo"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField5(oprot); err != nil {
 | |
| 			fieldId = 5
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField6(oprot); err != nil {
 | |
| 			fieldId = 6
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField7(oprot); err != nil {
 | |
| 			fieldId = 7
 | |
| 			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 *HookInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPreAgentJumpHook() {
 | |
| 		if err = oprot.WriteFieldBegin("pre_agent_jump_hook", thrift.LIST, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.PreAgentJumpHook)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.PreAgentJumpHook {
 | |
| 			if err := v.Write(oprot); 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 1 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
 | |
| }
 | |
| func (p *HookInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPostAgentJumpHook() {
 | |
| 		if err = oprot.WriteFieldBegin("post_agent_jump_hook", thrift.LIST, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.PostAgentJumpHook)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.PostAgentJumpHook {
 | |
| 			if err := v.Write(oprot); 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 *HookInfo) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetFlowHook() {
 | |
| 		if err = oprot.WriteFieldBegin("flow_hook", thrift.LIST, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.FlowHook)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.FlowHook {
 | |
| 			if err := v.Write(oprot); 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 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *HookInfo) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAtomicHook() {
 | |
| 		if err = oprot.WriteFieldBegin("atomic_hook", thrift.LIST, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.AtomicHook)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.AtomicHook {
 | |
| 			if err := v.Write(oprot); 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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *HookInfo) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetLlmCallHook() {
 | |
| 		if err = oprot.WriteFieldBegin("llm_call_hook", thrift.LIST, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.LlmCallHook)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.LlmCallHook {
 | |
| 			if err := v.Write(oprot); 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 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *HookInfo) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetResParsingHook() {
 | |
| 		if err = oprot.WriteFieldBegin("res_parsing_hook", thrift.LIST, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ResParsingHook)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.ResParsingHook {
 | |
| 			if err := v.Write(oprot); 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 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *HookInfo) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuggestionHook() {
 | |
| 		if err = oprot.WriteFieldBegin("suggestion_hook", thrift.LIST, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.SuggestionHook)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.SuggestionHook {
 | |
| 			if err := v.Write(oprot); 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 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *HookInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("HookInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type HookItem struct {
 | |
| 	URI         *string  `thrift:"uri,1,optional" form:"uri" json:"uri,omitempty" query:"uri"`
 | |
| 	FilterRules []string `thrift:"filter_rules,2,optional" form:"filter_rules" json:"filter_rules,omitempty" query:"filter_rules"`
 | |
| 	StrongDep   *bool    `thrift:"strong_dep,3,optional" form:"strong_dep" json:"strong_dep,omitempty" query:"strong_dep"`
 | |
| 	TimeoutMs   *int64   `thrift:"timeout_ms,4,optional" form:"timeout_ms" json:"timeout_ms,omitempty" query:"timeout_ms"`
 | |
| }
 | |
| 
 | |
| func NewHookItem() *HookItem {
 | |
| 	return &HookItem{}
 | |
| }
 | |
| 
 | |
| func (p *HookItem) InitDefault() {
 | |
| }
 | |
| 
 | |
| var HookItem_URI_DEFAULT string
 | |
| 
 | |
| func (p *HookItem) GetURI() (v string) {
 | |
| 	if !p.IsSetURI() {
 | |
| 		return HookItem_URI_DEFAULT
 | |
| 	}
 | |
| 	return *p.URI
 | |
| }
 | |
| 
 | |
| var HookItem_FilterRules_DEFAULT []string
 | |
| 
 | |
| func (p *HookItem) GetFilterRules() (v []string) {
 | |
| 	if !p.IsSetFilterRules() {
 | |
| 		return HookItem_FilterRules_DEFAULT
 | |
| 	}
 | |
| 	return p.FilterRules
 | |
| }
 | |
| 
 | |
| var HookItem_StrongDep_DEFAULT bool
 | |
| 
 | |
| func (p *HookItem) GetStrongDep() (v bool) {
 | |
| 	if !p.IsSetStrongDep() {
 | |
| 		return HookItem_StrongDep_DEFAULT
 | |
| 	}
 | |
| 	return *p.StrongDep
 | |
| }
 | |
| 
 | |
| var HookItem_TimeoutMs_DEFAULT int64
 | |
| 
 | |
| func (p *HookItem) GetTimeoutMs() (v int64) {
 | |
| 	if !p.IsSetTimeoutMs() {
 | |
| 		return HookItem_TimeoutMs_DEFAULT
 | |
| 	}
 | |
| 	return *p.TimeoutMs
 | |
| }
 | |
| 
 | |
| var fieldIDToName_HookItem = map[int16]string{
 | |
| 	1: "uri",
 | |
| 	2: "filter_rules",
 | |
| 	3: "strong_dep",
 | |
| 	4: "timeout_ms",
 | |
| }
 | |
| 
 | |
| func (p *HookItem) IsSetURI() bool {
 | |
| 	return p.URI != nil
 | |
| }
 | |
| 
 | |
| func (p *HookItem) IsSetFilterRules() bool {
 | |
| 	return p.FilterRules != nil
 | |
| }
 | |
| 
 | |
| func (p *HookItem) IsSetStrongDep() bool {
 | |
| 	return p.StrongDep != nil
 | |
| }
 | |
| 
 | |
| func (p *HookItem) IsSetTimeoutMs() bool {
 | |
| 	return p.TimeoutMs != nil
 | |
| }
 | |
| 
 | |
| func (p *HookItem) 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.STRING {
 | |
| 				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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 4:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField4(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_HookItem[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 *HookItem) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.URI = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *HookItem) ReadField2(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := 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
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.FilterRules = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *HookItem) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.StrongDep = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *HookItem) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.TimeoutMs = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *HookItem) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("HookItem"); 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 = p.writeField3(oprot); err != nil {
 | |
| 			fieldId = 3
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField4(oprot); err != nil {
 | |
| 			fieldId = 4
 | |
| 			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 *HookItem) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetURI() {
 | |
| 		if err = oprot.WriteFieldBegin("uri", thrift.STRING, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.URI); 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 *HookItem) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetFilterRules() {
 | |
| 		if err = oprot.WriteFieldBegin("filter_rules", thrift.LIST, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRING, len(p.FilterRules)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.FilterRules {
 | |
| 			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 *HookItem) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetStrongDep() {
 | |
| 		if err = oprot.WriteFieldBegin("strong_dep", thrift.BOOL, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.StrongDep); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *HookItem) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetTimeoutMs() {
 | |
| 		if err = oprot.WriteFieldBegin("timeout_ms", thrift.I64, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.TimeoutMs); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *HookItem) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("HookItem(%+v)", *p)
 | |
| 
 | |
| }
 |