34323 lines
		
	
	
		
			967 KiB
		
	
	
	
		
			Go
		
	
	
	
			
		
		
	
	
			34323 lines
		
	
	
		
			967 KiB
		
	
	
	
		
			Go
		
	
	
	
| // Code generated by thriftgo (0.4.1). DO NOT EDIT.
 | |
| 
 | |
| package plugin_develop
 | |
| 
 | |
| import (
 | |
| 	"context"
 | |
| 	"fmt"
 | |
| 	"github.com/apache/thrift/lib/go/thrift"
 | |
| 	"github.com/coze-dev/coze-studio/backend/api/model/base"
 | |
| 	"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
 | |
| )
 | |
| 
 | |
| type GetPlaygroundPluginListRequest struct {
 | |
| 	// page number
 | |
| 	Page *int32 `thrift:"page,1,optional" form:"page" json:"page,omitempty"`
 | |
| 	// page size
 | |
| 	Size *int32 `thrift:"size,2,optional" form:"size" json:"size,omitempty"`
 | |
| 	// ignore
 | |
| 	Name *string `thrift:"name,4,optional" form:"name" json:"name,omitempty"`
 | |
| 	// Space ID
 | |
| 	SpaceID *int64 `thrift:"space_id,5,optional" form:"space_id" json:"space_id,string,omitempty"`
 | |
| 	// If present, query according to plug-in id, no paging logic
 | |
| 	PluginIds []string `thrift:"plugin_ids,6" form:"plugin_ids" json:"plugin_ids"`
 | |
| 	// When the length is 1 and it is a workflow, return the list of published workflows, and return the list of published plugins by default
 | |
| 	PluginTypes []int32 `thrift:"plugin_types,7" form:"plugin_types" json:"plugin_types"`
 | |
| 	// ignore
 | |
| 	ChannelID *int32 `thrift:"channel_id,8,optional" form:"channel_id" json:"channel_id,omitempty"`
 | |
| 	// ignore
 | |
| 	SelfCreated *bool `thrift:"self_created,9,optional" form:"self_created" json:"self_created,omitempty"`
 | |
| 	// sort
 | |
| 	OrderBy *int32 `thrift:"order_by,10,optional" form:"order_by" json:"order_by,omitempty"`
 | |
| 	// ignore
 | |
| 	IsGetOffline *bool `thrift:"is_get_offline,11,optional" form:"is_get_offline" json:"is_get_offline,omitempty"`
 | |
| 	// ignore
 | |
| 	Referer string     `thrift:"referer,99" header:"Referer" json:"referer"`
 | |
| 	Base    *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewGetPlaygroundPluginListRequest() *GetPlaygroundPluginListRequest {
 | |
| 	return &GetPlaygroundPluginListRequest{}
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| var GetPlaygroundPluginListRequest_Page_DEFAULT int32
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) GetPage() (v int32) {
 | |
| 	if !p.IsSetPage() {
 | |
| 		return GetPlaygroundPluginListRequest_Page_DEFAULT
 | |
| 	}
 | |
| 	return *p.Page
 | |
| }
 | |
| 
 | |
| var GetPlaygroundPluginListRequest_Size_DEFAULT int32
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) GetSize() (v int32) {
 | |
| 	if !p.IsSetSize() {
 | |
| 		return GetPlaygroundPluginListRequest_Size_DEFAULT
 | |
| 	}
 | |
| 	return *p.Size
 | |
| }
 | |
| 
 | |
| var GetPlaygroundPluginListRequest_Name_DEFAULT string
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) GetName() (v string) {
 | |
| 	if !p.IsSetName() {
 | |
| 		return GetPlaygroundPluginListRequest_Name_DEFAULT
 | |
| 	}
 | |
| 	return *p.Name
 | |
| }
 | |
| 
 | |
| var GetPlaygroundPluginListRequest_SpaceID_DEFAULT int64
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) GetSpaceID() (v int64) {
 | |
| 	if !p.IsSetSpaceID() {
 | |
| 		return GetPlaygroundPluginListRequest_SpaceID_DEFAULT
 | |
| 	}
 | |
| 	return *p.SpaceID
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) GetPluginIds() (v []string) {
 | |
| 	return p.PluginIds
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) GetPluginTypes() (v []int32) {
 | |
| 	return p.PluginTypes
 | |
| }
 | |
| 
 | |
| var GetPlaygroundPluginListRequest_ChannelID_DEFAULT int32
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) GetChannelID() (v int32) {
 | |
| 	if !p.IsSetChannelID() {
 | |
| 		return GetPlaygroundPluginListRequest_ChannelID_DEFAULT
 | |
| 	}
 | |
| 	return *p.ChannelID
 | |
| }
 | |
| 
 | |
| var GetPlaygroundPluginListRequest_SelfCreated_DEFAULT bool
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) GetSelfCreated() (v bool) {
 | |
| 	if !p.IsSetSelfCreated() {
 | |
| 		return GetPlaygroundPluginListRequest_SelfCreated_DEFAULT
 | |
| 	}
 | |
| 	return *p.SelfCreated
 | |
| }
 | |
| 
 | |
| var GetPlaygroundPluginListRequest_OrderBy_DEFAULT int32
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) GetOrderBy() (v int32) {
 | |
| 	if !p.IsSetOrderBy() {
 | |
| 		return GetPlaygroundPluginListRequest_OrderBy_DEFAULT
 | |
| 	}
 | |
| 	return *p.OrderBy
 | |
| }
 | |
| 
 | |
| var GetPlaygroundPluginListRequest_IsGetOffline_DEFAULT bool
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) GetIsGetOffline() (v bool) {
 | |
| 	if !p.IsSetIsGetOffline() {
 | |
| 		return GetPlaygroundPluginListRequest_IsGetOffline_DEFAULT
 | |
| 	}
 | |
| 	return *p.IsGetOffline
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) GetReferer() (v string) {
 | |
| 	return p.Referer
 | |
| }
 | |
| 
 | |
| var GetPlaygroundPluginListRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return GetPlaygroundPluginListRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetPlaygroundPluginListRequest = map[int16]string{
 | |
| 	1:   "page",
 | |
| 	2:   "size",
 | |
| 	4:   "name",
 | |
| 	5:   "space_id",
 | |
| 	6:   "plugin_ids",
 | |
| 	7:   "plugin_types",
 | |
| 	8:   "channel_id",
 | |
| 	9:   "self_created",
 | |
| 	10:  "order_by",
 | |
| 	11:  "is_get_offline",
 | |
| 	99:  "referer",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) IsSetPage() bool {
 | |
| 	return p.Page != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) IsSetSize() bool {
 | |
| 	return p.Size != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) IsSetName() bool {
 | |
| 	return p.Name != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) IsSetSpaceID() bool {
 | |
| 	return p.SpaceID != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) IsSetChannelID() bool {
 | |
| 	return p.ChannelID != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) IsSetSelfCreated() bool {
 | |
| 	return p.SelfCreated != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) IsSetOrderBy() bool {
 | |
| 	return p.OrderBy != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) IsSetIsGetOffline() bool {
 | |
| 	return p.IsGetOffline != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) 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 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.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
 | |
| 			}
 | |
| 		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.BOOL {
 | |
| 				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 11:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField11(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 99:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField99(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_GetPlaygroundPluginListRequest[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 *GetPlaygroundPluginListRequest) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Page = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPlaygroundPluginListRequest) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Size = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPlaygroundPluginListRequest) ReadField4(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 *GetPlaygroundPluginListRequest) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.SpaceID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPlaygroundPluginListRequest) ReadField6(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.PluginIds = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPlaygroundPluginListRequest) ReadField7(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.PluginTypes = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPlaygroundPluginListRequest) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ChannelID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPlaygroundPluginListRequest) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.SelfCreated = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPlaygroundPluginListRequest) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.OrderBy = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPlaygroundPluginListRequest) ReadField11(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.IsGetOffline = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPlaygroundPluginListRequest) ReadField99(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Referer = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPlaygroundPluginListRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPlaygroundPluginListRequest"); 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.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.writeField99(oprot); err != nil {
 | |
| 			fieldId = 99
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetPlaygroundPluginListRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPage() {
 | |
| 		if err = oprot.WriteFieldBegin("page", thrift.I32, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.Page); 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 *GetPlaygroundPluginListRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSize() {
 | |
| 		if err = oprot.WriteFieldBegin("size", thrift.I32, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.Size); 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 *GetPlaygroundPluginListRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetName() {
 | |
| 		if err = oprot.WriteFieldBegin("name", thrift.STRING, 4); 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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *GetPlaygroundPluginListRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSpaceID() {
 | |
| 		if err = oprot.WriteFieldBegin("space_id", thrift.I64, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.SpaceID); 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 *GetPlaygroundPluginListRequest) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_ids", thrift.LIST, 6); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRING, len(p.PluginIds)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.PluginIds {
 | |
| 		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 6 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
 | |
| }
 | |
| func (p *GetPlaygroundPluginListRequest) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_types", thrift.LIST, 7); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.I32, len(p.PluginTypes)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.PluginTypes {
 | |
| 		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 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *GetPlaygroundPluginListRequest) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetChannelID() {
 | |
| 		if err = oprot.WriteFieldBegin("channel_id", thrift.I32, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.ChannelID); 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 *GetPlaygroundPluginListRequest) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSelfCreated() {
 | |
| 		if err = oprot.WriteFieldBegin("self_created", thrift.BOOL, 9); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.SelfCreated); 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 *GetPlaygroundPluginListRequest) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetOrderBy() {
 | |
| 		if err = oprot.WriteFieldBegin("order_by", thrift.I32, 10); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.OrderBy); 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 *GetPlaygroundPluginListRequest) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetIsGetOffline() {
 | |
| 		if err = oprot.WriteFieldBegin("is_get_offline", thrift.BOOL, 11); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.IsGetOffline); 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 *GetPlaygroundPluginListRequest) writeField99(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("referer", thrift.STRING, 99); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Referer); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 99 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 99 end error: ", p), err)
 | |
| }
 | |
| func (p *GetPlaygroundPluginListRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetPlaygroundPluginListRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetPlaygroundPluginListResponse struct {
 | |
| 	Code     int32                               `thrift:"code,1,required" form:"code,required" json:"code,required" query:"code,required"`
 | |
| 	Msg      string                              `thrift:"msg,2,required" form:"msg,required" json:"msg,required" query:"msg,required"`
 | |
| 	Data     *common.GetPlaygroundPluginListData `thrift:"data,3" form:"data" json:"data" query:"data"`
 | |
| 	BaseResp *base.BaseResp                      `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewGetPlaygroundPluginListResponse() *GetPlaygroundPluginListResponse {
 | |
| 	return &GetPlaygroundPluginListResponse{}
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListResponse) GetCode() (v int32) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| var GetPlaygroundPluginListResponse_Data_DEFAULT *common.GetPlaygroundPluginListData
 | |
| 
 | |
| func (p *GetPlaygroundPluginListResponse) GetData() (v *common.GetPlaygroundPluginListData) {
 | |
| 	if !p.IsSetData() {
 | |
| 		return GetPlaygroundPluginListResponse_Data_DEFAULT
 | |
| 	}
 | |
| 	return p.Data
 | |
| }
 | |
| 
 | |
| var GetPlaygroundPluginListResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *GetPlaygroundPluginListResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return GetPlaygroundPluginListResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetPlaygroundPluginListResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "data",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListResponse) IsSetData() bool {
 | |
| 	return p.Data != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListResponse) 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
 | |
| 			}
 | |
| 		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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !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_GetPlaygroundPluginListResponse[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_GetPlaygroundPluginListResponse[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListResponse) 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 *GetPlaygroundPluginListResponse) 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 *GetPlaygroundPluginListResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewGetPlaygroundPluginListData()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Data = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPlaygroundPluginListResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPlaygroundPluginListResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetPlaygroundPluginListResponse) 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 *GetPlaygroundPluginListResponse) 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 *GetPlaygroundPluginListResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("data", thrift.STRUCT, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Data.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 *GetPlaygroundPluginListResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetPlaygroundPluginListResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetPlaygroundPluginListResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetPluginAPIsRequest struct {
 | |
| 	// Plugin ID
 | |
| 	PluginID int64 `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required" query:"plugin_id,required"`
 | |
| 	// If present, query according to tool id, no paging logic
 | |
| 	APIIds []string `thrift:"api_ids,2" form:"api_ids" json:"api_ids" query:"api_ids"`
 | |
| 	// page number
 | |
| 	Page int32 `thrift:"page,3" form:"page" json:"page" query:"page"`
 | |
| 	// page size
 | |
| 	Size int32 `thrift:"size,4" form:"size" json:"size" query:"size"`
 | |
| 	// ignore
 | |
| 	Order *common.APIListOrder `thrift:"order,5" form:"order" json:"order" query:"order"`
 | |
| 	// ignore
 | |
| 	PreviewVersionTs *string    `thrift:"preview_version_ts,6,optional" form:"preview_version_ts" json:"preview_version_ts,omitempty" query:"preview_version_ts"`
 | |
| 	Base             *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewGetPluginAPIsRequest() *GetPluginAPIsRequest {
 | |
| 	return &GetPluginAPIsRequest{}
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) GetAPIIds() (v []string) {
 | |
| 	return p.APIIds
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) GetPage() (v int32) {
 | |
| 	return p.Page
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) GetSize() (v int32) {
 | |
| 	return p.Size
 | |
| }
 | |
| 
 | |
| var GetPluginAPIsRequest_Order_DEFAULT *common.APIListOrder
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) GetOrder() (v *common.APIListOrder) {
 | |
| 	if !p.IsSetOrder() {
 | |
| 		return GetPluginAPIsRequest_Order_DEFAULT
 | |
| 	}
 | |
| 	return p.Order
 | |
| }
 | |
| 
 | |
| var GetPluginAPIsRequest_PreviewVersionTs_DEFAULT string
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) GetPreviewVersionTs() (v string) {
 | |
| 	if !p.IsSetPreviewVersionTs() {
 | |
| 		return GetPluginAPIsRequest_PreviewVersionTs_DEFAULT
 | |
| 	}
 | |
| 	return *p.PreviewVersionTs
 | |
| }
 | |
| 
 | |
| var GetPluginAPIsRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return GetPluginAPIsRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetPluginAPIsRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	2:   "api_ids",
 | |
| 	3:   "page",
 | |
| 	4:   "size",
 | |
| 	5:   "order",
 | |
| 	6:   "preview_version_ts",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) IsSetOrder() bool {
 | |
| 	return p.Order != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) IsSetPreviewVersionTs() bool {
 | |
| 	return p.PreviewVersionTs != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = true
 | |
| 			} 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.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.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.STRING {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		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_GetPluginAPIsRequest[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_GetPluginAPIsRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) 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 *GetPluginAPIsRequest) 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.APIIds = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginAPIsRequest) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Page = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginAPIsRequest) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Size = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginAPIsRequest) ReadField5(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewAPIListOrder()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Order = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginAPIsRequest) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PreviewVersionTs = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginAPIsRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPluginAPIsRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetPluginAPIsRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *GetPluginAPIsRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("api_ids", thrift.LIST, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRING, len(p.APIIds)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.APIIds {
 | |
| 		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 *GetPluginAPIsRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("page", thrift.I32, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(p.Page); 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 *GetPluginAPIsRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("size", thrift.I32, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(p.Size); 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 *GetPluginAPIsRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("order", thrift.STRUCT, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Order.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 *GetPluginAPIsRequest) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPreviewVersionTs() {
 | |
| 		if err = oprot.WriteFieldBegin("preview_version_ts", thrift.STRING, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.PreviewVersionTs); 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 *GetPluginAPIsRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetPluginAPIsRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetPluginAPIsResponse struct {
 | |
| 	Code        int64                   `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg         string                  `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	APIInfo     []*common.PluginAPIInfo `thrift:"api_info,3" form:"api_info" json:"api_info" query:"api_info"`
 | |
| 	Total       int32                   `thrift:"total,4" form:"total" json:"total" query:"total"`
 | |
| 	EditVersion int32                   `thrift:"edit_version,5" form:"edit_version" json:"edit_version" query:"edit_version"`
 | |
| 	BaseResp    *base.BaseResp          `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewGetPluginAPIsResponse() *GetPluginAPIsResponse {
 | |
| 	return &GetPluginAPIsResponse{}
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsResponse) GetAPIInfo() (v []*common.PluginAPIInfo) {
 | |
| 	return p.APIInfo
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsResponse) GetTotal() (v int32) {
 | |
| 	return p.Total
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsResponse) GetEditVersion() (v int32) {
 | |
| 	return p.EditVersion
 | |
| }
 | |
| 
 | |
| var GetPluginAPIsResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *GetPluginAPIsResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return GetPluginAPIsResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetPluginAPIsResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "api_info",
 | |
| 	4:   "total",
 | |
| 	5:   "edit_version",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsResponse) 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.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.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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_GetPluginAPIsResponse[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 *GetPluginAPIsResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginAPIsResponse) 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 *GetPluginAPIsResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.PluginAPIInfo, 0, size)
 | |
| 	values := make([]common.PluginAPIInfo, 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.APIInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginAPIsResponse) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Total = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginAPIsResponse) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.EditVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginAPIsResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPluginAPIsResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetPluginAPIsResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *GetPluginAPIsResponse) 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 *GetPluginAPIsResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("api_info", thrift.LIST, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.APIInfo)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.APIInfo {
 | |
| 		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 *GetPluginAPIsResponse) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("total", thrift.I32, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(p.Total); 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 *GetPluginAPIsResponse) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("edit_version", thrift.I32, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(p.EditVersion); 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 *GetPluginAPIsResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetPluginAPIsResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetPluginAPIsResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetUpdatedAPIsRequest struct {
 | |
| 	// Plugin ID
 | |
| 	PluginID int64      `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required" query:"plugin_id,required"`
 | |
| 	Base     *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewGetUpdatedAPIsRequest() *GetUpdatedAPIsRequest {
 | |
| 	return &GetUpdatedAPIsRequest{}
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| var GetUpdatedAPIsRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *GetUpdatedAPIsRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return GetUpdatedAPIsRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetUpdatedAPIsRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		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_GetUpdatedAPIsRequest[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_GetUpdatedAPIsRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsRequest) 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 *GetUpdatedAPIsRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetUpdatedAPIsRequest"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetUpdatedAPIsRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *GetUpdatedAPIsRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetUpdatedAPIsRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetUpdatedAPIsResponse struct {
 | |
| 	Code int64  `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg  string `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	// Newly created tool name
 | |
| 	CreatedAPINames []string `thrift:"created_api_names,3" form:"created_api_names" json:"created_api_names" query:"created_api_names"`
 | |
| 	// Deleted tool name
 | |
| 	DeletedAPINames []string `thrift:"deleted_api_names,4" form:"deleted_api_names" json:"deleted_api_names" query:"deleted_api_names"`
 | |
| 	// updated tool name
 | |
| 	UpdatedAPINames []string       `thrift:"updated_api_names,5" form:"updated_api_names" json:"updated_api_names" query:"updated_api_names"`
 | |
| 	BaseResp        *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewGetUpdatedAPIsResponse() *GetUpdatedAPIsResponse {
 | |
| 	return &GetUpdatedAPIsResponse{}
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsResponse) GetCreatedAPINames() (v []string) {
 | |
| 	return p.CreatedAPINames
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsResponse) GetDeletedAPINames() (v []string) {
 | |
| 	return p.DeletedAPINames
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsResponse) GetUpdatedAPINames() (v []string) {
 | |
| 	return p.UpdatedAPINames
 | |
| }
 | |
| 
 | |
| var GetUpdatedAPIsResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *GetUpdatedAPIsResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return GetUpdatedAPIsResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetUpdatedAPIsResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "created_api_names",
 | |
| 	4:   "deleted_api_names",
 | |
| 	5:   "updated_api_names",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsResponse) 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.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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_GetUpdatedAPIsResponse[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 *GetUpdatedAPIsResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetUpdatedAPIsResponse) 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 *GetUpdatedAPIsResponse) ReadField3(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.CreatedAPINames = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetUpdatedAPIsResponse) ReadField4(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.DeletedAPINames = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetUpdatedAPIsResponse) 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.UpdatedAPINames = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetUpdatedAPIsResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetUpdatedAPIsResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetUpdatedAPIsResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *GetUpdatedAPIsResponse) 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 *GetUpdatedAPIsResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("created_api_names", thrift.LIST, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRING, len(p.CreatedAPINames)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.CreatedAPINames {
 | |
| 		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 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *GetUpdatedAPIsResponse) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("deleted_api_names", thrift.LIST, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRING, len(p.DeletedAPINames)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.DeletedAPINames {
 | |
| 		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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *GetUpdatedAPIsResponse) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("updated_api_names", thrift.LIST, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRING, len(p.UpdatedAPINames)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.UpdatedAPINames {
 | |
| 		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 *GetUpdatedAPIsResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetUpdatedAPIsResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetUpdatedAPIsResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetPluginInfoRequest struct {
 | |
| 	// Currently only plugins are supported OpenAPI plugin information
 | |
| 	PluginID int64 `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required" query:"plugin_id,required"`
 | |
| 	// ignore
 | |
| 	PreviewVersionTsx *string    `thrift:"preview_version_tsx,2,optional" form:"preview_version_tsx" json:"preview_version_tsx,omitempty" query:"preview_version_tsx"`
 | |
| 	Base              *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewGetPluginInfoRequest() *GetPluginInfoRequest {
 | |
| 	return &GetPluginInfoRequest{}
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| var GetPluginInfoRequest_PreviewVersionTsx_DEFAULT string
 | |
| 
 | |
| func (p *GetPluginInfoRequest) GetPreviewVersionTsx() (v string) {
 | |
| 	if !p.IsSetPreviewVersionTsx() {
 | |
| 		return GetPluginInfoRequest_PreviewVersionTsx_DEFAULT
 | |
| 	}
 | |
| 	return *p.PreviewVersionTsx
 | |
| }
 | |
| 
 | |
| var GetPluginInfoRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *GetPluginInfoRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return GetPluginInfoRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetPluginInfoRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	2:   "preview_version_tsx",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoRequest) IsSetPreviewVersionTsx() bool {
 | |
| 	return p.PreviewVersionTsx != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = 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
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		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_GetPluginInfoRequest[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_GetPluginInfoRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoRequest) 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 *GetPluginInfoRequest) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PreviewVersionTsx = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPluginInfoRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetPluginInfoRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *GetPluginInfoRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPreviewVersionTsx() {
 | |
| 		if err = oprot.WriteFieldBegin("preview_version_tsx", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.PreviewVersionTsx); 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 *GetPluginInfoRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetPluginInfoRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetPluginInfoResponse struct {
 | |
| 	Code     int64                  `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg      string                 `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	MetaInfo *common.PluginMetaInfo `thrift:"meta_info,3" form:"meta_info" json:"meta_info" query:"meta_info"`
 | |
| 	CodeInfo *common.CodeInfo       `thrift:"code_info,4" form:"code_info" json:"code_info" query:"code_info"`
 | |
| 	// 0 No updates 1 Yes updates Not released
 | |
| 	Status bool `thrift:"status,5" form:"status" json:"status" query:"status"`
 | |
| 	// Has it been published?
 | |
| 	Published bool `thrift:"published,6" form:"published" json:"published" query:"published"`
 | |
| 	// creator information
 | |
| 	Creator *common.Creator `thrift:"creator,7" form:"creator" json:"creator" query:"creator"`
 | |
| 	// ignore
 | |
| 	StatisticData *common.PluginStatisticData `thrift:"statistic_data,8" form:"statistic_data" json:"statistic_data" query:"statistic_data"`
 | |
| 	// ignore
 | |
| 	PluginProductStatus common.ProductStatus `thrift:"plugin_product_status,9" form:"plugin_product_status" json:"plugin_product_status" query:"plugin_product_status"`
 | |
| 	// ignore
 | |
| 	PrivacyStatus bool `thrift:"privacy_status,10" form:"privacy_status" json:"privacy_status" query:"privacy_status"`
 | |
| 	// ignore
 | |
| 	PrivacyInfo string `thrift:"privacy_info,11" form:"privacy_info" json:"privacy_info" query:"privacy_info"`
 | |
| 	// ignore
 | |
| 	CreationMethod common.CreationMethod `thrift:"creation_method,12" form:"creation_method" json:"creation_method" query:"creation_method"`
 | |
| 	// ignore
 | |
| 	IdeCodeRuntime string `thrift:"ide_code_runtime,13" form:"ide_code_runtime" json:"ide_code_runtime" query:"ide_code_runtime"`
 | |
| 	// ignore
 | |
| 	EditVersion int32 `thrift:"edit_version,14" form:"edit_version" json:"edit_version" query:"edit_version"`
 | |
| 	// ignore
 | |
| 	PluginType common.PluginType `thrift:"plugin_type,15" form:"plugin_type" json:"plugin_type" query:"plugin_type"`
 | |
| 	BaseResp   *base.BaseResp    `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewGetPluginInfoResponse() *GetPluginInfoResponse {
 | |
| 	return &GetPluginInfoResponse{}
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| var GetPluginInfoResponse_MetaInfo_DEFAULT *common.PluginMetaInfo
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetMetaInfo() (v *common.PluginMetaInfo) {
 | |
| 	if !p.IsSetMetaInfo() {
 | |
| 		return GetPluginInfoResponse_MetaInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.MetaInfo
 | |
| }
 | |
| 
 | |
| var GetPluginInfoResponse_CodeInfo_DEFAULT *common.CodeInfo
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetCodeInfo() (v *common.CodeInfo) {
 | |
| 	if !p.IsSetCodeInfo() {
 | |
| 		return GetPluginInfoResponse_CodeInfo_DEFAULT
 | |
| 	}
 | |
| 	return p.CodeInfo
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetStatus() (v bool) {
 | |
| 	return p.Status
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetPublished() (v bool) {
 | |
| 	return p.Published
 | |
| }
 | |
| 
 | |
| var GetPluginInfoResponse_Creator_DEFAULT *common.Creator
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetCreator() (v *common.Creator) {
 | |
| 	if !p.IsSetCreator() {
 | |
| 		return GetPluginInfoResponse_Creator_DEFAULT
 | |
| 	}
 | |
| 	return p.Creator
 | |
| }
 | |
| 
 | |
| var GetPluginInfoResponse_StatisticData_DEFAULT *common.PluginStatisticData
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetStatisticData() (v *common.PluginStatisticData) {
 | |
| 	if !p.IsSetStatisticData() {
 | |
| 		return GetPluginInfoResponse_StatisticData_DEFAULT
 | |
| 	}
 | |
| 	return p.StatisticData
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetPluginProductStatus() (v common.ProductStatus) {
 | |
| 	return p.PluginProductStatus
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetPrivacyStatus() (v bool) {
 | |
| 	return p.PrivacyStatus
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetPrivacyInfo() (v string) {
 | |
| 	return p.PrivacyInfo
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetCreationMethod() (v common.CreationMethod) {
 | |
| 	return p.CreationMethod
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetIdeCodeRuntime() (v string) {
 | |
| 	return p.IdeCodeRuntime
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetEditVersion() (v int32) {
 | |
| 	return p.EditVersion
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetPluginType() (v common.PluginType) {
 | |
| 	return p.PluginType
 | |
| }
 | |
| 
 | |
| var GetPluginInfoResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *GetPluginInfoResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return GetPluginInfoResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetPluginInfoResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "meta_info",
 | |
| 	4:   "code_info",
 | |
| 	5:   "status",
 | |
| 	6:   "published",
 | |
| 	7:   "creator",
 | |
| 	8:   "statistic_data",
 | |
| 	9:   "plugin_product_status",
 | |
| 	10:  "privacy_status",
 | |
| 	11:  "privacy_info",
 | |
| 	12:  "creation_method",
 | |
| 	13:  "ide_code_runtime",
 | |
| 	14:  "edit_version",
 | |
| 	15:  "plugin_type",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) IsSetMetaInfo() bool {
 | |
| 	return p.MetaInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) IsSetCodeInfo() bool {
 | |
| 	return p.CodeInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) IsSetCreator() bool {
 | |
| 	return p.Creator != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) IsSetStatisticData() bool {
 | |
| 	return p.StatisticData != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) 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.STRUCT {
 | |
| 				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.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.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.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.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.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.I32 {
 | |
| 				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.I32 {
 | |
| 				if err = p.ReadField14(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 15:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField15(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_GetPluginInfoResponse[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 *GetPluginInfoResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoResponse) 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 *GetPluginInfoResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewPluginMetaInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.MetaInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoResponse) ReadField4(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewCodeInfo()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.CodeInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoResponse) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Status = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoResponse) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Published = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoResponse) ReadField7(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewCreator()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Creator = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoResponse) ReadField8(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewPluginStatisticData()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.StatisticData = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoResponse) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field common.ProductStatus
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = common.ProductStatus(v)
 | |
| 	}
 | |
| 	p.PluginProductStatus = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoResponse) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.PrivacyStatus = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoResponse) ReadField11(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.PrivacyInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoResponse) ReadField12(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field common.CreationMethod
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = common.CreationMethod(v)
 | |
| 	}
 | |
| 	p.CreationMethod = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoResponse) ReadField13(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.IdeCodeRuntime = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoResponse) ReadField14(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.EditVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoResponse) ReadField15(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field common.PluginType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = common.PluginType(v)
 | |
| 	}
 | |
| 	p.PluginType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginInfoResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPluginInfoResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetPluginInfoResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *GetPluginInfoResponse) 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 *GetPluginInfoResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("meta_info", thrift.STRUCT, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.MetaInfo.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 *GetPluginInfoResponse) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code_info", thrift.STRUCT, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.CodeInfo.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 *GetPluginInfoResponse) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("status", thrift.BOOL, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(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 *GetPluginInfoResponse) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("published", thrift.BOOL, 6); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(p.Published); 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 *GetPluginInfoResponse) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("creator", thrift.STRUCT, 7); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Creator.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 *GetPluginInfoResponse) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("statistic_data", thrift.STRUCT, 8); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.StatisticData.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 *GetPluginInfoResponse) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_product_status", thrift.I32, 9); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.PluginProductStatus)); 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 *GetPluginInfoResponse) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("privacy_status", thrift.BOOL, 10); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(p.PrivacyStatus); 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 *GetPluginInfoResponse) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("privacy_info", thrift.STRING, 11); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.PrivacyInfo); 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 *GetPluginInfoResponse) writeField12(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("creation_method", thrift.I32, 12); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.CreationMethod)); 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 *GetPluginInfoResponse) writeField13(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ide_code_runtime", thrift.STRING, 13); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.IdeCodeRuntime); 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 *GetPluginInfoResponse) writeField14(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("edit_version", thrift.I32, 14); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(p.EditVersion); 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 *GetPluginInfoResponse) writeField15(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_type", thrift.I32, 15); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.PluginType)); 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 *GetPluginInfoResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetPluginInfoResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetPluginInfoResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type UpdatePluginRequest struct {
 | |
| 	PluginID int64 `thrift:"plugin_id,1" form:"plugin_id" json:"plugin_id,string" query:"plugin_id"`
 | |
| 	// plugin manifest in json string
 | |
| 	AiPlugin string `thrift:"ai_plugin,3" form:"ai_plugin" json:"ai_plugin" query:"ai_plugin"`
 | |
| 	// plugin openapi3 document in yaml string
 | |
| 	Openapi string `thrift:"openapi,4" form:"openapi" json:"openapi" query:"openapi"`
 | |
| 	// ignore
 | |
| 	ClientID *string `thrift:"client_id,5,optional" form:"client_id" json:"client_id,omitempty" query:"client_id"`
 | |
| 	// ignore
 | |
| 	ClientSecret *string `thrift:"client_secret,6,optional" form:"client_secret" json:"client_secret,omitempty" query:"client_secret"`
 | |
| 	// ignore
 | |
| 	ServiceToken *string `thrift:"service_token,7,optional" form:"service_token" json:"service_token,omitempty" query:"service_token"`
 | |
| 	// ignore
 | |
| 	SourceCode *string `thrift:"source_code,8,optional" form:"source_code" json:"source_code,omitempty" query:"source_code"`
 | |
| 	// ignore
 | |
| 	EditVersion *int32 `thrift:"edit_version,9,optional" form:"edit_version" json:"edit_version,omitempty" query:"edit_version"`
 | |
| 	// ignore
 | |
| 	Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewUpdatePluginRequest() *UpdatePluginRequest {
 | |
| 	return &UpdatePluginRequest{}
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginRequest) GetAiPlugin() (v string) {
 | |
| 	return p.AiPlugin
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginRequest) GetOpenapi() (v string) {
 | |
| 	return p.Openapi
 | |
| }
 | |
| 
 | |
| var UpdatePluginRequest_ClientID_DEFAULT string
 | |
| 
 | |
| func (p *UpdatePluginRequest) GetClientID() (v string) {
 | |
| 	if !p.IsSetClientID() {
 | |
| 		return UpdatePluginRequest_ClientID_DEFAULT
 | |
| 	}
 | |
| 	return *p.ClientID
 | |
| }
 | |
| 
 | |
| var UpdatePluginRequest_ClientSecret_DEFAULT string
 | |
| 
 | |
| func (p *UpdatePluginRequest) GetClientSecret() (v string) {
 | |
| 	if !p.IsSetClientSecret() {
 | |
| 		return UpdatePluginRequest_ClientSecret_DEFAULT
 | |
| 	}
 | |
| 	return *p.ClientSecret
 | |
| }
 | |
| 
 | |
| var UpdatePluginRequest_ServiceToken_DEFAULT string
 | |
| 
 | |
| func (p *UpdatePluginRequest) GetServiceToken() (v string) {
 | |
| 	if !p.IsSetServiceToken() {
 | |
| 		return UpdatePluginRequest_ServiceToken_DEFAULT
 | |
| 	}
 | |
| 	return *p.ServiceToken
 | |
| }
 | |
| 
 | |
| var UpdatePluginRequest_SourceCode_DEFAULT string
 | |
| 
 | |
| func (p *UpdatePluginRequest) GetSourceCode() (v string) {
 | |
| 	if !p.IsSetSourceCode() {
 | |
| 		return UpdatePluginRequest_SourceCode_DEFAULT
 | |
| 	}
 | |
| 	return *p.SourceCode
 | |
| }
 | |
| 
 | |
| var UpdatePluginRequest_EditVersion_DEFAULT int32
 | |
| 
 | |
| func (p *UpdatePluginRequest) GetEditVersion() (v int32) {
 | |
| 	if !p.IsSetEditVersion() {
 | |
| 		return UpdatePluginRequest_EditVersion_DEFAULT
 | |
| 	}
 | |
| 	return *p.EditVersion
 | |
| }
 | |
| 
 | |
| var UpdatePluginRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *UpdatePluginRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return UpdatePluginRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_UpdatePluginRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	3:   "ai_plugin",
 | |
| 	4:   "openapi",
 | |
| 	5:   "client_id",
 | |
| 	6:   "client_secret",
 | |
| 	7:   "service_token",
 | |
| 	8:   "source_code",
 | |
| 	9:   "edit_version",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginRequest) IsSetClientID() bool {
 | |
| 	return p.ClientID != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginRequest) IsSetClientSecret() bool {
 | |
| 	return p.ClientSecret != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginRequest) IsSetServiceToken() bool {
 | |
| 	return p.ServiceToken != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginRequest) IsSetSourceCode() bool {
 | |
| 	return p.SourceCode != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginRequest) IsSetEditVersion() bool {
 | |
| 	return p.EditVersion != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginRequest) 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 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
 | |
| 			}
 | |
| 		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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_UpdatePluginRequest[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 *UpdatePluginRequest) 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 *UpdatePluginRequest) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.AiPlugin = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginRequest) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Openapi = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginRequest) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ClientID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginRequest) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ClientSecret = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginRequest) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ServiceToken = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginRequest) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.SourceCode = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginRequest) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.EditVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdatePluginRequest"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *UpdatePluginRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *UpdatePluginRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ai_plugin", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.AiPlugin); 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 *UpdatePluginRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("openapi", thrift.STRING, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Openapi); 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 *UpdatePluginRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetClientID() {
 | |
| 		if err = oprot.WriteFieldBegin("client_id", thrift.STRING, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ClientID); 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 *UpdatePluginRequest) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetClientSecret() {
 | |
| 		if err = oprot.WriteFieldBegin("client_secret", thrift.STRING, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ClientSecret); 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 *UpdatePluginRequest) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetServiceToken() {
 | |
| 		if err = oprot.WriteFieldBegin("service_token", thrift.STRING, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ServiceToken); 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 *UpdatePluginRequest) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSourceCode() {
 | |
| 		if err = oprot.WriteFieldBegin("source_code", thrift.STRING, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.SourceCode); 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 *UpdatePluginRequest) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetEditVersion() {
 | |
| 		if err = oprot.WriteFieldBegin("edit_version", thrift.I32, 9); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.EditVersion); 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 *UpdatePluginRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("UpdatePluginRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type UpdatePluginResponse struct {
 | |
| 	Code     int64                    `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg      string                   `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	Data     *common.UpdatePluginData `thrift:"data,3,required" form:"data,required" json:"data,required" query:"data,required"`
 | |
| 	BaseResp *base.BaseResp           `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewUpdatePluginResponse() *UpdatePluginResponse {
 | |
| 	return &UpdatePluginResponse{}
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| var UpdatePluginResponse_Data_DEFAULT *common.UpdatePluginData
 | |
| 
 | |
| func (p *UpdatePluginResponse) GetData() (v *common.UpdatePluginData) {
 | |
| 	if !p.IsSetData() {
 | |
| 		return UpdatePluginResponse_Data_DEFAULT
 | |
| 	}
 | |
| 	return p.Data
 | |
| }
 | |
| 
 | |
| var UpdatePluginResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *UpdatePluginResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return UpdatePluginResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_UpdatePluginResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "data",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginResponse) IsSetData() bool {
 | |
| 	return p.Data != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginResponse) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetData 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.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
 | |
| 				}
 | |
| 				issetData = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetData {
 | |
| 		fieldId = 3
 | |
| 		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_UpdatePluginResponse[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_UpdatePluginResponse[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginResponse) 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 *UpdatePluginResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewUpdatePluginData()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Data = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdatePluginResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *UpdatePluginResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *UpdatePluginResponse) 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 *UpdatePluginResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("data", thrift.STRUCT, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Data.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 *UpdatePluginResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("UpdatePluginResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type RegisterPluginMetaRequest struct {
 | |
| 	// plugin name
 | |
| 	Name string `thrift:"name,1,required" form:"name,required" json:"name,required" query:"name,required"`
 | |
| 	// Plugin description
 | |
| 	Desc string `thrift:"desc,2,required" form:"desc,required" json:"desc,required" query:"desc,required"`
 | |
| 	// Plugin service address prefix
 | |
| 	URL *string `thrift:"url,3,optional" form:"url" json:"url,omitempty" query:"url"`
 | |
| 	// plugin icon
 | |
| 	Icon *common.PluginIcon `thrift:"icon,4,required" form:"icon,required" json:"icon,required" query:"icon,required"`
 | |
| 	// plug-in authorization type
 | |
| 	AuthType *common.AuthorizationType `thrift:"auth_type,5,optional" form:"auth_type" json:"auth_type,omitempty" query:"auth_type"`
 | |
| 	// When the sub-authorization type is api/token, the token parameter position
 | |
| 	Location *common.AuthorizationServiceLocation `thrift:"location,6,optional" form:"location" json:"location,omitempty" query:"location"`
 | |
| 	// When the sub-authorization type is api/token, the token parameter key
 | |
| 	Key *string `thrift:"key,7,optional" form:"key" json:"key,omitempty" query:"key"`
 | |
| 	// When the sub-authorization type is api/token, the token parameter value
 | |
| 	ServiceToken *string `thrift:"service_token,8,optional" form:"service_token" json:"service_token,omitempty" query:"service_token"`
 | |
| 	// The authorization type is oauth Yes, oauth information, see GetOAuthSchema return value
 | |
| 	OauthInfo *string `thrift:"oauth_info,9,optional" form:"oauth_info" json:"oauth_info,omitempty" query:"oauth_info"`
 | |
| 	// Space ID
 | |
| 	SpaceID int64 `thrift:"space_id,10,required" form:"space_id,required" json:"space_id,string,required" query:"space_id,required"`
 | |
| 	// Plugin public parameters, key is the parameter position, value is the parameter list
 | |
| 	CommonParams map[common.ParameterLocation][]*common.CommonParamSchema `thrift:"common_params,11,optional" form:"common_params" json:"common_params,omitempty" query:"common_params"`
 | |
| 	// ignore
 | |
| 	CreationMethod *common.CreationMethod `thrift:"creation_method,12,optional" form:"creation_method" json:"creation_method,omitempty" query:"creation_method"`
 | |
| 	// ignore
 | |
| 	IdeCodeRuntime *string `thrift:"ide_code_runtime,13,optional" form:"ide_code_runtime" json:"ide_code_runtime,omitempty" query:"ide_code_runtime"`
 | |
| 	// ignore
 | |
| 	PluginType *common.PluginType `thrift:"plugin_type,14,optional" form:"plugin_type" json:"plugin_type,omitempty" query:"plugin_type"`
 | |
| 	// App ID
 | |
| 	ProjectID *int64 `thrift:"project_id,15,optional" form:"project_id" json:"project_id,string,omitempty" query:"project_id"`
 | |
| 	// Level 2 authorization type, 0: api/token of service, 10: client credentials of oauth
 | |
| 	SubAuthType *int32 `thrift:"sub_auth_type,16,optional" form:"sub_auth_type" json:"sub_auth_type,omitempty" query:"sub_auth_type"`
 | |
| 	// ignore
 | |
| 	AuthPayload *string `thrift:"auth_payload,17,optional" form:"auth_payload" json:"auth_payload,omitempty" query:"auth_payload"`
 | |
| 	// ignore
 | |
| 	FixedExportIP *bool      `thrift:"fixed_export_ip,18,optional" form:"fixed_export_ip" json:"fixed_export_ip,omitempty" query:"fixed_export_ip"`
 | |
| 	Base          *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewRegisterPluginMetaRequest() *RegisterPluginMetaRequest {
 | |
| 	return &RegisterPluginMetaRequest{}
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetName() (v string) {
 | |
| 	return p.Name
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetDesc() (v string) {
 | |
| 	return p.Desc
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_URL_DEFAULT string
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetURL() (v string) {
 | |
| 	if !p.IsSetURL() {
 | |
| 		return RegisterPluginMetaRequest_URL_DEFAULT
 | |
| 	}
 | |
| 	return *p.URL
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_Icon_DEFAULT *common.PluginIcon
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetIcon() (v *common.PluginIcon) {
 | |
| 	if !p.IsSetIcon() {
 | |
| 		return RegisterPluginMetaRequest_Icon_DEFAULT
 | |
| 	}
 | |
| 	return p.Icon
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_AuthType_DEFAULT common.AuthorizationType
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetAuthType() (v common.AuthorizationType) {
 | |
| 	if !p.IsSetAuthType() {
 | |
| 		return RegisterPluginMetaRequest_AuthType_DEFAULT
 | |
| 	}
 | |
| 	return *p.AuthType
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_Location_DEFAULT common.AuthorizationServiceLocation
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetLocation() (v common.AuthorizationServiceLocation) {
 | |
| 	if !p.IsSetLocation() {
 | |
| 		return RegisterPluginMetaRequest_Location_DEFAULT
 | |
| 	}
 | |
| 	return *p.Location
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_Key_DEFAULT string
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetKey() (v string) {
 | |
| 	if !p.IsSetKey() {
 | |
| 		return RegisterPluginMetaRequest_Key_DEFAULT
 | |
| 	}
 | |
| 	return *p.Key
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_ServiceToken_DEFAULT string
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetServiceToken() (v string) {
 | |
| 	if !p.IsSetServiceToken() {
 | |
| 		return RegisterPluginMetaRequest_ServiceToken_DEFAULT
 | |
| 	}
 | |
| 	return *p.ServiceToken
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_OauthInfo_DEFAULT string
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetOauthInfo() (v string) {
 | |
| 	if !p.IsSetOauthInfo() {
 | |
| 		return RegisterPluginMetaRequest_OauthInfo_DEFAULT
 | |
| 	}
 | |
| 	return *p.OauthInfo
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetSpaceID() (v int64) {
 | |
| 	return p.SpaceID
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_CommonParams_DEFAULT map[common.ParameterLocation][]*common.CommonParamSchema
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetCommonParams() (v map[common.ParameterLocation][]*common.CommonParamSchema) {
 | |
| 	if !p.IsSetCommonParams() {
 | |
| 		return RegisterPluginMetaRequest_CommonParams_DEFAULT
 | |
| 	}
 | |
| 	return p.CommonParams
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_CreationMethod_DEFAULT common.CreationMethod
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetCreationMethod() (v common.CreationMethod) {
 | |
| 	if !p.IsSetCreationMethod() {
 | |
| 		return RegisterPluginMetaRequest_CreationMethod_DEFAULT
 | |
| 	}
 | |
| 	return *p.CreationMethod
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_IdeCodeRuntime_DEFAULT string
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetIdeCodeRuntime() (v string) {
 | |
| 	if !p.IsSetIdeCodeRuntime() {
 | |
| 		return RegisterPluginMetaRequest_IdeCodeRuntime_DEFAULT
 | |
| 	}
 | |
| 	return *p.IdeCodeRuntime
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_PluginType_DEFAULT common.PluginType
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetPluginType() (v common.PluginType) {
 | |
| 	if !p.IsSetPluginType() {
 | |
| 		return RegisterPluginMetaRequest_PluginType_DEFAULT
 | |
| 	}
 | |
| 	return *p.PluginType
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_ProjectID_DEFAULT int64
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetProjectID() (v int64) {
 | |
| 	if !p.IsSetProjectID() {
 | |
| 		return RegisterPluginMetaRequest_ProjectID_DEFAULT
 | |
| 	}
 | |
| 	return *p.ProjectID
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_SubAuthType_DEFAULT int32
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetSubAuthType() (v int32) {
 | |
| 	if !p.IsSetSubAuthType() {
 | |
| 		return RegisterPluginMetaRequest_SubAuthType_DEFAULT
 | |
| 	}
 | |
| 	return *p.SubAuthType
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_AuthPayload_DEFAULT string
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetAuthPayload() (v string) {
 | |
| 	if !p.IsSetAuthPayload() {
 | |
| 		return RegisterPluginMetaRequest_AuthPayload_DEFAULT
 | |
| 	}
 | |
| 	return *p.AuthPayload
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_FixedExportIP_DEFAULT bool
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetFixedExportIP() (v bool) {
 | |
| 	if !p.IsSetFixedExportIP() {
 | |
| 		return RegisterPluginMetaRequest_FixedExportIP_DEFAULT
 | |
| 	}
 | |
| 	return *p.FixedExportIP
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return RegisterPluginMetaRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_RegisterPluginMetaRequest = map[int16]string{
 | |
| 	1:   "name",
 | |
| 	2:   "desc",
 | |
| 	3:   "url",
 | |
| 	4:   "icon",
 | |
| 	5:   "auth_type",
 | |
| 	6:   "location",
 | |
| 	7:   "key",
 | |
| 	8:   "service_token",
 | |
| 	9:   "oauth_info",
 | |
| 	10:  "space_id",
 | |
| 	11:  "common_params",
 | |
| 	12:  "creation_method",
 | |
| 	13:  "ide_code_runtime",
 | |
| 	14:  "plugin_type",
 | |
| 	15:  "project_id",
 | |
| 	16:  "sub_auth_type",
 | |
| 	17:  "auth_payload",
 | |
| 	18:  "fixed_export_ip",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetURL() bool {
 | |
| 	return p.URL != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetIcon() bool {
 | |
| 	return p.Icon != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetAuthType() bool {
 | |
| 	return p.AuthType != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetLocation() bool {
 | |
| 	return p.Location != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetKey() bool {
 | |
| 	return p.Key != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetServiceToken() bool {
 | |
| 	return p.ServiceToken != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetOauthInfo() bool {
 | |
| 	return p.OauthInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetCommonParams() bool {
 | |
| 	return p.CommonParams != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetCreationMethod() bool {
 | |
| 	return p.CreationMethod != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetIdeCodeRuntime() bool {
 | |
| 	return p.IdeCodeRuntime != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetPluginType() bool {
 | |
| 	return p.PluginType != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetProjectID() bool {
 | |
| 	return p.ProjectID != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetSubAuthType() bool {
 | |
| 	return p.SubAuthType != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetAuthPayload() bool {
 | |
| 	return p.AuthPayload != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetFixedExportIP() bool {
 | |
| 	return p.FixedExportIP != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetName bool = false
 | |
| 	var issetDesc bool = false
 | |
| 	var issetIcon bool = false
 | |
| 	var issetSpaceID 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
 | |
| 				}
 | |
| 				issetName = 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
 | |
| 				}
 | |
| 				issetDesc = 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
 | |
| 				}
 | |
| 			} 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
 | |
| 				}
 | |
| 				issetIcon = true
 | |
| 			} 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.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.I64 {
 | |
| 				if err = p.ReadField10(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetSpaceID = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 11:
 | |
| 			if fieldTypeId == thrift.MAP {
 | |
| 				if err = p.ReadField11(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 12:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				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.I32 {
 | |
| 				if err = p.ReadField14(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 15:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField15(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 16:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				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.BOOL {
 | |
| 				if err = p.ReadField18(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetName {
 | |
| 		fieldId = 1
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetDesc {
 | |
| 		fieldId = 2
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetIcon {
 | |
| 		fieldId = 4
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetSpaceID {
 | |
| 		fieldId = 10
 | |
| 		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_RegisterPluginMetaRequest[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_RegisterPluginMetaRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) 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 *RegisterPluginMetaRequest) 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 *RegisterPluginMetaRequest) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.URL = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField4(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewPluginIcon()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Icon = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.AuthorizationType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.AuthorizationType(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.AuthType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.AuthorizationServiceLocation
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.AuthorizationServiceLocation(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.Location = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField7(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 *RegisterPluginMetaRequest) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ServiceToken = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.OauthInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.SpaceID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField11(iprot thrift.TProtocol) error {
 | |
| 	_, _, size, err := iprot.ReadMapBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make(map[common.ParameterLocation][]*common.CommonParamSchema, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		var _key common.ParameterLocation
 | |
| 		if v, err := iprot.ReadI32(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_key = common.ParameterLocation(v)
 | |
| 		}
 | |
| 		_, size, err := iprot.ReadListBegin()
 | |
| 		if err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		_val := make([]*common.CommonParamSchema, 0, size)
 | |
| 		values := make([]common.CommonParamSchema, size)
 | |
| 		for i := 0; i < size; i++ {
 | |
| 			_elem := &values[i]
 | |
| 			_elem.InitDefault()
 | |
| 
 | |
| 			if err := _elem.Read(iprot); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 
 | |
| 			_val = append(_val, _elem)
 | |
| 		}
 | |
| 		if err := iprot.ReadListEnd(); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field[_key] = _val
 | |
| 	}
 | |
| 	if err := iprot.ReadMapEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.CommonParams = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField12(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.CreationMethod
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.CreationMethod(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.CreationMethod = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField13(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.IdeCodeRuntime = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField14(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.PluginType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.PluginType(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.PluginType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField15(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ProjectID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField16(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.SubAuthType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField17(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.AuthPayload = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField18(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.FixedExportIP = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("RegisterPluginMetaRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *RegisterPluginMetaRequest) 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 *RegisterPluginMetaRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	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 *RegisterPluginMetaRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetURL() {
 | |
| 		if err = oprot.WriteFieldBegin("url", thrift.STRING, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.URL); 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 *RegisterPluginMetaRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("icon", thrift.STRUCT, 4); 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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAuthType() {
 | |
| 		if err = oprot.WriteFieldBegin("auth_type", thrift.I32, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.AuthType)); 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 *RegisterPluginMetaRequest) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetLocation() {
 | |
| 		if err = oprot.WriteFieldBegin("location", thrift.I32, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.Location)); 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 *RegisterPluginMetaRequest) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetKey() {
 | |
| 		if err = oprot.WriteFieldBegin("key", thrift.STRING, 7); 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 7 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetServiceToken() {
 | |
| 		if err = oprot.WriteFieldBegin("service_token", thrift.STRING, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ServiceToken); 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 *RegisterPluginMetaRequest) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetOauthInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("oauth_info", thrift.STRING, 9); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.OauthInfo); 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 *RegisterPluginMetaRequest) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("space_id", thrift.I64, 10); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.SpaceID); 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 *RegisterPluginMetaRequest) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCommonParams() {
 | |
| 		if err = oprot.WriteFieldBegin("common_params", thrift.MAP, 11); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteMapBegin(thrift.I32, thrift.LIST, len(p.CommonParams)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for k, v := range p.CommonParams {
 | |
| 			if err := oprot.WriteI32(int32(k)); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 			if err := oprot.WriteListBegin(thrift.STRUCT, len(v)); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 			for _, v := range v {
 | |
| 				if err := v.Write(oprot); err != nil {
 | |
| 					return err
 | |
| 				}
 | |
| 			}
 | |
| 			if err := oprot.WriteListEnd(); 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 11 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 11 end error: ", p), err)
 | |
| }
 | |
| func (p *RegisterPluginMetaRequest) writeField12(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCreationMethod() {
 | |
| 		if err = oprot.WriteFieldBegin("creation_method", thrift.I32, 12); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.CreationMethod)); 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 *RegisterPluginMetaRequest) writeField13(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetIdeCodeRuntime() {
 | |
| 		if err = oprot.WriteFieldBegin("ide_code_runtime", thrift.STRING, 13); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.IdeCodeRuntime); 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 *RegisterPluginMetaRequest) writeField14(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginType() {
 | |
| 		if err = oprot.WriteFieldBegin("plugin_type", thrift.I32, 14); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.PluginType)); 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 *RegisterPluginMetaRequest) writeField15(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetProjectID() {
 | |
| 		if err = oprot.WriteFieldBegin("project_id", thrift.I64, 15); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.ProjectID); 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 *RegisterPluginMetaRequest) writeField16(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSubAuthType() {
 | |
| 		if err = oprot.WriteFieldBegin("sub_auth_type", thrift.I32, 16); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.SubAuthType); 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 *RegisterPluginMetaRequest) writeField17(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAuthPayload() {
 | |
| 		if err = oprot.WriteFieldBegin("auth_payload", thrift.STRING, 17); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.AuthPayload); 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 *RegisterPluginMetaRequest) writeField18(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetFixedExportIP() {
 | |
| 		if err = oprot.WriteFieldBegin("fixed_export_ip", thrift.BOOL, 18); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.FixedExportIP); 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 *RegisterPluginMetaRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("RegisterPluginMetaRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type RegisterPluginMetaResponse struct {
 | |
| 	Code     int64          `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg      string         `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	PluginID int64          `thrift:"plugin_id,3" form:"plugin_id" json:"plugin_id,string" query:"plugin_id"`
 | |
| 	BaseResp *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewRegisterPluginMetaResponse() *RegisterPluginMetaResponse {
 | |
| 	return &RegisterPluginMetaResponse{}
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaResponse) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| var RegisterPluginMetaResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *RegisterPluginMetaResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return RegisterPluginMetaResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_RegisterPluginMetaResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "plugin_id",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaResponse) 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.I64 {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_RegisterPluginMetaResponse[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 *RegisterPluginMetaResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginMetaResponse) 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 *RegisterPluginMetaResponse) ReadField3(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 *RegisterPluginMetaResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("RegisterPluginMetaResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *RegisterPluginMetaResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *RegisterPluginMetaResponse) 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 *RegisterPluginMetaResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", thrift.I64, 3); 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 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *RegisterPluginMetaResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginMetaResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("RegisterPluginMetaResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type UpdatePluginMetaRequest struct {
 | |
| 	PluginID int64   `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required" query:"plugin_id,required"`
 | |
| 	Name     *string `thrift:"name,2,optional" form:"name" json:"name,omitempty" query:"name"`
 | |
| 	Desc     *string `thrift:"desc,3,optional" form:"desc" json:"desc,omitempty" query:"desc"`
 | |
| 	// plugin service url
 | |
| 	URL      *string                   `thrift:"url,4,optional" form:"url" json:"url,omitempty" query:"url"`
 | |
| 	Icon     *common.PluginIcon        `thrift:"icon,5,optional" form:"icon" json:"icon,omitempty" query:"icon"`
 | |
| 	AuthType *common.AuthorizationType `thrift:"auth_type,6,optional" form:"auth_type" json:"auth_type,omitempty" query:"auth_type"`
 | |
| 	// When the sub-authorization type is api/token, the token parameter position
 | |
| 	Location *common.AuthorizationServiceLocation `thrift:"location,7,optional" form:"location" json:"location,omitempty" query:"location"`
 | |
| 	// When the sub-authorization type is api/token, the token parameter key
 | |
| 	Key *string `thrift:"key,8,optional" form:"key" json:"key,omitempty" query:"key"`
 | |
| 	// When the sub-authorization type is api/token, the token parameter value
 | |
| 	ServiceToken *string `thrift:"service_token,9,optional" form:"service_token" json:"service_token,omitempty" query:"service_token"`
 | |
| 	// When the sub-authorization type is oauth, for oauth information, see GetOAuthSchema return value
 | |
| 	OauthInfo *string `thrift:"oauth_info,10,optional" form:"oauth_info" json:"oauth_info,omitempty" query:"oauth_info"`
 | |
| 	// JSON serialization
 | |
| 	CommonParams map[common.ParameterLocation][]*common.CommonParamSchema `thrift:"common_params,11,optional" form:"common_params" json:"common_params,omitempty" query:"common_params"`
 | |
| 	// ignore
 | |
| 	CreationMethod *common.CreationMethod `thrift:"creation_method,12,optional" form:"creation_method" json:"creation_method,omitempty" query:"creation_method"`
 | |
| 	// ignore
 | |
| 	EditVersion *int32             `thrift:"edit_version,13,optional" form:"edit_version" json:"edit_version,omitempty" query:"edit_version"`
 | |
| 	PluginType  *common.PluginType `thrift:"plugin_type,14,optional" form:"plugin_type" json:"plugin_type,omitempty" query:"plugin_type"`
 | |
| 	// Level 2 authorization type
 | |
| 	SubAuthType *int32 `thrift:"sub_auth_type,15,optional" form:"sub_auth_type" json:"sub_auth_type,omitempty" query:"sub_auth_type"`
 | |
| 	// ignore
 | |
| 	AuthPayload *string `thrift:"auth_payload,16,optional" form:"auth_payload" json:"auth_payload,omitempty" query:"auth_payload"`
 | |
| 	// ignore
 | |
| 	FixedExportIP *bool      `thrift:"fixed_export_ip,17,optional" form:"fixed_export_ip" json:"fixed_export_ip,omitempty" query:"fixed_export_ip"`
 | |
| 	Base          *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewUpdatePluginMetaRequest() *UpdatePluginMetaRequest {
 | |
| 	return &UpdatePluginMetaRequest{}
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_Name_DEFAULT string
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetName() (v string) {
 | |
| 	if !p.IsSetName() {
 | |
| 		return UpdatePluginMetaRequest_Name_DEFAULT
 | |
| 	}
 | |
| 	return *p.Name
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_Desc_DEFAULT string
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetDesc() (v string) {
 | |
| 	if !p.IsSetDesc() {
 | |
| 		return UpdatePluginMetaRequest_Desc_DEFAULT
 | |
| 	}
 | |
| 	return *p.Desc
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_URL_DEFAULT string
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetURL() (v string) {
 | |
| 	if !p.IsSetURL() {
 | |
| 		return UpdatePluginMetaRequest_URL_DEFAULT
 | |
| 	}
 | |
| 	return *p.URL
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_Icon_DEFAULT *common.PluginIcon
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetIcon() (v *common.PluginIcon) {
 | |
| 	if !p.IsSetIcon() {
 | |
| 		return UpdatePluginMetaRequest_Icon_DEFAULT
 | |
| 	}
 | |
| 	return p.Icon
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_AuthType_DEFAULT common.AuthorizationType
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetAuthType() (v common.AuthorizationType) {
 | |
| 	if !p.IsSetAuthType() {
 | |
| 		return UpdatePluginMetaRequest_AuthType_DEFAULT
 | |
| 	}
 | |
| 	return *p.AuthType
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_Location_DEFAULT common.AuthorizationServiceLocation
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetLocation() (v common.AuthorizationServiceLocation) {
 | |
| 	if !p.IsSetLocation() {
 | |
| 		return UpdatePluginMetaRequest_Location_DEFAULT
 | |
| 	}
 | |
| 	return *p.Location
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_Key_DEFAULT string
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetKey() (v string) {
 | |
| 	if !p.IsSetKey() {
 | |
| 		return UpdatePluginMetaRequest_Key_DEFAULT
 | |
| 	}
 | |
| 	return *p.Key
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_ServiceToken_DEFAULT string
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetServiceToken() (v string) {
 | |
| 	if !p.IsSetServiceToken() {
 | |
| 		return UpdatePluginMetaRequest_ServiceToken_DEFAULT
 | |
| 	}
 | |
| 	return *p.ServiceToken
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_OauthInfo_DEFAULT string
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetOauthInfo() (v string) {
 | |
| 	if !p.IsSetOauthInfo() {
 | |
| 		return UpdatePluginMetaRequest_OauthInfo_DEFAULT
 | |
| 	}
 | |
| 	return *p.OauthInfo
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_CommonParams_DEFAULT map[common.ParameterLocation][]*common.CommonParamSchema
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetCommonParams() (v map[common.ParameterLocation][]*common.CommonParamSchema) {
 | |
| 	if !p.IsSetCommonParams() {
 | |
| 		return UpdatePluginMetaRequest_CommonParams_DEFAULT
 | |
| 	}
 | |
| 	return p.CommonParams
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_CreationMethod_DEFAULT common.CreationMethod
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetCreationMethod() (v common.CreationMethod) {
 | |
| 	if !p.IsSetCreationMethod() {
 | |
| 		return UpdatePluginMetaRequest_CreationMethod_DEFAULT
 | |
| 	}
 | |
| 	return *p.CreationMethod
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_EditVersion_DEFAULT int32
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetEditVersion() (v int32) {
 | |
| 	if !p.IsSetEditVersion() {
 | |
| 		return UpdatePluginMetaRequest_EditVersion_DEFAULT
 | |
| 	}
 | |
| 	return *p.EditVersion
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_PluginType_DEFAULT common.PluginType
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetPluginType() (v common.PluginType) {
 | |
| 	if !p.IsSetPluginType() {
 | |
| 		return UpdatePluginMetaRequest_PluginType_DEFAULT
 | |
| 	}
 | |
| 	return *p.PluginType
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_SubAuthType_DEFAULT int32
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetSubAuthType() (v int32) {
 | |
| 	if !p.IsSetSubAuthType() {
 | |
| 		return UpdatePluginMetaRequest_SubAuthType_DEFAULT
 | |
| 	}
 | |
| 	return *p.SubAuthType
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_AuthPayload_DEFAULT string
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetAuthPayload() (v string) {
 | |
| 	if !p.IsSetAuthPayload() {
 | |
| 		return UpdatePluginMetaRequest_AuthPayload_DEFAULT
 | |
| 	}
 | |
| 	return *p.AuthPayload
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_FixedExportIP_DEFAULT bool
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetFixedExportIP() (v bool) {
 | |
| 	if !p.IsSetFixedExportIP() {
 | |
| 		return UpdatePluginMetaRequest_FixedExportIP_DEFAULT
 | |
| 	}
 | |
| 	return *p.FixedExportIP
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return UpdatePluginMetaRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_UpdatePluginMetaRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	2:   "name",
 | |
| 	3:   "desc",
 | |
| 	4:   "url",
 | |
| 	5:   "icon",
 | |
| 	6:   "auth_type",
 | |
| 	7:   "location",
 | |
| 	8:   "key",
 | |
| 	9:   "service_token",
 | |
| 	10:  "oauth_info",
 | |
| 	11:  "common_params",
 | |
| 	12:  "creation_method",
 | |
| 	13:  "edit_version",
 | |
| 	14:  "plugin_type",
 | |
| 	15:  "sub_auth_type",
 | |
| 	16:  "auth_payload",
 | |
| 	17:  "fixed_export_ip",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetName() bool {
 | |
| 	return p.Name != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetDesc() bool {
 | |
| 	return p.Desc != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetURL() bool {
 | |
| 	return p.URL != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetIcon() bool {
 | |
| 	return p.Icon != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetAuthType() bool {
 | |
| 	return p.AuthType != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetLocation() bool {
 | |
| 	return p.Location != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetKey() bool {
 | |
| 	return p.Key != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetServiceToken() bool {
 | |
| 	return p.ServiceToken != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetOauthInfo() bool {
 | |
| 	return p.OauthInfo != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetCommonParams() bool {
 | |
| 	return p.CommonParams != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetCreationMethod() bool {
 | |
| 	return p.CreationMethod != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetEditVersion() bool {
 | |
| 	return p.EditVersion != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetPluginType() bool {
 | |
| 	return p.PluginType != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetSubAuthType() bool {
 | |
| 	return p.SubAuthType != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetAuthPayload() bool {
 | |
| 	return p.AuthPayload != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetFixedExportIP() bool {
 | |
| 	return p.FixedExportIP != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = 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
 | |
| 				}
 | |
| 			} 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.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
 | |
| 			}
 | |
| 		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.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.MAP {
 | |
| 				if err = p.ReadField11(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 12:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField12(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 13:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField13(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 14:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField14(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 15:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				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.BOOL {
 | |
| 				if err = p.ReadField17(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		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_UpdatePluginMetaRequest[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_UpdatePluginMetaRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) 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 *UpdatePluginMetaRequest) 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 *UpdatePluginMetaRequest) ReadField3(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 *UpdatePluginMetaRequest) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.URL = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) ReadField5(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewPluginIcon()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Icon = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.AuthorizationType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.AuthorizationType(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.AuthType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.AuthorizationServiceLocation
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.AuthorizationServiceLocation(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.Location = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) ReadField8(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 *UpdatePluginMetaRequest) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ServiceToken = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.OauthInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) ReadField11(iprot thrift.TProtocol) error {
 | |
| 	_, _, size, err := iprot.ReadMapBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make(map[common.ParameterLocation][]*common.CommonParamSchema, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 		var _key common.ParameterLocation
 | |
| 		if v, err := iprot.ReadI32(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_key = common.ParameterLocation(v)
 | |
| 		}
 | |
| 		_, size, err := iprot.ReadListBegin()
 | |
| 		if err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		_val := make([]*common.CommonParamSchema, 0, size)
 | |
| 		values := make([]common.CommonParamSchema, size)
 | |
| 		for i := 0; i < size; i++ {
 | |
| 			_elem := &values[i]
 | |
| 			_elem.InitDefault()
 | |
| 
 | |
| 			if err := _elem.Read(iprot); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 
 | |
| 			_val = append(_val, _elem)
 | |
| 		}
 | |
| 		if err := iprot.ReadListEnd(); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 
 | |
| 		_field[_key] = _val
 | |
| 	}
 | |
| 	if err := iprot.ReadMapEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.CommonParams = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) ReadField12(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.CreationMethod
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.CreationMethod(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.CreationMethod = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) ReadField13(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.EditVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) ReadField14(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.PluginType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.PluginType(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.PluginType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) ReadField15(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.SubAuthType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) ReadField16(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.AuthPayload = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) ReadField17(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.FixedExportIP = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdatePluginMetaRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *UpdatePluginMetaRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *UpdatePluginMetaRequest) 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 *UpdatePluginMetaRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDesc() {
 | |
| 		if err = oprot.WriteFieldBegin("desc", thrift.STRING, 3); 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 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetURL() {
 | |
| 		if err = oprot.WriteFieldBegin("url", thrift.STRING, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.URL); 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 *UpdatePluginMetaRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetIcon() {
 | |
| 		if err = oprot.WriteFieldBegin("icon", thrift.STRUCT, 5); 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 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAuthType() {
 | |
| 		if err = oprot.WriteFieldBegin("auth_type", thrift.I32, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.AuthType)); 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 *UpdatePluginMetaRequest) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetLocation() {
 | |
| 		if err = oprot.WriteFieldBegin("location", thrift.I32, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.Location)); 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 *UpdatePluginMetaRequest) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetKey() {
 | |
| 		if err = oprot.WriteFieldBegin("key", thrift.STRING, 8); 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 8 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetServiceToken() {
 | |
| 		if err = oprot.WriteFieldBegin("service_token", thrift.STRING, 9); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ServiceToken); 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 *UpdatePluginMetaRequest) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetOauthInfo() {
 | |
| 		if err = oprot.WriteFieldBegin("oauth_info", thrift.STRING, 10); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.OauthInfo); 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 *UpdatePluginMetaRequest) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCommonParams() {
 | |
| 		if err = oprot.WriteFieldBegin("common_params", thrift.MAP, 11); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteMapBegin(thrift.I32, thrift.LIST, len(p.CommonParams)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for k, v := range p.CommonParams {
 | |
| 			if err := oprot.WriteI32(int32(k)); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 			if err := oprot.WriteListBegin(thrift.STRUCT, len(v)); err != nil {
 | |
| 				return err
 | |
| 			}
 | |
| 			for _, v := range v {
 | |
| 				if err := v.Write(oprot); err != nil {
 | |
| 					return err
 | |
| 				}
 | |
| 			}
 | |
| 			if err := oprot.WriteListEnd(); 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 11 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 11 end error: ", p), err)
 | |
| }
 | |
| func (p *UpdatePluginMetaRequest) writeField12(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetCreationMethod() {
 | |
| 		if err = oprot.WriteFieldBegin("creation_method", thrift.I32, 12); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.CreationMethod)); 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 *UpdatePluginMetaRequest) writeField13(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetEditVersion() {
 | |
| 		if err = oprot.WriteFieldBegin("edit_version", thrift.I32, 13); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.EditVersion); 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 *UpdatePluginMetaRequest) writeField14(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginType() {
 | |
| 		if err = oprot.WriteFieldBegin("plugin_type", thrift.I32, 14); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.PluginType)); 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 *UpdatePluginMetaRequest) writeField15(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSubAuthType() {
 | |
| 		if err = oprot.WriteFieldBegin("sub_auth_type", thrift.I32, 15); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.SubAuthType); 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 *UpdatePluginMetaRequest) writeField16(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAuthPayload() {
 | |
| 		if err = oprot.WriteFieldBegin("auth_payload", thrift.STRING, 16); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.AuthPayload); 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 *UpdatePluginMetaRequest) writeField17(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetFixedExportIP() {
 | |
| 		if err = oprot.WriteFieldBegin("fixed_export_ip", thrift.BOOL, 17); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.FixedExportIP); 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 *UpdatePluginMetaRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("UpdatePluginMetaRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type UpdatePluginMetaResponse struct {
 | |
| 	Code        int64          `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg         string         `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	EditVersion int32          `thrift:"edit_version,3" form:"edit_version" json:"edit_version" query:"edit_version"`
 | |
| 	BaseResp    *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewUpdatePluginMetaResponse() *UpdatePluginMetaResponse {
 | |
| 	return &UpdatePluginMetaResponse{}
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaResponse) GetEditVersion() (v int32) {
 | |
| 	return p.EditVersion
 | |
| }
 | |
| 
 | |
| var UpdatePluginMetaResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *UpdatePluginMetaResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return UpdatePluginMetaResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_UpdatePluginMetaResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "edit_version",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaResponse) 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.I32 {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_UpdatePluginMetaResponse[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 *UpdatePluginMetaResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaResponse) 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 *UpdatePluginMetaResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.EditVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdatePluginMetaResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdatePluginMetaResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *UpdatePluginMetaResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *UpdatePluginMetaResponse) 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 *UpdatePluginMetaResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("edit_version", thrift.I32, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(p.EditVersion); 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 *UpdatePluginMetaResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *UpdatePluginMetaResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("UpdatePluginMetaResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PublishPluginRequest struct {
 | |
| 	PluginID int64 `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required" query:"plugin_id,required"`
 | |
| 	// Privacy Statement Status
 | |
| 	PrivacyStatus bool `thrift:"privacy_status,2" form:"privacy_status" json:"privacy_status" query:"privacy_status"`
 | |
| 	// Privacy Statement Content
 | |
| 	PrivacyInfo string     `thrift:"privacy_info,3" form:"privacy_info" json:"privacy_info" query:"privacy_info"`
 | |
| 	VersionName string     `thrift:"version_name,4" form:"version_name" json:"version_name" query:"version_name"`
 | |
| 	VersionDesc string     `thrift:"version_desc,5" form:"version_desc" json:"version_desc" query:"version_desc"`
 | |
| 	Base        *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewPublishPluginRequest() *PublishPluginRequest {
 | |
| 	return &PublishPluginRequest{}
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginRequest) GetPrivacyStatus() (v bool) {
 | |
| 	return p.PrivacyStatus
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginRequest) GetPrivacyInfo() (v string) {
 | |
| 	return p.PrivacyInfo
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginRequest) GetVersionName() (v string) {
 | |
| 	return p.VersionName
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginRequest) GetVersionDesc() (v string) {
 | |
| 	return p.VersionDesc
 | |
| }
 | |
| 
 | |
| var PublishPluginRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *PublishPluginRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return PublishPluginRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PublishPluginRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	2:   "privacy_status",
 | |
| 	3:   "privacy_info",
 | |
| 	4:   "version_name",
 | |
| 	5:   "version_desc",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = true
 | |
| 			} 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.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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		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_PublishPluginRequest[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_PublishPluginRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginRequest) 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 *PublishPluginRequest) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.PrivacyStatus = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *PublishPluginRequest) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.PrivacyInfo = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *PublishPluginRequest) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.VersionName = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *PublishPluginRequest) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.VersionDesc = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *PublishPluginRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("PublishPluginRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *PublishPluginRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *PublishPluginRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("privacy_status", thrift.BOOL, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(p.PrivacyStatus); 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 *PublishPluginRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("privacy_info", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.PrivacyInfo); 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 *PublishPluginRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("version_name", thrift.STRING, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.VersionName); 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 *PublishPluginRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("version_desc", thrift.STRING, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.VersionDesc); 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 *PublishPluginRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PublishPluginRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PublishPluginResponse struct {
 | |
| 	Code      int64          `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg       string         `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	VersionTs string         `thrift:"version_ts,3" form:"version_ts" json:"version_ts" query:"version_ts"`
 | |
| 	BaseResp  *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewPublishPluginResponse() *PublishPluginResponse {
 | |
| 	return &PublishPluginResponse{}
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginResponse) GetVersionTs() (v string) {
 | |
| 	return p.VersionTs
 | |
| }
 | |
| 
 | |
| var PublishPluginResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *PublishPluginResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return PublishPluginResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PublishPluginResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "version_ts",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginResponse) 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_PublishPluginResponse[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 *PublishPluginResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *PublishPluginResponse) 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 *PublishPluginResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.VersionTs = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *PublishPluginResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("PublishPluginResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *PublishPluginResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *PublishPluginResponse) 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 *PublishPluginResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("version_ts", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.VersionTs); 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 *PublishPluginResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PublishPluginResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PublishPluginResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| // Bot reference plugin
 | |
| type GetBotDefaultParamsRequest struct {
 | |
| 	SpaceID                int64                      `thrift:"space_id,1" form:"space_id" json:"space_id,string" query:"space_id"`
 | |
| 	BotID                  int64                      `thrift:"bot_id,2" form:"bot_id" json:"bot_id,string" query:"bot_id"`
 | |
| 	DevID                  string                     `thrift:"dev_id,3" form:"dev_id" json:"dev_id" query:"dev_id"`
 | |
| 	PluginID               int64                      `thrift:"plugin_id,4" form:"plugin_id" json:"plugin_id,string" query:"plugin_id"`
 | |
| 	APIName                string                     `thrift:"api_name,5" form:"api_name" json:"api_name" query:"api_name"`
 | |
| 	PluginReferrerID       string                     `thrift:"plugin_referrer_id,6" form:"plugin_referrer_id" json:"plugin_referrer_id" query:"plugin_referrer_id"`
 | |
| 	PluginReferrerScene    common.PluginReferrerScene `thrift:"plugin_referrer_scene,7" form:"plugin_referrer_scene" json:"plugin_referrer_scene" query:"plugin_referrer_scene"`
 | |
| 	PluginIsDebug          bool                       `thrift:"plugin_is_debug,8" form:"plugin_is_debug" json:"plugin_is_debug" query:"plugin_is_debug"`
 | |
| 	WorkflowID             string                     `thrift:"workflow_id,9" form:"workflow_id" json:"workflow_id" query:"workflow_id"`
 | |
| 	PluginPublishVersionTs *string                    `thrift:"plugin_publish_version_ts,10,optional" form:"plugin_publish_version_ts" json:"plugin_publish_version_ts,omitempty" query:"plugin_publish_version_ts"`
 | |
| 	Base                   *base.Base                 `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewGetBotDefaultParamsRequest() *GetBotDefaultParamsRequest {
 | |
| 	return &GetBotDefaultParamsRequest{}
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) GetSpaceID() (v int64) {
 | |
| 	return p.SpaceID
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) GetBotID() (v int64) {
 | |
| 	return p.BotID
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) GetDevID() (v string) {
 | |
| 	return p.DevID
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) GetAPIName() (v string) {
 | |
| 	return p.APIName
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) GetPluginReferrerID() (v string) {
 | |
| 	return p.PluginReferrerID
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) GetPluginReferrerScene() (v common.PluginReferrerScene) {
 | |
| 	return p.PluginReferrerScene
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) GetPluginIsDebug() (v bool) {
 | |
| 	return p.PluginIsDebug
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) GetWorkflowID() (v string) {
 | |
| 	return p.WorkflowID
 | |
| }
 | |
| 
 | |
| var GetBotDefaultParamsRequest_PluginPublishVersionTs_DEFAULT string
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) GetPluginPublishVersionTs() (v string) {
 | |
| 	if !p.IsSetPluginPublishVersionTs() {
 | |
| 		return GetBotDefaultParamsRequest_PluginPublishVersionTs_DEFAULT
 | |
| 	}
 | |
| 	return *p.PluginPublishVersionTs
 | |
| }
 | |
| 
 | |
| var GetBotDefaultParamsRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return GetBotDefaultParamsRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetBotDefaultParamsRequest = map[int16]string{
 | |
| 	1:   "space_id",
 | |
| 	2:   "bot_id",
 | |
| 	3:   "dev_id",
 | |
| 	4:   "plugin_id",
 | |
| 	5:   "api_name",
 | |
| 	6:   "plugin_referrer_id",
 | |
| 	7:   "plugin_referrer_scene",
 | |
| 	8:   "plugin_is_debug",
 | |
| 	9:   "workflow_id",
 | |
| 	10:  "plugin_publish_version_ts",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) IsSetPluginPublishVersionTs() bool {
 | |
| 	return p.PluginPublishVersionTs != nil
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) 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 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.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.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.BOOL {
 | |
| 				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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_GetBotDefaultParamsRequest[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 *GetBotDefaultParamsRequest) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.SpaceID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetBotDefaultParamsRequest) ReadField2(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 *GetBotDefaultParamsRequest) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.DevID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetBotDefaultParamsRequest) ReadField4(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 *GetBotDefaultParamsRequest) ReadField5(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 *GetBotDefaultParamsRequest) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.PluginReferrerID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetBotDefaultParamsRequest) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field common.PluginReferrerScene
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = common.PluginReferrerScene(v)
 | |
| 	}
 | |
| 	p.PluginReferrerScene = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetBotDefaultParamsRequest) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.PluginIsDebug = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetBotDefaultParamsRequest) ReadField9(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 *GetBotDefaultParamsRequest) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PluginPublishVersionTs = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetBotDefaultParamsRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetBotDefaultParamsRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetBotDefaultParamsRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("space_id", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.SpaceID); 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 *GetBotDefaultParamsRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("bot_id", thrift.I64, 2); 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 2 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
 | |
| }
 | |
| func (p *GetBotDefaultParamsRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("dev_id", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.DevID); 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 *GetBotDefaultParamsRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", thrift.I64, 4); 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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *GetBotDefaultParamsRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("api_name", thrift.STRING, 5); 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 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *GetBotDefaultParamsRequest) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_referrer_id", thrift.STRING, 6); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.PluginReferrerID); 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 *GetBotDefaultParamsRequest) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_referrer_scene", thrift.I32, 7); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.PluginReferrerScene)); 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 *GetBotDefaultParamsRequest) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_is_debug", thrift.BOOL, 8); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(p.PluginIsDebug); 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 *GetBotDefaultParamsRequest) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("workflow_id", thrift.STRING, 9); 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 9 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
 | |
| }
 | |
| func (p *GetBotDefaultParamsRequest) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginPublishVersionTs() {
 | |
| 		if err = oprot.WriteFieldBegin("plugin_publish_version_ts", thrift.STRING, 10); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.PluginPublishVersionTs); 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 *GetBotDefaultParamsRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetBotDefaultParamsRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetBotDefaultParamsResponse struct {
 | |
| 	Code           int64                  `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg            string                 `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	RequestParams  []*common.APIParameter `thrift:"request_params,3" form:"request_params" json:"request_params" query:"request_params"`
 | |
| 	ResponseParams []*common.APIParameter `thrift:"response_params,4" form:"response_params" json:"response_params" query:"response_params"`
 | |
| 	ResponseStyle  *common.ResponseStyle  `thrift:"response_style,5" form:"response_style" json:"response_style" query:"response_style"`
 | |
| 	BaseResp       *base.BaseResp         `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewGetBotDefaultParamsResponse() *GetBotDefaultParamsResponse {
 | |
| 	return &GetBotDefaultParamsResponse{}
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsResponse) GetRequestParams() (v []*common.APIParameter) {
 | |
| 	return p.RequestParams
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsResponse) GetResponseParams() (v []*common.APIParameter) {
 | |
| 	return p.ResponseParams
 | |
| }
 | |
| 
 | |
| var GetBotDefaultParamsResponse_ResponseStyle_DEFAULT *common.ResponseStyle
 | |
| 
 | |
| func (p *GetBotDefaultParamsResponse) GetResponseStyle() (v *common.ResponseStyle) {
 | |
| 	if !p.IsSetResponseStyle() {
 | |
| 		return GetBotDefaultParamsResponse_ResponseStyle_DEFAULT
 | |
| 	}
 | |
| 	return p.ResponseStyle
 | |
| }
 | |
| 
 | |
| var GetBotDefaultParamsResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *GetBotDefaultParamsResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return GetBotDefaultParamsResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetBotDefaultParamsResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "request_params",
 | |
| 	4:   "response_params",
 | |
| 	5:   "response_style",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsResponse) IsSetResponseStyle() bool {
 | |
| 	return p.ResponseStyle != nil
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsResponse) 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.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.STRUCT {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_GetBotDefaultParamsResponse[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 *GetBotDefaultParamsResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetBotDefaultParamsResponse) 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 *GetBotDefaultParamsResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.APIParameter, 0, size)
 | |
| 	values := make([]common.APIParameter, 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.RequestParams = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetBotDefaultParamsResponse) ReadField4(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.APIParameter, 0, size)
 | |
| 	values := make([]common.APIParameter, 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.ResponseParams = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetBotDefaultParamsResponse) ReadField5(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewResponseStyle()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.ResponseStyle = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetBotDefaultParamsResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetBotDefaultParamsResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetBotDefaultParamsResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *GetBotDefaultParamsResponse) 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 *GetBotDefaultParamsResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request_params", thrift.LIST, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.RequestParams)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.RequestParams {
 | |
| 		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 *GetBotDefaultParamsResponse) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("response_params", thrift.LIST, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ResponseParams)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.ResponseParams {
 | |
| 		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 *GetBotDefaultParamsResponse) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("response_style", thrift.STRUCT, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.ResponseStyle.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 *GetBotDefaultParamsResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetBotDefaultParamsResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetBotDefaultParamsResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type UpdateBotDefaultParamsRequest struct {
 | |
| 	SpaceID             int64                      `thrift:"space_id,1" form:"space_id" json:"space_id,string" query:"space_id"`
 | |
| 	BotID               int64                      `thrift:"bot_id,2" form:"bot_id" json:"bot_id,string" query:"bot_id"`
 | |
| 	DevID               string                     `thrift:"dev_id,3" form:"dev_id" json:"dev_id" query:"dev_id"`
 | |
| 	PluginID            int64                      `thrift:"plugin_id,4" form:"plugin_id" json:"plugin_id,string" query:"plugin_id"`
 | |
| 	APIName             string                     `thrift:"api_name,5" form:"api_name" json:"api_name" query:"api_name"`
 | |
| 	RequestParams       []*common.APIParameter     `thrift:"request_params,6" form:"request_params" json:"request_params" query:"request_params"`
 | |
| 	ResponseParams      []*common.APIParameter     `thrift:"response_params,7" form:"response_params" json:"response_params" query:"response_params"`
 | |
| 	PluginReferrerID    string                     `thrift:"plugin_referrer_id,8" form:"plugin_referrer_id" json:"plugin_referrer_id" query:"plugin_referrer_id"`
 | |
| 	PluginReferrerScene common.PluginReferrerScene `thrift:"plugin_referrer_scene,9" form:"plugin_referrer_scene" json:"plugin_referrer_scene" query:"plugin_referrer_scene"`
 | |
| 	ResponseStyle       *common.ResponseStyle      `thrift:"response_style,10" form:"response_style" json:"response_style" query:"response_style"`
 | |
| 	WorkflowID          string                     `thrift:"workflow_id,11" form:"workflow_id" json:"workflow_id" query:"workflow_id"`
 | |
| 	Base                *base.Base                 `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewUpdateBotDefaultParamsRequest() *UpdateBotDefaultParamsRequest {
 | |
| 	return &UpdateBotDefaultParamsRequest{}
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) GetSpaceID() (v int64) {
 | |
| 	return p.SpaceID
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) GetBotID() (v int64) {
 | |
| 	return p.BotID
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) GetDevID() (v string) {
 | |
| 	return p.DevID
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) GetAPIName() (v string) {
 | |
| 	return p.APIName
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) GetRequestParams() (v []*common.APIParameter) {
 | |
| 	return p.RequestParams
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) GetResponseParams() (v []*common.APIParameter) {
 | |
| 	return p.ResponseParams
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) GetPluginReferrerID() (v string) {
 | |
| 	return p.PluginReferrerID
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) GetPluginReferrerScene() (v common.PluginReferrerScene) {
 | |
| 	return p.PluginReferrerScene
 | |
| }
 | |
| 
 | |
| var UpdateBotDefaultParamsRequest_ResponseStyle_DEFAULT *common.ResponseStyle
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) GetResponseStyle() (v *common.ResponseStyle) {
 | |
| 	if !p.IsSetResponseStyle() {
 | |
| 		return UpdateBotDefaultParamsRequest_ResponseStyle_DEFAULT
 | |
| 	}
 | |
| 	return p.ResponseStyle
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) GetWorkflowID() (v string) {
 | |
| 	return p.WorkflowID
 | |
| }
 | |
| 
 | |
| var UpdateBotDefaultParamsRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return UpdateBotDefaultParamsRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_UpdateBotDefaultParamsRequest = map[int16]string{
 | |
| 	1:   "space_id",
 | |
| 	2:   "bot_id",
 | |
| 	3:   "dev_id",
 | |
| 	4:   "plugin_id",
 | |
| 	5:   "api_name",
 | |
| 	6:   "request_params",
 | |
| 	7:   "response_params",
 | |
| 	8:   "plugin_referrer_id",
 | |
| 	9:   "plugin_referrer_scene",
 | |
| 	10:  "response_style",
 | |
| 	11:  "workflow_id",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) IsSetResponseStyle() bool {
 | |
| 	return p.ResponseStyle != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) 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 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.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.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
 | |
| 			}
 | |
| 		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
 | |
| 			}
 | |
| 		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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_UpdateBotDefaultParamsRequest[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 *UpdateBotDefaultParamsRequest) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.SpaceID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateBotDefaultParamsRequest) ReadField2(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 *UpdateBotDefaultParamsRequest) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.DevID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateBotDefaultParamsRequest) ReadField4(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 *UpdateBotDefaultParamsRequest) ReadField5(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 *UpdateBotDefaultParamsRequest) ReadField6(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.APIParameter, 0, size)
 | |
| 	values := make([]common.APIParameter, 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.RequestParams = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateBotDefaultParamsRequest) ReadField7(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.APIParameter, 0, size)
 | |
| 	values := make([]common.APIParameter, 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.ResponseParams = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateBotDefaultParamsRequest) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.PluginReferrerID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateBotDefaultParamsRequest) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field common.PluginReferrerScene
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = common.PluginReferrerScene(v)
 | |
| 	}
 | |
| 	p.PluginReferrerScene = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateBotDefaultParamsRequest) ReadField10(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewResponseStyle()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.ResponseStyle = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateBotDefaultParamsRequest) ReadField11(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 *UpdateBotDefaultParamsRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdateBotDefaultParamsRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *UpdateBotDefaultParamsRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("space_id", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.SpaceID); 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 *UpdateBotDefaultParamsRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("bot_id", thrift.I64, 2); 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 2 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
 | |
| }
 | |
| func (p *UpdateBotDefaultParamsRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("dev_id", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.DevID); 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 *UpdateBotDefaultParamsRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", thrift.I64, 4); 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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *UpdateBotDefaultParamsRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("api_name", thrift.STRING, 5); 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 5 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
 | |
| }
 | |
| func (p *UpdateBotDefaultParamsRequest) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request_params", thrift.LIST, 6); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.RequestParams)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.RequestParams {
 | |
| 		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 *UpdateBotDefaultParamsRequest) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("response_params", thrift.LIST, 7); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ResponseParams)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.ResponseParams {
 | |
| 		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 *UpdateBotDefaultParamsRequest) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_referrer_id", thrift.STRING, 8); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.PluginReferrerID); 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 *UpdateBotDefaultParamsRequest) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_referrer_scene", thrift.I32, 9); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.PluginReferrerScene)); 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 *UpdateBotDefaultParamsRequest) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("response_style", thrift.STRUCT, 10); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.ResponseStyle.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 *UpdateBotDefaultParamsRequest) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("workflow_id", thrift.STRING, 11); 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 11 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 11 end error: ", p), err)
 | |
| }
 | |
| func (p *UpdateBotDefaultParamsRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("UpdateBotDefaultParamsRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type UpdateBotDefaultParamsResponse struct {
 | |
| 	Code     int64          `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg      string         `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	BaseResp *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewUpdateBotDefaultParamsResponse() *UpdateBotDefaultParamsResponse {
 | |
| 	return &UpdateBotDefaultParamsResponse{}
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| var UpdateBotDefaultParamsResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return UpdateBotDefaultParamsResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_UpdateBotDefaultParamsResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsResponse) 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_UpdateBotDefaultParamsResponse[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 *UpdateBotDefaultParamsResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateBotDefaultParamsResponse) 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 *UpdateBotDefaultParamsResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdateBotDefaultParamsResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *UpdateBotDefaultParamsResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *UpdateBotDefaultParamsResponse) 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 *UpdateBotDefaultParamsResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *UpdateBotDefaultParamsResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("UpdateBotDefaultParamsResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type DeleteBotDefaultParamsRequest struct {
 | |
| 	BotID    int64  `thrift:"bot_id,1" form:"bot_id" json:"bot_id,string" query:"bot_id"`
 | |
| 	DevID    string `thrift:"dev_id,2" form:"dev_id" json:"dev_id" query:"dev_id"`
 | |
| 	PluginID int64  `thrift:"plugin_id,3" form:"plugin_id" json:"plugin_id,string" query:"plugin_id"`
 | |
| 	APIName  string `thrift:"api_name,4" form:"api_name" json:"api_name" query:"api_name"`
 | |
| 	// Bot removal tool when: DeleteBot = false, APIName to set
 | |
| 	// Delete bot: DeleteBot = true, APIName is empty
 | |
| 	DeleteBot           bool                       `thrift:"delete_bot,5" form:"delete_bot" json:"delete_bot" query:"delete_bot"`
 | |
| 	SpaceID             int64                      `thrift:"space_id,6" form:"space_id" json:"space_id,string" query:"space_id"`
 | |
| 	PluginReferrerID    string                     `thrift:"plugin_referrer_id,7" form:"plugin_referrer_id" json:"plugin_referrer_id" query:"plugin_referrer_id"`
 | |
| 	PluginReferrerScene common.PluginReferrerScene `thrift:"plugin_referrer_scene,8" form:"plugin_referrer_scene" json:"plugin_referrer_scene" query:"plugin_referrer_scene"`
 | |
| 	WorkflowID          string                     `thrift:"workflow_id,9" form:"workflow_id" json:"workflow_id" query:"workflow_id"`
 | |
| 	APIID               int64                      `thrift:"api_id,10" form:"api_id" json:"api_id,string" query:"api_id"`
 | |
| 	Base                *base.Base                 `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewDeleteBotDefaultParamsRequest() *DeleteBotDefaultParamsRequest {
 | |
| 	return &DeleteBotDefaultParamsRequest{}
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) GetBotID() (v int64) {
 | |
| 	return p.BotID
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) GetDevID() (v string) {
 | |
| 	return p.DevID
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) GetAPIName() (v string) {
 | |
| 	return p.APIName
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) GetDeleteBot() (v bool) {
 | |
| 	return p.DeleteBot
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) GetSpaceID() (v int64) {
 | |
| 	return p.SpaceID
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) GetPluginReferrerID() (v string) {
 | |
| 	return p.PluginReferrerID
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) GetPluginReferrerScene() (v common.PluginReferrerScene) {
 | |
| 	return p.PluginReferrerScene
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) GetWorkflowID() (v string) {
 | |
| 	return p.WorkflowID
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) GetAPIID() (v int64) {
 | |
| 	return p.APIID
 | |
| }
 | |
| 
 | |
| var DeleteBotDefaultParamsRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return DeleteBotDefaultParamsRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_DeleteBotDefaultParamsRequest = map[int16]string{
 | |
| 	1:   "bot_id",
 | |
| 	2:   "dev_id",
 | |
| 	3:   "plugin_id",
 | |
| 	4:   "api_name",
 | |
| 	5:   "delete_bot",
 | |
| 	6:   "space_id",
 | |
| 	7:   "plugin_referrer_id",
 | |
| 	8:   "plugin_referrer_scene",
 | |
| 	9:   "workflow_id",
 | |
| 	10:  "api_id",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) 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.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.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.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.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.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.I64 {
 | |
| 				if err = p.ReadField10(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_DeleteBotDefaultParamsRequest[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 *DeleteBotDefaultParamsRequest) 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 *DeleteBotDefaultParamsRequest) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.DevID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DeleteBotDefaultParamsRequest) ReadField3(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 *DeleteBotDefaultParamsRequest) ReadField4(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 *DeleteBotDefaultParamsRequest) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.DeleteBot = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DeleteBotDefaultParamsRequest) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.SpaceID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DeleteBotDefaultParamsRequest) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.PluginReferrerID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DeleteBotDefaultParamsRequest) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field common.PluginReferrerScene
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = common.PluginReferrerScene(v)
 | |
| 	}
 | |
| 	p.PluginReferrerScene = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DeleteBotDefaultParamsRequest) ReadField9(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 *DeleteBotDefaultParamsRequest) ReadField10(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 *DeleteBotDefaultParamsRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DeleteBotDefaultParamsRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *DeleteBotDefaultParamsRequest) 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 *DeleteBotDefaultParamsRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("dev_id", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.DevID); 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 *DeleteBotDefaultParamsRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", thrift.I64, 3); 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 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *DeleteBotDefaultParamsRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("api_name", thrift.STRING, 4); 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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *DeleteBotDefaultParamsRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("delete_bot", thrift.BOOL, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(p.DeleteBot); 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 *DeleteBotDefaultParamsRequest) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("space_id", thrift.I64, 6); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.SpaceID); 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 *DeleteBotDefaultParamsRequest) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_referrer_id", thrift.STRING, 7); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.PluginReferrerID); 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 *DeleteBotDefaultParamsRequest) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_referrer_scene", thrift.I32, 8); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.PluginReferrerScene)); 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 *DeleteBotDefaultParamsRequest) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("workflow_id", thrift.STRING, 9); 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 9 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
 | |
| }
 | |
| func (p *DeleteBotDefaultParamsRequest) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("api_id", thrift.I64, 10); 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 10 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 10 end error: ", p), err)
 | |
| }
 | |
| func (p *DeleteBotDefaultParamsRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("DeleteBotDefaultParamsRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type DeleteBotDefaultParamsResponse struct {
 | |
| 	BaseResp *base.BaseResp `thrift:"BaseResp,255" form:"BaseResp" json:"BaseResp" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewDeleteBotDefaultParamsResponse() *DeleteBotDefaultParamsResponse {
 | |
| 	return &DeleteBotDefaultParamsResponse{}
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| var DeleteBotDefaultParamsResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return DeleteBotDefaultParamsResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_DeleteBotDefaultParamsResponse = map[int16]string{
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsResponse) 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_DeleteBotDefaultParamsResponse[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 *DeleteBotDefaultParamsResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DeleteBotDefaultParamsResponse"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *DeleteBotDefaultParamsResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *DeleteBotDefaultParamsResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("DeleteBotDefaultParamsResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type UpdateAPIRequest struct {
 | |
| 	PluginID int64   `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required" query:"plugin_id,required"`
 | |
| 	APIID    int64   `thrift:"api_id,2,required" form:"api_id,required" json:"api_id,string,required" query:"api_id,required"`
 | |
| 	Name     *string `thrift:"name,3,optional" form:"name" json:"name,omitempty" query:"name"`
 | |
| 	Desc     *string `thrift:"desc,4,optional" form:"desc" json:"desc,omitempty" query:"desc"`
 | |
| 	// http subURL of tool
 | |
| 	Path *string `thrift:"path,5,optional" form:"path" json:"path,omitempty" query:"path"`
 | |
| 	// http method of tool
 | |
| 	Method *common.APIMethod `thrift:"method,6,optional" form:"method" json:"method,omitempty" query:"method"`
 | |
| 	// request parameters of tool
 | |
| 	RequestParams []*common.APIParameter `thrift:"request_params,7,optional" form:"request_params" json:"request_params,omitempty" query:"request_params"`
 | |
| 	// response parameters of tool
 | |
| 	ResponseParams []*common.APIParameter `thrift:"response_params,8,optional" form:"response_params" json:"response_params,omitempty" query:"response_params"`
 | |
| 	// whether disable tool
 | |
| 	Disabled *bool `thrift:"disabled,9,optional" form:"disabled" json:"disabled,omitempty" query:"disabled"`
 | |
| 	// ignore
 | |
| 	APIExtend *common.APIExtend `thrift:"api_extend,10,optional" form:"api_extend" json:"api_extend,omitempty" query:"api_extend"`
 | |
| 	// ignore
 | |
| 	EditVersion *int32 `thrift:"edit_version,11,optional" form:"edit_version" json:"edit_version,omitempty" query:"edit_version"`
 | |
| 	// whether save example
 | |
| 	SaveExample  *bool                `thrift:"save_example,12,optional" form:"save_example" json:"save_example,omitempty" query:"save_example"`
 | |
| 	DebugExample *common.DebugExample `thrift:"debug_example,13,optional" form:"debug_example" json:"debug_example,omitempty" query:"debug_example"`
 | |
| 	// ignore
 | |
| 	FunctionName *string    `thrift:"function_name,14,optional" form:"function_name" json:"function_name,omitempty" query:"function_name"`
 | |
| 	Base         *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewUpdateAPIRequest() *UpdateAPIRequest {
 | |
| 	return &UpdateAPIRequest{}
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetAPIID() (v int64) {
 | |
| 	return p.APIID
 | |
| }
 | |
| 
 | |
| var UpdateAPIRequest_Name_DEFAULT string
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetName() (v string) {
 | |
| 	if !p.IsSetName() {
 | |
| 		return UpdateAPIRequest_Name_DEFAULT
 | |
| 	}
 | |
| 	return *p.Name
 | |
| }
 | |
| 
 | |
| var UpdateAPIRequest_Desc_DEFAULT string
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetDesc() (v string) {
 | |
| 	if !p.IsSetDesc() {
 | |
| 		return UpdateAPIRequest_Desc_DEFAULT
 | |
| 	}
 | |
| 	return *p.Desc
 | |
| }
 | |
| 
 | |
| var UpdateAPIRequest_Path_DEFAULT string
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetPath() (v string) {
 | |
| 	if !p.IsSetPath() {
 | |
| 		return UpdateAPIRequest_Path_DEFAULT
 | |
| 	}
 | |
| 	return *p.Path
 | |
| }
 | |
| 
 | |
| var UpdateAPIRequest_Method_DEFAULT common.APIMethod
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetMethod() (v common.APIMethod) {
 | |
| 	if !p.IsSetMethod() {
 | |
| 		return UpdateAPIRequest_Method_DEFAULT
 | |
| 	}
 | |
| 	return *p.Method
 | |
| }
 | |
| 
 | |
| var UpdateAPIRequest_RequestParams_DEFAULT []*common.APIParameter
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetRequestParams() (v []*common.APIParameter) {
 | |
| 	if !p.IsSetRequestParams() {
 | |
| 		return UpdateAPIRequest_RequestParams_DEFAULT
 | |
| 	}
 | |
| 	return p.RequestParams
 | |
| }
 | |
| 
 | |
| var UpdateAPIRequest_ResponseParams_DEFAULT []*common.APIParameter
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetResponseParams() (v []*common.APIParameter) {
 | |
| 	if !p.IsSetResponseParams() {
 | |
| 		return UpdateAPIRequest_ResponseParams_DEFAULT
 | |
| 	}
 | |
| 	return p.ResponseParams
 | |
| }
 | |
| 
 | |
| var UpdateAPIRequest_Disabled_DEFAULT bool
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetDisabled() (v bool) {
 | |
| 	if !p.IsSetDisabled() {
 | |
| 		return UpdateAPIRequest_Disabled_DEFAULT
 | |
| 	}
 | |
| 	return *p.Disabled
 | |
| }
 | |
| 
 | |
| var UpdateAPIRequest_APIExtend_DEFAULT *common.APIExtend
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetAPIExtend() (v *common.APIExtend) {
 | |
| 	if !p.IsSetAPIExtend() {
 | |
| 		return UpdateAPIRequest_APIExtend_DEFAULT
 | |
| 	}
 | |
| 	return p.APIExtend
 | |
| }
 | |
| 
 | |
| var UpdateAPIRequest_EditVersion_DEFAULT int32
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetEditVersion() (v int32) {
 | |
| 	if !p.IsSetEditVersion() {
 | |
| 		return UpdateAPIRequest_EditVersion_DEFAULT
 | |
| 	}
 | |
| 	return *p.EditVersion
 | |
| }
 | |
| 
 | |
| var UpdateAPIRequest_SaveExample_DEFAULT bool
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetSaveExample() (v bool) {
 | |
| 	if !p.IsSetSaveExample() {
 | |
| 		return UpdateAPIRequest_SaveExample_DEFAULT
 | |
| 	}
 | |
| 	return *p.SaveExample
 | |
| }
 | |
| 
 | |
| var UpdateAPIRequest_DebugExample_DEFAULT *common.DebugExample
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetDebugExample() (v *common.DebugExample) {
 | |
| 	if !p.IsSetDebugExample() {
 | |
| 		return UpdateAPIRequest_DebugExample_DEFAULT
 | |
| 	}
 | |
| 	return p.DebugExample
 | |
| }
 | |
| 
 | |
| var UpdateAPIRequest_FunctionName_DEFAULT string
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetFunctionName() (v string) {
 | |
| 	if !p.IsSetFunctionName() {
 | |
| 		return UpdateAPIRequest_FunctionName_DEFAULT
 | |
| 	}
 | |
| 	return *p.FunctionName
 | |
| }
 | |
| 
 | |
| var UpdateAPIRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *UpdateAPIRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return UpdateAPIRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_UpdateAPIRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	2:   "api_id",
 | |
| 	3:   "name",
 | |
| 	4:   "desc",
 | |
| 	5:   "path",
 | |
| 	6:   "method",
 | |
| 	7:   "request_params",
 | |
| 	8:   "response_params",
 | |
| 	9:   "disabled",
 | |
| 	10:  "api_extend",
 | |
| 	11:  "edit_version",
 | |
| 	12:  "save_example",
 | |
| 	13:  "debug_example",
 | |
| 	14:  "function_name",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) IsSetName() bool {
 | |
| 	return p.Name != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) IsSetDesc() bool {
 | |
| 	return p.Desc != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) IsSetPath() bool {
 | |
| 	return p.Path != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) IsSetMethod() bool {
 | |
| 	return p.Method != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) IsSetRequestParams() bool {
 | |
| 	return p.RequestParams != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) IsSetResponseParams() bool {
 | |
| 	return p.ResponseParams != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) IsSetDisabled() bool {
 | |
| 	return p.Disabled != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) IsSetAPIExtend() bool {
 | |
| 	return p.APIExtend != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) IsSetEditVersion() bool {
 | |
| 	return p.EditVersion != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) IsSetSaveExample() bool {
 | |
| 	return p.SaveExample != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) IsSetDebugExample() bool {
 | |
| 	return p.DebugExample != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) IsSetFunctionName() bool {
 | |
| 	return p.FunctionName != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID bool = false
 | |
| 	var issetAPIID 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = true
 | |
| 			} 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
 | |
| 				}
 | |
| 				issetAPIID = 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
 | |
| 				}
 | |
| 			} 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.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.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.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.BOOL {
 | |
| 				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
 | |
| 			}
 | |
| 		case 11:
 | |
| 			if fieldTypeId == thrift.I32 {
 | |
| 				if err = p.ReadField11(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 12:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField12(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 13:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetAPIID {
 | |
| 		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_UpdateAPIRequest[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_UpdateAPIRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) 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 *UpdateAPIRequest) 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 *UpdateAPIRequest) ReadField3(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 *UpdateAPIRequest) ReadField4(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 *UpdateAPIRequest) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Path = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateAPIRequest) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.APIMethod
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.APIMethod(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.Method = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateAPIRequest) ReadField7(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.APIParameter, 0, size)
 | |
| 	values := make([]common.APIParameter, 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.RequestParams = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateAPIRequest) ReadField8(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.APIParameter, 0, size)
 | |
| 	values := make([]common.APIParameter, 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.ResponseParams = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateAPIRequest) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Disabled = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateAPIRequest) ReadField10(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewAPIExtend()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.APIExtend = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateAPIRequest) ReadField11(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.EditVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateAPIRequest) ReadField12(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.SaveExample = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateAPIRequest) ReadField13(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewDebugExample()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.DebugExample = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateAPIRequest) ReadField14(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.FunctionName = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateAPIRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdateAPIRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *UpdateAPIRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *UpdateAPIRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("api_id", 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 *UpdateAPIRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetName() {
 | |
| 		if err = oprot.WriteFieldBegin("name", thrift.STRING, 3); 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 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *UpdateAPIRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDesc() {
 | |
| 		if err = oprot.WriteFieldBegin("desc", thrift.STRING, 4); 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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| func (p *UpdateAPIRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPath() {
 | |
| 		if err = oprot.WriteFieldBegin("path", thrift.STRING, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Path); 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 *UpdateAPIRequest) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetMethod() {
 | |
| 		if err = oprot.WriteFieldBegin("method", thrift.I32, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.Method)); 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 *UpdateAPIRequest) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetRequestParams() {
 | |
| 		if err = oprot.WriteFieldBegin("request_params", thrift.LIST, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.RequestParams)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.RequestParams {
 | |
| 			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 *UpdateAPIRequest) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetResponseParams() {
 | |
| 		if err = oprot.WriteFieldBegin("response_params", thrift.LIST, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ResponseParams)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.ResponseParams {
 | |
| 			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 *UpdateAPIRequest) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDisabled() {
 | |
| 		if err = oprot.WriteFieldBegin("disabled", thrift.BOOL, 9); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.Disabled); 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 *UpdateAPIRequest) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAPIExtend() {
 | |
| 		if err = oprot.WriteFieldBegin("api_extend", thrift.STRUCT, 10); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.APIExtend.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 *UpdateAPIRequest) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetEditVersion() {
 | |
| 		if err = oprot.WriteFieldBegin("edit_version", thrift.I32, 11); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.EditVersion); 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 *UpdateAPIRequest) writeField12(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSaveExample() {
 | |
| 		if err = oprot.WriteFieldBegin("save_example", thrift.BOOL, 12); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.SaveExample); 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 *UpdateAPIRequest) writeField13(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDebugExample() {
 | |
| 		if err = oprot.WriteFieldBegin("debug_example", thrift.STRUCT, 13); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.DebugExample.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 13 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 13 end error: ", p), err)
 | |
| }
 | |
| func (p *UpdateAPIRequest) writeField14(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetFunctionName() {
 | |
| 		if err = oprot.WriteFieldBegin("function_name", thrift.STRING, 14); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.FunctionName); 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 *UpdateAPIRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("UpdateAPIRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type UpdateAPIResponse struct {
 | |
| 	Code        int64          `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg         string         `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	EditVersion int32          `thrift:"edit_version,3" form:"edit_version" json:"edit_version" query:"edit_version"`
 | |
| 	BaseResp    *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewUpdateAPIResponse() *UpdateAPIResponse {
 | |
| 	return &UpdateAPIResponse{}
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIResponse) GetEditVersion() (v int32) {
 | |
| 	return p.EditVersion
 | |
| }
 | |
| 
 | |
| var UpdateAPIResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *UpdateAPIResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return UpdateAPIResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_UpdateAPIResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "edit_version",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIResponse) 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.I32 {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_UpdateAPIResponse[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 *UpdateAPIResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateAPIResponse) 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 *UpdateAPIResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.EditVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UpdateAPIResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdateAPIResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *UpdateAPIResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *UpdateAPIResponse) 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 *UpdateAPIResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("edit_version", thrift.I32, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(p.EditVersion); 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 *UpdateAPIResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *UpdateAPIResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("UpdateAPIResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type DelPluginRequest struct {
 | |
| 	PluginID int64      `thrift:"plugin_id,1" form:"plugin_id" json:"plugin_id,string" query:"plugin_id"`
 | |
| 	Base     *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewDelPluginRequest() *DelPluginRequest {
 | |
| 	return &DelPluginRequest{}
 | |
| }
 | |
| 
 | |
| func (p *DelPluginRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *DelPluginRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| var DelPluginRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *DelPluginRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return DelPluginRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_DelPluginRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *DelPluginRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *DelPluginRequest) 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_DelPluginRequest[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 *DelPluginRequest) 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 *DelPluginRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *DelPluginRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DelPluginRequest"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *DelPluginRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *DelPluginRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *DelPluginRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("DelPluginRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type DelPluginResponse struct {
 | |
| 	Code     int64          `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg      string         `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	BaseResp *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewDelPluginResponse() *DelPluginResponse {
 | |
| 	return &DelPluginResponse{}
 | |
| }
 | |
| 
 | |
| func (p *DelPluginResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *DelPluginResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *DelPluginResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| var DelPluginResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *DelPluginResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return DelPluginResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_DelPluginResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *DelPluginResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *DelPluginResponse) 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_DelPluginResponse[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 *DelPluginResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DelPluginResponse) 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 *DelPluginResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *DelPluginResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DelPluginResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *DelPluginResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *DelPluginResponse) 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 *DelPluginResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *DelPluginResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("DelPluginResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type CreateAPIRequest struct {
 | |
| 	PluginID int64 `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required" query:"plugin_id,required"`
 | |
| 	// tool name
 | |
| 	Name string `thrift:"name,2,required" form:"name,required" json:"name,required" query:"name,required"`
 | |
| 	// tool description
 | |
| 	Desc string `thrift:"desc,3,required" form:"desc,required" json:"desc,required" query:"desc,required"`
 | |
| 	// http subURL of tool
 | |
| 	Path *string `thrift:"path,4,optional" form:"path" json:"path,omitempty" query:"path"`
 | |
| 	// http method of tool
 | |
| 	Method *common.APIMethod `thrift:"method,5,optional" form:"method" json:"method,omitempty" query:"method"`
 | |
| 	// ignore
 | |
| 	APIExtend *common.APIExtend `thrift:"api_extend,6,optional" form:"api_extend" json:"api_extend,omitempty" query:"api_extend"`
 | |
| 	// ignore
 | |
| 	RequestParams []*common.APIParameter `thrift:"request_params,7,optional" form:"request_params" json:"request_params,omitempty" query:"request_params"`
 | |
| 	// ignore
 | |
| 	ResponseParams []*common.APIParameter `thrift:"response_params,8,optional" form:"response_params" json:"response_params,omitempty" query:"response_params"`
 | |
| 	// ignore
 | |
| 	Disabled *bool `thrift:"disabled,9,optional" form:"disabled" json:"disabled,omitempty" query:"disabled"`
 | |
| 	// ignore
 | |
| 	EditVersion *int32 `thrift:"edit_version,10,optional" form:"edit_version" json:"edit_version,omitempty" query:"edit_version"`
 | |
| 	// ignore
 | |
| 	FunctionName *string    `thrift:"function_name,11,optional" form:"function_name" json:"function_name,omitempty" query:"function_name"`
 | |
| 	Base         *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewCreateAPIRequest() *CreateAPIRequest {
 | |
| 	return &CreateAPIRequest{}
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) GetName() (v string) {
 | |
| 	return p.Name
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) GetDesc() (v string) {
 | |
| 	return p.Desc
 | |
| }
 | |
| 
 | |
| var CreateAPIRequest_Path_DEFAULT string
 | |
| 
 | |
| func (p *CreateAPIRequest) GetPath() (v string) {
 | |
| 	if !p.IsSetPath() {
 | |
| 		return CreateAPIRequest_Path_DEFAULT
 | |
| 	}
 | |
| 	return *p.Path
 | |
| }
 | |
| 
 | |
| var CreateAPIRequest_Method_DEFAULT common.APIMethod
 | |
| 
 | |
| func (p *CreateAPIRequest) GetMethod() (v common.APIMethod) {
 | |
| 	if !p.IsSetMethod() {
 | |
| 		return CreateAPIRequest_Method_DEFAULT
 | |
| 	}
 | |
| 	return *p.Method
 | |
| }
 | |
| 
 | |
| var CreateAPIRequest_APIExtend_DEFAULT *common.APIExtend
 | |
| 
 | |
| func (p *CreateAPIRequest) GetAPIExtend() (v *common.APIExtend) {
 | |
| 	if !p.IsSetAPIExtend() {
 | |
| 		return CreateAPIRequest_APIExtend_DEFAULT
 | |
| 	}
 | |
| 	return p.APIExtend
 | |
| }
 | |
| 
 | |
| var CreateAPIRequest_RequestParams_DEFAULT []*common.APIParameter
 | |
| 
 | |
| func (p *CreateAPIRequest) GetRequestParams() (v []*common.APIParameter) {
 | |
| 	if !p.IsSetRequestParams() {
 | |
| 		return CreateAPIRequest_RequestParams_DEFAULT
 | |
| 	}
 | |
| 	return p.RequestParams
 | |
| }
 | |
| 
 | |
| var CreateAPIRequest_ResponseParams_DEFAULT []*common.APIParameter
 | |
| 
 | |
| func (p *CreateAPIRequest) GetResponseParams() (v []*common.APIParameter) {
 | |
| 	if !p.IsSetResponseParams() {
 | |
| 		return CreateAPIRequest_ResponseParams_DEFAULT
 | |
| 	}
 | |
| 	return p.ResponseParams
 | |
| }
 | |
| 
 | |
| var CreateAPIRequest_Disabled_DEFAULT bool
 | |
| 
 | |
| func (p *CreateAPIRequest) GetDisabled() (v bool) {
 | |
| 	if !p.IsSetDisabled() {
 | |
| 		return CreateAPIRequest_Disabled_DEFAULT
 | |
| 	}
 | |
| 	return *p.Disabled
 | |
| }
 | |
| 
 | |
| var CreateAPIRequest_EditVersion_DEFAULT int32
 | |
| 
 | |
| func (p *CreateAPIRequest) GetEditVersion() (v int32) {
 | |
| 	if !p.IsSetEditVersion() {
 | |
| 		return CreateAPIRequest_EditVersion_DEFAULT
 | |
| 	}
 | |
| 	return *p.EditVersion
 | |
| }
 | |
| 
 | |
| var CreateAPIRequest_FunctionName_DEFAULT string
 | |
| 
 | |
| func (p *CreateAPIRequest) GetFunctionName() (v string) {
 | |
| 	if !p.IsSetFunctionName() {
 | |
| 		return CreateAPIRequest_FunctionName_DEFAULT
 | |
| 	}
 | |
| 	return *p.FunctionName
 | |
| }
 | |
| 
 | |
| var CreateAPIRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *CreateAPIRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return CreateAPIRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_CreateAPIRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	2:   "name",
 | |
| 	3:   "desc",
 | |
| 	4:   "path",
 | |
| 	5:   "method",
 | |
| 	6:   "api_extend",
 | |
| 	7:   "request_params",
 | |
| 	8:   "response_params",
 | |
| 	9:   "disabled",
 | |
| 	10:  "edit_version",
 | |
| 	11:  "function_name",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) IsSetPath() bool {
 | |
| 	return p.Path != nil
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) IsSetMethod() bool {
 | |
| 	return p.Method != nil
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) IsSetAPIExtend() bool {
 | |
| 	return p.APIExtend != nil
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) IsSetRequestParams() bool {
 | |
| 	return p.RequestParams != nil
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) IsSetResponseParams() bool {
 | |
| 	return p.ResponseParams != nil
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) IsSetDisabled() bool {
 | |
| 	return p.Disabled != nil
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) IsSetEditVersion() bool {
 | |
| 	return p.EditVersion != nil
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) IsSetFunctionName() bool {
 | |
| 	return p.FunctionName != nil
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID bool = false
 | |
| 	var issetName bool = false
 | |
| 	var issetDesc 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = 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
 | |
| 				}
 | |
| 				issetName = 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
 | |
| 				}
 | |
| 				issetDesc = 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
 | |
| 				}
 | |
| 			} 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.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.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.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.BOOL {
 | |
| 				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 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetName {
 | |
| 		fieldId = 2
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetDesc {
 | |
| 		fieldId = 3
 | |
| 		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_CreateAPIRequest[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_CreateAPIRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) 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 *CreateAPIRequest) 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 *CreateAPIRequest) ReadField3(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 *CreateAPIRequest) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Path = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CreateAPIRequest) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.APIMethod
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.APIMethod(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.Method = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CreateAPIRequest) ReadField6(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewAPIExtend()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.APIExtend = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CreateAPIRequest) ReadField7(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.APIParameter, 0, size)
 | |
| 	values := make([]common.APIParameter, 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.RequestParams = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CreateAPIRequest) ReadField8(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.APIParameter, 0, size)
 | |
| 	values := make([]common.APIParameter, 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.ResponseParams = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CreateAPIRequest) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Disabled = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CreateAPIRequest) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.EditVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CreateAPIRequest) ReadField11(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.FunctionName = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CreateAPIRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("CreateAPIRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *CreateAPIRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *CreateAPIRequest) 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 *CreateAPIRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("desc", thrift.STRING, 3); 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 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *CreateAPIRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPath() {
 | |
| 		if err = oprot.WriteFieldBegin("path", thrift.STRING, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Path); 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 *CreateAPIRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetMethod() {
 | |
| 		if err = oprot.WriteFieldBegin("method", thrift.I32, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.Method)); 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 *CreateAPIRequest) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAPIExtend() {
 | |
| 		if err = oprot.WriteFieldBegin("api_extend", thrift.STRUCT, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.APIExtend.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 *CreateAPIRequest) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetRequestParams() {
 | |
| 		if err = oprot.WriteFieldBegin("request_params", thrift.LIST, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.RequestParams)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.RequestParams {
 | |
| 			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 *CreateAPIRequest) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetResponseParams() {
 | |
| 		if err = oprot.WriteFieldBegin("response_params", thrift.LIST, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ResponseParams)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.ResponseParams {
 | |
| 			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 *CreateAPIRequest) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetDisabled() {
 | |
| 		if err = oprot.WriteFieldBegin("disabled", thrift.BOOL, 9); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.Disabled); 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 *CreateAPIRequest) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetEditVersion() {
 | |
| 		if err = oprot.WriteFieldBegin("edit_version", thrift.I32, 10); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.EditVersion); 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 *CreateAPIRequest) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetFunctionName() {
 | |
| 		if err = oprot.WriteFieldBegin("function_name", thrift.STRING, 11); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.FunctionName); 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 *CreateAPIRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("CreateAPIRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type CreateAPIResponse struct {
 | |
| 	Code        int64          `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg         string         `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	APIID       string         `thrift:"api_id,3" form:"api_id" json:"api_id" query:"api_id"`
 | |
| 	EditVersion int32          `thrift:"edit_version,4" form:"edit_version" json:"edit_version" query:"edit_version"`
 | |
| 	BaseResp    *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewCreateAPIResponse() *CreateAPIResponse {
 | |
| 	return &CreateAPIResponse{}
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIResponse) GetAPIID() (v string) {
 | |
| 	return p.APIID
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIResponse) GetEditVersion() (v int32) {
 | |
| 	return p.EditVersion
 | |
| }
 | |
| 
 | |
| var CreateAPIResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *CreateAPIResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return CreateAPIResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_CreateAPIResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "api_id",
 | |
| 	4:   "edit_version",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIResponse) 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.I32 {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_CreateAPIResponse[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 *CreateAPIResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CreateAPIResponse) 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 *CreateAPIResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.APIID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CreateAPIResponse) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.EditVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CreateAPIResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("CreateAPIResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *CreateAPIResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *CreateAPIResponse) 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 *CreateAPIResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("api_id", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(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 *CreateAPIResponse) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("edit_version", thrift.I32, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(p.EditVersion); 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 *CreateAPIResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *CreateAPIResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("CreateAPIResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type DeleteAPIRequest struct {
 | |
| 	PluginID int64 `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required" query:"plugin_id,required"`
 | |
| 	APIID    int64 `thrift:"api_id,2,required" form:"api_id,required" json:"api_id,string,required" query:"api_id,required"`
 | |
| 	// ignore
 | |
| 	EditVersion *int32     `thrift:"edit_version,3,optional" form:"edit_version" json:"edit_version,omitempty" query:"edit_version"`
 | |
| 	Base        *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewDeleteAPIRequest() *DeleteAPIRequest {
 | |
| 	return &DeleteAPIRequest{}
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIRequest) GetAPIID() (v int64) {
 | |
| 	return p.APIID
 | |
| }
 | |
| 
 | |
| var DeleteAPIRequest_EditVersion_DEFAULT int32
 | |
| 
 | |
| func (p *DeleteAPIRequest) GetEditVersion() (v int32) {
 | |
| 	if !p.IsSetEditVersion() {
 | |
| 		return DeleteAPIRequest_EditVersion_DEFAULT
 | |
| 	}
 | |
| 	return *p.EditVersion
 | |
| }
 | |
| 
 | |
| var DeleteAPIRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *DeleteAPIRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return DeleteAPIRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_DeleteAPIRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	2:   "api_id",
 | |
| 	3:   "edit_version",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIRequest) IsSetEditVersion() bool {
 | |
| 	return p.EditVersion != nil
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID bool = false
 | |
| 	var issetAPIID 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = true
 | |
| 			} 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
 | |
| 				}
 | |
| 				issetAPIID = true
 | |
| 			} 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetAPIID {
 | |
| 		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_DeleteAPIRequest[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_DeleteAPIRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIRequest) 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 *DeleteAPIRequest) 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 *DeleteAPIRequest) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.EditVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DeleteAPIRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DeleteAPIRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *DeleteAPIRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *DeleteAPIRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("api_id", 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 *DeleteAPIRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetEditVersion() {
 | |
| 		if err = oprot.WriteFieldBegin("edit_version", thrift.I32, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.EditVersion); 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 *DeleteAPIRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("DeleteAPIRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type DeleteAPIResponse struct {
 | |
| 	Code        int64          `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg         string         `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	EditVersion int32          `thrift:"edit_version,3" form:"edit_version" json:"edit_version" query:"edit_version"`
 | |
| 	BaseResp    *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewDeleteAPIResponse() *DeleteAPIResponse {
 | |
| 	return &DeleteAPIResponse{}
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIResponse) GetEditVersion() (v int32) {
 | |
| 	return p.EditVersion
 | |
| }
 | |
| 
 | |
| var DeleteAPIResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *DeleteAPIResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return DeleteAPIResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_DeleteAPIResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "edit_version",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIResponse) 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.I32 {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_DeleteAPIResponse[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 *DeleteAPIResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DeleteAPIResponse) 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 *DeleteAPIResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.EditVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DeleteAPIResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DeleteAPIResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *DeleteAPIResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *DeleteAPIResponse) 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 *DeleteAPIResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("edit_version", thrift.I32, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(p.EditVersion); 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 *DeleteAPIResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *DeleteAPIResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("DeleteAPIResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetOAuthSchemaRequest struct {
 | |
| 	Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewGetOAuthSchemaRequest() *GetOAuthSchemaRequest {
 | |
| 	return &GetOAuthSchemaRequest{}
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthSchemaRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| var GetOAuthSchemaRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *GetOAuthSchemaRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return GetOAuthSchemaRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetOAuthSchemaRequest = map[int16]string{
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthSchemaRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthSchemaRequest) 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_GetOAuthSchemaRequest[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 *GetOAuthSchemaRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthSchemaRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetOAuthSchemaRequest"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetOAuthSchemaRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthSchemaRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetOAuthSchemaRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetOAuthSchemaResponse struct {
 | |
| 	Code        int64  `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg         string `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	OauthSchema string `thrift:"oauth_schema,3" form:"oauth_schema" json:"oauth_schema" query:"oauth_schema"`
 | |
| 	IdeConf     string `thrift:"ide_conf,4" form:"ide_conf" json:"ide_conf" query:"ide_conf"`
 | |
| 	// The agreed json
 | |
| 	BaseResp *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewGetOAuthSchemaResponse() *GetOAuthSchemaResponse {
 | |
| 	return &GetOAuthSchemaResponse{}
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthSchemaResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthSchemaResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthSchemaResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthSchemaResponse) GetOauthSchema() (v string) {
 | |
| 	return p.OauthSchema
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthSchemaResponse) GetIdeConf() (v string) {
 | |
| 	return p.IdeConf
 | |
| }
 | |
| 
 | |
| var GetOAuthSchemaResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *GetOAuthSchemaResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return GetOAuthSchemaResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetOAuthSchemaResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "oauth_schema",
 | |
| 	4:   "ide_conf",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthSchemaResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthSchemaResponse) 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_GetOAuthSchemaResponse[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 *GetOAuthSchemaResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetOAuthSchemaResponse) 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 *GetOAuthSchemaResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.OauthSchema = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetOAuthSchemaResponse) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.IdeConf = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetOAuthSchemaResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthSchemaResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetOAuthSchemaResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetOAuthSchemaResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *GetOAuthSchemaResponse) 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 *GetOAuthSchemaResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("oauth_schema", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.OauthSchema); 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 *GetOAuthSchemaResponse) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ide_conf", thrift.STRING, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.IdeConf); 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 *GetOAuthSchemaResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthSchemaResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetOAuthSchemaResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetUserAuthorityRequest struct {
 | |
| 	PluginID       int64                 `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required"`
 | |
| 	CreationMethod common.CreationMethod `thrift:"creation_method,2,required" form:"creation_method,required" json:"creation_method,required"`
 | |
| 	ProjectID      int64                 `thrift:"project_id,3" form:"project_id" json:"project_id,string"`
 | |
| 	Base           *base.Base            `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewGetUserAuthorityRequest() *GetUserAuthorityRequest {
 | |
| 	return &GetUserAuthorityRequest{}
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityRequest) GetCreationMethod() (v common.CreationMethod) {
 | |
| 	return p.CreationMethod
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityRequest) GetProjectID() (v int64) {
 | |
| 	return p.ProjectID
 | |
| }
 | |
| 
 | |
| var GetUserAuthorityRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *GetUserAuthorityRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return GetUserAuthorityRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetUserAuthorityRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	2:   "creation_method",
 | |
| 	3:   "project_id",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID bool = false
 | |
| 	var issetCreationMethod 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = true
 | |
| 			} 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
 | |
| 				}
 | |
| 				issetCreationMethod = true
 | |
| 			} 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetCreationMethod {
 | |
| 		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_GetUserAuthorityRequest[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_GetUserAuthorityRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityRequest) 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 *GetUserAuthorityRequest) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field common.CreationMethod
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = common.CreationMethod(v)
 | |
| 	}
 | |
| 	p.CreationMethod = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetUserAuthorityRequest) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ProjectID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetUserAuthorityRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetUserAuthorityRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetUserAuthorityRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *GetUserAuthorityRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("creation_method", thrift.I32, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.CreationMethod)); 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 *GetUserAuthorityRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("project_id", thrift.I64, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.ProjectID); 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 *GetUserAuthorityRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetUserAuthorityRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetUserAuthorityResponse struct {
 | |
| 	Code     int32                        `thrift:"code,1,required" form:"code,required" json:"code,required" query:"code,required"`
 | |
| 	Msg      string                       `thrift:"msg,2,required" form:"msg,required" json:"msg,required" query:"msg,required"`
 | |
| 	Data     *common.GetUserAuthorityData `thrift:"data,3" form:"data" json:"data"`
 | |
| 	BaseResp *base.BaseResp               `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewGetUserAuthorityResponse() *GetUserAuthorityResponse {
 | |
| 	return &GetUserAuthorityResponse{}
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityResponse) GetCode() (v int32) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| var GetUserAuthorityResponse_Data_DEFAULT *common.GetUserAuthorityData
 | |
| 
 | |
| func (p *GetUserAuthorityResponse) GetData() (v *common.GetUserAuthorityData) {
 | |
| 	if !p.IsSetData() {
 | |
| 		return GetUserAuthorityResponse_Data_DEFAULT
 | |
| 	}
 | |
| 	return p.Data
 | |
| }
 | |
| 
 | |
| var GetUserAuthorityResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *GetUserAuthorityResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return GetUserAuthorityResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetUserAuthorityResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "data",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityResponse) IsSetData() bool {
 | |
| 	return p.Data != nil
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityResponse) 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
 | |
| 			}
 | |
| 		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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !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_GetUserAuthorityResponse[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_GetUserAuthorityResponse[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityResponse) 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 *GetUserAuthorityResponse) 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 *GetUserAuthorityResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewGetUserAuthorityData()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Data = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetUserAuthorityResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetUserAuthorityResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetUserAuthorityResponse) 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 *GetUserAuthorityResponse) 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 *GetUserAuthorityResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("data", thrift.STRUCT, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Data.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 *GetUserAuthorityResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetUserAuthorityResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetUserAuthorityResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| // Get authorization status--plugin debug area
 | |
| type GetOAuthStatusRequest struct {
 | |
| 	PluginID int64      `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required" query:"plugin_id,required"`
 | |
| 	Base     *base.Base `thrift:"Base,255" form:"Base" json:"Base" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewGetOAuthStatusRequest() *GetOAuthStatusRequest {
 | |
| 	return &GetOAuthStatusRequest{}
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| var GetOAuthStatusRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *GetOAuthStatusRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return GetOAuthStatusRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetOAuthStatusRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		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_GetOAuthStatusRequest[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_GetOAuthStatusRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusRequest) 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 *GetOAuthStatusRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetOAuthStatusRequest"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetOAuthStatusRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *GetOAuthStatusRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetOAuthStatusRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetOAuthStatusResponse struct {
 | |
| 	// Is it an authorized plugin?
 | |
| 	IsOauth bool `thrift:"is_oauth,1" form:"is_oauth" json:"is_oauth" query:"is_oauth"`
 | |
| 	// user authorization status
 | |
| 	Status common.OAuthStatus `thrift:"status,2" form:"status" json:"status" query:"status"`
 | |
| 	// Unauthorized, return the authorized url.
 | |
| 	Content  string         `thrift:"content,3" form:"content" json:"content" query:"content"`
 | |
| 	Code     int64          `thrift:"code,253" form:"code" json:"code" query:"code"`
 | |
| 	Msg      string         `thrift:"msg,254" form:"msg" json:"msg" query:"msg"`
 | |
| 	BaseResp *base.BaseResp `thrift:"BaseResp,255,required" form:"BaseResp,required" json:"BaseResp,required" query:"BaseResp,required"`
 | |
| }
 | |
| 
 | |
| func NewGetOAuthStatusResponse() *GetOAuthStatusResponse {
 | |
| 	return &GetOAuthStatusResponse{}
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusResponse) GetIsOauth() (v bool) {
 | |
| 	return p.IsOauth
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusResponse) GetStatus() (v common.OAuthStatus) {
 | |
| 	return p.Status
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusResponse) GetContent() (v string) {
 | |
| 	return p.Content
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| var GetOAuthStatusResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *GetOAuthStatusResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return GetOAuthStatusResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetOAuthStatusResponse = map[int16]string{
 | |
| 	1:   "is_oauth",
 | |
| 	2:   "status",
 | |
| 	3:   "content",
 | |
| 	253: "code",
 | |
| 	254: "msg",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusResponse) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetBaseResp 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.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.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.STRING {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 253:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField253(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 254:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField254(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetBaseResp = 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 !issetBaseResp {
 | |
| 		fieldId = 255
 | |
| 		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_GetOAuthStatusResponse[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_GetOAuthStatusResponse[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.IsOauth = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetOAuthStatusResponse) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field common.OAuthStatus
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = common.OAuthStatus(v)
 | |
| 	}
 | |
| 	p.Status = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetOAuthStatusResponse) ReadField3(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 *GetOAuthStatusResponse) ReadField253(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetOAuthStatusResponse) ReadField254(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 *GetOAuthStatusResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetOAuthStatusResponse"); 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.writeField253(oprot); err != nil {
 | |
| 			fieldId = 253
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField254(oprot); err != nil {
 | |
| 			fieldId = 254
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetOAuthStatusResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("is_oauth", thrift.BOOL, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(p.IsOauth); 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 *GetOAuthStatusResponse) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("status", thrift.I32, 2); 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 2 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
 | |
| }
 | |
| func (p *GetOAuthStatusResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("content", thrift.STRING, 3); 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 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *GetOAuthStatusResponse) writeField253(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 253); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 253 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 253 end error: ", p), err)
 | |
| }
 | |
| func (p *GetOAuthStatusResponse) writeField254(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("msg", thrift.STRING, 254); 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 254 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 254 end error: ", p), err)
 | |
| }
 | |
| func (p *GetOAuthStatusResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetOAuthStatusResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetOAuthStatusResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type CheckAndLockPluginEditRequest struct {
 | |
| 	PluginID int64      `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required"`
 | |
| 	Base     *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewCheckAndLockPluginEditRequest() *CheckAndLockPluginEditRequest {
 | |
| 	return &CheckAndLockPluginEditRequest{}
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| var CheckAndLockPluginEditRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *CheckAndLockPluginEditRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return CheckAndLockPluginEditRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_CheckAndLockPluginEditRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		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_CheckAndLockPluginEditRequest[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_CheckAndLockPluginEditRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditRequest) 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 *CheckAndLockPluginEditRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("CheckAndLockPluginEditRequest"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *CheckAndLockPluginEditRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *CheckAndLockPluginEditRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("CheckAndLockPluginEditRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type CheckAndLockPluginEditResponse struct {
 | |
| 	Code     int32                              `thrift:"code,1,required" form:"code,required" json:"code,required" query:"code,required"`
 | |
| 	Msg      string                             `thrift:"msg,2,required" form:"msg,required" json:"msg,required" query:"msg,required"`
 | |
| 	Data     *common.CheckAndLockPluginEditData `thrift:"data,3" form:"data" json:"data" query:"data"`
 | |
| 	BaseResp *base.BaseResp                     `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewCheckAndLockPluginEditResponse() *CheckAndLockPluginEditResponse {
 | |
| 	return &CheckAndLockPluginEditResponse{}
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditResponse) GetCode() (v int32) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| var CheckAndLockPluginEditResponse_Data_DEFAULT *common.CheckAndLockPluginEditData
 | |
| 
 | |
| func (p *CheckAndLockPluginEditResponse) GetData() (v *common.CheckAndLockPluginEditData) {
 | |
| 	if !p.IsSetData() {
 | |
| 		return CheckAndLockPluginEditResponse_Data_DEFAULT
 | |
| 	}
 | |
| 	return p.Data
 | |
| }
 | |
| 
 | |
| var CheckAndLockPluginEditResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *CheckAndLockPluginEditResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return CheckAndLockPluginEditResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_CheckAndLockPluginEditResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "data",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditResponse) IsSetData() bool {
 | |
| 	return p.Data != nil
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditResponse) 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
 | |
| 			}
 | |
| 		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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !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_CheckAndLockPluginEditResponse[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_CheckAndLockPluginEditResponse[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditResponse) 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 *CheckAndLockPluginEditResponse) 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 *CheckAndLockPluginEditResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewCheckAndLockPluginEditData()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Data = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *CheckAndLockPluginEditResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("CheckAndLockPluginEditResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *CheckAndLockPluginEditResponse) 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 *CheckAndLockPluginEditResponse) 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 *CheckAndLockPluginEditResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("data", thrift.STRUCT, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Data.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 *CheckAndLockPluginEditResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *CheckAndLockPluginEditResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("CheckAndLockPluginEditResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetPluginPublishHistoryRequest struct {
 | |
| 	PluginID int64 `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required" query:"plugin_id,required"`
 | |
| 	SpaceID  int64 `thrift:"space_id,2,required" form:"space_id,required" json:"space_id,string,required" query:"space_id,required"`
 | |
| 	// Turn the page, what page?
 | |
| 	Page *int32 `thrift:"page,3,optional" form:"page" json:"page,omitempty" query:"page"`
 | |
| 	// Flip pages, a few entries per page
 | |
| 	Size *int32     `thrift:"size,4,optional" form:"size" json:"size,omitempty" query:"size"`
 | |
| 	Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewGetPluginPublishHistoryRequest() *GetPluginPublishHistoryRequest {
 | |
| 	return &GetPluginPublishHistoryRequest{}
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryRequest) GetSpaceID() (v int64) {
 | |
| 	return p.SpaceID
 | |
| }
 | |
| 
 | |
| var GetPluginPublishHistoryRequest_Page_DEFAULT int32
 | |
| 
 | |
| func (p *GetPluginPublishHistoryRequest) GetPage() (v int32) {
 | |
| 	if !p.IsSetPage() {
 | |
| 		return GetPluginPublishHistoryRequest_Page_DEFAULT
 | |
| 	}
 | |
| 	return *p.Page
 | |
| }
 | |
| 
 | |
| var GetPluginPublishHistoryRequest_Size_DEFAULT int32
 | |
| 
 | |
| func (p *GetPluginPublishHistoryRequest) GetSize() (v int32) {
 | |
| 	if !p.IsSetSize() {
 | |
| 		return GetPluginPublishHistoryRequest_Size_DEFAULT
 | |
| 	}
 | |
| 	return *p.Size
 | |
| }
 | |
| 
 | |
| var GetPluginPublishHistoryRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *GetPluginPublishHistoryRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return GetPluginPublishHistoryRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetPluginPublishHistoryRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	2:   "space_id",
 | |
| 	3:   "page",
 | |
| 	4:   "size",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryRequest) IsSetPage() bool {
 | |
| 	return p.Page != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryRequest) IsSetSize() bool {
 | |
| 	return p.Size != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID bool = false
 | |
| 	var issetSpaceID 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = true
 | |
| 			} 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
 | |
| 				}
 | |
| 				issetSpaceID = true
 | |
| 			} 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.I32 {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetSpaceID {
 | |
| 		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_GetPluginPublishHistoryRequest[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_GetPluginPublishHistoryRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryRequest) 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 *GetPluginPublishHistoryRequest) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.SpaceID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginPublishHistoryRequest) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Page = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginPublishHistoryRequest) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Size = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginPublishHistoryRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPluginPublishHistoryRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetPluginPublishHistoryRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *GetPluginPublishHistoryRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("space_id", thrift.I64, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.SpaceID); 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 *GetPluginPublishHistoryRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPage() {
 | |
| 		if err = oprot.WriteFieldBegin("page", thrift.I32, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.Page); 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 *GetPluginPublishHistoryRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSize() {
 | |
| 		if err = oprot.WriteFieldBegin("size", thrift.I32, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.Size); 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 *GetPluginPublishHistoryRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetPluginPublishHistoryRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetPluginPublishHistoryResponse struct {
 | |
| 	Code int64  `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg  string `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	// reverse time
 | |
| 	PluginPublishInfoList []*common.PluginPublishInfo `thrift:"plugin_publish_info_list,3" form:"plugin_publish_info_list" json:"plugin_publish_info_list" query:"plugin_publish_info_list"`
 | |
| 	// How many in total, greater than page x size description and next page
 | |
| 	Total    int32          `thrift:"total,4" form:"total" json:"total" query:"total"`
 | |
| 	BaseResp *base.BaseResp `thrift:"BaseResp,255" form:"BaseResp" json:"BaseResp" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewGetPluginPublishHistoryResponse() *GetPluginPublishHistoryResponse {
 | |
| 	return &GetPluginPublishHistoryResponse{}
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryResponse) GetPluginPublishInfoList() (v []*common.PluginPublishInfo) {
 | |
| 	return p.PluginPublishInfoList
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryResponse) GetTotal() (v int32) {
 | |
| 	return p.Total
 | |
| }
 | |
| 
 | |
| var GetPluginPublishHistoryResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *GetPluginPublishHistoryResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return GetPluginPublishHistoryResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetPluginPublishHistoryResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "plugin_publish_info_list",
 | |
| 	4:   "total",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryResponse) 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.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.I32 {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_GetPluginPublishHistoryResponse[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 *GetPluginPublishHistoryResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginPublishHistoryResponse) 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 *GetPluginPublishHistoryResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.PluginPublishInfo, 0, size)
 | |
| 	values := make([]common.PluginPublishInfo, 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.PluginPublishInfoList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginPublishHistoryResponse) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Total = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginPublishHistoryResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPluginPublishHistoryResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetPluginPublishHistoryResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *GetPluginPublishHistoryResponse) 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 *GetPluginPublishHistoryResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_publish_info_list", thrift.LIST, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.PluginPublishInfoList)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.PluginPublishInfoList {
 | |
| 		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 *GetPluginPublishHistoryResponse) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("total", thrift.I32, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(p.Total); 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 *GetPluginPublishHistoryResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetPluginPublishHistoryResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetPluginPublishHistoryResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type DebugAPIRequest struct {
 | |
| 	PluginID int64 `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required" query:"plugin_id,required"`
 | |
| 	APIID    int64 `thrift:"api_id,2,required" form:"api_id,required" json:"api_id,string,required" query:"api_id,required"`
 | |
| 	// request parameters in json string
 | |
| 	Parameters string `thrift:"parameters,3,required" form:"parameters,required" json:"parameters,required" query:"parameters,required"`
 | |
| 	// ignore
 | |
| 	Operation common.DebugOperation `thrift:"operation,4,required" form:"operation,required" json:"operation,required" query:"operation,required"`
 | |
| 	// ignore
 | |
| 	EditVersion *int32     `thrift:"edit_version,5,optional" form:"edit_version" json:"edit_version,omitempty" query:"edit_version"`
 | |
| 	Base        *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewDebugAPIRequest() *DebugAPIRequest {
 | |
| 	return &DebugAPIRequest{}
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIRequest) GetAPIID() (v int64) {
 | |
| 	return p.APIID
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIRequest) GetParameters() (v string) {
 | |
| 	return p.Parameters
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIRequest) GetOperation() (v common.DebugOperation) {
 | |
| 	return p.Operation
 | |
| }
 | |
| 
 | |
| var DebugAPIRequest_EditVersion_DEFAULT int32
 | |
| 
 | |
| func (p *DebugAPIRequest) GetEditVersion() (v int32) {
 | |
| 	if !p.IsSetEditVersion() {
 | |
| 		return DebugAPIRequest_EditVersion_DEFAULT
 | |
| 	}
 | |
| 	return *p.EditVersion
 | |
| }
 | |
| 
 | |
| var DebugAPIRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *DebugAPIRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return DebugAPIRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_DebugAPIRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	2:   "api_id",
 | |
| 	3:   "parameters",
 | |
| 	4:   "operation",
 | |
| 	5:   "edit_version",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIRequest) IsSetEditVersion() bool {
 | |
| 	return p.EditVersion != nil
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID bool = false
 | |
| 	var issetAPIID bool = false
 | |
| 	var issetParameters bool = false
 | |
| 	var issetOperation 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = true
 | |
| 			} 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
 | |
| 				}
 | |
| 				issetAPIID = 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
 | |
| 				}
 | |
| 				issetParameters = 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
 | |
| 				}
 | |
| 				issetOperation = true
 | |
| 			} 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetAPIID {
 | |
| 		fieldId = 2
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetParameters {
 | |
| 		fieldId = 3
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetOperation {
 | |
| 		fieldId = 4
 | |
| 		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_DebugAPIRequest[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_DebugAPIRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIRequest) 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 *DebugAPIRequest) 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 *DebugAPIRequest) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Parameters = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DebugAPIRequest) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field common.DebugOperation
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = common.DebugOperation(v)
 | |
| 	}
 | |
| 	p.Operation = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DebugAPIRequest) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.EditVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DebugAPIRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DebugAPIRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *DebugAPIRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *DebugAPIRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("api_id", 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 *DebugAPIRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("parameters", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Parameters); 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 *DebugAPIRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("operation", thrift.I32, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(int32(p.Operation)); 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 *DebugAPIRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetEditVersion() {
 | |
| 		if err = oprot.WriteFieldBegin("edit_version", thrift.I32, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.EditVersion); 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 *DebugAPIRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("DebugAPIRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type DebugAPIResponse struct {
 | |
| 	Code int64  `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg  string `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	// response parameters
 | |
| 	ResponseParams []*common.APIParameter `thrift:"response_params,3" form:"response_params" json:"response_params" query:"response_params"`
 | |
| 	// invoke success or not
 | |
| 	Success bool `thrift:"success,4" form:"success" json:"success" query:"success"`
 | |
| 	// trimmed response in json string
 | |
| 	Resp string `thrift:"resp,5" form:"resp" json:"resp" query:"resp"`
 | |
| 	// invoke failed reason
 | |
| 	Reason string `thrift:"reason,6" form:"reason" json:"reason" query:"reason"`
 | |
| 	// raw response in json string
 | |
| 	RawResp string `thrift:"raw_resp,7" form:"raw_resp" json:"raw_resp" query:"raw_resp"`
 | |
| 	// raw request in json string
 | |
| 	RawReq   string         `thrift:"raw_req,8" form:"raw_req" json:"raw_req" query:"raw_req"`
 | |
| 	BaseResp *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewDebugAPIResponse() *DebugAPIResponse {
 | |
| 	return &DebugAPIResponse{}
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIResponse) GetResponseParams() (v []*common.APIParameter) {
 | |
| 	return p.ResponseParams
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIResponse) GetSuccess() (v bool) {
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIResponse) GetResp() (v string) {
 | |
| 	return p.Resp
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIResponse) GetReason() (v string) {
 | |
| 	return p.Reason
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIResponse) GetRawResp() (v string) {
 | |
| 	return p.RawResp
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIResponse) GetRawReq() (v string) {
 | |
| 	return p.RawReq
 | |
| }
 | |
| 
 | |
| var DebugAPIResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *DebugAPIResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return DebugAPIResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_DebugAPIResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "response_params",
 | |
| 	4:   "success",
 | |
| 	5:   "resp",
 | |
| 	6:   "reason",
 | |
| 	7:   "raw_resp",
 | |
| 	8:   "raw_req",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIResponse) 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.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.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.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
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_DebugAPIResponse[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 *DebugAPIResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DebugAPIResponse) 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 *DebugAPIResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.APIParameter, 0, size)
 | |
| 	values := make([]common.APIParameter, 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.ResponseParams = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DebugAPIResponse) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DebugAPIResponse) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Resp = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DebugAPIResponse) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Reason = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DebugAPIResponse) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.RawResp = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DebugAPIResponse) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.RawReq = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *DebugAPIResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DebugAPIResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *DebugAPIResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *DebugAPIResponse) 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 *DebugAPIResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("response_params", thrift.LIST, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ResponseParams)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.ResponseParams {
 | |
| 		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 *DebugAPIResponse) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("success", thrift.BOOL, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(p.Success); 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 *DebugAPIResponse) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("resp", thrift.STRING, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Resp); 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 *DebugAPIResponse) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("reason", thrift.STRING, 6); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Reason); 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 *DebugAPIResponse) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("raw_resp", thrift.STRING, 7); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.RawResp); 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 *DebugAPIResponse) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("raw_req", thrift.STRING, 8); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.RawReq); 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 *DebugAPIResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *DebugAPIResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("DebugAPIResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type UnlockPluginEditRequest struct {
 | |
| 	PluginID int64      `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required"`
 | |
| 	Base     *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewUnlockPluginEditRequest() *UnlockPluginEditRequest {
 | |
| 	return &UnlockPluginEditRequest{}
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| var UnlockPluginEditRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *UnlockPluginEditRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return UnlockPluginEditRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_UnlockPluginEditRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		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_UnlockPluginEditRequest[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_UnlockPluginEditRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditRequest) 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 *UnlockPluginEditRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UnlockPluginEditRequest"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *UnlockPluginEditRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *UnlockPluginEditRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("UnlockPluginEditRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type UnlockPluginEditResponse struct {
 | |
| 	Code     int32          `thrift:"code,1,required" form:"code,required" json:"code,required" query:"code,required"`
 | |
| 	Msg      string         `thrift:"msg,2,required" form:"msg,required" json:"msg,required" query:"msg,required"`
 | |
| 	Released bool           `thrift:"released,3,required" form:"released,required" json:"released,required" query:"released,required"`
 | |
| 	BaseResp *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewUnlockPluginEditResponse() *UnlockPluginEditResponse {
 | |
| 	return &UnlockPluginEditResponse{}
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditResponse) GetCode() (v int32) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditResponse) GetReleased() (v bool) {
 | |
| 	return p.Released
 | |
| }
 | |
| 
 | |
| var UnlockPluginEditResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *UnlockPluginEditResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return UnlockPluginEditResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_UnlockPluginEditResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "released",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditResponse) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetCode bool = false
 | |
| 	var issetMsg bool = false
 | |
| 	var issetReleased 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
 | |
| 			}
 | |
| 		case 3:
 | |
| 			if fieldTypeId == thrift.BOOL {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetReleased = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetCode {
 | |
| 		fieldId = 1
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetMsg {
 | |
| 		fieldId = 2
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetReleased {
 | |
| 		fieldId = 3
 | |
| 		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_UnlockPluginEditResponse[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_UnlockPluginEditResponse[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditResponse) 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 *UnlockPluginEditResponse) 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 *UnlockPluginEditResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Released = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *UnlockPluginEditResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UnlockPluginEditResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *UnlockPluginEditResponse) 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 *UnlockPluginEditResponse) 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 *UnlockPluginEditResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("released", thrift.BOOL, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(p.Released); 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 *UnlockPluginEditResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *UnlockPluginEditResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("UnlockPluginEditResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetPluginNextVersionRequest struct {
 | |
| 	PluginID int64      `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required" query:"plugin_id,required"`
 | |
| 	SpaceID  int64      `thrift:"space_id,2,required" form:"space_id,required" json:"space_id,string,required" query:"space_id,required"`
 | |
| 	Base     *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewGetPluginNextVersionRequest() *GetPluginNextVersionRequest {
 | |
| 	return &GetPluginNextVersionRequest{}
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionRequest) GetSpaceID() (v int64) {
 | |
| 	return p.SpaceID
 | |
| }
 | |
| 
 | |
| var GetPluginNextVersionRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *GetPluginNextVersionRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return GetPluginNextVersionRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetPluginNextVersionRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	2:   "space_id",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID bool = false
 | |
| 	var issetSpaceID 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = true
 | |
| 			} 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
 | |
| 				}
 | |
| 				issetSpaceID = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		goto RequiredFieldNotSetError
 | |
| 	}
 | |
| 
 | |
| 	if !issetSpaceID {
 | |
| 		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_GetPluginNextVersionRequest[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_GetPluginNextVersionRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionRequest) 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 *GetPluginNextVersionRequest) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.SpaceID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginNextVersionRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPluginNextVersionRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetPluginNextVersionRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *GetPluginNextVersionRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("space_id", thrift.I64, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.SpaceID); 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 *GetPluginNextVersionRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetPluginNextVersionRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetPluginNextVersionResponse struct {
 | |
| 	Code            int64          `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg             string         `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	NextVersionName string         `thrift:"next_version_name,3" form:"next_version_name" json:"next_version_name" query:"next_version_name"`
 | |
| 	BaseResp        *base.BaseResp `thrift:"BaseResp,255" form:"BaseResp" json:"BaseResp" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewGetPluginNextVersionResponse() *GetPluginNextVersionResponse {
 | |
| 	return &GetPluginNextVersionResponse{}
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionResponse) GetNextVersionName() (v string) {
 | |
| 	return p.NextVersionName
 | |
| }
 | |
| 
 | |
| var GetPluginNextVersionResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *GetPluginNextVersionResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return GetPluginNextVersionResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetPluginNextVersionResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "next_version_name",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionResponse) 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_GetPluginNextVersionResponse[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 *GetPluginNextVersionResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginNextVersionResponse) 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 *GetPluginNextVersionResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.NextVersionName = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetPluginNextVersionResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPluginNextVersionResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetPluginNextVersionResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *GetPluginNextVersionResponse) 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 *GetPluginNextVersionResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("next_version_name", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.NextVersionName); 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 *GetPluginNextVersionResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetPluginNextVersionResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetPluginNextVersionResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type RegisterPluginRequest struct {
 | |
| 	// plugin manifest in json string
 | |
| 	AiPlugin string `thrift:"ai_plugin,1" form:"ai_plugin" json:"ai_plugin" query:"ai_plugin"`
 | |
| 	// plugin openapi3 document in yaml string
 | |
| 	Openapi string `thrift:"openapi,2" form:"openapi" json:"openapi" query:"openapi"`
 | |
| 	// ignore
 | |
| 	ClientID *string `thrift:"client_id,4,optional" form:"client_id" json:"client_id,omitempty" query:"client_id"`
 | |
| 	// ignore
 | |
| 	ClientSecret *string `thrift:"client_secret,5,optional" form:"client_secret" json:"client_secret,omitempty" query:"client_secret"`
 | |
| 	// ignore
 | |
| 	ServiceToken *string `thrift:"service_token,6,optional" form:"service_token" json:"service_token,omitempty" query:"service_token"`
 | |
| 	// ignore
 | |
| 	PluginType *common.PluginType `thrift:"plugin_type,7,optional" form:"plugin_type" json:"plugin_type,omitempty" query:"plugin_type"`
 | |
| 	SpaceID    int64              `thrift:"space_id,8" form:"space_id" json:"space_id,string" query:"space_id"`
 | |
| 	// ignore
 | |
| 	ImportFromFile bool       `thrift:"import_from_file,9" form:"import_from_file" json:"import_from_file" query:"import_from_file"`
 | |
| 	ProjectID      *int64     `thrift:"project_id,10,optional" form:"project_id" json:"project_id,string,omitempty" query:"project_id"`
 | |
| 	Base           *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewRegisterPluginRequest() *RegisterPluginRequest {
 | |
| 	return &RegisterPluginRequest{}
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginRequest) GetAiPlugin() (v string) {
 | |
| 	return p.AiPlugin
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginRequest) GetOpenapi() (v string) {
 | |
| 	return p.Openapi
 | |
| }
 | |
| 
 | |
| var RegisterPluginRequest_ClientID_DEFAULT string
 | |
| 
 | |
| func (p *RegisterPluginRequest) GetClientID() (v string) {
 | |
| 	if !p.IsSetClientID() {
 | |
| 		return RegisterPluginRequest_ClientID_DEFAULT
 | |
| 	}
 | |
| 	return *p.ClientID
 | |
| }
 | |
| 
 | |
| var RegisterPluginRequest_ClientSecret_DEFAULT string
 | |
| 
 | |
| func (p *RegisterPluginRequest) GetClientSecret() (v string) {
 | |
| 	if !p.IsSetClientSecret() {
 | |
| 		return RegisterPluginRequest_ClientSecret_DEFAULT
 | |
| 	}
 | |
| 	return *p.ClientSecret
 | |
| }
 | |
| 
 | |
| var RegisterPluginRequest_ServiceToken_DEFAULT string
 | |
| 
 | |
| func (p *RegisterPluginRequest) GetServiceToken() (v string) {
 | |
| 	if !p.IsSetServiceToken() {
 | |
| 		return RegisterPluginRequest_ServiceToken_DEFAULT
 | |
| 	}
 | |
| 	return *p.ServiceToken
 | |
| }
 | |
| 
 | |
| var RegisterPluginRequest_PluginType_DEFAULT common.PluginType
 | |
| 
 | |
| func (p *RegisterPluginRequest) GetPluginType() (v common.PluginType) {
 | |
| 	if !p.IsSetPluginType() {
 | |
| 		return RegisterPluginRequest_PluginType_DEFAULT
 | |
| 	}
 | |
| 	return *p.PluginType
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginRequest) GetSpaceID() (v int64) {
 | |
| 	return p.SpaceID
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginRequest) GetImportFromFile() (v bool) {
 | |
| 	return p.ImportFromFile
 | |
| }
 | |
| 
 | |
| var RegisterPluginRequest_ProjectID_DEFAULT int64
 | |
| 
 | |
| func (p *RegisterPluginRequest) GetProjectID() (v int64) {
 | |
| 	if !p.IsSetProjectID() {
 | |
| 		return RegisterPluginRequest_ProjectID_DEFAULT
 | |
| 	}
 | |
| 	return *p.ProjectID
 | |
| }
 | |
| 
 | |
| var RegisterPluginRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *RegisterPluginRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return RegisterPluginRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_RegisterPluginRequest = map[int16]string{
 | |
| 	1:   "ai_plugin",
 | |
| 	2:   "openapi",
 | |
| 	4:   "client_id",
 | |
| 	5:   "client_secret",
 | |
| 	6:   "service_token",
 | |
| 	7:   "plugin_type",
 | |
| 	8:   "space_id",
 | |
| 	9:   "import_from_file",
 | |
| 	10:  "project_id",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginRequest) IsSetClientID() bool {
 | |
| 	return p.ClientID != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginRequest) IsSetClientSecret() bool {
 | |
| 	return p.ClientSecret != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginRequest) IsSetServiceToken() bool {
 | |
| 	return p.ServiceToken != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginRequest) IsSetPluginType() bool {
 | |
| 	return p.PluginType != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginRequest) IsSetProjectID() bool {
 | |
| 	return p.ProjectID != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginRequest) 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 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.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.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.BOOL {
 | |
| 				if err = p.ReadField9(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 10:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField10(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_RegisterPluginRequest[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 *RegisterPluginRequest) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.AiPlugin = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginRequest) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Openapi = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginRequest) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ClientID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginRequest) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ClientSecret = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginRequest) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ServiceToken = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginRequest) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.PluginType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.PluginType(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.PluginType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginRequest) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.SpaceID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginRequest) ReadField9(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ImportFromFile = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginRequest) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ProjectID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("RegisterPluginRequest"); 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.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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *RegisterPluginRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ai_plugin", thrift.STRING, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.AiPlugin); 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 *RegisterPluginRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("openapi", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Openapi); 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 *RegisterPluginRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetClientID() {
 | |
| 		if err = oprot.WriteFieldBegin("client_id", thrift.STRING, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ClientID); 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 *RegisterPluginRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetClientSecret() {
 | |
| 		if err = oprot.WriteFieldBegin("client_secret", thrift.STRING, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ClientSecret); 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 *RegisterPluginRequest) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetServiceToken() {
 | |
| 		if err = oprot.WriteFieldBegin("service_token", thrift.STRING, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.ServiceToken); 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 *RegisterPluginRequest) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginType() {
 | |
| 		if err = oprot.WriteFieldBegin("plugin_type", thrift.I32, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.PluginType)); 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 *RegisterPluginRequest) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("space_id", thrift.I64, 8); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.SpaceID); 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 *RegisterPluginRequest) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("import_from_file", thrift.BOOL, 9); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(p.ImportFromFile); 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 *RegisterPluginRequest) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetProjectID() {
 | |
| 		if err = oprot.WriteFieldBegin("project_id", thrift.I64, 10); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI64(*p.ProjectID); 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 *RegisterPluginRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("RegisterPluginRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type RegisterPluginResponse struct {
 | |
| 	Code     int64                      `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg      string                     `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	Data     *common.RegisterPluginData `thrift:"data,3" form:"data" json:"data" query:"data"`
 | |
| 	BaseResp *base.BaseResp             `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewRegisterPluginResponse() *RegisterPluginResponse {
 | |
| 	return &RegisterPluginResponse{}
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| var RegisterPluginResponse_Data_DEFAULT *common.RegisterPluginData
 | |
| 
 | |
| func (p *RegisterPluginResponse) GetData() (v *common.RegisterPluginData) {
 | |
| 	if !p.IsSetData() {
 | |
| 		return RegisterPluginResponse_Data_DEFAULT
 | |
| 	}
 | |
| 	return p.Data
 | |
| }
 | |
| 
 | |
| var RegisterPluginResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *RegisterPluginResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return RegisterPluginResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_RegisterPluginResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "data",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginResponse) IsSetData() bool {
 | |
| 	return p.Data != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginResponse) 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_RegisterPluginResponse[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 *RegisterPluginResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginResponse) 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 *RegisterPluginResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_field := common.NewRegisterPluginData()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Data = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RegisterPluginResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("RegisterPluginResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *RegisterPluginResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *RegisterPluginResponse) 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 *RegisterPluginResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("data", thrift.STRUCT, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Data.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 *RegisterPluginResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *RegisterPluginResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("RegisterPluginResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetDevPluginListRequest struct {
 | |
| 	Status    []common.PluginStatus `thrift:"status,1,optional" form:"status" json:"status,omitempty" query:"status"`
 | |
| 	Page      *int32                `thrift:"page,2,optional" form:"page" json:"page,omitempty" query:"page"`
 | |
| 	Size      *int32                `thrift:"size,3,optional" form:"size" json:"size,omitempty" query:"size"`
 | |
| 	DevID     int64                 `thrift:"dev_id,4,required" form:"dev_id,required" json:"dev_id,string,required"`
 | |
| 	SpaceID   int64                 `thrift:"space_id,5" form:"space_id" json:"space_id,string"`
 | |
| 	ScopeType *common.ScopeType     `thrift:"scope_type,6,optional" form:"scope_type" json:"scope_type,omitempty" query:"scope_type"`
 | |
| 	OrderBy   *common.OrderBy       `thrift:"order_by,7,optional" form:"order_by" json:"order_by,omitempty" query:"order_by"`
 | |
| 	// Release status filter: true: published, false: not published
 | |
| 	PublishStatus *bool `thrift:"publish_status,8,optional" form:"publish_status" json:"publish_status,omitempty" query:"publish_status"`
 | |
| 	// Plugin name or tool name
 | |
| 	Name *string `thrift:"name,9,optional" form:"name" json:"name,omitempty" query:"name"`
 | |
| 	// Plugin Type Filter, End/Cloud
 | |
| 	PluginTypeForFilter *common.PluginTypeForFilter `thrift:"plugin_type_for_filter,10,optional" form:"plugin_type_for_filter" json:"plugin_type_for_filter,omitempty" query:"plugin_type_for_filter"`
 | |
| 	ProjectID           int64                       `thrift:"project_id,11" form:"project_id" json:"project_id,string"`
 | |
| 	// plugin id list
 | |
| 	PluginIds []int64    `thrift:"plugin_ids,12" form:"plugin_ids" json:"plugin_ids"`
 | |
| 	Base      *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewGetDevPluginListRequest() *GetDevPluginListRequest {
 | |
| 	return &GetDevPluginListRequest{}
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| var GetDevPluginListRequest_Status_DEFAULT []common.PluginStatus
 | |
| 
 | |
| func (p *GetDevPluginListRequest) GetStatus() (v []common.PluginStatus) {
 | |
| 	if !p.IsSetStatus() {
 | |
| 		return GetDevPluginListRequest_Status_DEFAULT
 | |
| 	}
 | |
| 	return p.Status
 | |
| }
 | |
| 
 | |
| var GetDevPluginListRequest_Page_DEFAULT int32
 | |
| 
 | |
| func (p *GetDevPluginListRequest) GetPage() (v int32) {
 | |
| 	if !p.IsSetPage() {
 | |
| 		return GetDevPluginListRequest_Page_DEFAULT
 | |
| 	}
 | |
| 	return *p.Page
 | |
| }
 | |
| 
 | |
| var GetDevPluginListRequest_Size_DEFAULT int32
 | |
| 
 | |
| func (p *GetDevPluginListRequest) GetSize() (v int32) {
 | |
| 	if !p.IsSetSize() {
 | |
| 		return GetDevPluginListRequest_Size_DEFAULT
 | |
| 	}
 | |
| 	return *p.Size
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) GetDevID() (v int64) {
 | |
| 	return p.DevID
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) GetSpaceID() (v int64) {
 | |
| 	return p.SpaceID
 | |
| }
 | |
| 
 | |
| var GetDevPluginListRequest_ScopeType_DEFAULT common.ScopeType
 | |
| 
 | |
| func (p *GetDevPluginListRequest) GetScopeType() (v common.ScopeType) {
 | |
| 	if !p.IsSetScopeType() {
 | |
| 		return GetDevPluginListRequest_ScopeType_DEFAULT
 | |
| 	}
 | |
| 	return *p.ScopeType
 | |
| }
 | |
| 
 | |
| var GetDevPluginListRequest_OrderBy_DEFAULT common.OrderBy
 | |
| 
 | |
| func (p *GetDevPluginListRequest) GetOrderBy() (v common.OrderBy) {
 | |
| 	if !p.IsSetOrderBy() {
 | |
| 		return GetDevPluginListRequest_OrderBy_DEFAULT
 | |
| 	}
 | |
| 	return *p.OrderBy
 | |
| }
 | |
| 
 | |
| var GetDevPluginListRequest_PublishStatus_DEFAULT bool
 | |
| 
 | |
| func (p *GetDevPluginListRequest) GetPublishStatus() (v bool) {
 | |
| 	if !p.IsSetPublishStatus() {
 | |
| 		return GetDevPluginListRequest_PublishStatus_DEFAULT
 | |
| 	}
 | |
| 	return *p.PublishStatus
 | |
| }
 | |
| 
 | |
| var GetDevPluginListRequest_Name_DEFAULT string
 | |
| 
 | |
| func (p *GetDevPluginListRequest) GetName() (v string) {
 | |
| 	if !p.IsSetName() {
 | |
| 		return GetDevPluginListRequest_Name_DEFAULT
 | |
| 	}
 | |
| 	return *p.Name
 | |
| }
 | |
| 
 | |
| var GetDevPluginListRequest_PluginTypeForFilter_DEFAULT common.PluginTypeForFilter
 | |
| 
 | |
| func (p *GetDevPluginListRequest) GetPluginTypeForFilter() (v common.PluginTypeForFilter) {
 | |
| 	if !p.IsSetPluginTypeForFilter() {
 | |
| 		return GetDevPluginListRequest_PluginTypeForFilter_DEFAULT
 | |
| 	}
 | |
| 	return *p.PluginTypeForFilter
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) GetProjectID() (v int64) {
 | |
| 	return p.ProjectID
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) GetPluginIds() (v []int64) {
 | |
| 	return p.PluginIds
 | |
| }
 | |
| 
 | |
| var GetDevPluginListRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *GetDevPluginListRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return GetDevPluginListRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetDevPluginListRequest = map[int16]string{
 | |
| 	1:   "status",
 | |
| 	2:   "page",
 | |
| 	3:   "size",
 | |
| 	4:   "dev_id",
 | |
| 	5:   "space_id",
 | |
| 	6:   "scope_type",
 | |
| 	7:   "order_by",
 | |
| 	8:   "publish_status",
 | |
| 	9:   "name",
 | |
| 	10:  "plugin_type_for_filter",
 | |
| 	11:  "project_id",
 | |
| 	12:  "plugin_ids",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) IsSetStatus() bool {
 | |
| 	return p.Status != nil
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) IsSetPage() bool {
 | |
| 	return p.Page != nil
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) IsSetSize() bool {
 | |
| 	return p.Size != nil
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) IsSetScopeType() bool {
 | |
| 	return p.ScopeType != nil
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) IsSetOrderBy() bool {
 | |
| 	return p.OrderBy != nil
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) IsSetPublishStatus() bool {
 | |
| 	return p.PublishStatus != nil
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) IsSetName() bool {
 | |
| 	return p.Name != nil
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) IsSetPluginTypeForFilter() bool {
 | |
| 	return p.PluginTypeForFilter != nil
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetDevID 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.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.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.I64 {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetDevID = true
 | |
| 			} 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.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.BOOL {
 | |
| 				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.I32 {
 | |
| 				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.LIST {
 | |
| 				if err = p.ReadField12(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetDevID {
 | |
| 		fieldId = 4
 | |
| 		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_GetDevPluginListRequest[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_GetDevPluginListRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]common.PluginStatus, 0, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 
 | |
| 		var _elem common.PluginStatus
 | |
| 		if v, err := iprot.ReadI32(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_elem = common.PluginStatus(v)
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Status = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetDevPluginListRequest) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Page = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetDevPluginListRequest) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Size = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetDevPluginListRequest) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.DevID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetDevPluginListRequest) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.SpaceID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetDevPluginListRequest) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.ScopeType
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.ScopeType(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.ScopeType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetDevPluginListRequest) ReadField7(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.OrderBy
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.OrderBy(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.OrderBy = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetDevPluginListRequest) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PublishStatus = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetDevPluginListRequest) ReadField9(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 *GetDevPluginListRequest) ReadField10(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.PluginTypeForFilter
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.PluginTypeForFilter(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.PluginTypeForFilter = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetDevPluginListRequest) ReadField11(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ProjectID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetDevPluginListRequest) ReadField12(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]int64, 0, size)
 | |
| 	for i := 0; i < size; i++ {
 | |
| 
 | |
| 		var _elem int64
 | |
| 		if v, err := iprot.ReadI64(); err != nil {
 | |
| 			return err
 | |
| 		} else {
 | |
| 			_elem = v
 | |
| 		}
 | |
| 
 | |
| 		_field = append(_field, _elem)
 | |
| 	}
 | |
| 	if err := iprot.ReadListEnd(); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.PluginIds = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetDevPluginListRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetDevPluginListRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetDevPluginListRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetStatus() {
 | |
| 		if err = oprot.WriteFieldBegin("status", thrift.LIST, 1); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.I32, len(p.Status)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.Status {
 | |
| 			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 1 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
 | |
| }
 | |
| func (p *GetDevPluginListRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPage() {
 | |
| 		if err = oprot.WriteFieldBegin("page", thrift.I32, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.Page); 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 *GetDevPluginListRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSize() {
 | |
| 		if err = oprot.WriteFieldBegin("size", thrift.I32, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.Size); 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 *GetDevPluginListRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("dev_id", thrift.I64, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.DevID); 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 *GetDevPluginListRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("space_id", thrift.I64, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.SpaceID); 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 *GetDevPluginListRequest) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetScopeType() {
 | |
| 		if err = oprot.WriteFieldBegin("scope_type", thrift.I32, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.ScopeType)); 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 *GetDevPluginListRequest) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetOrderBy() {
 | |
| 		if err = oprot.WriteFieldBegin("order_by", thrift.I32, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.OrderBy)); 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 *GetDevPluginListRequest) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPublishStatus() {
 | |
| 		if err = oprot.WriteFieldBegin("publish_status", thrift.BOOL, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.PublishStatus); 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 *GetDevPluginListRequest) writeField9(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetName() {
 | |
| 		if err = oprot.WriteFieldBegin("name", thrift.STRING, 9); 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 9 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
 | |
| }
 | |
| func (p *GetDevPluginListRequest) writeField10(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginTypeForFilter() {
 | |
| 		if err = oprot.WriteFieldBegin("plugin_type_for_filter", thrift.I32, 10); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.PluginTypeForFilter)); 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 *GetDevPluginListRequest) writeField11(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("project_id", thrift.I64, 11); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.ProjectID); 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 *GetDevPluginListRequest) writeField12(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_ids", thrift.LIST, 12); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.I64, len(p.PluginIds)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.PluginIds {
 | |
| 		if err := oprot.WriteI64(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 12 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 12 end error: ", p), err)
 | |
| }
 | |
| func (p *GetDevPluginListRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetDevPluginListRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetDevPluginListResponse struct {
 | |
| 	Code       int32                             `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg        string                            `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	PluginList []*common.PluginInfoForPlayground `thrift:"plugin_list,3" form:"plugin_list" json:"plugin_list" query:"plugin_list"`
 | |
| 	Total      int64                             `thrift:"total,4" form:"total" json:"total,string"`
 | |
| 	BaseResp   *base.BaseResp                    `thrift:"baseResp,255" form:"baseResp" json:"baseResp" query:"baseResp"`
 | |
| }
 | |
| 
 | |
| func NewGetDevPluginListResponse() *GetDevPluginListResponse {
 | |
| 	return &GetDevPluginListResponse{}
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListResponse) GetCode() (v int32) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListResponse) GetPluginList() (v []*common.PluginInfoForPlayground) {
 | |
| 	return p.PluginList
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListResponse) GetTotal() (v int64) {
 | |
| 	return p.Total
 | |
| }
 | |
| 
 | |
| var GetDevPluginListResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *GetDevPluginListResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return GetDevPluginListResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetDevPluginListResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "plugin_list",
 | |
| 	4:   "total",
 | |
| 	255: "baseResp",
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListResponse) 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.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.I64 {
 | |
| 				if err = p.ReadField4(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_GetDevPluginListResponse[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 *GetDevPluginListResponse) 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 *GetDevPluginListResponse) 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 *GetDevPluginListResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.PluginInfoForPlayground, 0, size)
 | |
| 	values := make([]common.PluginInfoForPlayground, 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.PluginList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetDevPluginListResponse) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Total = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetDevPluginListResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetDevPluginListResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetDevPluginListResponse) 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 *GetDevPluginListResponse) 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 *GetDevPluginListResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_list", thrift.LIST, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.PluginList)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.PluginList {
 | |
| 		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 *GetDevPluginListResponse) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("total", thrift.I64, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.Total); 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 *GetDevPluginListResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("baseResp", thrift.STRUCT, 255); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetDevPluginListResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetDevPluginListResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type Convert2OpenAPIRequest struct {
 | |
| 	PluginName *string `thrift:"plugin_name,1,optional" form:"plugin_name" json:"plugin_name,omitempty"`
 | |
| 	PluginURL  *string `thrift:"plugin_url,2,optional" form:"plugin_url" json:"plugin_url,omitempty"`
 | |
| 	// import content, e.g. curl, postman, swagger
 | |
| 	Data string `thrift:"data,3,required" form:"data,required" json:"data,required"`
 | |
| 	// ignore
 | |
| 	MergeSamePaths *bool `thrift:"merge_same_paths,4,optional" form:"merge_same_paths" json:"merge_same_paths,omitempty"`
 | |
| 	SpaceID        int64 `thrift:"space_id,5" form:"space_id" json:"space_id,string"`
 | |
| 	// ignore
 | |
| 	PluginDescription *string    `thrift:"plugin_description,6,optional" form:"plugin_description" json:"plugin_description,omitempty"`
 | |
| 	Base              *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewConvert2OpenAPIRequest() *Convert2OpenAPIRequest {
 | |
| 	return &Convert2OpenAPIRequest{}
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| var Convert2OpenAPIRequest_PluginName_DEFAULT string
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) GetPluginName() (v string) {
 | |
| 	if !p.IsSetPluginName() {
 | |
| 		return Convert2OpenAPIRequest_PluginName_DEFAULT
 | |
| 	}
 | |
| 	return *p.PluginName
 | |
| }
 | |
| 
 | |
| var Convert2OpenAPIRequest_PluginURL_DEFAULT string
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) GetPluginURL() (v string) {
 | |
| 	if !p.IsSetPluginURL() {
 | |
| 		return Convert2OpenAPIRequest_PluginURL_DEFAULT
 | |
| 	}
 | |
| 	return *p.PluginURL
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) GetData() (v string) {
 | |
| 	return p.Data
 | |
| }
 | |
| 
 | |
| var Convert2OpenAPIRequest_MergeSamePaths_DEFAULT bool
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) GetMergeSamePaths() (v bool) {
 | |
| 	if !p.IsSetMergeSamePaths() {
 | |
| 		return Convert2OpenAPIRequest_MergeSamePaths_DEFAULT
 | |
| 	}
 | |
| 	return *p.MergeSamePaths
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) GetSpaceID() (v int64) {
 | |
| 	return p.SpaceID
 | |
| }
 | |
| 
 | |
| var Convert2OpenAPIRequest_PluginDescription_DEFAULT string
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) GetPluginDescription() (v string) {
 | |
| 	if !p.IsSetPluginDescription() {
 | |
| 		return Convert2OpenAPIRequest_PluginDescription_DEFAULT
 | |
| 	}
 | |
| 	return *p.PluginDescription
 | |
| }
 | |
| 
 | |
| var Convert2OpenAPIRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return Convert2OpenAPIRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_Convert2OpenAPIRequest = map[int16]string{
 | |
| 	1:   "plugin_name",
 | |
| 	2:   "plugin_url",
 | |
| 	3:   "data",
 | |
| 	4:   "merge_same_paths",
 | |
| 	5:   "space_id",
 | |
| 	6:   "plugin_description",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) IsSetPluginName() bool {
 | |
| 	return p.PluginName != nil
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) IsSetPluginURL() bool {
 | |
| 	return p.PluginURL != nil
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) IsSetMergeSamePaths() bool {
 | |
| 	return p.MergeSamePaths != nil
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) IsSetPluginDescription() bool {
 | |
| 	return p.PluginDescription != nil
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetData 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
 | |
| 				}
 | |
| 			} 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
 | |
| 				}
 | |
| 				issetData = true
 | |
| 			} 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetData {
 | |
| 		fieldId = 3
 | |
| 		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_Convert2OpenAPIRequest[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_Convert2OpenAPIRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) ReadField1(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 *Convert2OpenAPIRequest) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PluginURL = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Convert2OpenAPIRequest) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Data = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Convert2OpenAPIRequest) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.MergeSamePaths = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Convert2OpenAPIRequest) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.SpaceID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Convert2OpenAPIRequest) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.PluginDescription = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Convert2OpenAPIRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("Convert2OpenAPIRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *Convert2OpenAPIRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginName() {
 | |
| 		if err = oprot.WriteFieldBegin("plugin_name", thrift.STRING, 1); 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 1 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
 | |
| }
 | |
| func (p *Convert2OpenAPIRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginURL() {
 | |
| 		if err = oprot.WriteFieldBegin("plugin_url", thrift.STRING, 2); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.PluginURL); 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 *Convert2OpenAPIRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("data", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Data); 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 *Convert2OpenAPIRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetMergeSamePaths() {
 | |
| 		if err = oprot.WriteFieldBegin("merge_same_paths", thrift.BOOL, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteBool(*p.MergeSamePaths); 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 *Convert2OpenAPIRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("space_id", thrift.I64, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.SpaceID); 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 *Convert2OpenAPIRequest) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginDescription() {
 | |
| 		if err = oprot.WriteFieldBegin("plugin_description", thrift.STRING, 6); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.PluginDescription); 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 *Convert2OpenAPIRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("Convert2OpenAPIRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type Convert2OpenAPIResponse struct {
 | |
| 	Code int64  `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg  string `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	// openapi3 document in yaml string
 | |
| 	Openapi *string `thrift:"openapi,3,optional" form:"openapi" json:"openapi,omitempty" query:"openapi"`
 | |
| 	// plugin manifest in json string
 | |
| 	AiPlugin *string `thrift:"ai_plugin,4,optional" form:"ai_plugin" json:"ai_plugin,omitempty" query:"ai_plugin"`
 | |
| 	// protocol type
 | |
| 	PluginDataFormat *common.PluginDataFormat `thrift:"plugin_data_format,5,optional" form:"plugin_data_format" json:"plugin_data_format,omitempty" query:"plugin_data_format"`
 | |
| 	// ignore
 | |
| 	DuplicateAPIInfos []*common.DuplicateAPIInfo `thrift:"duplicate_api_infos,6" form:"duplicate_api_infos" json:"duplicate_api_infos" query:"duplicate_api_infos"`
 | |
| 	// BaseResp.StatusCode
 | |
| 	//     DuplicateAPIPath: Duplicate API Path in imported file with request. MergeSamePaths = false
 | |
| 	//     InvalidParam: Other errors
 | |
| 	BaseResp *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
 | |
| }
 | |
| 
 | |
| func NewConvert2OpenAPIResponse() *Convert2OpenAPIResponse {
 | |
| 	return &Convert2OpenAPIResponse{}
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| var Convert2OpenAPIResponse_Openapi_DEFAULT string
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) GetOpenapi() (v string) {
 | |
| 	if !p.IsSetOpenapi() {
 | |
| 		return Convert2OpenAPIResponse_Openapi_DEFAULT
 | |
| 	}
 | |
| 	return *p.Openapi
 | |
| }
 | |
| 
 | |
| var Convert2OpenAPIResponse_AiPlugin_DEFAULT string
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) GetAiPlugin() (v string) {
 | |
| 	if !p.IsSetAiPlugin() {
 | |
| 		return Convert2OpenAPIResponse_AiPlugin_DEFAULT
 | |
| 	}
 | |
| 	return *p.AiPlugin
 | |
| }
 | |
| 
 | |
| var Convert2OpenAPIResponse_PluginDataFormat_DEFAULT common.PluginDataFormat
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) GetPluginDataFormat() (v common.PluginDataFormat) {
 | |
| 	if !p.IsSetPluginDataFormat() {
 | |
| 		return Convert2OpenAPIResponse_PluginDataFormat_DEFAULT
 | |
| 	}
 | |
| 	return *p.PluginDataFormat
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) GetDuplicateAPIInfos() (v []*common.DuplicateAPIInfo) {
 | |
| 	return p.DuplicateAPIInfos
 | |
| }
 | |
| 
 | |
| var Convert2OpenAPIResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return Convert2OpenAPIResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_Convert2OpenAPIResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "openapi",
 | |
| 	4:   "ai_plugin",
 | |
| 	5:   "plugin_data_format",
 | |
| 	6:   "duplicate_api_infos",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) IsSetOpenapi() bool {
 | |
| 	return p.Openapi != nil
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) IsSetAiPlugin() bool {
 | |
| 	return p.AiPlugin != nil
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) IsSetPluginDataFormat() bool {
 | |
| 	return p.PluginDataFormat != nil
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) 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.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.LIST {
 | |
| 				if err = p.ReadField6(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_Convert2OpenAPIResponse[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 *Convert2OpenAPIResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Convert2OpenAPIResponse) 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 *Convert2OpenAPIResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.Openapi = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Convert2OpenAPIResponse) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.AiPlugin = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Convert2OpenAPIResponse) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *common.PluginDataFormat
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		tmp := common.PluginDataFormat(v)
 | |
| 		_field = &tmp
 | |
| 	}
 | |
| 	p.PluginDataFormat = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Convert2OpenAPIResponse) ReadField6(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.DuplicateAPIInfo, 0, size)
 | |
| 	values := make([]common.DuplicateAPIInfo, 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.DuplicateAPIInfos = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *Convert2OpenAPIResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("Convert2OpenAPIResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *Convert2OpenAPIResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *Convert2OpenAPIResponse) 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 *Convert2OpenAPIResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetOpenapi() {
 | |
| 		if err = oprot.WriteFieldBegin("openapi", thrift.STRING, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.Openapi); 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 *Convert2OpenAPIResponse) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetAiPlugin() {
 | |
| 		if err = oprot.WriteFieldBegin("ai_plugin", thrift.STRING, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteString(*p.AiPlugin); 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 *Convert2OpenAPIResponse) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPluginDataFormat() {
 | |
| 		if err = oprot.WriteFieldBegin("plugin_data_format", thrift.I32, 5); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(int32(*p.PluginDataFormat)); 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 *Convert2OpenAPIResponse) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("duplicate_api_infos", thrift.LIST, 6); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.DuplicateAPIInfos)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.DuplicateAPIInfos {
 | |
| 		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 *Convert2OpenAPIResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBaseResp() {
 | |
| 		if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *Convert2OpenAPIResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("Convert2OpenAPIResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type BatchCreateAPIRequest struct {
 | |
| 	PluginID int64 `thrift:"plugin_id,1" form:"plugin_id" json:"plugin_id,string"`
 | |
| 	// plugin manifest in json string
 | |
| 	AiPlugin string `thrift:"ai_plugin,2" form:"ai_plugin" json:"ai_plugin"`
 | |
| 	// plugin openapi3 document in yaml string
 | |
| 	Openapi string `thrift:"openapi,3" form:"openapi" json:"openapi"`
 | |
| 	SpaceID int64  `thrift:"space_id,4" form:"space_id" json:"space_id,string"`
 | |
| 	// ignore
 | |
| 	DevID int64 `thrift:"dev_id,5" form:"dev_id" json:"dev_id,string"`
 | |
| 	// whether to replace the same tool, method:subURL is unique
 | |
| 	ReplaceSamePaths bool `thrift:"replace_same_paths,6" form:"replace_same_paths" json:"replace_same_paths"`
 | |
| 	// ignore
 | |
| 	PathsToReplace []*common.PluginAPIInfo `thrift:"paths_to_replace,7,optional" form:"paths_to_replace" json:"paths_to_replace,omitempty"`
 | |
| 	// ignore
 | |
| 	EditVersion *int32     `thrift:"edit_version,8,optional" form:"edit_version" json:"edit_version,omitempty"`
 | |
| 	Base        *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewBatchCreateAPIRequest() *BatchCreateAPIRequest {
 | |
| 	return &BatchCreateAPIRequest{}
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) GetAiPlugin() (v string) {
 | |
| 	return p.AiPlugin
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) GetOpenapi() (v string) {
 | |
| 	return p.Openapi
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) GetSpaceID() (v int64) {
 | |
| 	return p.SpaceID
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) GetDevID() (v int64) {
 | |
| 	return p.DevID
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) GetReplaceSamePaths() (v bool) {
 | |
| 	return p.ReplaceSamePaths
 | |
| }
 | |
| 
 | |
| var BatchCreateAPIRequest_PathsToReplace_DEFAULT []*common.PluginAPIInfo
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) GetPathsToReplace() (v []*common.PluginAPIInfo) {
 | |
| 	if !p.IsSetPathsToReplace() {
 | |
| 		return BatchCreateAPIRequest_PathsToReplace_DEFAULT
 | |
| 	}
 | |
| 	return p.PathsToReplace
 | |
| }
 | |
| 
 | |
| var BatchCreateAPIRequest_EditVersion_DEFAULT int32
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) GetEditVersion() (v int32) {
 | |
| 	if !p.IsSetEditVersion() {
 | |
| 		return BatchCreateAPIRequest_EditVersion_DEFAULT
 | |
| 	}
 | |
| 	return *p.EditVersion
 | |
| }
 | |
| 
 | |
| var BatchCreateAPIRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return BatchCreateAPIRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_BatchCreateAPIRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	2:   "ai_plugin",
 | |
| 	3:   "openapi",
 | |
| 	4:   "space_id",
 | |
| 	5:   "dev_id",
 | |
| 	6:   "replace_same_paths",
 | |
| 	7:   "paths_to_replace",
 | |
| 	8:   "edit_version",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) IsSetPathsToReplace() bool {
 | |
| 	return p.PathsToReplace != nil
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) IsSetEditVersion() bool {
 | |
| 	return p.EditVersion != nil
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) 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.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.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.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.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.I32 {
 | |
| 				if err = p.ReadField8(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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_BatchCreateAPIRequest[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 *BatchCreateAPIRequest) 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 *BatchCreateAPIRequest) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.AiPlugin = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BatchCreateAPIRequest) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field string
 | |
| 	if v, err := iprot.ReadString(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Openapi = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BatchCreateAPIRequest) ReadField4(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.SpaceID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BatchCreateAPIRequest) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.DevID = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BatchCreateAPIRequest) ReadField6(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field bool
 | |
| 	if v, err := iprot.ReadBool(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.ReplaceSamePaths = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BatchCreateAPIRequest) ReadField7(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.PluginAPIInfo, 0, size)
 | |
| 	values := make([]common.PluginAPIInfo, 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.PathsToReplace = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BatchCreateAPIRequest) ReadField8(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.EditVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BatchCreateAPIRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("BatchCreateAPIRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *BatchCreateAPIRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *BatchCreateAPIRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("ai_plugin", thrift.STRING, 2); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.AiPlugin); 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 *BatchCreateAPIRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("openapi", thrift.STRING, 3); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteString(p.Openapi); 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 *BatchCreateAPIRequest) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("space_id", thrift.I64, 4); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.SpaceID); 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 *BatchCreateAPIRequest) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("dev_id", thrift.I64, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(p.DevID); 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 *BatchCreateAPIRequest) writeField6(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("replace_same_paths", thrift.BOOL, 6); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteBool(p.ReplaceSamePaths); 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 *BatchCreateAPIRequest) writeField7(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPathsToReplace() {
 | |
| 		if err = oprot.WriteFieldBegin("paths_to_replace", thrift.LIST, 7); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.PathsToReplace)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.PathsToReplace {
 | |
| 			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 *BatchCreateAPIRequest) writeField8(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetEditVersion() {
 | |
| 		if err = oprot.WriteFieldBegin("edit_version", thrift.I32, 8); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.EditVersion); 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 *BatchCreateAPIRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBase() {
 | |
| 		if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("BatchCreateAPIRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type BatchCreateAPIResponse struct {
 | |
| 	Code int64  `thrift:"code,1" form:"code" json:"code" query:"code"`
 | |
| 	Msg  string `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
 | |
| 	// PathsToReplace represents the tools to override,
 | |
| 	// If BaseResp. StatusCode = DuplicateAPIPath, then PathsToReplace is not empty
 | |
| 	PathsDuplicated []*common.PluginAPIInfo `thrift:"paths_duplicated,3,optional" form:"paths_duplicated" json:"paths_duplicated,omitempty" query:"paths_duplicated"`
 | |
| 	PathsCreated    []*common.PluginAPIInfo `thrift:"paths_created,4,optional" form:"paths_created" json:"paths_created,omitempty" query:"paths_created"`
 | |
| 	EditVersion     int32                   `thrift:"edit_version,5" form:"edit_version" json:"edit_version" query:"edit_version"`
 | |
| 	// BaseResp.StatusCode
 | |
| 	//     DuplicateAPIPath: There is a duplicate API Path with request. ReplaceDupPath = false
 | |
| 	//     InvalidParam: Other errors
 | |
| 	BaseResp *base.BaseResp `thrift:"BaseResp,255,required" form:"BaseResp,required" json:"BaseResp,required" query:"BaseResp,required"`
 | |
| }
 | |
| 
 | |
| func NewBatchCreateAPIResponse() *BatchCreateAPIResponse {
 | |
| 	return &BatchCreateAPIResponse{}
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| var BatchCreateAPIResponse_PathsDuplicated_DEFAULT []*common.PluginAPIInfo
 | |
| 
 | |
| func (p *BatchCreateAPIResponse) GetPathsDuplicated() (v []*common.PluginAPIInfo) {
 | |
| 	if !p.IsSetPathsDuplicated() {
 | |
| 		return BatchCreateAPIResponse_PathsDuplicated_DEFAULT
 | |
| 	}
 | |
| 	return p.PathsDuplicated
 | |
| }
 | |
| 
 | |
| var BatchCreateAPIResponse_PathsCreated_DEFAULT []*common.PluginAPIInfo
 | |
| 
 | |
| func (p *BatchCreateAPIResponse) GetPathsCreated() (v []*common.PluginAPIInfo) {
 | |
| 	if !p.IsSetPathsCreated() {
 | |
| 		return BatchCreateAPIResponse_PathsCreated_DEFAULT
 | |
| 	}
 | |
| 	return p.PathsCreated
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIResponse) GetEditVersion() (v int32) {
 | |
| 	return p.EditVersion
 | |
| }
 | |
| 
 | |
| var BatchCreateAPIResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *BatchCreateAPIResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return BatchCreateAPIResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_BatchCreateAPIResponse = map[int16]string{
 | |
| 	1:   "code",
 | |
| 	2:   "msg",
 | |
| 	3:   "paths_duplicated",
 | |
| 	4:   "paths_created",
 | |
| 	5:   "edit_version",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIResponse) IsSetPathsDuplicated() bool {
 | |
| 	return p.PathsDuplicated != nil
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIResponse) IsSetPathsCreated() bool {
 | |
| 	return p.PathsCreated != nil
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIResponse) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetBaseResp 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.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.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.I32 {
 | |
| 				if err = p.ReadField5(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetBaseResp = 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 !issetBaseResp {
 | |
| 		fieldId = 255
 | |
| 		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_BatchCreateAPIResponse[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_BatchCreateAPIResponse[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BatchCreateAPIResponse) 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 *BatchCreateAPIResponse) ReadField3(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.PluginAPIInfo, 0, size)
 | |
| 	values := make([]common.PluginAPIInfo, 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.PathsDuplicated = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BatchCreateAPIResponse) ReadField4(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*common.PluginAPIInfo, 0, size)
 | |
| 	values := make([]common.PluginAPIInfo, 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.PathsCreated = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BatchCreateAPIResponse) ReadField5(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.EditVersion = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *BatchCreateAPIResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("BatchCreateAPIResponse"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *BatchCreateAPIResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 *BatchCreateAPIResponse) 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 *BatchCreateAPIResponse) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPathsDuplicated() {
 | |
| 		if err = oprot.WriteFieldBegin("paths_duplicated", thrift.LIST, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.PathsDuplicated)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.PathsDuplicated {
 | |
| 			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 *BatchCreateAPIResponse) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetPathsCreated() {
 | |
| 		if err = oprot.WriteFieldBegin("paths_created", thrift.LIST, 4); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.PathsCreated)); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		for _, v := range p.PathsCreated {
 | |
| 			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 *BatchCreateAPIResponse) writeField5(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("edit_version", thrift.I32, 5); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI32(p.EditVersion); 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 *BatchCreateAPIResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *BatchCreateAPIResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("BatchCreateAPIResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type RevokeAuthTokenRequest struct {
 | |
| 	PluginID int64 `thrift:"plugin_id,1,required" form:"plugin_id,required" json:"plugin_id,string,required"`
 | |
| 	// If not passed using uid assignment bot_id = connector_uid
 | |
| 	BotID       *int64     `thrift:"bot_id,2,optional" form:"bot_id" json:"bot_id,string,omitempty"`
 | |
| 	ContextType *int32     `thrift:"context_type,3,optional" form:"context_type" json:"context_type,omitempty"`
 | |
| 	Base        *base.Base `thrift:"Base,255" form:"Base" json:"Base" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewRevokeAuthTokenRequest() *RevokeAuthTokenRequest {
 | |
| 	return &RevokeAuthTokenRequest{}
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenRequest) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| var RevokeAuthTokenRequest_BotID_DEFAULT int64
 | |
| 
 | |
| func (p *RevokeAuthTokenRequest) GetBotID() (v int64) {
 | |
| 	if !p.IsSetBotID() {
 | |
| 		return RevokeAuthTokenRequest_BotID_DEFAULT
 | |
| 	}
 | |
| 	return *p.BotID
 | |
| }
 | |
| 
 | |
| var RevokeAuthTokenRequest_ContextType_DEFAULT int32
 | |
| 
 | |
| func (p *RevokeAuthTokenRequest) GetContextType() (v int32) {
 | |
| 	if !p.IsSetContextType() {
 | |
| 		return RevokeAuthTokenRequest_ContextType_DEFAULT
 | |
| 	}
 | |
| 	return *p.ContextType
 | |
| }
 | |
| 
 | |
| var RevokeAuthTokenRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *RevokeAuthTokenRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return RevokeAuthTokenRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_RevokeAuthTokenRequest = map[int16]string{
 | |
| 	1:   "plugin_id",
 | |
| 	2:   "bot_id",
 | |
| 	3:   "context_type",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenRequest) IsSetBotID() bool {
 | |
| 	return p.BotID != nil
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenRequest) IsSetContextType() bool {
 | |
| 	return p.ContextType != nil
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetPluginID 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetPluginID = true
 | |
| 			} 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.I32 {
 | |
| 				if err = p.ReadField3(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetPluginID {
 | |
| 		fieldId = 1
 | |
| 		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_RevokeAuthTokenRequest[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_RevokeAuthTokenRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenRequest) 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 *RevokeAuthTokenRequest) ReadField2(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 *RevokeAuthTokenRequest) ReadField3(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field *int32
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = &v
 | |
| 	}
 | |
| 	p.ContextType = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *RevokeAuthTokenRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("RevokeAuthTokenRequest"); 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.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *RevokeAuthTokenRequest) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *RevokeAuthTokenRequest) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetBotID() {
 | |
| 		if err = oprot.WriteFieldBegin("bot_id", thrift.I64, 2); 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 2 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
 | |
| }
 | |
| func (p *RevokeAuthTokenRequest) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetContextType() {
 | |
| 		if err = oprot.WriteFieldBegin("context_type", thrift.I32, 3); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := oprot.WriteI32(*p.ContextType); 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 *RevokeAuthTokenRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("RevokeAuthTokenRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type RevokeAuthTokenResponse struct {
 | |
| 	BaseResp *base.BaseResp `thrift:"BaseResp,255,required" form:"BaseResp,required" json:"BaseResp,required" query:"BaseResp,required"`
 | |
| }
 | |
| 
 | |
| func NewRevokeAuthTokenResponse() *RevokeAuthTokenResponse {
 | |
| 	return &RevokeAuthTokenResponse{}
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| var RevokeAuthTokenResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *RevokeAuthTokenResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return RevokeAuthTokenResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_RevokeAuthTokenResponse = map[int16]string{
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenResponse) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetBaseResp 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 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetBaseResp = 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 !issetBaseResp {
 | |
| 		fieldId = 255
 | |
| 		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_RevokeAuthTokenResponse[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_RevokeAuthTokenResponse[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("RevokeAuthTokenResponse"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *RevokeAuthTokenResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *RevokeAuthTokenResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("RevokeAuthTokenResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type OAuthPluginInfo struct {
 | |
| 	PluginID int64 `thrift:"plugin_id,1" form:"plugin_id" json:"plugin_id,string" query:"plugin_id"`
 | |
| 	// user authorization status
 | |
| 	Status common.OAuthStatus `thrift:"status,2" form:"status" json:"status" query:"status"`
 | |
| 	// Plugin name
 | |
| 	Name string `thrift:"name,3" form:"name" json:"name" query:"name"`
 | |
| 	// plugin avatar
 | |
| 	PluginIcon string `thrift:"plugin_icon,4" form:"plugin_icon" json:"plugin_icon" query:"plugin_icon"`
 | |
| }
 | |
| 
 | |
| func NewOAuthPluginInfo() *OAuthPluginInfo {
 | |
| 	return &OAuthPluginInfo{}
 | |
| }
 | |
| 
 | |
| func (p *OAuthPluginInfo) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *OAuthPluginInfo) GetPluginID() (v int64) {
 | |
| 	return p.PluginID
 | |
| }
 | |
| 
 | |
| func (p *OAuthPluginInfo) GetStatus() (v common.OAuthStatus) {
 | |
| 	return p.Status
 | |
| }
 | |
| 
 | |
| func (p *OAuthPluginInfo) GetName() (v string) {
 | |
| 	return p.Name
 | |
| }
 | |
| 
 | |
| func (p *OAuthPluginInfo) GetPluginIcon() (v string) {
 | |
| 	return p.PluginIcon
 | |
| }
 | |
| 
 | |
| var fieldIDToName_OAuthPluginInfo = map[int16]string{
 | |
| 	1: "plugin_id",
 | |
| 	2: "status",
 | |
| 	3: "name",
 | |
| 	4: "plugin_icon",
 | |
| }
 | |
| 
 | |
| func (p *OAuthPluginInfo) 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.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.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
 | |
| 			}
 | |
| 		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_OAuthPluginInfo[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 *OAuthPluginInfo) 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 *OAuthPluginInfo) ReadField2(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field common.OAuthStatus
 | |
| 	if v, err := iprot.ReadI32(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = common.OAuthStatus(v)
 | |
| 	}
 | |
| 	p.Status = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *OAuthPluginInfo) ReadField3(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 *OAuthPluginInfo) ReadField4(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 *OAuthPluginInfo) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("OAuthPluginInfo"); 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 *OAuthPluginInfo) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_id", 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 *OAuthPluginInfo) writeField2(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("status", thrift.I32, 2); 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 2 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
 | |
| }
 | |
| func (p *OAuthPluginInfo) writeField3(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("name", thrift.STRING, 3); 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 3 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
 | |
| }
 | |
| func (p *OAuthPluginInfo) writeField4(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("plugin_icon", thrift.STRING, 4); 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 4 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *OAuthPluginInfo) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("OAuthPluginInfo(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetQueriedOAuthPluginListRequest struct {
 | |
| 	BotID int64      `thrift:"bot_id,1,required" form:"bot_id,required" json:"bot_id,string,required" query:"bot_id,required"`
 | |
| 	Base  *base.Base `thrift:"Base,255" form:"Base" json:"Base" query:"Base"`
 | |
| }
 | |
| 
 | |
| func NewGetQueriedOAuthPluginListRequest() *GetQueriedOAuthPluginListRequest {
 | |
| 	return &GetQueriedOAuthPluginListRequest{}
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListRequest) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListRequest) GetBotID() (v int64) {
 | |
| 	return p.BotID
 | |
| }
 | |
| 
 | |
| var GetQueriedOAuthPluginListRequest_Base_DEFAULT *base.Base
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListRequest) GetBase() (v *base.Base) {
 | |
| 	if !p.IsSetBase() {
 | |
| 		return GetQueriedOAuthPluginListRequest_Base_DEFAULT
 | |
| 	}
 | |
| 	return p.Base
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetQueriedOAuthPluginListRequest = map[int16]string{
 | |
| 	1:   "bot_id",
 | |
| 	255: "Base",
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListRequest) IsSetBase() bool {
 | |
| 	return p.Base != nil
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListRequest) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetBotID 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.I64 {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetBotID = true
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(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 !issetBotID {
 | |
| 		fieldId = 1
 | |
| 		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_GetQueriedOAuthPluginListRequest[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_GetQueriedOAuthPluginListRequest[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListRequest) 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 *GetQueriedOAuthPluginListRequest) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBase()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Base = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListRequest) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetQueriedOAuthPluginListRequest"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetQueriedOAuthPluginListRequest) 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 *GetQueriedOAuthPluginListRequest) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Base.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 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListRequest) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetQueriedOAuthPluginListRequest(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type GetQueriedOAuthPluginListResponse struct {
 | |
| 	OauthPluginList []*OAuthPluginInfo `thrift:"oauth_plugin_list,1" form:"oauth_plugin_list" json:"oauth_plugin_list" query:"oauth_plugin_list"`
 | |
| 	Code            int64              `thrift:"code,253" form:"code" json:"code" query:"code"`
 | |
| 	Msg             string             `thrift:"msg,254" form:"msg" json:"msg" query:"msg"`
 | |
| 	BaseResp        *base.BaseResp     `thrift:"BaseResp,255,required" form:"BaseResp,required" json:"BaseResp,required" query:"BaseResp,required"`
 | |
| }
 | |
| 
 | |
| func NewGetQueriedOAuthPluginListResponse() *GetQueriedOAuthPluginListResponse {
 | |
| 	return &GetQueriedOAuthPluginListResponse{}
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListResponse) InitDefault() {
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListResponse) GetOauthPluginList() (v []*OAuthPluginInfo) {
 | |
| 	return p.OauthPluginList
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListResponse) GetCode() (v int64) {
 | |
| 	return p.Code
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListResponse) GetMsg() (v string) {
 | |
| 	return p.Msg
 | |
| }
 | |
| 
 | |
| var GetQueriedOAuthPluginListResponse_BaseResp_DEFAULT *base.BaseResp
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListResponse) GetBaseResp() (v *base.BaseResp) {
 | |
| 	if !p.IsSetBaseResp() {
 | |
| 		return GetQueriedOAuthPluginListResponse_BaseResp_DEFAULT
 | |
| 	}
 | |
| 	return p.BaseResp
 | |
| }
 | |
| 
 | |
| var fieldIDToName_GetQueriedOAuthPluginListResponse = map[int16]string{
 | |
| 	1:   "oauth_plugin_list",
 | |
| 	253: "code",
 | |
| 	254: "msg",
 | |
| 	255: "BaseResp",
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListResponse) IsSetBaseResp() bool {
 | |
| 	return p.BaseResp != nil
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListResponse) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 	var issetBaseResp 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.LIST {
 | |
| 				if err = p.ReadField1(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 253:
 | |
| 			if fieldTypeId == thrift.I64 {
 | |
| 				if err = p.ReadField253(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 254:
 | |
| 			if fieldTypeId == thrift.STRING {
 | |
| 				if err = p.ReadField254(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		case 255:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField255(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 				issetBaseResp = 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 !issetBaseResp {
 | |
| 		fieldId = 255
 | |
| 		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_GetQueriedOAuthPluginListResponse[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_GetQueriedOAuthPluginListResponse[fieldId]))
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListResponse) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_, size, err := iprot.ReadListBegin()
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	_field := make([]*OAuthPluginInfo, 0, size)
 | |
| 	values := make([]OAuthPluginInfo, 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.OauthPluginList = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetQueriedOAuthPluginListResponse) ReadField253(iprot thrift.TProtocol) error {
 | |
| 
 | |
| 	var _field int64
 | |
| 	if v, err := iprot.ReadI64(); err != nil {
 | |
| 		return err
 | |
| 	} else {
 | |
| 		_field = v
 | |
| 	}
 | |
| 	p.Code = _field
 | |
| 	return nil
 | |
| }
 | |
| func (p *GetQueriedOAuthPluginListResponse) ReadField254(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 *GetQueriedOAuthPluginListResponse) ReadField255(iprot thrift.TProtocol) error {
 | |
| 	_field := base.NewBaseResp()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.BaseResp = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListResponse) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetQueriedOAuthPluginListResponse"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField253(oprot); err != nil {
 | |
| 			fieldId = 253
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField254(oprot); err != nil {
 | |
| 			fieldId = 254
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 		if err = p.writeField255(oprot); err != nil {
 | |
| 			fieldId = 255
 | |
| 			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 *GetQueriedOAuthPluginListResponse) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("oauth_plugin_list", thrift.LIST, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.OauthPluginList)); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	for _, v := range p.OauthPluginList {
 | |
| 		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 *GetQueriedOAuthPluginListResponse) writeField253(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("code", thrift.I64, 253); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := oprot.WriteI64(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 253 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 253 end error: ", p), err)
 | |
| }
 | |
| func (p *GetQueriedOAuthPluginListResponse) writeField254(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("msg", thrift.STRING, 254); 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 254 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 254 end error: ", p), err)
 | |
| }
 | |
| func (p *GetQueriedOAuthPluginListResponse) writeField255(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.BaseResp.Write(oprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 		goto WriteFieldEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *GetQueriedOAuthPluginListResponse) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("GetQueriedOAuthPluginListResponse(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopService interface {
 | |
| 	GetOAuthSchema(ctx context.Context, request *GetOAuthSchemaRequest) (r *GetOAuthSchemaResponse, err error)
 | |
| 
 | |
| 	GetOAuthSchemaAPI(ctx context.Context, request *GetOAuthSchemaRequest) (r *GetOAuthSchemaResponse, err error)
 | |
| 	// Get a list of published workflows, plugins, or details of multiple plugins
 | |
| 	GetPlaygroundPluginList(ctx context.Context, request *GetPlaygroundPluginListRequest) (r *GetPlaygroundPluginListResponse, err error)
 | |
| 	// Creating plugins with code
 | |
| 	RegisterPlugin(ctx context.Context, request *RegisterPluginRequest) (r *RegisterPluginResponse, err error)
 | |
| 	// Create plugins through UI
 | |
| 	RegisterPluginMeta(ctx context.Context, request *RegisterPluginMetaRequest) (r *RegisterPluginMetaResponse, err error)
 | |
| 	// Get a list of plug-in tools, or multiple tool details
 | |
| 	GetPluginAPIs(ctx context.Context, request *GetPluginAPIsRequest) (r *GetPluginAPIsResponse, err error)
 | |
| 	// Get plugin details
 | |
| 	GetPluginInfo(ctx context.Context, request *GetPluginInfoRequest) (r *GetPluginInfoResponse, err error)
 | |
| 	// Updated list of tools compared to the most recent release
 | |
| 	GetUpdatedAPIs(ctx context.Context, request *GetUpdatedAPIsRequest) (r *GetUpdatedAPIsResponse, err error)
 | |
| 
 | |
| 	GetOAuthStatus(ctx context.Context, request *GetOAuthStatusRequest) (r *GetOAuthStatusResponse, err error)
 | |
| 
 | |
| 	CheckAndLockPluginEdit(ctx context.Context, request *CheckAndLockPluginEditRequest) (r *CheckAndLockPluginEditResponse, err error)
 | |
| 
 | |
| 	UnlockPluginEdit(ctx context.Context, request *UnlockPluginEditRequest) (r *UnlockPluginEditResponse, err error)
 | |
| 	// Update plugins via code
 | |
| 	UpdatePlugin(ctx context.Context, request *UpdatePluginRequest) (r *UpdatePluginResponse, err error)
 | |
| 	// removal tool
 | |
| 	DeleteAPI(ctx context.Context, request *DeleteAPIRequest) (r *DeleteAPIResponse, err error)
 | |
| 	// Remove plugin
 | |
| 	DelPlugin(ctx context.Context, request *DelPluginRequest) (r *DelPluginResponse, err error)
 | |
| 	// publishing plugin
 | |
| 	PublishPlugin(ctx context.Context, request *PublishPluginRequest) (r *PublishPluginResponse, err error)
 | |
| 	// Update plugins via UI
 | |
| 	UpdatePluginMeta(ctx context.Context, request *UpdatePluginMetaRequest) (r *UpdatePluginMetaResponse, err error)
 | |
| 
 | |
| 	GetBotDefaultParams(ctx context.Context, request *GetBotDefaultParamsRequest) (r *GetBotDefaultParamsResponse, err error)
 | |
| 
 | |
| 	UpdateBotDefaultParams(ctx context.Context, request *UpdateBotDefaultParamsRequest) (r *UpdateBotDefaultParamsResponse, err error)
 | |
| 	// creation tool
 | |
| 	CreateAPI(ctx context.Context, request *CreateAPIRequest) (r *CreateAPIResponse, err error)
 | |
| 	// update tool
 | |
| 	UpdateAPI(ctx context.Context, request *UpdateAPIRequest) (r *UpdateAPIResponse, err error)
 | |
| 
 | |
| 	GetUserAuthority(ctx context.Context, request *GetUserAuthorityRequest) (r *GetUserAuthorityResponse, err error)
 | |
| 
 | |
| 	DebugAPI(ctx context.Context, request *DebugAPIRequest) (r *DebugAPIResponse, err error)
 | |
| 
 | |
| 	GetPluginNextVersion(ctx context.Context, request *GetPluginNextVersionRequest) (r *GetPluginNextVersionResponse, err error)
 | |
| 
 | |
| 	GetDevPluginList(ctx context.Context, request *GetDevPluginListRequest) (r *GetDevPluginListResponse, err error)
 | |
| 	// Protocol conversion, such as converting curl and mail carrier collection protocols to openapi3 protocols
 | |
| 	Convert2OpenAPI(ctx context.Context, request *Convert2OpenAPIRequest) (r *Convert2OpenAPIResponse, err error)
 | |
| 	// Batch creation tool, currently used with the Convert2 OpenAPI interface
 | |
| 	BatchCreateAPI(ctx context.Context, request *BatchCreateAPIRequest) (r *BatchCreateAPIResponse, err error)
 | |
| 
 | |
| 	RevokeAuthToken(ctx context.Context, request *RevokeAuthTokenRequest) (r *RevokeAuthTokenResponse, err error)
 | |
| 
 | |
| 	GetQueriedOAuthPluginList(ctx context.Context, request *GetQueriedOAuthPluginListRequest) (r *GetQueriedOAuthPluginListResponse, err error)
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceClient struct {
 | |
| 	c thrift.TClient
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *PluginDevelopServiceClient {
 | |
| 	return &PluginDevelopServiceClient{
 | |
| 		c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)),
 | |
| 	}
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *PluginDevelopServiceClient {
 | |
| 	return &PluginDevelopServiceClient{
 | |
| 		c: thrift.NewTStandardClient(iprot, oprot),
 | |
| 	}
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceClient(c thrift.TClient) *PluginDevelopServiceClient {
 | |
| 	return &PluginDevelopServiceClient{
 | |
| 		c: c,
 | |
| 	}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceClient) Client_() thrift.TClient {
 | |
| 	return p.c
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceClient) GetOAuthSchema(ctx context.Context, request *GetOAuthSchemaRequest) (r *GetOAuthSchemaResponse, err error) {
 | |
| 	var _args PluginDevelopServiceGetOAuthSchemaArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceGetOAuthSchemaResult
 | |
| 	if err = p.Client_().Call(ctx, "GetOAuthSchema", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) GetOAuthSchemaAPI(ctx context.Context, request *GetOAuthSchemaRequest) (r *GetOAuthSchemaResponse, err error) {
 | |
| 	var _args PluginDevelopServiceGetOAuthSchemaAPIArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceGetOAuthSchemaAPIResult
 | |
| 	if err = p.Client_().Call(ctx, "GetOAuthSchemaAPI", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) GetPlaygroundPluginList(ctx context.Context, request *GetPlaygroundPluginListRequest) (r *GetPlaygroundPluginListResponse, err error) {
 | |
| 	var _args PluginDevelopServiceGetPlaygroundPluginListArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceGetPlaygroundPluginListResult
 | |
| 	if err = p.Client_().Call(ctx, "GetPlaygroundPluginList", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) RegisterPlugin(ctx context.Context, request *RegisterPluginRequest) (r *RegisterPluginResponse, err error) {
 | |
| 	var _args PluginDevelopServiceRegisterPluginArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceRegisterPluginResult
 | |
| 	if err = p.Client_().Call(ctx, "RegisterPlugin", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) RegisterPluginMeta(ctx context.Context, request *RegisterPluginMetaRequest) (r *RegisterPluginMetaResponse, err error) {
 | |
| 	var _args PluginDevelopServiceRegisterPluginMetaArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceRegisterPluginMetaResult
 | |
| 	if err = p.Client_().Call(ctx, "RegisterPluginMeta", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) GetPluginAPIs(ctx context.Context, request *GetPluginAPIsRequest) (r *GetPluginAPIsResponse, err error) {
 | |
| 	var _args PluginDevelopServiceGetPluginAPIsArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceGetPluginAPIsResult
 | |
| 	if err = p.Client_().Call(ctx, "GetPluginAPIs", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) GetPluginInfo(ctx context.Context, request *GetPluginInfoRequest) (r *GetPluginInfoResponse, err error) {
 | |
| 	var _args PluginDevelopServiceGetPluginInfoArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceGetPluginInfoResult
 | |
| 	if err = p.Client_().Call(ctx, "GetPluginInfo", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) GetUpdatedAPIs(ctx context.Context, request *GetUpdatedAPIsRequest) (r *GetUpdatedAPIsResponse, err error) {
 | |
| 	var _args PluginDevelopServiceGetUpdatedAPIsArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceGetUpdatedAPIsResult
 | |
| 	if err = p.Client_().Call(ctx, "GetUpdatedAPIs", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) GetOAuthStatus(ctx context.Context, request *GetOAuthStatusRequest) (r *GetOAuthStatusResponse, err error) {
 | |
| 	var _args PluginDevelopServiceGetOAuthStatusArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceGetOAuthStatusResult
 | |
| 	if err = p.Client_().Call(ctx, "GetOAuthStatus", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) CheckAndLockPluginEdit(ctx context.Context, request *CheckAndLockPluginEditRequest) (r *CheckAndLockPluginEditResponse, err error) {
 | |
| 	var _args PluginDevelopServiceCheckAndLockPluginEditArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceCheckAndLockPluginEditResult
 | |
| 	if err = p.Client_().Call(ctx, "CheckAndLockPluginEdit", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) UnlockPluginEdit(ctx context.Context, request *UnlockPluginEditRequest) (r *UnlockPluginEditResponse, err error) {
 | |
| 	var _args PluginDevelopServiceUnlockPluginEditArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceUnlockPluginEditResult
 | |
| 	if err = p.Client_().Call(ctx, "UnlockPluginEdit", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) UpdatePlugin(ctx context.Context, request *UpdatePluginRequest) (r *UpdatePluginResponse, err error) {
 | |
| 	var _args PluginDevelopServiceUpdatePluginArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceUpdatePluginResult
 | |
| 	if err = p.Client_().Call(ctx, "UpdatePlugin", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) DeleteAPI(ctx context.Context, request *DeleteAPIRequest) (r *DeleteAPIResponse, err error) {
 | |
| 	var _args PluginDevelopServiceDeleteAPIArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceDeleteAPIResult
 | |
| 	if err = p.Client_().Call(ctx, "DeleteAPI", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) DelPlugin(ctx context.Context, request *DelPluginRequest) (r *DelPluginResponse, err error) {
 | |
| 	var _args PluginDevelopServiceDelPluginArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceDelPluginResult
 | |
| 	if err = p.Client_().Call(ctx, "DelPlugin", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) PublishPlugin(ctx context.Context, request *PublishPluginRequest) (r *PublishPluginResponse, err error) {
 | |
| 	var _args PluginDevelopServicePublishPluginArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServicePublishPluginResult
 | |
| 	if err = p.Client_().Call(ctx, "PublishPlugin", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) UpdatePluginMeta(ctx context.Context, request *UpdatePluginMetaRequest) (r *UpdatePluginMetaResponse, err error) {
 | |
| 	var _args PluginDevelopServiceUpdatePluginMetaArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceUpdatePluginMetaResult
 | |
| 	if err = p.Client_().Call(ctx, "UpdatePluginMeta", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) GetBotDefaultParams(ctx context.Context, request *GetBotDefaultParamsRequest) (r *GetBotDefaultParamsResponse, err error) {
 | |
| 	var _args PluginDevelopServiceGetBotDefaultParamsArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceGetBotDefaultParamsResult
 | |
| 	if err = p.Client_().Call(ctx, "GetBotDefaultParams", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) UpdateBotDefaultParams(ctx context.Context, request *UpdateBotDefaultParamsRequest) (r *UpdateBotDefaultParamsResponse, err error) {
 | |
| 	var _args PluginDevelopServiceUpdateBotDefaultParamsArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceUpdateBotDefaultParamsResult
 | |
| 	if err = p.Client_().Call(ctx, "UpdateBotDefaultParams", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) CreateAPI(ctx context.Context, request *CreateAPIRequest) (r *CreateAPIResponse, err error) {
 | |
| 	var _args PluginDevelopServiceCreateAPIArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceCreateAPIResult
 | |
| 	if err = p.Client_().Call(ctx, "CreateAPI", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) UpdateAPI(ctx context.Context, request *UpdateAPIRequest) (r *UpdateAPIResponse, err error) {
 | |
| 	var _args PluginDevelopServiceUpdateAPIArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceUpdateAPIResult
 | |
| 	if err = p.Client_().Call(ctx, "UpdateAPI", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) GetUserAuthority(ctx context.Context, request *GetUserAuthorityRequest) (r *GetUserAuthorityResponse, err error) {
 | |
| 	var _args PluginDevelopServiceGetUserAuthorityArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceGetUserAuthorityResult
 | |
| 	if err = p.Client_().Call(ctx, "GetUserAuthority", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) DebugAPI(ctx context.Context, request *DebugAPIRequest) (r *DebugAPIResponse, err error) {
 | |
| 	var _args PluginDevelopServiceDebugAPIArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceDebugAPIResult
 | |
| 	if err = p.Client_().Call(ctx, "DebugAPI", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) GetPluginNextVersion(ctx context.Context, request *GetPluginNextVersionRequest) (r *GetPluginNextVersionResponse, err error) {
 | |
| 	var _args PluginDevelopServiceGetPluginNextVersionArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceGetPluginNextVersionResult
 | |
| 	if err = p.Client_().Call(ctx, "GetPluginNextVersion", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) GetDevPluginList(ctx context.Context, request *GetDevPluginListRequest) (r *GetDevPluginListResponse, err error) {
 | |
| 	var _args PluginDevelopServiceGetDevPluginListArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceGetDevPluginListResult
 | |
| 	if err = p.Client_().Call(ctx, "GetDevPluginList", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) Convert2OpenAPI(ctx context.Context, request *Convert2OpenAPIRequest) (r *Convert2OpenAPIResponse, err error) {
 | |
| 	var _args PluginDevelopServiceConvert2OpenAPIArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceConvert2OpenAPIResult
 | |
| 	if err = p.Client_().Call(ctx, "Convert2OpenAPI", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) BatchCreateAPI(ctx context.Context, request *BatchCreateAPIRequest) (r *BatchCreateAPIResponse, err error) {
 | |
| 	var _args PluginDevelopServiceBatchCreateAPIArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceBatchCreateAPIResult
 | |
| 	if err = p.Client_().Call(ctx, "BatchCreateAPI", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) RevokeAuthToken(ctx context.Context, request *RevokeAuthTokenRequest) (r *RevokeAuthTokenResponse, err error) {
 | |
| 	var _args PluginDevelopServiceRevokeAuthTokenArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceRevokeAuthTokenResult
 | |
| 	if err = p.Client_().Call(ctx, "RevokeAuthToken", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| func (p *PluginDevelopServiceClient) GetQueriedOAuthPluginList(ctx context.Context, request *GetQueriedOAuthPluginListRequest) (r *GetQueriedOAuthPluginListResponse, err error) {
 | |
| 	var _args PluginDevelopServiceGetQueriedOAuthPluginListArgs
 | |
| 	_args.Request = request
 | |
| 	var _result PluginDevelopServiceGetQueriedOAuthPluginListResult
 | |
| 	if err = p.Client_().Call(ctx, "GetQueriedOAuthPluginList", &_args, &_result); err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return _result.GetSuccess(), nil
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceProcessor struct {
 | |
| 	processorMap map[string]thrift.TProcessorFunction
 | |
| 	handler      PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) {
 | |
| 	p.processorMap[key] = processor
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) {
 | |
| 	processor, ok = p.processorMap[key]
 | |
| 	return processor, ok
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction {
 | |
| 	return p.processorMap
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceProcessor(handler PluginDevelopService) *PluginDevelopServiceProcessor {
 | |
| 	self := &PluginDevelopServiceProcessor{handler: handler, processorMap: make(map[string]thrift.TProcessorFunction)}
 | |
| 	self.AddToProcessorMap("GetOAuthSchema", &pluginDevelopServiceProcessorGetOAuthSchema{handler: handler})
 | |
| 	self.AddToProcessorMap("GetOAuthSchemaAPI", &pluginDevelopServiceProcessorGetOAuthSchemaAPI{handler: handler})
 | |
| 	self.AddToProcessorMap("GetPlaygroundPluginList", &pluginDevelopServiceProcessorGetPlaygroundPluginList{handler: handler})
 | |
| 	self.AddToProcessorMap("RegisterPlugin", &pluginDevelopServiceProcessorRegisterPlugin{handler: handler})
 | |
| 	self.AddToProcessorMap("RegisterPluginMeta", &pluginDevelopServiceProcessorRegisterPluginMeta{handler: handler})
 | |
| 	self.AddToProcessorMap("GetPluginAPIs", &pluginDevelopServiceProcessorGetPluginAPIs{handler: handler})
 | |
| 	self.AddToProcessorMap("GetPluginInfo", &pluginDevelopServiceProcessorGetPluginInfo{handler: handler})
 | |
| 	self.AddToProcessorMap("GetUpdatedAPIs", &pluginDevelopServiceProcessorGetUpdatedAPIs{handler: handler})
 | |
| 	self.AddToProcessorMap("GetOAuthStatus", &pluginDevelopServiceProcessorGetOAuthStatus{handler: handler})
 | |
| 	self.AddToProcessorMap("CheckAndLockPluginEdit", &pluginDevelopServiceProcessorCheckAndLockPluginEdit{handler: handler})
 | |
| 	self.AddToProcessorMap("UnlockPluginEdit", &pluginDevelopServiceProcessorUnlockPluginEdit{handler: handler})
 | |
| 	self.AddToProcessorMap("UpdatePlugin", &pluginDevelopServiceProcessorUpdatePlugin{handler: handler})
 | |
| 	self.AddToProcessorMap("DeleteAPI", &pluginDevelopServiceProcessorDeleteAPI{handler: handler})
 | |
| 	self.AddToProcessorMap("DelPlugin", &pluginDevelopServiceProcessorDelPlugin{handler: handler})
 | |
| 	self.AddToProcessorMap("PublishPlugin", &pluginDevelopServiceProcessorPublishPlugin{handler: handler})
 | |
| 	self.AddToProcessorMap("UpdatePluginMeta", &pluginDevelopServiceProcessorUpdatePluginMeta{handler: handler})
 | |
| 	self.AddToProcessorMap("GetBotDefaultParams", &pluginDevelopServiceProcessorGetBotDefaultParams{handler: handler})
 | |
| 	self.AddToProcessorMap("UpdateBotDefaultParams", &pluginDevelopServiceProcessorUpdateBotDefaultParams{handler: handler})
 | |
| 	self.AddToProcessorMap("CreateAPI", &pluginDevelopServiceProcessorCreateAPI{handler: handler})
 | |
| 	self.AddToProcessorMap("UpdateAPI", &pluginDevelopServiceProcessorUpdateAPI{handler: handler})
 | |
| 	self.AddToProcessorMap("GetUserAuthority", &pluginDevelopServiceProcessorGetUserAuthority{handler: handler})
 | |
| 	self.AddToProcessorMap("DebugAPI", &pluginDevelopServiceProcessorDebugAPI{handler: handler})
 | |
| 	self.AddToProcessorMap("GetPluginNextVersion", &pluginDevelopServiceProcessorGetPluginNextVersion{handler: handler})
 | |
| 	self.AddToProcessorMap("GetDevPluginList", &pluginDevelopServiceProcessorGetDevPluginList{handler: handler})
 | |
| 	self.AddToProcessorMap("Convert2OpenAPI", &pluginDevelopServiceProcessorConvert2OpenAPI{handler: handler})
 | |
| 	self.AddToProcessorMap("BatchCreateAPI", &pluginDevelopServiceProcessorBatchCreateAPI{handler: handler})
 | |
| 	self.AddToProcessorMap("RevokeAuthToken", &pluginDevelopServiceProcessorRevokeAuthToken{handler: handler})
 | |
| 	self.AddToProcessorMap("GetQueriedOAuthPluginList", &pluginDevelopServiceProcessorGetQueriedOAuthPluginList{handler: handler})
 | |
| 	return self
 | |
| }
 | |
| func (p *PluginDevelopServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	name, _, seqId, err := iprot.ReadMessageBegin()
 | |
| 	if err != nil {
 | |
| 		return false, err
 | |
| 	}
 | |
| 	if processor, ok := p.GetProcessorFunction(name); ok {
 | |
| 		return processor.Process(ctx, seqId, iprot, oprot)
 | |
| 	}
 | |
| 	iprot.Skip(thrift.STRUCT)
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	x := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function "+name)
 | |
| 	oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId)
 | |
| 	x.Write(oprot)
 | |
| 	oprot.WriteMessageEnd()
 | |
| 	oprot.Flush(ctx)
 | |
| 	return false, x
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorGetOAuthSchema struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorGetOAuthSchema) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceGetOAuthSchemaArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("GetOAuthSchema", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceGetOAuthSchemaResult{}
 | |
| 	var retval *GetOAuthSchemaResponse
 | |
| 	if retval, err2 = p.handler.GetOAuthSchema(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetOAuthSchema: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("GetOAuthSchema", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("GetOAuthSchema", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorGetOAuthSchemaAPI struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorGetOAuthSchemaAPI) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceGetOAuthSchemaAPIArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("GetOAuthSchemaAPI", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceGetOAuthSchemaAPIResult{}
 | |
| 	var retval *GetOAuthSchemaResponse
 | |
| 	if retval, err2 = p.handler.GetOAuthSchemaAPI(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetOAuthSchemaAPI: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("GetOAuthSchemaAPI", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("GetOAuthSchemaAPI", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorGetPlaygroundPluginList struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorGetPlaygroundPluginList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceGetPlaygroundPluginListArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("GetPlaygroundPluginList", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceGetPlaygroundPluginListResult{}
 | |
| 	var retval *GetPlaygroundPluginListResponse
 | |
| 	if retval, err2 = p.handler.GetPlaygroundPluginList(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetPlaygroundPluginList: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("GetPlaygroundPluginList", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("GetPlaygroundPluginList", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorRegisterPlugin struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorRegisterPlugin) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceRegisterPluginArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("RegisterPlugin", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceRegisterPluginResult{}
 | |
| 	var retval *RegisterPluginResponse
 | |
| 	if retval, err2 = p.handler.RegisterPlugin(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing RegisterPlugin: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("RegisterPlugin", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("RegisterPlugin", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorRegisterPluginMeta struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorRegisterPluginMeta) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceRegisterPluginMetaArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("RegisterPluginMeta", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceRegisterPluginMetaResult{}
 | |
| 	var retval *RegisterPluginMetaResponse
 | |
| 	if retval, err2 = p.handler.RegisterPluginMeta(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing RegisterPluginMeta: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("RegisterPluginMeta", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("RegisterPluginMeta", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorGetPluginAPIs struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorGetPluginAPIs) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceGetPluginAPIsArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("GetPluginAPIs", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceGetPluginAPIsResult{}
 | |
| 	var retval *GetPluginAPIsResponse
 | |
| 	if retval, err2 = p.handler.GetPluginAPIs(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetPluginAPIs: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("GetPluginAPIs", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("GetPluginAPIs", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorGetPluginInfo struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorGetPluginInfo) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceGetPluginInfoArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("GetPluginInfo", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceGetPluginInfoResult{}
 | |
| 	var retval *GetPluginInfoResponse
 | |
| 	if retval, err2 = p.handler.GetPluginInfo(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetPluginInfo: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("GetPluginInfo", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("GetPluginInfo", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorGetUpdatedAPIs struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorGetUpdatedAPIs) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceGetUpdatedAPIsArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("GetUpdatedAPIs", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceGetUpdatedAPIsResult{}
 | |
| 	var retval *GetUpdatedAPIsResponse
 | |
| 	if retval, err2 = p.handler.GetUpdatedAPIs(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetUpdatedAPIs: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("GetUpdatedAPIs", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("GetUpdatedAPIs", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorGetOAuthStatus struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorGetOAuthStatus) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceGetOAuthStatusArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("GetOAuthStatus", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceGetOAuthStatusResult{}
 | |
| 	var retval *GetOAuthStatusResponse
 | |
| 	if retval, err2 = p.handler.GetOAuthStatus(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetOAuthStatus: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("GetOAuthStatus", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("GetOAuthStatus", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorCheckAndLockPluginEdit struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorCheckAndLockPluginEdit) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceCheckAndLockPluginEditArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("CheckAndLockPluginEdit", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceCheckAndLockPluginEditResult{}
 | |
| 	var retval *CheckAndLockPluginEditResponse
 | |
| 	if retval, err2 = p.handler.CheckAndLockPluginEdit(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing CheckAndLockPluginEdit: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("CheckAndLockPluginEdit", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("CheckAndLockPluginEdit", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorUnlockPluginEdit struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorUnlockPluginEdit) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceUnlockPluginEditArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("UnlockPluginEdit", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceUnlockPluginEditResult{}
 | |
| 	var retval *UnlockPluginEditResponse
 | |
| 	if retval, err2 = p.handler.UnlockPluginEdit(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing UnlockPluginEdit: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("UnlockPluginEdit", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("UnlockPluginEdit", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorUpdatePlugin struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorUpdatePlugin) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceUpdatePluginArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("UpdatePlugin", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceUpdatePluginResult{}
 | |
| 	var retval *UpdatePluginResponse
 | |
| 	if retval, err2 = p.handler.UpdatePlugin(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing UpdatePlugin: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("UpdatePlugin", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("UpdatePlugin", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorDeleteAPI struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorDeleteAPI) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceDeleteAPIArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("DeleteAPI", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceDeleteAPIResult{}
 | |
| 	var retval *DeleteAPIResponse
 | |
| 	if retval, err2 = p.handler.DeleteAPI(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing DeleteAPI: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("DeleteAPI", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("DeleteAPI", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorDelPlugin struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorDelPlugin) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceDelPluginArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("DelPlugin", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceDelPluginResult{}
 | |
| 	var retval *DelPluginResponse
 | |
| 	if retval, err2 = p.handler.DelPlugin(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing DelPlugin: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("DelPlugin", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("DelPlugin", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorPublishPlugin struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorPublishPlugin) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServicePublishPluginArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("PublishPlugin", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServicePublishPluginResult{}
 | |
| 	var retval *PublishPluginResponse
 | |
| 	if retval, err2 = p.handler.PublishPlugin(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing PublishPlugin: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("PublishPlugin", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("PublishPlugin", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorUpdatePluginMeta struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorUpdatePluginMeta) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceUpdatePluginMetaArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("UpdatePluginMeta", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceUpdatePluginMetaResult{}
 | |
| 	var retval *UpdatePluginMetaResponse
 | |
| 	if retval, err2 = p.handler.UpdatePluginMeta(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing UpdatePluginMeta: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("UpdatePluginMeta", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("UpdatePluginMeta", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorGetBotDefaultParams struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorGetBotDefaultParams) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceGetBotDefaultParamsArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("GetBotDefaultParams", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceGetBotDefaultParamsResult{}
 | |
| 	var retval *GetBotDefaultParamsResponse
 | |
| 	if retval, err2 = p.handler.GetBotDefaultParams(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetBotDefaultParams: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("GetBotDefaultParams", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("GetBotDefaultParams", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorUpdateBotDefaultParams struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorUpdateBotDefaultParams) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceUpdateBotDefaultParamsArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("UpdateBotDefaultParams", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceUpdateBotDefaultParamsResult{}
 | |
| 	var retval *UpdateBotDefaultParamsResponse
 | |
| 	if retval, err2 = p.handler.UpdateBotDefaultParams(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing UpdateBotDefaultParams: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("UpdateBotDefaultParams", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("UpdateBotDefaultParams", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorCreateAPI struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorCreateAPI) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceCreateAPIArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("CreateAPI", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceCreateAPIResult{}
 | |
| 	var retval *CreateAPIResponse
 | |
| 	if retval, err2 = p.handler.CreateAPI(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing CreateAPI: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("CreateAPI", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("CreateAPI", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorUpdateAPI struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorUpdateAPI) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceUpdateAPIArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("UpdateAPI", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceUpdateAPIResult{}
 | |
| 	var retval *UpdateAPIResponse
 | |
| 	if retval, err2 = p.handler.UpdateAPI(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing UpdateAPI: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("UpdateAPI", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("UpdateAPI", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorGetUserAuthority struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorGetUserAuthority) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceGetUserAuthorityArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("GetUserAuthority", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceGetUserAuthorityResult{}
 | |
| 	var retval *GetUserAuthorityResponse
 | |
| 	if retval, err2 = p.handler.GetUserAuthority(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetUserAuthority: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("GetUserAuthority", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("GetUserAuthority", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorDebugAPI struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorDebugAPI) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceDebugAPIArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("DebugAPI", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceDebugAPIResult{}
 | |
| 	var retval *DebugAPIResponse
 | |
| 	if retval, err2 = p.handler.DebugAPI(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing DebugAPI: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("DebugAPI", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("DebugAPI", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorGetPluginNextVersion struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorGetPluginNextVersion) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceGetPluginNextVersionArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("GetPluginNextVersion", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceGetPluginNextVersionResult{}
 | |
| 	var retval *GetPluginNextVersionResponse
 | |
| 	if retval, err2 = p.handler.GetPluginNextVersion(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetPluginNextVersion: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("GetPluginNextVersion", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("GetPluginNextVersion", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorGetDevPluginList struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorGetDevPluginList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceGetDevPluginListArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("GetDevPluginList", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceGetDevPluginListResult{}
 | |
| 	var retval *GetDevPluginListResponse
 | |
| 	if retval, err2 = p.handler.GetDevPluginList(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetDevPluginList: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("GetDevPluginList", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("GetDevPluginList", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorConvert2OpenAPI struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorConvert2OpenAPI) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceConvert2OpenAPIArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("Convert2OpenAPI", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceConvert2OpenAPIResult{}
 | |
| 	var retval *Convert2OpenAPIResponse
 | |
| 	if retval, err2 = p.handler.Convert2OpenAPI(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing Convert2OpenAPI: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("Convert2OpenAPI", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("Convert2OpenAPI", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorBatchCreateAPI struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorBatchCreateAPI) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceBatchCreateAPIArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("BatchCreateAPI", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceBatchCreateAPIResult{}
 | |
| 	var retval *BatchCreateAPIResponse
 | |
| 	if retval, err2 = p.handler.BatchCreateAPI(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing BatchCreateAPI: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("BatchCreateAPI", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("BatchCreateAPI", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorRevokeAuthToken struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorRevokeAuthToken) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceRevokeAuthTokenArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("RevokeAuthToken", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceRevokeAuthTokenResult{}
 | |
| 	var retval *RevokeAuthTokenResponse
 | |
| 	if retval, err2 = p.handler.RevokeAuthToken(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing RevokeAuthToken: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("RevokeAuthToken", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("RevokeAuthToken", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type pluginDevelopServiceProcessorGetQueriedOAuthPluginList struct {
 | |
| 	handler PluginDevelopService
 | |
| }
 | |
| 
 | |
| func (p *pluginDevelopServiceProcessorGetQueriedOAuthPluginList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
 | |
| 	args := PluginDevelopServiceGetQueriedOAuthPluginListArgs{}
 | |
| 	if err = args.Read(iprot); err != nil {
 | |
| 		iprot.ReadMessageEnd()
 | |
| 		x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
 | |
| 		oprot.WriteMessageBegin("GetQueriedOAuthPluginList", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return false, err
 | |
| 	}
 | |
| 
 | |
| 	iprot.ReadMessageEnd()
 | |
| 	var err2 error
 | |
| 	result := PluginDevelopServiceGetQueriedOAuthPluginListResult{}
 | |
| 	var retval *GetQueriedOAuthPluginListResponse
 | |
| 	if retval, err2 = p.handler.GetQueriedOAuthPluginList(ctx, args.Request); err2 != nil {
 | |
| 		x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetQueriedOAuthPluginList: "+err2.Error())
 | |
| 		oprot.WriteMessageBegin("GetQueriedOAuthPluginList", thrift.EXCEPTION, seqId)
 | |
| 		x.Write(oprot)
 | |
| 		oprot.WriteMessageEnd()
 | |
| 		oprot.Flush(ctx)
 | |
| 		return true, err2
 | |
| 	} else {
 | |
| 		result.Success = retval
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageBegin("GetQueriedOAuthPluginList", thrift.REPLY, seqId); err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = result.Write(oprot); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
 | |
| 		err = err2
 | |
| 	}
 | |
| 	if err != nil {
 | |
| 		return
 | |
| 	}
 | |
| 	return true, err
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetOAuthSchemaArgs struct {
 | |
| 	Request *GetOAuthSchemaRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetOAuthSchemaArgs() *PluginDevelopServiceGetOAuthSchemaArgs {
 | |
| 	return &PluginDevelopServiceGetOAuthSchemaArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetOAuthSchemaArgs_Request_DEFAULT *GetOAuthSchemaRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaArgs) GetRequest() (v *GetOAuthSchemaRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceGetOAuthSchemaArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetOAuthSchemaArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaArgs) 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_PluginDevelopServiceGetOAuthSchemaArgs[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 *PluginDevelopServiceGetOAuthSchemaArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetOAuthSchemaRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetOAuthSchema_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceGetOAuthSchemaArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetOAuthSchemaArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetOAuthSchemaResult struct {
 | |
| 	Success *GetOAuthSchemaResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetOAuthSchemaResult() *PluginDevelopServiceGetOAuthSchemaResult {
 | |
| 	return &PluginDevelopServiceGetOAuthSchemaResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetOAuthSchemaResult_Success_DEFAULT *GetOAuthSchemaResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaResult) GetSuccess() (v *GetOAuthSchemaResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceGetOAuthSchemaResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetOAuthSchemaResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceGetOAuthSchemaResult[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 *PluginDevelopServiceGetOAuthSchemaResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetOAuthSchemaResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetOAuthSchema_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetOAuthSchemaResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetOAuthSchemaAPIArgs struct {
 | |
| 	Request *GetOAuthSchemaRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetOAuthSchemaAPIArgs() *PluginDevelopServiceGetOAuthSchemaAPIArgs {
 | |
| 	return &PluginDevelopServiceGetOAuthSchemaAPIArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaAPIArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetOAuthSchemaAPIArgs_Request_DEFAULT *GetOAuthSchemaRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaAPIArgs) GetRequest() (v *GetOAuthSchemaRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceGetOAuthSchemaAPIArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetOAuthSchemaAPIArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaAPIArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaAPIArgs) 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_PluginDevelopServiceGetOAuthSchemaAPIArgs[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 *PluginDevelopServiceGetOAuthSchemaAPIArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetOAuthSchemaRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaAPIArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetOAuthSchemaAPI_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaAPIArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceGetOAuthSchemaAPIArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetOAuthSchemaAPIArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetOAuthSchemaAPIResult struct {
 | |
| 	Success *GetOAuthSchemaResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetOAuthSchemaAPIResult() *PluginDevelopServiceGetOAuthSchemaAPIResult {
 | |
| 	return &PluginDevelopServiceGetOAuthSchemaAPIResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaAPIResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetOAuthSchemaAPIResult_Success_DEFAULT *GetOAuthSchemaResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaAPIResult) GetSuccess() (v *GetOAuthSchemaResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceGetOAuthSchemaAPIResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetOAuthSchemaAPIResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaAPIResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaAPIResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceGetOAuthSchemaAPIResult[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 *PluginDevelopServiceGetOAuthSchemaAPIResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetOAuthSchemaResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaAPIResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetOAuthSchemaAPI_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaAPIResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthSchemaAPIResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetOAuthSchemaAPIResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetPlaygroundPluginListArgs struct {
 | |
| 	Request *GetPlaygroundPluginListRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetPlaygroundPluginListArgs() *PluginDevelopServiceGetPlaygroundPluginListArgs {
 | |
| 	return &PluginDevelopServiceGetPlaygroundPluginListArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPlaygroundPluginListArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetPlaygroundPluginListArgs_Request_DEFAULT *GetPlaygroundPluginListRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPlaygroundPluginListArgs) GetRequest() (v *GetPlaygroundPluginListRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceGetPlaygroundPluginListArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetPlaygroundPluginListArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPlaygroundPluginListArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPlaygroundPluginListArgs) 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_PluginDevelopServiceGetPlaygroundPluginListArgs[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 *PluginDevelopServiceGetPlaygroundPluginListArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetPlaygroundPluginListRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPlaygroundPluginListArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPlaygroundPluginList_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPlaygroundPluginListArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceGetPlaygroundPluginListArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetPlaygroundPluginListArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetPlaygroundPluginListResult struct {
 | |
| 	Success *GetPlaygroundPluginListResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetPlaygroundPluginListResult() *PluginDevelopServiceGetPlaygroundPluginListResult {
 | |
| 	return &PluginDevelopServiceGetPlaygroundPluginListResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPlaygroundPluginListResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetPlaygroundPluginListResult_Success_DEFAULT *GetPlaygroundPluginListResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPlaygroundPluginListResult) GetSuccess() (v *GetPlaygroundPluginListResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceGetPlaygroundPluginListResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetPlaygroundPluginListResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPlaygroundPluginListResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPlaygroundPluginListResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceGetPlaygroundPluginListResult[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 *PluginDevelopServiceGetPlaygroundPluginListResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetPlaygroundPluginListResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPlaygroundPluginListResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPlaygroundPluginList_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPlaygroundPluginListResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPlaygroundPluginListResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetPlaygroundPluginListResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceRegisterPluginArgs struct {
 | |
| 	Request *RegisterPluginRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceRegisterPluginArgs() *PluginDevelopServiceRegisterPluginArgs {
 | |
| 	return &PluginDevelopServiceRegisterPluginArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceRegisterPluginArgs_Request_DEFAULT *RegisterPluginRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginArgs) GetRequest() (v *RegisterPluginRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceRegisterPluginArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceRegisterPluginArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginArgs) 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_PluginDevelopServiceRegisterPluginArgs[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 *PluginDevelopServiceRegisterPluginArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewRegisterPluginRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("RegisterPlugin_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceRegisterPluginArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceRegisterPluginArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceRegisterPluginResult struct {
 | |
| 	Success *RegisterPluginResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceRegisterPluginResult() *PluginDevelopServiceRegisterPluginResult {
 | |
| 	return &PluginDevelopServiceRegisterPluginResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceRegisterPluginResult_Success_DEFAULT *RegisterPluginResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginResult) GetSuccess() (v *RegisterPluginResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceRegisterPluginResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceRegisterPluginResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceRegisterPluginResult[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 *PluginDevelopServiceRegisterPluginResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewRegisterPluginResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("RegisterPlugin_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceRegisterPluginResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceRegisterPluginMetaArgs struct {
 | |
| 	Request *RegisterPluginMetaRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceRegisterPluginMetaArgs() *PluginDevelopServiceRegisterPluginMetaArgs {
 | |
| 	return &PluginDevelopServiceRegisterPluginMetaArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginMetaArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceRegisterPluginMetaArgs_Request_DEFAULT *RegisterPluginMetaRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginMetaArgs) GetRequest() (v *RegisterPluginMetaRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceRegisterPluginMetaArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceRegisterPluginMetaArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginMetaArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginMetaArgs) 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_PluginDevelopServiceRegisterPluginMetaArgs[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 *PluginDevelopServiceRegisterPluginMetaArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewRegisterPluginMetaRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginMetaArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("RegisterPluginMeta_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginMetaArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceRegisterPluginMetaArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceRegisterPluginMetaArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceRegisterPluginMetaResult struct {
 | |
| 	Success *RegisterPluginMetaResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceRegisterPluginMetaResult() *PluginDevelopServiceRegisterPluginMetaResult {
 | |
| 	return &PluginDevelopServiceRegisterPluginMetaResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginMetaResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceRegisterPluginMetaResult_Success_DEFAULT *RegisterPluginMetaResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginMetaResult) GetSuccess() (v *RegisterPluginMetaResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceRegisterPluginMetaResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceRegisterPluginMetaResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginMetaResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginMetaResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceRegisterPluginMetaResult[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 *PluginDevelopServiceRegisterPluginMetaResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewRegisterPluginMetaResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginMetaResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("RegisterPluginMeta_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginMetaResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRegisterPluginMetaResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceRegisterPluginMetaResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetPluginAPIsArgs struct {
 | |
| 	Request *GetPluginAPIsRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetPluginAPIsArgs() *PluginDevelopServiceGetPluginAPIsArgs {
 | |
| 	return &PluginDevelopServiceGetPluginAPIsArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginAPIsArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetPluginAPIsArgs_Request_DEFAULT *GetPluginAPIsRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginAPIsArgs) GetRequest() (v *GetPluginAPIsRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceGetPluginAPIsArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetPluginAPIsArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginAPIsArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginAPIsArgs) 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_PluginDevelopServiceGetPluginAPIsArgs[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 *PluginDevelopServiceGetPluginAPIsArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetPluginAPIsRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginAPIsArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPluginAPIs_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginAPIsArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceGetPluginAPIsArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetPluginAPIsArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetPluginAPIsResult struct {
 | |
| 	Success *GetPluginAPIsResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetPluginAPIsResult() *PluginDevelopServiceGetPluginAPIsResult {
 | |
| 	return &PluginDevelopServiceGetPluginAPIsResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginAPIsResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetPluginAPIsResult_Success_DEFAULT *GetPluginAPIsResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginAPIsResult) GetSuccess() (v *GetPluginAPIsResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceGetPluginAPIsResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetPluginAPIsResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginAPIsResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginAPIsResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceGetPluginAPIsResult[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 *PluginDevelopServiceGetPluginAPIsResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetPluginAPIsResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginAPIsResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPluginAPIs_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginAPIsResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginAPIsResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetPluginAPIsResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetPluginInfoArgs struct {
 | |
| 	Request *GetPluginInfoRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetPluginInfoArgs() *PluginDevelopServiceGetPluginInfoArgs {
 | |
| 	return &PluginDevelopServiceGetPluginInfoArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginInfoArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetPluginInfoArgs_Request_DEFAULT *GetPluginInfoRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginInfoArgs) GetRequest() (v *GetPluginInfoRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceGetPluginInfoArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetPluginInfoArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginInfoArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginInfoArgs) 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_PluginDevelopServiceGetPluginInfoArgs[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 *PluginDevelopServiceGetPluginInfoArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetPluginInfoRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginInfoArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPluginInfo_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginInfoArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceGetPluginInfoArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetPluginInfoArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetPluginInfoResult struct {
 | |
| 	Success *GetPluginInfoResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetPluginInfoResult() *PluginDevelopServiceGetPluginInfoResult {
 | |
| 	return &PluginDevelopServiceGetPluginInfoResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginInfoResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetPluginInfoResult_Success_DEFAULT *GetPluginInfoResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginInfoResult) GetSuccess() (v *GetPluginInfoResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceGetPluginInfoResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetPluginInfoResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginInfoResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginInfoResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceGetPluginInfoResult[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 *PluginDevelopServiceGetPluginInfoResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetPluginInfoResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginInfoResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPluginInfo_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginInfoResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginInfoResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetPluginInfoResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetUpdatedAPIsArgs struct {
 | |
| 	Request *GetUpdatedAPIsRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetUpdatedAPIsArgs() *PluginDevelopServiceGetUpdatedAPIsArgs {
 | |
| 	return &PluginDevelopServiceGetUpdatedAPIsArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUpdatedAPIsArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetUpdatedAPIsArgs_Request_DEFAULT *GetUpdatedAPIsRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUpdatedAPIsArgs) GetRequest() (v *GetUpdatedAPIsRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceGetUpdatedAPIsArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetUpdatedAPIsArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUpdatedAPIsArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUpdatedAPIsArgs) 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_PluginDevelopServiceGetUpdatedAPIsArgs[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 *PluginDevelopServiceGetUpdatedAPIsArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetUpdatedAPIsRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUpdatedAPIsArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetUpdatedAPIs_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUpdatedAPIsArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceGetUpdatedAPIsArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetUpdatedAPIsArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetUpdatedAPIsResult struct {
 | |
| 	Success *GetUpdatedAPIsResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetUpdatedAPIsResult() *PluginDevelopServiceGetUpdatedAPIsResult {
 | |
| 	return &PluginDevelopServiceGetUpdatedAPIsResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUpdatedAPIsResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetUpdatedAPIsResult_Success_DEFAULT *GetUpdatedAPIsResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUpdatedAPIsResult) GetSuccess() (v *GetUpdatedAPIsResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceGetUpdatedAPIsResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetUpdatedAPIsResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUpdatedAPIsResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUpdatedAPIsResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceGetUpdatedAPIsResult[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 *PluginDevelopServiceGetUpdatedAPIsResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetUpdatedAPIsResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUpdatedAPIsResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetUpdatedAPIs_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUpdatedAPIsResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUpdatedAPIsResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetUpdatedAPIsResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetOAuthStatusArgs struct {
 | |
| 	Request *GetOAuthStatusRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetOAuthStatusArgs() *PluginDevelopServiceGetOAuthStatusArgs {
 | |
| 	return &PluginDevelopServiceGetOAuthStatusArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthStatusArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetOAuthStatusArgs_Request_DEFAULT *GetOAuthStatusRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthStatusArgs) GetRequest() (v *GetOAuthStatusRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceGetOAuthStatusArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetOAuthStatusArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthStatusArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthStatusArgs) 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_PluginDevelopServiceGetOAuthStatusArgs[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 *PluginDevelopServiceGetOAuthStatusArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetOAuthStatusRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthStatusArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetOAuthStatus_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthStatusArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceGetOAuthStatusArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetOAuthStatusArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetOAuthStatusResult struct {
 | |
| 	Success *GetOAuthStatusResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetOAuthStatusResult() *PluginDevelopServiceGetOAuthStatusResult {
 | |
| 	return &PluginDevelopServiceGetOAuthStatusResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthStatusResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetOAuthStatusResult_Success_DEFAULT *GetOAuthStatusResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthStatusResult) GetSuccess() (v *GetOAuthStatusResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceGetOAuthStatusResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetOAuthStatusResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthStatusResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthStatusResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceGetOAuthStatusResult[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 *PluginDevelopServiceGetOAuthStatusResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetOAuthStatusResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthStatusResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetOAuthStatus_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthStatusResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetOAuthStatusResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetOAuthStatusResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceCheckAndLockPluginEditArgs struct {
 | |
| 	Request *CheckAndLockPluginEditRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceCheckAndLockPluginEditArgs() *PluginDevelopServiceCheckAndLockPluginEditArgs {
 | |
| 	return &PluginDevelopServiceCheckAndLockPluginEditArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCheckAndLockPluginEditArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceCheckAndLockPluginEditArgs_Request_DEFAULT *CheckAndLockPluginEditRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceCheckAndLockPluginEditArgs) GetRequest() (v *CheckAndLockPluginEditRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceCheckAndLockPluginEditArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceCheckAndLockPluginEditArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCheckAndLockPluginEditArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCheckAndLockPluginEditArgs) 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_PluginDevelopServiceCheckAndLockPluginEditArgs[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 *PluginDevelopServiceCheckAndLockPluginEditArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewCheckAndLockPluginEditRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCheckAndLockPluginEditArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("CheckAndLockPluginEdit_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCheckAndLockPluginEditArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceCheckAndLockPluginEditArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceCheckAndLockPluginEditArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceCheckAndLockPluginEditResult struct {
 | |
| 	Success *CheckAndLockPluginEditResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceCheckAndLockPluginEditResult() *PluginDevelopServiceCheckAndLockPluginEditResult {
 | |
| 	return &PluginDevelopServiceCheckAndLockPluginEditResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCheckAndLockPluginEditResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceCheckAndLockPluginEditResult_Success_DEFAULT *CheckAndLockPluginEditResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceCheckAndLockPluginEditResult) GetSuccess() (v *CheckAndLockPluginEditResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceCheckAndLockPluginEditResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceCheckAndLockPluginEditResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCheckAndLockPluginEditResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCheckAndLockPluginEditResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceCheckAndLockPluginEditResult[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 *PluginDevelopServiceCheckAndLockPluginEditResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewCheckAndLockPluginEditResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCheckAndLockPluginEditResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("CheckAndLockPluginEdit_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCheckAndLockPluginEditResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCheckAndLockPluginEditResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceCheckAndLockPluginEditResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceUnlockPluginEditArgs struct {
 | |
| 	Request *UnlockPluginEditRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceUnlockPluginEditArgs() *PluginDevelopServiceUnlockPluginEditArgs {
 | |
| 	return &PluginDevelopServiceUnlockPluginEditArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUnlockPluginEditArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceUnlockPluginEditArgs_Request_DEFAULT *UnlockPluginEditRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceUnlockPluginEditArgs) GetRequest() (v *UnlockPluginEditRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceUnlockPluginEditArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceUnlockPluginEditArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUnlockPluginEditArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUnlockPluginEditArgs) 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_PluginDevelopServiceUnlockPluginEditArgs[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 *PluginDevelopServiceUnlockPluginEditArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewUnlockPluginEditRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUnlockPluginEditArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UnlockPluginEdit_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUnlockPluginEditArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceUnlockPluginEditArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceUnlockPluginEditArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceUnlockPluginEditResult struct {
 | |
| 	Success *UnlockPluginEditResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceUnlockPluginEditResult() *PluginDevelopServiceUnlockPluginEditResult {
 | |
| 	return &PluginDevelopServiceUnlockPluginEditResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUnlockPluginEditResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceUnlockPluginEditResult_Success_DEFAULT *UnlockPluginEditResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceUnlockPluginEditResult) GetSuccess() (v *UnlockPluginEditResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceUnlockPluginEditResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceUnlockPluginEditResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUnlockPluginEditResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUnlockPluginEditResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceUnlockPluginEditResult[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 *PluginDevelopServiceUnlockPluginEditResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewUnlockPluginEditResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUnlockPluginEditResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UnlockPluginEdit_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUnlockPluginEditResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUnlockPluginEditResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceUnlockPluginEditResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceUpdatePluginArgs struct {
 | |
| 	Request *UpdatePluginRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceUpdatePluginArgs() *PluginDevelopServiceUpdatePluginArgs {
 | |
| 	return &PluginDevelopServiceUpdatePluginArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceUpdatePluginArgs_Request_DEFAULT *UpdatePluginRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginArgs) GetRequest() (v *UpdatePluginRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceUpdatePluginArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceUpdatePluginArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginArgs) 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_PluginDevelopServiceUpdatePluginArgs[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 *PluginDevelopServiceUpdatePluginArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewUpdatePluginRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdatePlugin_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceUpdatePluginArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceUpdatePluginArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceUpdatePluginResult struct {
 | |
| 	Success *UpdatePluginResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceUpdatePluginResult() *PluginDevelopServiceUpdatePluginResult {
 | |
| 	return &PluginDevelopServiceUpdatePluginResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceUpdatePluginResult_Success_DEFAULT *UpdatePluginResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginResult) GetSuccess() (v *UpdatePluginResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceUpdatePluginResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceUpdatePluginResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceUpdatePluginResult[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 *PluginDevelopServiceUpdatePluginResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewUpdatePluginResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdatePlugin_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceUpdatePluginResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceDeleteAPIArgs struct {
 | |
| 	Request *DeleteAPIRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceDeleteAPIArgs() *PluginDevelopServiceDeleteAPIArgs {
 | |
| 	return &PluginDevelopServiceDeleteAPIArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDeleteAPIArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceDeleteAPIArgs_Request_DEFAULT *DeleteAPIRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceDeleteAPIArgs) GetRequest() (v *DeleteAPIRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceDeleteAPIArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceDeleteAPIArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDeleteAPIArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDeleteAPIArgs) 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_PluginDevelopServiceDeleteAPIArgs[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 *PluginDevelopServiceDeleteAPIArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewDeleteAPIRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDeleteAPIArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DeleteAPI_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDeleteAPIArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceDeleteAPIArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceDeleteAPIArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceDeleteAPIResult struct {
 | |
| 	Success *DeleteAPIResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceDeleteAPIResult() *PluginDevelopServiceDeleteAPIResult {
 | |
| 	return &PluginDevelopServiceDeleteAPIResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDeleteAPIResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceDeleteAPIResult_Success_DEFAULT *DeleteAPIResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceDeleteAPIResult) GetSuccess() (v *DeleteAPIResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceDeleteAPIResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceDeleteAPIResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDeleteAPIResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDeleteAPIResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceDeleteAPIResult[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 *PluginDevelopServiceDeleteAPIResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewDeleteAPIResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDeleteAPIResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DeleteAPI_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDeleteAPIResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDeleteAPIResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceDeleteAPIResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceDelPluginArgs struct {
 | |
| 	Request *DelPluginRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceDelPluginArgs() *PluginDevelopServiceDelPluginArgs {
 | |
| 	return &PluginDevelopServiceDelPluginArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDelPluginArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceDelPluginArgs_Request_DEFAULT *DelPluginRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceDelPluginArgs) GetRequest() (v *DelPluginRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceDelPluginArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceDelPluginArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDelPluginArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDelPluginArgs) 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_PluginDevelopServiceDelPluginArgs[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 *PluginDevelopServiceDelPluginArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewDelPluginRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDelPluginArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DelPlugin_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDelPluginArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceDelPluginArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceDelPluginArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceDelPluginResult struct {
 | |
| 	Success *DelPluginResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceDelPluginResult() *PluginDevelopServiceDelPluginResult {
 | |
| 	return &PluginDevelopServiceDelPluginResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDelPluginResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceDelPluginResult_Success_DEFAULT *DelPluginResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceDelPluginResult) GetSuccess() (v *DelPluginResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceDelPluginResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceDelPluginResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDelPluginResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDelPluginResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceDelPluginResult[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 *PluginDevelopServiceDelPluginResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewDelPluginResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDelPluginResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DelPlugin_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDelPluginResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDelPluginResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceDelPluginResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServicePublishPluginArgs struct {
 | |
| 	Request *PublishPluginRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServicePublishPluginArgs() *PluginDevelopServicePublishPluginArgs {
 | |
| 	return &PluginDevelopServicePublishPluginArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServicePublishPluginArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServicePublishPluginArgs_Request_DEFAULT *PublishPluginRequest
 | |
| 
 | |
| func (p *PluginDevelopServicePublishPluginArgs) GetRequest() (v *PublishPluginRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServicePublishPluginArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServicePublishPluginArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServicePublishPluginArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServicePublishPluginArgs) 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_PluginDevelopServicePublishPluginArgs[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 *PluginDevelopServicePublishPluginArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewPublishPluginRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServicePublishPluginArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("PublishPlugin_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServicePublishPluginArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServicePublishPluginArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServicePublishPluginArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServicePublishPluginResult struct {
 | |
| 	Success *PublishPluginResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServicePublishPluginResult() *PluginDevelopServicePublishPluginResult {
 | |
| 	return &PluginDevelopServicePublishPluginResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServicePublishPluginResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServicePublishPluginResult_Success_DEFAULT *PublishPluginResponse
 | |
| 
 | |
| func (p *PluginDevelopServicePublishPluginResult) GetSuccess() (v *PublishPluginResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServicePublishPluginResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServicePublishPluginResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServicePublishPluginResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServicePublishPluginResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServicePublishPluginResult[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 *PluginDevelopServicePublishPluginResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewPublishPluginResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServicePublishPluginResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("PublishPlugin_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServicePublishPluginResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServicePublishPluginResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServicePublishPluginResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceUpdatePluginMetaArgs struct {
 | |
| 	Request *UpdatePluginMetaRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceUpdatePluginMetaArgs() *PluginDevelopServiceUpdatePluginMetaArgs {
 | |
| 	return &PluginDevelopServiceUpdatePluginMetaArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginMetaArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceUpdatePluginMetaArgs_Request_DEFAULT *UpdatePluginMetaRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginMetaArgs) GetRequest() (v *UpdatePluginMetaRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceUpdatePluginMetaArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceUpdatePluginMetaArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginMetaArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginMetaArgs) 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_PluginDevelopServiceUpdatePluginMetaArgs[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 *PluginDevelopServiceUpdatePluginMetaArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewUpdatePluginMetaRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginMetaArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdatePluginMeta_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginMetaArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceUpdatePluginMetaArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceUpdatePluginMetaArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceUpdatePluginMetaResult struct {
 | |
| 	Success *UpdatePluginMetaResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceUpdatePluginMetaResult() *PluginDevelopServiceUpdatePluginMetaResult {
 | |
| 	return &PluginDevelopServiceUpdatePluginMetaResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginMetaResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceUpdatePluginMetaResult_Success_DEFAULT *UpdatePluginMetaResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginMetaResult) GetSuccess() (v *UpdatePluginMetaResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceUpdatePluginMetaResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceUpdatePluginMetaResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginMetaResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginMetaResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceUpdatePluginMetaResult[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 *PluginDevelopServiceUpdatePluginMetaResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewUpdatePluginMetaResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginMetaResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdatePluginMeta_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginMetaResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdatePluginMetaResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceUpdatePluginMetaResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetBotDefaultParamsArgs struct {
 | |
| 	Request *GetBotDefaultParamsRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetBotDefaultParamsArgs() *PluginDevelopServiceGetBotDefaultParamsArgs {
 | |
| 	return &PluginDevelopServiceGetBotDefaultParamsArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetBotDefaultParamsArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetBotDefaultParamsArgs_Request_DEFAULT *GetBotDefaultParamsRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceGetBotDefaultParamsArgs) GetRequest() (v *GetBotDefaultParamsRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceGetBotDefaultParamsArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetBotDefaultParamsArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetBotDefaultParamsArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetBotDefaultParamsArgs) 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_PluginDevelopServiceGetBotDefaultParamsArgs[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 *PluginDevelopServiceGetBotDefaultParamsArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetBotDefaultParamsRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetBotDefaultParamsArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetBotDefaultParams_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetBotDefaultParamsArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceGetBotDefaultParamsArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetBotDefaultParamsArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetBotDefaultParamsResult struct {
 | |
| 	Success *GetBotDefaultParamsResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetBotDefaultParamsResult() *PluginDevelopServiceGetBotDefaultParamsResult {
 | |
| 	return &PluginDevelopServiceGetBotDefaultParamsResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetBotDefaultParamsResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetBotDefaultParamsResult_Success_DEFAULT *GetBotDefaultParamsResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceGetBotDefaultParamsResult) GetSuccess() (v *GetBotDefaultParamsResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceGetBotDefaultParamsResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetBotDefaultParamsResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetBotDefaultParamsResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetBotDefaultParamsResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceGetBotDefaultParamsResult[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 *PluginDevelopServiceGetBotDefaultParamsResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetBotDefaultParamsResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetBotDefaultParamsResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetBotDefaultParams_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetBotDefaultParamsResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetBotDefaultParamsResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetBotDefaultParamsResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceUpdateBotDefaultParamsArgs struct {
 | |
| 	Request *UpdateBotDefaultParamsRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceUpdateBotDefaultParamsArgs() *PluginDevelopServiceUpdateBotDefaultParamsArgs {
 | |
| 	return &PluginDevelopServiceUpdateBotDefaultParamsArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateBotDefaultParamsArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceUpdateBotDefaultParamsArgs_Request_DEFAULT *UpdateBotDefaultParamsRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateBotDefaultParamsArgs) GetRequest() (v *UpdateBotDefaultParamsRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceUpdateBotDefaultParamsArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceUpdateBotDefaultParamsArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateBotDefaultParamsArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateBotDefaultParamsArgs) 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_PluginDevelopServiceUpdateBotDefaultParamsArgs[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 *PluginDevelopServiceUpdateBotDefaultParamsArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewUpdateBotDefaultParamsRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateBotDefaultParamsArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdateBotDefaultParams_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateBotDefaultParamsArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceUpdateBotDefaultParamsArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceUpdateBotDefaultParamsArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceUpdateBotDefaultParamsResult struct {
 | |
| 	Success *UpdateBotDefaultParamsResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceUpdateBotDefaultParamsResult() *PluginDevelopServiceUpdateBotDefaultParamsResult {
 | |
| 	return &PluginDevelopServiceUpdateBotDefaultParamsResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateBotDefaultParamsResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceUpdateBotDefaultParamsResult_Success_DEFAULT *UpdateBotDefaultParamsResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateBotDefaultParamsResult) GetSuccess() (v *UpdateBotDefaultParamsResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceUpdateBotDefaultParamsResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceUpdateBotDefaultParamsResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateBotDefaultParamsResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateBotDefaultParamsResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceUpdateBotDefaultParamsResult[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 *PluginDevelopServiceUpdateBotDefaultParamsResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewUpdateBotDefaultParamsResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateBotDefaultParamsResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdateBotDefaultParams_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateBotDefaultParamsResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateBotDefaultParamsResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceUpdateBotDefaultParamsResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceCreateAPIArgs struct {
 | |
| 	Request *CreateAPIRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceCreateAPIArgs() *PluginDevelopServiceCreateAPIArgs {
 | |
| 	return &PluginDevelopServiceCreateAPIArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCreateAPIArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceCreateAPIArgs_Request_DEFAULT *CreateAPIRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceCreateAPIArgs) GetRequest() (v *CreateAPIRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceCreateAPIArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceCreateAPIArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCreateAPIArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCreateAPIArgs) 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_PluginDevelopServiceCreateAPIArgs[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 *PluginDevelopServiceCreateAPIArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewCreateAPIRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCreateAPIArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("CreateAPI_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCreateAPIArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceCreateAPIArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceCreateAPIArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceCreateAPIResult struct {
 | |
| 	Success *CreateAPIResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceCreateAPIResult() *PluginDevelopServiceCreateAPIResult {
 | |
| 	return &PluginDevelopServiceCreateAPIResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCreateAPIResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceCreateAPIResult_Success_DEFAULT *CreateAPIResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceCreateAPIResult) GetSuccess() (v *CreateAPIResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceCreateAPIResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceCreateAPIResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCreateAPIResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCreateAPIResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceCreateAPIResult[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 *PluginDevelopServiceCreateAPIResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewCreateAPIResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCreateAPIResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("CreateAPI_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCreateAPIResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceCreateAPIResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceCreateAPIResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceUpdateAPIArgs struct {
 | |
| 	Request *UpdateAPIRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceUpdateAPIArgs() *PluginDevelopServiceUpdateAPIArgs {
 | |
| 	return &PluginDevelopServiceUpdateAPIArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateAPIArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceUpdateAPIArgs_Request_DEFAULT *UpdateAPIRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateAPIArgs) GetRequest() (v *UpdateAPIRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceUpdateAPIArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceUpdateAPIArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateAPIArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateAPIArgs) 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_PluginDevelopServiceUpdateAPIArgs[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 *PluginDevelopServiceUpdateAPIArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewUpdateAPIRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateAPIArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdateAPI_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateAPIArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceUpdateAPIArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceUpdateAPIArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceUpdateAPIResult struct {
 | |
| 	Success *UpdateAPIResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceUpdateAPIResult() *PluginDevelopServiceUpdateAPIResult {
 | |
| 	return &PluginDevelopServiceUpdateAPIResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateAPIResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceUpdateAPIResult_Success_DEFAULT *UpdateAPIResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateAPIResult) GetSuccess() (v *UpdateAPIResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceUpdateAPIResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceUpdateAPIResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateAPIResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateAPIResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceUpdateAPIResult[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 *PluginDevelopServiceUpdateAPIResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewUpdateAPIResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateAPIResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("UpdateAPI_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateAPIResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceUpdateAPIResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceUpdateAPIResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetUserAuthorityArgs struct {
 | |
| 	Request *GetUserAuthorityRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetUserAuthorityArgs() *PluginDevelopServiceGetUserAuthorityArgs {
 | |
| 	return &PluginDevelopServiceGetUserAuthorityArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUserAuthorityArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetUserAuthorityArgs_Request_DEFAULT *GetUserAuthorityRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUserAuthorityArgs) GetRequest() (v *GetUserAuthorityRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceGetUserAuthorityArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetUserAuthorityArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUserAuthorityArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUserAuthorityArgs) 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_PluginDevelopServiceGetUserAuthorityArgs[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 *PluginDevelopServiceGetUserAuthorityArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetUserAuthorityRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUserAuthorityArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetUserAuthority_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUserAuthorityArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceGetUserAuthorityArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetUserAuthorityArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetUserAuthorityResult struct {
 | |
| 	Success *GetUserAuthorityResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetUserAuthorityResult() *PluginDevelopServiceGetUserAuthorityResult {
 | |
| 	return &PluginDevelopServiceGetUserAuthorityResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUserAuthorityResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetUserAuthorityResult_Success_DEFAULT *GetUserAuthorityResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUserAuthorityResult) GetSuccess() (v *GetUserAuthorityResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceGetUserAuthorityResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetUserAuthorityResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUserAuthorityResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUserAuthorityResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceGetUserAuthorityResult[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 *PluginDevelopServiceGetUserAuthorityResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetUserAuthorityResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUserAuthorityResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetUserAuthority_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUserAuthorityResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetUserAuthorityResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetUserAuthorityResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceDebugAPIArgs struct {
 | |
| 	Request *DebugAPIRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceDebugAPIArgs() *PluginDevelopServiceDebugAPIArgs {
 | |
| 	return &PluginDevelopServiceDebugAPIArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDebugAPIArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceDebugAPIArgs_Request_DEFAULT *DebugAPIRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceDebugAPIArgs) GetRequest() (v *DebugAPIRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceDebugAPIArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceDebugAPIArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDebugAPIArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDebugAPIArgs) 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_PluginDevelopServiceDebugAPIArgs[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 *PluginDevelopServiceDebugAPIArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewDebugAPIRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDebugAPIArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DebugAPI_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDebugAPIArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceDebugAPIArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceDebugAPIArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceDebugAPIResult struct {
 | |
| 	Success *DebugAPIResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceDebugAPIResult() *PluginDevelopServiceDebugAPIResult {
 | |
| 	return &PluginDevelopServiceDebugAPIResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDebugAPIResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceDebugAPIResult_Success_DEFAULT *DebugAPIResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceDebugAPIResult) GetSuccess() (v *DebugAPIResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceDebugAPIResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceDebugAPIResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDebugAPIResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDebugAPIResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceDebugAPIResult[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 *PluginDevelopServiceDebugAPIResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewDebugAPIResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDebugAPIResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("DebugAPI_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDebugAPIResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceDebugAPIResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceDebugAPIResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetPluginNextVersionArgs struct {
 | |
| 	Request *GetPluginNextVersionRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetPluginNextVersionArgs() *PluginDevelopServiceGetPluginNextVersionArgs {
 | |
| 	return &PluginDevelopServiceGetPluginNextVersionArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginNextVersionArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetPluginNextVersionArgs_Request_DEFAULT *GetPluginNextVersionRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginNextVersionArgs) GetRequest() (v *GetPluginNextVersionRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceGetPluginNextVersionArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetPluginNextVersionArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginNextVersionArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginNextVersionArgs) 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_PluginDevelopServiceGetPluginNextVersionArgs[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 *PluginDevelopServiceGetPluginNextVersionArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetPluginNextVersionRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginNextVersionArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPluginNextVersion_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginNextVersionArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceGetPluginNextVersionArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetPluginNextVersionArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetPluginNextVersionResult struct {
 | |
| 	Success *GetPluginNextVersionResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetPluginNextVersionResult() *PluginDevelopServiceGetPluginNextVersionResult {
 | |
| 	return &PluginDevelopServiceGetPluginNextVersionResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginNextVersionResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetPluginNextVersionResult_Success_DEFAULT *GetPluginNextVersionResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginNextVersionResult) GetSuccess() (v *GetPluginNextVersionResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceGetPluginNextVersionResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetPluginNextVersionResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginNextVersionResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginNextVersionResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceGetPluginNextVersionResult[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 *PluginDevelopServiceGetPluginNextVersionResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetPluginNextVersionResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginNextVersionResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetPluginNextVersion_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginNextVersionResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetPluginNextVersionResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetPluginNextVersionResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetDevPluginListArgs struct {
 | |
| 	Request *GetDevPluginListRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetDevPluginListArgs() *PluginDevelopServiceGetDevPluginListArgs {
 | |
| 	return &PluginDevelopServiceGetDevPluginListArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetDevPluginListArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetDevPluginListArgs_Request_DEFAULT *GetDevPluginListRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceGetDevPluginListArgs) GetRequest() (v *GetDevPluginListRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceGetDevPluginListArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetDevPluginListArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetDevPluginListArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetDevPluginListArgs) 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_PluginDevelopServiceGetDevPluginListArgs[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 *PluginDevelopServiceGetDevPluginListArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetDevPluginListRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetDevPluginListArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetDevPluginList_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetDevPluginListArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceGetDevPluginListArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetDevPluginListArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetDevPluginListResult struct {
 | |
| 	Success *GetDevPluginListResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetDevPluginListResult() *PluginDevelopServiceGetDevPluginListResult {
 | |
| 	return &PluginDevelopServiceGetDevPluginListResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetDevPluginListResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetDevPluginListResult_Success_DEFAULT *GetDevPluginListResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceGetDevPluginListResult) GetSuccess() (v *GetDevPluginListResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceGetDevPluginListResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetDevPluginListResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetDevPluginListResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetDevPluginListResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceGetDevPluginListResult[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 *PluginDevelopServiceGetDevPluginListResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetDevPluginListResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetDevPluginListResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetDevPluginList_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetDevPluginListResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetDevPluginListResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetDevPluginListResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceConvert2OpenAPIArgs struct {
 | |
| 	Request *Convert2OpenAPIRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceConvert2OpenAPIArgs() *PluginDevelopServiceConvert2OpenAPIArgs {
 | |
| 	return &PluginDevelopServiceConvert2OpenAPIArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceConvert2OpenAPIArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceConvert2OpenAPIArgs_Request_DEFAULT *Convert2OpenAPIRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceConvert2OpenAPIArgs) GetRequest() (v *Convert2OpenAPIRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceConvert2OpenAPIArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceConvert2OpenAPIArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceConvert2OpenAPIArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceConvert2OpenAPIArgs) 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_PluginDevelopServiceConvert2OpenAPIArgs[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 *PluginDevelopServiceConvert2OpenAPIArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewConvert2OpenAPIRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceConvert2OpenAPIArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("Convert2OpenAPI_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceConvert2OpenAPIArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceConvert2OpenAPIArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceConvert2OpenAPIArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceConvert2OpenAPIResult struct {
 | |
| 	Success *Convert2OpenAPIResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceConvert2OpenAPIResult() *PluginDevelopServiceConvert2OpenAPIResult {
 | |
| 	return &PluginDevelopServiceConvert2OpenAPIResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceConvert2OpenAPIResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceConvert2OpenAPIResult_Success_DEFAULT *Convert2OpenAPIResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceConvert2OpenAPIResult) GetSuccess() (v *Convert2OpenAPIResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceConvert2OpenAPIResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceConvert2OpenAPIResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceConvert2OpenAPIResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceConvert2OpenAPIResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceConvert2OpenAPIResult[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 *PluginDevelopServiceConvert2OpenAPIResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewConvert2OpenAPIResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceConvert2OpenAPIResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("Convert2OpenAPI_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceConvert2OpenAPIResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceConvert2OpenAPIResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceConvert2OpenAPIResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceBatchCreateAPIArgs struct {
 | |
| 	Request *BatchCreateAPIRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceBatchCreateAPIArgs() *PluginDevelopServiceBatchCreateAPIArgs {
 | |
| 	return &PluginDevelopServiceBatchCreateAPIArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceBatchCreateAPIArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceBatchCreateAPIArgs_Request_DEFAULT *BatchCreateAPIRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceBatchCreateAPIArgs) GetRequest() (v *BatchCreateAPIRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceBatchCreateAPIArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceBatchCreateAPIArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceBatchCreateAPIArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceBatchCreateAPIArgs) 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_PluginDevelopServiceBatchCreateAPIArgs[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 *PluginDevelopServiceBatchCreateAPIArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewBatchCreateAPIRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceBatchCreateAPIArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("BatchCreateAPI_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceBatchCreateAPIArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceBatchCreateAPIArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceBatchCreateAPIArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceBatchCreateAPIResult struct {
 | |
| 	Success *BatchCreateAPIResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceBatchCreateAPIResult() *PluginDevelopServiceBatchCreateAPIResult {
 | |
| 	return &PluginDevelopServiceBatchCreateAPIResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceBatchCreateAPIResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceBatchCreateAPIResult_Success_DEFAULT *BatchCreateAPIResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceBatchCreateAPIResult) GetSuccess() (v *BatchCreateAPIResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceBatchCreateAPIResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceBatchCreateAPIResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceBatchCreateAPIResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceBatchCreateAPIResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceBatchCreateAPIResult[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 *PluginDevelopServiceBatchCreateAPIResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewBatchCreateAPIResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceBatchCreateAPIResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("BatchCreateAPI_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceBatchCreateAPIResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceBatchCreateAPIResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceBatchCreateAPIResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceRevokeAuthTokenArgs struct {
 | |
| 	Request *RevokeAuthTokenRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceRevokeAuthTokenArgs() *PluginDevelopServiceRevokeAuthTokenArgs {
 | |
| 	return &PluginDevelopServiceRevokeAuthTokenArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRevokeAuthTokenArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceRevokeAuthTokenArgs_Request_DEFAULT *RevokeAuthTokenRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceRevokeAuthTokenArgs) GetRequest() (v *RevokeAuthTokenRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceRevokeAuthTokenArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceRevokeAuthTokenArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRevokeAuthTokenArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRevokeAuthTokenArgs) 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_PluginDevelopServiceRevokeAuthTokenArgs[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 *PluginDevelopServiceRevokeAuthTokenArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewRevokeAuthTokenRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRevokeAuthTokenArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("RevokeAuthToken_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRevokeAuthTokenArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceRevokeAuthTokenArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceRevokeAuthTokenArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceRevokeAuthTokenResult struct {
 | |
| 	Success *RevokeAuthTokenResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceRevokeAuthTokenResult() *PluginDevelopServiceRevokeAuthTokenResult {
 | |
| 	return &PluginDevelopServiceRevokeAuthTokenResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRevokeAuthTokenResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceRevokeAuthTokenResult_Success_DEFAULT *RevokeAuthTokenResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceRevokeAuthTokenResult) GetSuccess() (v *RevokeAuthTokenResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceRevokeAuthTokenResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceRevokeAuthTokenResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRevokeAuthTokenResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRevokeAuthTokenResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceRevokeAuthTokenResult[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 *PluginDevelopServiceRevokeAuthTokenResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewRevokeAuthTokenResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRevokeAuthTokenResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("RevokeAuthToken_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRevokeAuthTokenResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceRevokeAuthTokenResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceRevokeAuthTokenResult(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetQueriedOAuthPluginListArgs struct {
 | |
| 	Request *GetQueriedOAuthPluginListRequest `thrift:"request,1"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetQueriedOAuthPluginListArgs() *PluginDevelopServiceGetQueriedOAuthPluginListArgs {
 | |
| 	return &PluginDevelopServiceGetQueriedOAuthPluginListArgs{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetQueriedOAuthPluginListArgs) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetQueriedOAuthPluginListArgs_Request_DEFAULT *GetQueriedOAuthPluginListRequest
 | |
| 
 | |
| func (p *PluginDevelopServiceGetQueriedOAuthPluginListArgs) GetRequest() (v *GetQueriedOAuthPluginListRequest) {
 | |
| 	if !p.IsSetRequest() {
 | |
| 		return PluginDevelopServiceGetQueriedOAuthPluginListArgs_Request_DEFAULT
 | |
| 	}
 | |
| 	return p.Request
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetQueriedOAuthPluginListArgs = map[int16]string{
 | |
| 	1: "request",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetQueriedOAuthPluginListArgs) IsSetRequest() bool {
 | |
| 	return p.Request != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetQueriedOAuthPluginListArgs) 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_PluginDevelopServiceGetQueriedOAuthPluginListArgs[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 *PluginDevelopServiceGetQueriedOAuthPluginListArgs) ReadField1(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetQueriedOAuthPluginListRequest()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Request = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetQueriedOAuthPluginListArgs) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetQueriedOAuthPluginList_args"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField1(oprot); err != nil {
 | |
| 			fieldId = 1
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetQueriedOAuthPluginListArgs) writeField1(oprot thrift.TProtocol) (err error) {
 | |
| 	if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
 | |
| 		goto WriteFieldBeginError
 | |
| 	}
 | |
| 	if err := p.Request.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 *PluginDevelopServiceGetQueriedOAuthPluginListArgs) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetQueriedOAuthPluginListArgs(%+v)", *p)
 | |
| 
 | |
| }
 | |
| 
 | |
| type PluginDevelopServiceGetQueriedOAuthPluginListResult struct {
 | |
| 	Success *GetQueriedOAuthPluginListResponse `thrift:"success,0,optional"`
 | |
| }
 | |
| 
 | |
| func NewPluginDevelopServiceGetQueriedOAuthPluginListResult() *PluginDevelopServiceGetQueriedOAuthPluginListResult {
 | |
| 	return &PluginDevelopServiceGetQueriedOAuthPluginListResult{}
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetQueriedOAuthPluginListResult) InitDefault() {
 | |
| }
 | |
| 
 | |
| var PluginDevelopServiceGetQueriedOAuthPluginListResult_Success_DEFAULT *GetQueriedOAuthPluginListResponse
 | |
| 
 | |
| func (p *PluginDevelopServiceGetQueriedOAuthPluginListResult) GetSuccess() (v *GetQueriedOAuthPluginListResponse) {
 | |
| 	if !p.IsSetSuccess() {
 | |
| 		return PluginDevelopServiceGetQueriedOAuthPluginListResult_Success_DEFAULT
 | |
| 	}
 | |
| 	return p.Success
 | |
| }
 | |
| 
 | |
| var fieldIDToName_PluginDevelopServiceGetQueriedOAuthPluginListResult = map[int16]string{
 | |
| 	0: "success",
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetQueriedOAuthPluginListResult) IsSetSuccess() bool {
 | |
| 	return p.Success != nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetQueriedOAuthPluginListResult) Read(iprot thrift.TProtocol) (err error) {
 | |
| 	var fieldTypeId thrift.TType
 | |
| 	var fieldId int16
 | |
| 
 | |
| 	if _, err = iprot.ReadStructBegin(); err != nil {
 | |
| 		goto ReadStructBeginError
 | |
| 	}
 | |
| 
 | |
| 	for {
 | |
| 		_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
 | |
| 		if err != nil {
 | |
| 			goto ReadFieldBeginError
 | |
| 		}
 | |
| 		if fieldTypeId == thrift.STOP {
 | |
| 			break
 | |
| 		}
 | |
| 
 | |
| 		switch fieldId {
 | |
| 		case 0:
 | |
| 			if fieldTypeId == thrift.STRUCT {
 | |
| 				if err = p.ReadField0(iprot); err != nil {
 | |
| 					goto ReadFieldError
 | |
| 				}
 | |
| 			} else if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		default:
 | |
| 			if err = iprot.Skip(fieldTypeId); err != nil {
 | |
| 				goto SkipFieldError
 | |
| 			}
 | |
| 		}
 | |
| 		if err = iprot.ReadFieldEnd(); err != nil {
 | |
| 			goto ReadFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = iprot.ReadStructEnd(); err != nil {
 | |
| 		goto ReadStructEndError
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| ReadStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
 | |
| ReadFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
 | |
| ReadFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_PluginDevelopServiceGetQueriedOAuthPluginListResult[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 *PluginDevelopServiceGetQueriedOAuthPluginListResult) ReadField0(iprot thrift.TProtocol) error {
 | |
| 	_field := NewGetQueriedOAuthPluginListResponse()
 | |
| 	if err := _field.Read(iprot); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	p.Success = _field
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetQueriedOAuthPluginListResult) Write(oprot thrift.TProtocol) (err error) {
 | |
| 	var fieldId int16
 | |
| 	if err = oprot.WriteStructBegin("GetQueriedOAuthPluginList_result"); err != nil {
 | |
| 		goto WriteStructBeginError
 | |
| 	}
 | |
| 	if p != nil {
 | |
| 		if err = p.writeField0(oprot); err != nil {
 | |
| 			fieldId = 0
 | |
| 			goto WriteFieldError
 | |
| 		}
 | |
| 	}
 | |
| 	if err = oprot.WriteFieldStop(); err != nil {
 | |
| 		goto WriteFieldStopError
 | |
| 	}
 | |
| 	if err = oprot.WriteStructEnd(); err != nil {
 | |
| 		goto WriteStructEndError
 | |
| 	}
 | |
| 	return nil
 | |
| WriteStructBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
 | |
| WriteFieldError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
 | |
| WriteFieldStopError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
 | |
| WriteStructEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetQueriedOAuthPluginListResult) writeField0(oprot thrift.TProtocol) (err error) {
 | |
| 	if p.IsSetSuccess() {
 | |
| 		if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
 | |
| 			goto WriteFieldBeginError
 | |
| 		}
 | |
| 		if err := p.Success.Write(oprot); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if err = oprot.WriteFieldEnd(); err != nil {
 | |
| 			goto WriteFieldEndError
 | |
| 		}
 | |
| 	}
 | |
| 	return nil
 | |
| WriteFieldBeginError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
 | |
| WriteFieldEndError:
 | |
| 	return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
 | |
| }
 | |
| 
 | |
| func (p *PluginDevelopServiceGetQueriedOAuthPluginListResult) String() string {
 | |
| 	if p == nil {
 | |
| 		return "<nil>"
 | |
| 	}
 | |
| 	return fmt.Sprintf("PluginDevelopServiceGetQueriedOAuthPluginListResult(%+v)", *p)
 | |
| 
 | |
| }
 |