6658 lines
187 KiB
Go
6658 lines
187 KiB
Go
// Code generated by thriftgo (0.2.1). DO NOT EDIT.
|
|
|
|
package structs
|
|
|
|
import (
|
|
"context"
|
|
"database/sql"
|
|
"database/sql/driver"
|
|
"fmt"
|
|
"github.com/apache/thrift/lib/go/thrift"
|
|
"github.com/cloudwego/thriftgo/generator/golang/extension/meta"
|
|
"github.com/cloudwego/thriftgo/generator/golang/extension/unknown"
|
|
)
|
|
|
|
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
|
// Please don't mix DTO and DAO !
|
|
// This design is intended to be as-is.
|
|
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
|
type RoleType int64
|
|
|
|
const (
|
|
RoleType_UNKNOWN RoleType = 0
|
|
RoleType_SYSTEM RoleType = 1
|
|
RoleType_USER RoleType = 2
|
|
RoleType_WP_OWNER RoleType = 100
|
|
RoleType_WP_ADMIN RoleType = 110
|
|
)
|
|
|
|
func (p RoleType) String() string {
|
|
switch p {
|
|
case RoleType_UNKNOWN:
|
|
return "UNKNOWN"
|
|
case RoleType_SYSTEM:
|
|
return "SYSTEM"
|
|
case RoleType_USER:
|
|
return "USER"
|
|
case RoleType_WP_OWNER:
|
|
return "WP_OWNER"
|
|
case RoleType_WP_ADMIN:
|
|
return "WP_ADMIN"
|
|
}
|
|
return "<UNSET>"
|
|
}
|
|
|
|
func RoleTypeFromString(s string) (RoleType, error) {
|
|
switch s {
|
|
case "UNKNOWN":
|
|
return RoleType_UNKNOWN, nil
|
|
case "SYSTEM":
|
|
return RoleType_SYSTEM, nil
|
|
case "USER":
|
|
return RoleType_USER, nil
|
|
case "WP_OWNER":
|
|
return RoleType_WP_OWNER, nil
|
|
case "WP_ADMIN":
|
|
return RoleType_WP_ADMIN, nil
|
|
}
|
|
return RoleType(0), fmt.Errorf("not a valid RoleType string")
|
|
}
|
|
|
|
func RoleTypePtr(v RoleType) *RoleType { return &v }
|
|
func (p *RoleType) Scan(value interface{}) (err error) {
|
|
var result sql.NullInt64
|
|
err = result.Scan(value)
|
|
*p = RoleType(result.Int64)
|
|
return
|
|
}
|
|
|
|
func (p *RoleType) Value() (driver.Value, error) {
|
|
if p == nil {
|
|
return nil, nil
|
|
}
|
|
return int64(*p), nil
|
|
}
|
|
|
|
// @direct
|
|
//
|
|
// struct JenisPajakXX {
|
|
// 1: i64 id (go.tag = "gorm:\"primaryKey\"")
|
|
// 2: string displayName (go.tag = "core_v1_dto:\"required\"")
|
|
// }
|
|
type JenisPajak int64
|
|
|
|
const (
|
|
JenisPajak_UNKNOWN JenisPajak = 0
|
|
JenisPajak_PPH_21 JenisPajak = 1
|
|
JenisPajak_PPH_23 JenisPajak = 2
|
|
JenisPajak_PPH_25 JenisPajak = 3
|
|
JenisPajak_PPH_26 JenisPajak = 4
|
|
JenisPajak_PPH_4_2 JenisPajak = 5
|
|
JenisPajak_PPH_15 JenisPajak = 6
|
|
JenisPajak_PPN JenisPajak = 7
|
|
JenisPajak_TAHUNAN JenisPajak = 8
|
|
)
|
|
|
|
func (p JenisPajak) String() string {
|
|
switch p {
|
|
case JenisPajak_UNKNOWN:
|
|
return "UNKNOWN"
|
|
case JenisPajak_PPH_21:
|
|
return "PPH_21"
|
|
case JenisPajak_PPH_23:
|
|
return "PPH_23"
|
|
case JenisPajak_PPH_25:
|
|
return "PPH_25"
|
|
case JenisPajak_PPH_26:
|
|
return "PPH_26"
|
|
case JenisPajak_PPH_4_2:
|
|
return "PPH_4_2"
|
|
case JenisPajak_PPH_15:
|
|
return "PPH_15"
|
|
case JenisPajak_PPN:
|
|
return "PPN"
|
|
case JenisPajak_TAHUNAN:
|
|
return "TAHUNAN"
|
|
}
|
|
return "<UNSET>"
|
|
}
|
|
|
|
func JenisPajakFromString(s string) (JenisPajak, error) {
|
|
switch s {
|
|
case "UNKNOWN":
|
|
return JenisPajak_UNKNOWN, nil
|
|
case "PPH_21":
|
|
return JenisPajak_PPH_21, nil
|
|
case "PPH_23":
|
|
return JenisPajak_PPH_23, nil
|
|
case "PPH_25":
|
|
return JenisPajak_PPH_25, nil
|
|
case "PPH_26":
|
|
return JenisPajak_PPH_26, nil
|
|
case "PPH_4_2":
|
|
return JenisPajak_PPH_4_2, nil
|
|
case "PPH_15":
|
|
return JenisPajak_PPH_15, nil
|
|
case "PPN":
|
|
return JenisPajak_PPN, nil
|
|
case "TAHUNAN":
|
|
return JenisPajak_TAHUNAN, nil
|
|
}
|
|
return JenisPajak(0), fmt.Errorf("not a valid JenisPajak string")
|
|
}
|
|
|
|
func JenisPajakPtr(v JenisPajak) *JenisPajak { return &v }
|
|
func (p *JenisPajak) Scan(value interface{}) (err error) {
|
|
var result sql.NullInt64
|
|
err = result.Scan(value)
|
|
*p = JenisPajak(result.Int64)
|
|
return
|
|
}
|
|
|
|
func (p *JenisPajak) Value() (driver.Value, error) {
|
|
if p == nil {
|
|
return nil, nil
|
|
}
|
|
return int64(*p), nil
|
|
}
|
|
|
|
type WajibPajakOwnership int64
|
|
|
|
const (
|
|
WajibPajakOwnership_UNKNOWN WajibPajakOwnership = 0
|
|
WajibPajakOwnership_OWNED WajibPajakOwnership = 1
|
|
WajibPajakOwnership_ROLE WajibPajakOwnership = 2
|
|
)
|
|
|
|
func (p WajibPajakOwnership) String() string {
|
|
switch p {
|
|
case WajibPajakOwnership_UNKNOWN:
|
|
return "UNKNOWN"
|
|
case WajibPajakOwnership_OWNED:
|
|
return "OWNED"
|
|
case WajibPajakOwnership_ROLE:
|
|
return "ROLE"
|
|
}
|
|
return "<UNSET>"
|
|
}
|
|
|
|
func WajibPajakOwnershipFromString(s string) (WajibPajakOwnership, error) {
|
|
switch s {
|
|
case "UNKNOWN":
|
|
return WajibPajakOwnership_UNKNOWN, nil
|
|
case "OWNED":
|
|
return WajibPajakOwnership_OWNED, nil
|
|
case "ROLE":
|
|
return WajibPajakOwnership_ROLE, nil
|
|
}
|
|
return WajibPajakOwnership(0), fmt.Errorf("not a valid WajibPajakOwnership string")
|
|
}
|
|
|
|
func WajibPajakOwnershipPtr(v WajibPajakOwnership) *WajibPajakOwnership { return &v }
|
|
func (p *WajibPajakOwnership) Scan(value interface{}) (err error) {
|
|
var result sql.NullInt64
|
|
err = result.Scan(value)
|
|
*p = WajibPajakOwnership(result.Int64)
|
|
return
|
|
}
|
|
|
|
func (p *WajibPajakOwnership) Value() (driver.Value, error) {
|
|
if p == nil {
|
|
return nil, nil
|
|
}
|
|
return int64(*p), nil
|
|
}
|
|
|
|
type Role struct {
|
|
ID int64 `thrift:"id,1" frugal:"1,default,i64" gorm:"primaryKey"`
|
|
DisplayName string `thrift:"displayName,5" frugal:"5,default,string" core_v1_dto:"required"`
|
|
RoleType RoleType `thrift:"roleType,6" frugal:"6,default,RoleType" core_v1_dto:"required"`
|
|
// user that create this role
|
|
Creator *User `thrift:"creator,39,optional" frugal:"39,optional,User" gorm:"foreignKey:id;references:id;"`
|
|
// users with this role
|
|
Users []*User `thrift:"users,40,optional" frugal:"40,optional,list<User>" gorm:"many2many:user_roles;foreignKey:id;references:id;"`
|
|
// wajib pajak bound with this role
|
|
WajibPajakList []*WajibPajak `thrift:"wajibPajakList,41,optional" frugal:"41,optional,list<WajibPajak>" gorm:"many2many:wp_roles;foreignKey:id;references:id"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewRole, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x4, 0x52,
|
|
0x6f, 0x6c, 0x65, 0xb, 0x0, 0x2, 0x0, 0x0,
|
|
0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74,
|
|
0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x6,
|
|
0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2,
|
|
0x0, 0x0, 0x0, 0x2, 0x69, 0x64, 0x8, 0x0,
|
|
0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4,
|
|
0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x0,
|
|
0x0, 0x6, 0x0, 0x1, 0x0, 0x5, 0xb, 0x0,
|
|
0x2, 0x0, 0x0, 0x0, 0xb, 0x64, 0x69, 0x73,
|
|
0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65,
|
|
0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc,
|
|
0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0,
|
|
0xb, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x6,
|
|
0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x8, 0x72,
|
|
0x6f, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x8,
|
|
0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0,
|
|
0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0x8,
|
|
0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x27, 0xb,
|
|
0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x63, 0x72,
|
|
0x65, 0x61, 0x74, 0x6f, 0x72, 0x8, 0x0, 0x3,
|
|
0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8,
|
|
0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0,
|
|
0x6, 0x0, 0x1, 0x0, 0x28, 0xb, 0x0, 0x2,
|
|
0x0, 0x0, 0x0, 0x5, 0x75, 0x73, 0x65, 0x72,
|
|
0x73, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2,
|
|
0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0,
|
|
0x0, 0xf, 0xc, 0x0, 0x3, 0x8, 0x0, 0x1,
|
|
0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x6,
|
|
0x0, 0x1, 0x0, 0x29, 0xb, 0x0, 0x2, 0x0,
|
|
0x0, 0x0, 0xe, 0x77, 0x61, 0x6a, 0x69, 0x62,
|
|
0x50, 0x61, 0x6a, 0x61, 0x6b, 0x4c, 0x69, 0x73,
|
|
0x74, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2,
|
|
0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0,
|
|
0x0, 0xf, 0xc, 0x0, 0x3, 0x8, 0x0, 0x1,
|
|
0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewRole() *Role {
|
|
return &Role{}
|
|
}
|
|
|
|
func (p *Role) InitDefault() {
|
|
*p = Role{}
|
|
}
|
|
|
|
func (p *Role) GetID() (v int64) {
|
|
return p.ID
|
|
}
|
|
|
|
func (p *Role) GetDisplayName() (v string) {
|
|
return p.DisplayName
|
|
}
|
|
|
|
func (p *Role) GetRoleType() (v RoleType) {
|
|
return p.RoleType
|
|
}
|
|
|
|
var Role_Creator_DEFAULT *User
|
|
|
|
func (p *Role) GetCreator() (v *User) {
|
|
if !p.IsSetCreator() {
|
|
return Role_Creator_DEFAULT
|
|
}
|
|
return p.Creator
|
|
}
|
|
|
|
var Role_Users_DEFAULT []*User
|
|
|
|
func (p *Role) GetUsers() (v []*User) {
|
|
if !p.IsSetUsers() {
|
|
return Role_Users_DEFAULT
|
|
}
|
|
return p.Users
|
|
}
|
|
|
|
var Role_WajibPajakList_DEFAULT []*WajibPajak
|
|
|
|
func (p *Role) GetWajibPajakList() (v []*WajibPajak) {
|
|
if !p.IsSetWajibPajakList() {
|
|
return Role_WajibPajakList_DEFAULT
|
|
}
|
|
return p.WajibPajakList
|
|
}
|
|
func (p *Role) SetID(val int64) {
|
|
p.ID = val
|
|
}
|
|
func (p *Role) SetDisplayName(val string) {
|
|
p.DisplayName = val
|
|
}
|
|
func (p *Role) SetRoleType(val RoleType) {
|
|
p.RoleType = val
|
|
}
|
|
func (p *Role) SetCreator(val *User) {
|
|
p.Creator = val
|
|
}
|
|
func (p *Role) SetUsers(val []*User) {
|
|
p.Users = val
|
|
}
|
|
func (p *Role) SetWajibPajakList(val []*WajibPajak) {
|
|
p.WajibPajakList = val
|
|
}
|
|
|
|
func (p *Role) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_Role = map[int16]string{
|
|
1: "id",
|
|
5: "displayName",
|
|
6: "roleType",
|
|
39: "creator",
|
|
40: "users",
|
|
41: "wajibPajakList",
|
|
}
|
|
|
|
func (p *Role) IsSetCreator() bool {
|
|
return p.Creator != nil
|
|
}
|
|
|
|
func (p *Role) IsSetUsers() bool {
|
|
return p.Users != nil
|
|
}
|
|
|
|
func (p *Role) IsSetWajibPajakList() bool {
|
|
return p.WajibPajakList != nil
|
|
}
|
|
|
|
func (p *Role) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.I64 {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 5:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField5(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 6:
|
|
if fieldTypeId == thrift.I32 {
|
|
if err = p.ReadField6(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 39:
|
|
if fieldTypeId == thrift.STRUCT {
|
|
if err = p.ReadField39(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 40:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField40(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 41:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField41(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_Role[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *Role) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadI64(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.ID = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *Role) ReadField5(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.DisplayName = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *Role) ReadField6(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadI32(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.RoleType = RoleType(v)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *Role) ReadField39(ctx context.Context, iprot thrift.TProtocol) error {
|
|
p.Creator = NewUser()
|
|
if err := p.Creator.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *Role) ReadField40(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.Users = make([]*User, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
_elem := NewUser()
|
|
if err := _elem.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
|
|
p.Users = append(p.Users, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *Role) ReadField41(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.WajibPajakList = make([]*WajibPajak, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
_elem := NewWajibPajak()
|
|
if err := _elem.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
|
|
p.WajibPajakList = append(p.WajibPajakList, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *Role) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "Role"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField5(ctx, oprot); err != nil {
|
|
fieldId = 5
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField6(ctx, oprot); err != nil {
|
|
fieldId = 6
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField39(ctx, oprot); err != nil {
|
|
fieldId = 39
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField40(ctx, oprot); err != nil {
|
|
fieldId = 40
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField41(ctx, oprot); err != nil {
|
|
fieldId = 41
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *Role) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "id", thrift.I64, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteI64(ctx, p.ID); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *Role) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "displayName", thrift.STRING, 5); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.DisplayName); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *Role) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "roleType", thrift.I32, 6); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteI32(ctx, int32(p.RoleType)); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *Role) writeField39(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetCreator() {
|
|
if err = oprot.WriteFieldBegin(ctx, "creator", thrift.STRUCT, 39); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := p.Creator.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); err != nil {
|
|
goto WriteFieldEndError
|
|
}
|
|
}
|
|
return nil
|
|
WriteFieldBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 39 begin error: ", p), err)
|
|
WriteFieldEndError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 39 end error: ", p), err)
|
|
}
|
|
|
|
func (p *Role) writeField40(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetUsers() {
|
|
if err = oprot.WriteFieldBegin(ctx, "users", thrift.LIST, 40); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Users)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.Users {
|
|
if err := v.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); err != nil {
|
|
goto WriteFieldEndError
|
|
}
|
|
}
|
|
return nil
|
|
WriteFieldBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 40 begin error: ", p), err)
|
|
WriteFieldEndError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 40 end error: ", p), err)
|
|
}
|
|
|
|
func (p *Role) writeField41(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetWajibPajakList() {
|
|
if err = oprot.WriteFieldBegin(ctx, "wajibPajakList", thrift.LIST, 41); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.WajibPajakList)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.WajibPajakList {
|
|
if err := v.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); err != nil {
|
|
goto WriteFieldEndError
|
|
}
|
|
}
|
|
return nil
|
|
WriteFieldBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 41 begin error: ", p), err)
|
|
WriteFieldEndError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 41 end error: ", p), err)
|
|
}
|
|
|
|
func (p *Role) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("Role(%+v)", *p)
|
|
}
|
|
|
|
// @direct
|
|
type User struct {
|
|
ID int64 `thrift:"id,1" frugal:"1,default,i64" gorm:"primaryKey"`
|
|
Username string `thrift:"username,2" frugal:"2,default,string" core_v1_dto:"required" gorm:"index"`
|
|
Password string `thrift:"password,3" frugal:"3,default,string" core_v1_dto:"required"`
|
|
DisplayName string `thrift:"displayName,4" frugal:"4,default,string" core_v1_dto:"required"`
|
|
PrivateKey []byte `thrift:"privateKey,60" frugal:"60,default,binary" db:"privateKey" json:"privateKey"`
|
|
PublicKey []byte `thrift:"publicKey,61" frugal:"61,default,binary" db:"publicKey" json:"publicKey"`
|
|
// system roles
|
|
Roles []*Role `thrift:"roles,40,optional" frugal:"40,optional,list<Role>" gorm:"many2many:user_roles;foreignKey:id;references:id;"`
|
|
// wp owned by user
|
|
OwnedWajibPajakList []*WajibPajak `thrift:"ownedWajibPajakList,45,optional" frugal:"45,optional,list<WajibPajak>" gorm:"many2many:user_wps;foreignKey:id;references:id;constraint:OnDelete:CASCADE"`
|
|
// wp roles roles owned by user
|
|
RolesWajibPajakList []*Role `thrift:"rolesWajibPajakList,50,optional" frugal:"50,optional,list<Role>" gorm:"many2many:wp_roles;foreignKey:id;references:id;"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewUser, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x4, 0x55,
|
|
0x73, 0x65, 0x72, 0xb, 0x0, 0x2, 0x0, 0x0,
|
|
0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74,
|
|
0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x9,
|
|
0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2,
|
|
0x0, 0x0, 0x0, 0x2, 0x69, 0x64, 0x8, 0x0,
|
|
0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4,
|
|
0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x0,
|
|
0x0, 0x6, 0x0, 0x1, 0x0, 0x2, 0xb, 0x0,
|
|
0x2, 0x0, 0x0, 0x0, 0x8, 0x75, 0x73, 0x65,
|
|
0x72, 0x6e, 0x61, 0x6d, 0x65, 0x8, 0x0, 0x3,
|
|
0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8,
|
|
0x0, 0x1, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0,
|
|
0x6, 0x0, 0x1, 0x0, 0x3, 0xb, 0x0, 0x2,
|
|
0x0, 0x0, 0x0, 0x8, 0x70, 0x61, 0x73, 0x73,
|
|
0x77, 0x6f, 0x72, 0x64, 0x8, 0x0, 0x3, 0x0,
|
|
0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0,
|
|
0x1, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x6,
|
|
0x0, 0x1, 0x0, 0x4, 0xb, 0x0, 0x2, 0x0,
|
|
0x0, 0x0, 0xb, 0x64, 0x69, 0x73, 0x70, 0x6c,
|
|
0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x8, 0x0,
|
|
0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4,
|
|
0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xb, 0x0,
|
|
0x0, 0x6, 0x0, 0x1, 0x0, 0x3c, 0xb, 0x0,
|
|
0x2, 0x0, 0x0, 0x0, 0xa, 0x70, 0x72, 0x69,
|
|
0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x8,
|
|
0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0,
|
|
0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xb,
|
|
0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x3d, 0xb,
|
|
0x0, 0x2, 0x0, 0x0, 0x0, 0x9, 0x70, 0x75,
|
|
0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x8,
|
|
0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0,
|
|
0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xb,
|
|
0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x28, 0xb,
|
|
0x0, 0x2, 0x0, 0x0, 0x0, 0x5, 0x72, 0x6f,
|
|
0x6c, 0x65, 0x73, 0x8, 0x0, 0x3, 0x0, 0x0,
|
|
0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1,
|
|
0x0, 0x0, 0x0, 0xf, 0xc, 0x0, 0x3, 0x8,
|
|
0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0,
|
|
0x0, 0x6, 0x0, 0x1, 0x0, 0x2d, 0xb, 0x0,
|
|
0x2, 0x0, 0x0, 0x0, 0x13, 0x6f, 0x77, 0x6e,
|
|
0x65, 0x64, 0x57, 0x61, 0x6a, 0x69, 0x62, 0x50,
|
|
0x61, 0x6a, 0x61, 0x6b, 0x4c, 0x69, 0x73, 0x74,
|
|
0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc,
|
|
0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0,
|
|
0xf, 0xc, 0x0, 0x3, 0x8, 0x0, 0x1, 0x0,
|
|
0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x6, 0x0,
|
|
0x1, 0x0, 0x32, 0xb, 0x0, 0x2, 0x0, 0x0,
|
|
0x0, 0x13, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x57,
|
|
0x61, 0x6a, 0x69, 0x62, 0x50, 0x61, 0x6a, 0x61,
|
|
0x6b, 0x4c, 0x69, 0x73, 0x74, 0x8, 0x0, 0x3,
|
|
0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8,
|
|
0x0, 0x1, 0x0, 0x0, 0x0, 0xf, 0xc, 0x0,
|
|
0x3, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc,
|
|
0x0, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewUser() *User {
|
|
return &User{}
|
|
}
|
|
|
|
func (p *User) InitDefault() {
|
|
*p = User{}
|
|
}
|
|
|
|
func (p *User) GetID() (v int64) {
|
|
return p.ID
|
|
}
|
|
|
|
func (p *User) GetUsername() (v string) {
|
|
return p.Username
|
|
}
|
|
|
|
func (p *User) GetPassword() (v string) {
|
|
return p.Password
|
|
}
|
|
|
|
func (p *User) GetDisplayName() (v string) {
|
|
return p.DisplayName
|
|
}
|
|
|
|
func (p *User) GetPrivateKey() (v []byte) {
|
|
return p.PrivateKey
|
|
}
|
|
|
|
func (p *User) GetPublicKey() (v []byte) {
|
|
return p.PublicKey
|
|
}
|
|
|
|
var User_Roles_DEFAULT []*Role
|
|
|
|
func (p *User) GetRoles() (v []*Role) {
|
|
if !p.IsSetRoles() {
|
|
return User_Roles_DEFAULT
|
|
}
|
|
return p.Roles
|
|
}
|
|
|
|
var User_OwnedWajibPajakList_DEFAULT []*WajibPajak
|
|
|
|
func (p *User) GetOwnedWajibPajakList() (v []*WajibPajak) {
|
|
if !p.IsSetOwnedWajibPajakList() {
|
|
return User_OwnedWajibPajakList_DEFAULT
|
|
}
|
|
return p.OwnedWajibPajakList
|
|
}
|
|
|
|
var User_RolesWajibPajakList_DEFAULT []*Role
|
|
|
|
func (p *User) GetRolesWajibPajakList() (v []*Role) {
|
|
if !p.IsSetRolesWajibPajakList() {
|
|
return User_RolesWajibPajakList_DEFAULT
|
|
}
|
|
return p.RolesWajibPajakList
|
|
}
|
|
func (p *User) SetID(val int64) {
|
|
p.ID = val
|
|
}
|
|
func (p *User) SetUsername(val string) {
|
|
p.Username = val
|
|
}
|
|
func (p *User) SetPassword(val string) {
|
|
p.Password = val
|
|
}
|
|
func (p *User) SetDisplayName(val string) {
|
|
p.DisplayName = val
|
|
}
|
|
func (p *User) SetPrivateKey(val []byte) {
|
|
p.PrivateKey = val
|
|
}
|
|
func (p *User) SetPublicKey(val []byte) {
|
|
p.PublicKey = val
|
|
}
|
|
func (p *User) SetRoles(val []*Role) {
|
|
p.Roles = val
|
|
}
|
|
func (p *User) SetOwnedWajibPajakList(val []*WajibPajak) {
|
|
p.OwnedWajibPajakList = val
|
|
}
|
|
func (p *User) SetRolesWajibPajakList(val []*Role) {
|
|
p.RolesWajibPajakList = val
|
|
}
|
|
|
|
func (p *User) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_User = map[int16]string{
|
|
1: "id",
|
|
2: "username",
|
|
3: "password",
|
|
4: "displayName",
|
|
60: "privateKey",
|
|
61: "publicKey",
|
|
40: "roles",
|
|
45: "ownedWajibPajakList",
|
|
50: "rolesWajibPajakList",
|
|
}
|
|
|
|
func (p *User) IsSetRoles() bool {
|
|
return p.Roles != nil
|
|
}
|
|
|
|
func (p *User) IsSetOwnedWajibPajakList() bool {
|
|
return p.OwnedWajibPajakList != nil
|
|
}
|
|
|
|
func (p *User) IsSetRolesWajibPajakList() bool {
|
|
return p.RolesWajibPajakList != nil
|
|
}
|
|
|
|
func (p *User) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.I64 {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 2:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField2(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 3:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField3(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 4:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField4(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 60:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField60(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 61:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField61(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 40:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField40(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 45:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField45(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 50:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField50(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_User[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *User) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadI64(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.ID = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *User) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.Username = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *User) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.Password = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *User) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.DisplayName = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *User) ReadField60(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadBinary(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.PrivateKey = []byte(v)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *User) ReadField61(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadBinary(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.PublicKey = []byte(v)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *User) ReadField40(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.Roles = make([]*Role, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
_elem := NewRole()
|
|
if err := _elem.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
|
|
p.Roles = append(p.Roles, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *User) ReadField45(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.OwnedWajibPajakList = make([]*WajibPajak, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
_elem := NewWajibPajak()
|
|
if err := _elem.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
|
|
p.OwnedWajibPajakList = append(p.OwnedWajibPajakList, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *User) ReadField50(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.RolesWajibPajakList = make([]*Role, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
_elem := NewRole()
|
|
if err := _elem.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
|
|
p.RolesWajibPajakList = append(p.RolesWajibPajakList, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *User) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "User"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField2(ctx, oprot); err != nil {
|
|
fieldId = 2
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField3(ctx, oprot); err != nil {
|
|
fieldId = 3
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField4(ctx, oprot); err != nil {
|
|
fieldId = 4
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField60(ctx, oprot); err != nil {
|
|
fieldId = 60
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField61(ctx, oprot); err != nil {
|
|
fieldId = 61
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField40(ctx, oprot); err != nil {
|
|
fieldId = 40
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField45(ctx, oprot); err != nil {
|
|
fieldId = 45
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField50(ctx, oprot); err != nil {
|
|
fieldId = 50
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *User) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "id", thrift.I64, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteI64(ctx, p.ID); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *User) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "username", thrift.STRING, 2); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.Username); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *User) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "password", thrift.STRING, 3); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.Password); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *User) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "displayName", thrift.STRING, 4); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.DisplayName); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *User) writeField60(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "privateKey", thrift.STRING, 60); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteBinary(ctx, []byte(p.PrivateKey)); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); err != nil {
|
|
goto WriteFieldEndError
|
|
}
|
|
return nil
|
|
WriteFieldBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 60 begin error: ", p), err)
|
|
WriteFieldEndError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 60 end error: ", p), err)
|
|
}
|
|
|
|
func (p *User) writeField61(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "publicKey", thrift.STRING, 61); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteBinary(ctx, []byte(p.PublicKey)); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); err != nil {
|
|
goto WriteFieldEndError
|
|
}
|
|
return nil
|
|
WriteFieldBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 61 begin error: ", p), err)
|
|
WriteFieldEndError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 61 end error: ", p), err)
|
|
}
|
|
|
|
func (p *User) writeField40(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetRoles() {
|
|
if err = oprot.WriteFieldBegin(ctx, "roles", thrift.LIST, 40); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Roles)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.Roles {
|
|
if err := v.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); err != nil {
|
|
goto WriteFieldEndError
|
|
}
|
|
}
|
|
return nil
|
|
WriteFieldBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 40 begin error: ", p), err)
|
|
WriteFieldEndError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 40 end error: ", p), err)
|
|
}
|
|
|
|
func (p *User) writeField45(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetOwnedWajibPajakList() {
|
|
if err = oprot.WriteFieldBegin(ctx, "ownedWajibPajakList", thrift.LIST, 45); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.OwnedWajibPajakList)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.OwnedWajibPajakList {
|
|
if err := v.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); err != nil {
|
|
goto WriteFieldEndError
|
|
}
|
|
}
|
|
return nil
|
|
WriteFieldBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 45 begin error: ", p), err)
|
|
WriteFieldEndError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 45 end error: ", p), err)
|
|
}
|
|
|
|
func (p *User) writeField50(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetRolesWajibPajakList() {
|
|
if err = oprot.WriteFieldBegin(ctx, "rolesWajibPajakList", thrift.LIST, 50); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.RolesWajibPajakList)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.RolesWajibPajakList {
|
|
if err := v.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); err != nil {
|
|
goto WriteFieldEndError
|
|
}
|
|
}
|
|
return nil
|
|
WriteFieldBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 50 begin error: ", p), err)
|
|
WriteFieldEndError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 50 end error: ", p), err)
|
|
}
|
|
|
|
func (p *User) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("User(%+v)", *p)
|
|
}
|
|
|
|
type WajibPajakProfile struct {
|
|
// 1: i64 id (go.tag = "gorm:\"primaryKey\"")
|
|
Npwp string `thrift:"npwp,2" frugal:"2,default,string" core_v1_dto:"required"`
|
|
DisplayName string `thrift:"displayName,3" frugal:"3,default,string" core_v1_dto:"required"`
|
|
Address string `thrift:"address,4" frugal:"4,default,string" core_v1_dto:"required"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewWajibPajakProfile, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x11, 0x57,
|
|
0x61, 0x6a, 0x69, 0x62, 0x50, 0x61, 0x6a, 0x61,
|
|
0x6b, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
|
|
0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73,
|
|
0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3,
|
|
0xc, 0x0, 0x0, 0x0, 0x3, 0x6, 0x0, 0x1,
|
|
0x0, 0x2, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
0x4, 0x6e, 0x70, 0x77, 0x70, 0x8, 0x0, 0x3,
|
|
0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8,
|
|
0x0, 0x1, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0,
|
|
0x6, 0x0, 0x1, 0x0, 0x3, 0xb, 0x0, 0x2,
|
|
0x0, 0x0, 0x0, 0xb, 0x64, 0x69, 0x73, 0x70,
|
|
0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x8,
|
|
0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0,
|
|
0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xb,
|
|
0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x4, 0xb,
|
|
0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x61, 0x64,
|
|
0x64, 0x72, 0x65, 0x73, 0x73, 0x8, 0x0, 0x3,
|
|
0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8,
|
|
0x0, 0x1, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0,
|
|
0x0,
|
|
})
|
|
}
|
|
|
|
func NewWajibPajakProfile() *WajibPajakProfile {
|
|
return &WajibPajakProfile{}
|
|
}
|
|
|
|
func (p *WajibPajakProfile) InitDefault() {
|
|
*p = WajibPajakProfile{}
|
|
}
|
|
|
|
func (p *WajibPajakProfile) GetNpwp() (v string) {
|
|
return p.Npwp
|
|
}
|
|
|
|
func (p *WajibPajakProfile) GetDisplayName() (v string) {
|
|
return p.DisplayName
|
|
}
|
|
|
|
func (p *WajibPajakProfile) GetAddress() (v string) {
|
|
return p.Address
|
|
}
|
|
func (p *WajibPajakProfile) SetNpwp(val string) {
|
|
p.Npwp = val
|
|
}
|
|
func (p *WajibPajakProfile) SetDisplayName(val string) {
|
|
p.DisplayName = val
|
|
}
|
|
func (p *WajibPajakProfile) SetAddress(val string) {
|
|
p.Address = val
|
|
}
|
|
|
|
func (p *WajibPajakProfile) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_WajibPajakProfile = map[int16]string{
|
|
2: "npwp",
|
|
3: "displayName",
|
|
4: "address",
|
|
}
|
|
|
|
func (p *WajibPajakProfile) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 2:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField2(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 3:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField3(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 4:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField4(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_WajibPajakProfile[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *WajibPajakProfile) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.Npwp = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *WajibPajakProfile) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.DisplayName = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *WajibPajakProfile) ReadField4(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.Address = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *WajibPajakProfile) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "WajibPajakProfile"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField2(ctx, oprot); err != nil {
|
|
fieldId = 2
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField3(ctx, oprot); err != nil {
|
|
fieldId = 3
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField4(ctx, oprot); err != nil {
|
|
fieldId = 4
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *WajibPajakProfile) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "npwp", thrift.STRING, 2); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.Npwp); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *WajibPajakProfile) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "displayName", thrift.STRING, 3); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.DisplayName); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *WajibPajakProfile) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "address", thrift.STRING, 4); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.Address); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *WajibPajakProfile) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("WajibPajakProfile(%+v)", *p)
|
|
}
|
|
|
|
type WajibPajakTaxObligation struct {
|
|
ID int64 `thrift:"id,1" frugal:"1,default,i64" gorm:"primaryKey"`
|
|
Obligation JenisPajak `thrift:"obligation,2" frugal:"2,default,JenisPajak" gorm:"foreignKey:id;references:id"`
|
|
IsActive bool `thrift:"isActive,3" frugal:"3,default,bool" `
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewWajibPajakTaxObligation, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x17, 0x57,
|
|
0x61, 0x6a, 0x69, 0x62, 0x50, 0x61, 0x6a, 0x61,
|
|
0x6b, 0x54, 0x61, 0x78, 0x4f, 0x62, 0x6c, 0x69,
|
|
0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xb, 0x0,
|
|
0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72,
|
|
0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0,
|
|
0x0, 0x0, 0x3, 0x6, 0x0, 0x1, 0x0, 0x1,
|
|
0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x2, 0x69,
|
|
0x64, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0,
|
|
0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0,
|
|
0x0, 0xa, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0,
|
|
0x2, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0xa,
|
|
0x6f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x69,
|
|
0x6f, 0x6e, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0,
|
|
0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0,
|
|
0x0, 0x0, 0x8, 0x0, 0x0, 0x6, 0x0, 0x1,
|
|
0x0, 0x3, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
0x8, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76,
|
|
0x65, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0,
|
|
0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0,
|
|
0x0, 0x2, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewWajibPajakTaxObligation() *WajibPajakTaxObligation {
|
|
return &WajibPajakTaxObligation{}
|
|
}
|
|
|
|
func (p *WajibPajakTaxObligation) InitDefault() {
|
|
*p = WajibPajakTaxObligation{}
|
|
}
|
|
|
|
func (p *WajibPajakTaxObligation) GetID() (v int64) {
|
|
return p.ID
|
|
}
|
|
|
|
func (p *WajibPajakTaxObligation) GetObligation() (v JenisPajak) {
|
|
return p.Obligation
|
|
}
|
|
|
|
func (p *WajibPajakTaxObligation) GetIsActive() (v bool) {
|
|
return p.IsActive
|
|
}
|
|
func (p *WajibPajakTaxObligation) SetID(val int64) {
|
|
p.ID = val
|
|
}
|
|
func (p *WajibPajakTaxObligation) SetObligation(val JenisPajak) {
|
|
p.Obligation = val
|
|
}
|
|
func (p *WajibPajakTaxObligation) SetIsActive(val bool) {
|
|
p.IsActive = val
|
|
}
|
|
|
|
func (p *WajibPajakTaxObligation) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_WajibPajakTaxObligation = map[int16]string{
|
|
1: "id",
|
|
2: "obligation",
|
|
3: "isActive",
|
|
}
|
|
|
|
func (p *WajibPajakTaxObligation) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.I64 {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 2:
|
|
if fieldTypeId == thrift.I32 {
|
|
if err = p.ReadField2(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 3:
|
|
if fieldTypeId == thrift.BOOL {
|
|
if err = p.ReadField3(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_WajibPajakTaxObligation[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *WajibPajakTaxObligation) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadI64(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.ID = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *WajibPajakTaxObligation) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadI32(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.Obligation = JenisPajak(v)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *WajibPajakTaxObligation) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadBool(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.IsActive = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *WajibPajakTaxObligation) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "WajibPajakTaxObligation"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField2(ctx, oprot); err != nil {
|
|
fieldId = 2
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField3(ctx, oprot); err != nil {
|
|
fieldId = 3
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *WajibPajakTaxObligation) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "id", thrift.I64, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteI64(ctx, p.ID); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *WajibPajakTaxObligation) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "obligation", thrift.I32, 2); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteI32(ctx, int32(p.Obligation)); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *WajibPajakTaxObligation) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "isActive", thrift.BOOL, 3); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteBool(ctx, p.IsActive); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *WajibPajakTaxObligation) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("WajibPajakTaxObligation(%+v)", *p)
|
|
}
|
|
|
|
// @direct
|
|
type WajibPajak struct {
|
|
ID int64 `thrift:"id,1" frugal:"1,default,i64" gorm:"primaryKey"`
|
|
Profile *WajibPajakProfile `thrift:"profile,2" frugal:"2,default,WajibPajakProfile" gorm:"embedded;embeddedPrefix:profile_;constraint:OnDelete:CASCADE" core_v1_dto:"required"`
|
|
// wajib pajak owner
|
|
Owners []*User `thrift:"owners,30" frugal:"30,default,list<User>" gorm:"many2many:wp_roles;foreignKey:id;references:id;"`
|
|
// wajib pajak tax obligations
|
|
TaxObligations []*WajibPajakTaxObligation `thrift:"taxObligations,40,optional" frugal:"40,optional,list<WajibPajakTaxObligation>" gorm:"many2many:wp_obligations;foreignKey:id;references:id;"`
|
|
// role bound to this WajibPajak
|
|
Roles []*Role `thrift:"roles,45,optional" frugal:"45,optional,list<Role>" gorm:"many2many:wp_roles;foreignKey:id;references:id;constraint:OnDelete:CASCADE"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewWajibPajak, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x57,
|
|
0x61, 0x6a, 0x69, 0x62, 0x50, 0x61, 0x6a, 0x61,
|
|
0x6b, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6,
|
|
0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0,
|
|
0x3, 0xc, 0x0, 0x0, 0x0, 0x5, 0x6, 0x0,
|
|
0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0,
|
|
0x0, 0x2, 0x69, 0x64, 0x8, 0x0, 0x3, 0x0,
|
|
0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0,
|
|
0x1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x6,
|
|
0x0, 0x1, 0x0, 0x2, 0xb, 0x0, 0x2, 0x0,
|
|
0x0, 0x0, 0x7, 0x70, 0x72, 0x6f, 0x66, 0x69,
|
|
0x6c, 0x65, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0,
|
|
0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0,
|
|
0x0, 0x0, 0xc, 0x0, 0x0, 0x6, 0x0, 0x1,
|
|
0x0, 0x1e, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
0x6, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x8,
|
|
0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0,
|
|
0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xf,
|
|
0xc, 0x0, 0x3, 0x8, 0x0, 0x1, 0x0, 0x0,
|
|
0x0, 0xc, 0x0, 0x0, 0x0, 0x6, 0x0, 0x1,
|
|
0x0, 0x28, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
0xe, 0x74, 0x61, 0x78, 0x4f, 0x62, 0x6c, 0x69,
|
|
0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x8,
|
|
0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0,
|
|
0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xf,
|
|
0xc, 0x0, 0x3, 0x8, 0x0, 0x1, 0x0, 0x0,
|
|
0x0, 0xc, 0x0, 0x0, 0x0, 0x6, 0x0, 0x1,
|
|
0x0, 0x2d, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
0x5, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x8, 0x0,
|
|
0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4,
|
|
0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xf, 0xc,
|
|
0x0, 0x3, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0,
|
|
0xc, 0x0, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewWajibPajak() *WajibPajak {
|
|
return &WajibPajak{}
|
|
}
|
|
|
|
func (p *WajibPajak) InitDefault() {
|
|
*p = WajibPajak{}
|
|
}
|
|
|
|
func (p *WajibPajak) GetID() (v int64) {
|
|
return p.ID
|
|
}
|
|
|
|
var WajibPajak_Profile_DEFAULT *WajibPajakProfile
|
|
|
|
func (p *WajibPajak) GetProfile() (v *WajibPajakProfile) {
|
|
if !p.IsSetProfile() {
|
|
return WajibPajak_Profile_DEFAULT
|
|
}
|
|
return p.Profile
|
|
}
|
|
|
|
func (p *WajibPajak) GetOwners() (v []*User) {
|
|
return p.Owners
|
|
}
|
|
|
|
var WajibPajak_TaxObligations_DEFAULT []*WajibPajakTaxObligation
|
|
|
|
func (p *WajibPajak) GetTaxObligations() (v []*WajibPajakTaxObligation) {
|
|
if !p.IsSetTaxObligations() {
|
|
return WajibPajak_TaxObligations_DEFAULT
|
|
}
|
|
return p.TaxObligations
|
|
}
|
|
|
|
var WajibPajak_Roles_DEFAULT []*Role
|
|
|
|
func (p *WajibPajak) GetRoles() (v []*Role) {
|
|
if !p.IsSetRoles() {
|
|
return WajibPajak_Roles_DEFAULT
|
|
}
|
|
return p.Roles
|
|
}
|
|
func (p *WajibPajak) SetID(val int64) {
|
|
p.ID = val
|
|
}
|
|
func (p *WajibPajak) SetProfile(val *WajibPajakProfile) {
|
|
p.Profile = val
|
|
}
|
|
func (p *WajibPajak) SetOwners(val []*User) {
|
|
p.Owners = val
|
|
}
|
|
func (p *WajibPajak) SetTaxObligations(val []*WajibPajakTaxObligation) {
|
|
p.TaxObligations = val
|
|
}
|
|
func (p *WajibPajak) SetRoles(val []*Role) {
|
|
p.Roles = val
|
|
}
|
|
|
|
func (p *WajibPajak) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_WajibPajak = map[int16]string{
|
|
1: "id",
|
|
2: "profile",
|
|
30: "owners",
|
|
40: "taxObligations",
|
|
45: "roles",
|
|
}
|
|
|
|
func (p *WajibPajak) IsSetProfile() bool {
|
|
return p.Profile != nil
|
|
}
|
|
|
|
func (p *WajibPajak) IsSetTaxObligations() bool {
|
|
return p.TaxObligations != nil
|
|
}
|
|
|
|
func (p *WajibPajak) IsSetRoles() bool {
|
|
return p.Roles != nil
|
|
}
|
|
|
|
func (p *WajibPajak) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.I64 {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 2:
|
|
if fieldTypeId == thrift.STRUCT {
|
|
if err = p.ReadField2(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 30:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField30(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 40:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField40(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 45:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField45(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_WajibPajak[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *WajibPajak) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadI64(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.ID = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *WajibPajak) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
|
|
p.Profile = NewWajibPajakProfile()
|
|
if err := p.Profile.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *WajibPajak) ReadField30(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.Owners = make([]*User, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
_elem := NewUser()
|
|
if err := _elem.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
|
|
p.Owners = append(p.Owners, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *WajibPajak) ReadField40(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.TaxObligations = make([]*WajibPajakTaxObligation, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
_elem := NewWajibPajakTaxObligation()
|
|
if err := _elem.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
|
|
p.TaxObligations = append(p.TaxObligations, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *WajibPajak) ReadField45(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.Roles = make([]*Role, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
_elem := NewRole()
|
|
if err := _elem.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
|
|
p.Roles = append(p.Roles, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *WajibPajak) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "WajibPajak"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField2(ctx, oprot); err != nil {
|
|
fieldId = 2
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField30(ctx, oprot); err != nil {
|
|
fieldId = 30
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField40(ctx, oprot); err != nil {
|
|
fieldId = 40
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField45(ctx, oprot); err != nil {
|
|
fieldId = 45
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *WajibPajak) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "id", thrift.I64, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteI64(ctx, p.ID); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *WajibPajak) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "profile", thrift.STRUCT, 2); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := p.Profile.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *WajibPajak) writeField30(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "owners", thrift.LIST, 30); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Owners)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.Owners {
|
|
if err := v.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); err != nil {
|
|
goto WriteFieldEndError
|
|
}
|
|
return nil
|
|
WriteFieldBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 30 begin error: ", p), err)
|
|
WriteFieldEndError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 30 end error: ", p), err)
|
|
}
|
|
|
|
func (p *WajibPajak) writeField40(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetTaxObligations() {
|
|
if err = oprot.WriteFieldBegin(ctx, "taxObligations", thrift.LIST, 40); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.TaxObligations)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.TaxObligations {
|
|
if err := v.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); err != nil {
|
|
goto WriteFieldEndError
|
|
}
|
|
}
|
|
return nil
|
|
WriteFieldBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 40 begin error: ", p), err)
|
|
WriteFieldEndError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 40 end error: ", p), err)
|
|
}
|
|
|
|
func (p *WajibPajak) writeField45(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetRoles() {
|
|
if err = oprot.WriteFieldBegin(ctx, "roles", thrift.LIST, 45); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Roles)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.Roles {
|
|
if err := v.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); err != nil {
|
|
goto WriteFieldEndError
|
|
}
|
|
}
|
|
return nil
|
|
WriteFieldBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 45 begin error: ", p), err)
|
|
WriteFieldEndError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write field 45 end error: ", p), err)
|
|
}
|
|
|
|
func (p *WajibPajak) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("WajibPajak(%+v)", *p)
|
|
}
|
|
|
|
// ----------------------------------------------------------------
|
|
type Pagination struct {
|
|
Page int64 `thrift:"page,1" frugal:"1,default,i64" db:"page" json:"page"`
|
|
RowsPerPage int64 `thrift:"rowsPerPage,2" frugal:"2,default,i64" db:"rowsPerPage" json:"rowsPerPage"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewPagination, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x50,
|
|
0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f,
|
|
0x6e, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6,
|
|
0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0,
|
|
0x3, 0xc, 0x0, 0x0, 0x0, 0x2, 0x6, 0x0,
|
|
0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0,
|
|
0x0, 0x4, 0x70, 0x61, 0x67, 0x65, 0x8, 0x0,
|
|
0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4,
|
|
0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x0,
|
|
0x0, 0x6, 0x0, 0x1, 0x0, 0x2, 0xb, 0x0,
|
|
0x2, 0x0, 0x0, 0x0, 0xb, 0x72, 0x6f, 0x77,
|
|
0x73, 0x50, 0x65, 0x72, 0x50, 0x61, 0x67, 0x65,
|
|
0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc,
|
|
0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0,
|
|
0xa, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewPagination() *Pagination {
|
|
return &Pagination{}
|
|
}
|
|
|
|
func (p *Pagination) InitDefault() {
|
|
*p = Pagination{}
|
|
}
|
|
|
|
func (p *Pagination) GetPage() (v int64) {
|
|
return p.Page
|
|
}
|
|
|
|
func (p *Pagination) GetRowsPerPage() (v int64) {
|
|
return p.RowsPerPage
|
|
}
|
|
func (p *Pagination) SetPage(val int64) {
|
|
p.Page = val
|
|
}
|
|
func (p *Pagination) SetRowsPerPage(val int64) {
|
|
p.RowsPerPage = val
|
|
}
|
|
|
|
func (p *Pagination) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_Pagination = map[int16]string{
|
|
1: "page",
|
|
2: "rowsPerPage",
|
|
}
|
|
|
|
func (p *Pagination) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.I64 {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 2:
|
|
if fieldTypeId == thrift.I64 {
|
|
if err = p.ReadField2(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_Pagination[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *Pagination) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadI64(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.Page = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *Pagination) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadI64(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.RowsPerPage = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *Pagination) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "Pagination"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField2(ctx, oprot); err != nil {
|
|
fieldId = 2
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *Pagination) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "page", thrift.I64, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteI64(ctx, p.Page); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *Pagination) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "rowsPerPage", thrift.I64, 2); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteI64(ctx, p.RowsPerPage); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *Pagination) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("Pagination(%+v)", *p)
|
|
}
|
|
|
|
type AlertInfo struct {
|
|
Title string `thrift:"title,1" frugal:"1,default,string" db:"title" json:"title"`
|
|
Description string `thrift:"description,2" frugal:"2,default,string" db:"description" json:"description"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewAlertInfo, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x9, 0x41,
|
|
0x6c, 0x65, 0x72, 0x74, 0x49, 0x6e, 0x66, 0x6f,
|
|
0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73,
|
|
0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3,
|
|
0xc, 0x0, 0x0, 0x0, 0x2, 0x6, 0x0, 0x1,
|
|
0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
0x5, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x8, 0x0,
|
|
0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4,
|
|
0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xb, 0x0,
|
|
0x0, 0x6, 0x0, 0x1, 0x0, 0x2, 0xb, 0x0,
|
|
0x2, 0x0, 0x0, 0x0, 0xb, 0x64, 0x65, 0x73,
|
|
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
|
0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc,
|
|
0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0,
|
|
0xb, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewAlertInfo() *AlertInfo {
|
|
return &AlertInfo{}
|
|
}
|
|
|
|
func (p *AlertInfo) InitDefault() {
|
|
*p = AlertInfo{}
|
|
}
|
|
|
|
func (p *AlertInfo) GetTitle() (v string) {
|
|
return p.Title
|
|
}
|
|
|
|
func (p *AlertInfo) GetDescription() (v string) {
|
|
return p.Description
|
|
}
|
|
func (p *AlertInfo) SetTitle(val string) {
|
|
p.Title = val
|
|
}
|
|
func (p *AlertInfo) SetDescription(val string) {
|
|
p.Description = val
|
|
}
|
|
|
|
func (p *AlertInfo) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_AlertInfo = map[int16]string{
|
|
1: "title",
|
|
2: "description",
|
|
}
|
|
|
|
func (p *AlertInfo) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 2:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField2(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_AlertInfo[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *AlertInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.Title = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AlertInfo) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.Description = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AlertInfo) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "AlertInfo"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField2(ctx, oprot); err != nil {
|
|
fieldId = 2
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *AlertInfo) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "title", thrift.STRING, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.Title); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *AlertInfo) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "description", thrift.STRING, 2); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.Description); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *AlertInfo) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AlertInfo(%+v)", *p)
|
|
}
|
|
|
|
// ----------------------------------------------------------------
|
|
type LoginRequest struct {
|
|
Username string `thrift:"username,1" frugal:"1,default,string" core_v1_dto:"required"`
|
|
Password string `thrift:"password,2" frugal:"2,default,string" core_v1_dto:"required"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewLoginRequest, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x4c,
|
|
0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
|
0x65, 0x73, 0x74, 0xb, 0x0, 0x2, 0x0, 0x0,
|
|
0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74,
|
|
0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x2,
|
|
0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2,
|
|
0x0, 0x0, 0x0, 0x8, 0x75, 0x73, 0x65, 0x72,
|
|
0x6e, 0x61, 0x6d, 0x65, 0x8, 0x0, 0x3, 0x0,
|
|
0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0,
|
|
0x1, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x6,
|
|
0x0, 0x1, 0x0, 0x2, 0xb, 0x0, 0x2, 0x0,
|
|
0x0, 0x0, 0x8, 0x70, 0x61, 0x73, 0x73, 0x77,
|
|
0x6f, 0x72, 0x64, 0x8, 0x0, 0x3, 0x0, 0x0,
|
|
0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1,
|
|
0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewLoginRequest() *LoginRequest {
|
|
return &LoginRequest{}
|
|
}
|
|
|
|
func (p *LoginRequest) InitDefault() {
|
|
*p = LoginRequest{}
|
|
}
|
|
|
|
func (p *LoginRequest) GetUsername() (v string) {
|
|
return p.Username
|
|
}
|
|
|
|
func (p *LoginRequest) GetPassword() (v string) {
|
|
return p.Password
|
|
}
|
|
func (p *LoginRequest) SetUsername(val string) {
|
|
p.Username = val
|
|
}
|
|
func (p *LoginRequest) SetPassword(val string) {
|
|
p.Password = val
|
|
}
|
|
|
|
func (p *LoginRequest) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_LoginRequest = map[int16]string{
|
|
1: "username",
|
|
2: "password",
|
|
}
|
|
|
|
func (p *LoginRequest) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 2:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField2(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_LoginRequest[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *LoginRequest) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.Username = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *LoginRequest) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.Password = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *LoginRequest) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "LoginRequest"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField2(ctx, oprot); err != nil {
|
|
fieldId = 2
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *LoginRequest) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "username", thrift.STRING, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.Username); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *LoginRequest) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "password", thrift.STRING, 2); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.Password); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *LoginRequest) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("LoginRequest(%+v)", *p)
|
|
}
|
|
|
|
type LoginResponse struct {
|
|
TrkToken string `thrift:"trkToken,1" frugal:"1,default,string" db:"trkToken" json:"trkToken"`
|
|
Token string `thrift:"token,2" frugal:"2,default,string" db:"token" json:"token"`
|
|
Profile *User `thrift:"profile,10,optional" frugal:"10,optional,User" db:"profile" json:"profile,omitempty"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewLoginResponse, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0xd, 0x4c,
|
|
0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
|
0x6f, 0x6e, 0x73, 0x65, 0xb, 0x0, 0x2, 0x0,
|
|
0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63,
|
|
0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0,
|
|
0x3, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0,
|
|
0x2, 0x0, 0x0, 0x0, 0x8, 0x74, 0x72, 0x6b,
|
|
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x8, 0x0, 0x3,
|
|
0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8,
|
|
0x0, 0x1, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0,
|
|
0x6, 0x0, 0x1, 0x0, 0x2, 0xb, 0x0, 0x2,
|
|
0x0, 0x0, 0x0, 0x5, 0x74, 0x6f, 0x6b, 0x65,
|
|
0x6e, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0,
|
|
0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0,
|
|
0x0, 0xb, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0,
|
|
0xa, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7,
|
|
0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x8,
|
|
0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0,
|
|
0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc,
|
|
0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewLoginResponse() *LoginResponse {
|
|
return &LoginResponse{}
|
|
}
|
|
|
|
func (p *LoginResponse) InitDefault() {
|
|
*p = LoginResponse{}
|
|
}
|
|
|
|
func (p *LoginResponse) GetTrkToken() (v string) {
|
|
return p.TrkToken
|
|
}
|
|
|
|
func (p *LoginResponse) GetToken() (v string) {
|
|
return p.Token
|
|
}
|
|
|
|
var LoginResponse_Profile_DEFAULT *User
|
|
|
|
func (p *LoginResponse) GetProfile() (v *User) {
|
|
if !p.IsSetProfile() {
|
|
return LoginResponse_Profile_DEFAULT
|
|
}
|
|
return p.Profile
|
|
}
|
|
func (p *LoginResponse) SetTrkToken(val string) {
|
|
p.TrkToken = val
|
|
}
|
|
func (p *LoginResponse) SetToken(val string) {
|
|
p.Token = val
|
|
}
|
|
func (p *LoginResponse) SetProfile(val *User) {
|
|
p.Profile = val
|
|
}
|
|
|
|
func (p *LoginResponse) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_LoginResponse = map[int16]string{
|
|
1: "trkToken",
|
|
2: "token",
|
|
10: "profile",
|
|
}
|
|
|
|
func (p *LoginResponse) IsSetProfile() bool {
|
|
return p.Profile != nil
|
|
}
|
|
|
|
func (p *LoginResponse) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 2:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField2(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 10:
|
|
if fieldTypeId == thrift.STRUCT {
|
|
if err = p.ReadField10(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_LoginResponse[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *LoginResponse) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.TrkToken = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *LoginResponse) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.Token = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *LoginResponse) ReadField10(ctx context.Context, iprot thrift.TProtocol) error {
|
|
p.Profile = NewUser()
|
|
if err := p.Profile.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *LoginResponse) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "LoginResponse"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField2(ctx, oprot); err != nil {
|
|
fieldId = 2
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField10(ctx, oprot); err != nil {
|
|
fieldId = 10
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *LoginResponse) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "trkToken", thrift.STRING, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.TrkToken); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *LoginResponse) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "token", thrift.STRING, 2); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.Token); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *LoginResponse) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetProfile() {
|
|
if err = oprot.WriteFieldBegin(ctx, "profile", thrift.STRUCT, 10); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := p.Profile.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *LoginResponse) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("LoginResponse(%+v)", *p)
|
|
}
|
|
|
|
type LogoutRequest struct {
|
|
Token string `thrift:"token,1" frugal:"1,default,string" core_v1_dto:"required"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewLogoutRequest, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0xd, 0x4c,
|
|
0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71,
|
|
0x75, 0x65, 0x73, 0x74, 0xb, 0x0, 0x2, 0x0,
|
|
0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63,
|
|
0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0,
|
|
0x1, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0,
|
|
0x2, 0x0, 0x0, 0x0, 0x5, 0x74, 0x6f, 0x6b,
|
|
0x65, 0x6e, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0,
|
|
0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0,
|
|
0x0, 0x0, 0xb, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewLogoutRequest() *LogoutRequest {
|
|
return &LogoutRequest{}
|
|
}
|
|
|
|
func (p *LogoutRequest) InitDefault() {
|
|
*p = LogoutRequest{}
|
|
}
|
|
|
|
func (p *LogoutRequest) GetToken() (v string) {
|
|
return p.Token
|
|
}
|
|
func (p *LogoutRequest) SetToken(val string) {
|
|
p.Token = val
|
|
}
|
|
|
|
func (p *LogoutRequest) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_LogoutRequest = map[int16]string{
|
|
1: "token",
|
|
}
|
|
|
|
func (p *LogoutRequest) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_LogoutRequest[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *LogoutRequest) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.Token = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *LogoutRequest) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "LogoutRequest"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *LogoutRequest) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "token", thrift.STRING, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.Token); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *LogoutRequest) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("LogoutRequest(%+v)", *p)
|
|
}
|
|
|
|
type LogoutResponse struct {
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewLogoutResponse, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0xe, 0x4c,
|
|
0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73,
|
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0xb, 0x0, 0x2,
|
|
0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75,
|
|
0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0,
|
|
0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewLogoutResponse() *LogoutResponse {
|
|
return &LogoutResponse{}
|
|
}
|
|
|
|
func (p *LogoutResponse) InitDefault() {
|
|
*p = LogoutResponse{}
|
|
}
|
|
|
|
func (p *LogoutResponse) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_LogoutResponse = map[int16]string{}
|
|
|
|
func (p *LogoutResponse) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *LogoutResponse) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteStructBegin(ctx, "LogoutResponse"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); err != nil {
|
|
goto WriteStructEndError
|
|
}
|
|
return nil
|
|
WriteStructBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *LogoutResponse) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("LogoutResponse(%+v)", *p)
|
|
}
|
|
|
|
type GetProfileRequest struct {
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewGetProfileRequest, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x11, 0x47,
|
|
0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
|
|
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
|
0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73,
|
|
0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3,
|
|
0xc, 0x0, 0x0, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewGetProfileRequest() *GetProfileRequest {
|
|
return &GetProfileRequest{}
|
|
}
|
|
|
|
func (p *GetProfileRequest) InitDefault() {
|
|
*p = GetProfileRequest{}
|
|
}
|
|
|
|
func (p *GetProfileRequest) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_GetProfileRequest = map[int16]string{}
|
|
|
|
func (p *GetProfileRequest) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *GetProfileRequest) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteStructBegin(ctx, "GetProfileRequest"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); err != nil {
|
|
goto WriteStructEndError
|
|
}
|
|
return nil
|
|
WriteStructBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *GetProfileRequest) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("GetProfileRequest(%+v)", *p)
|
|
}
|
|
|
|
type GetProfileResponse struct {
|
|
Profile *User `thrift:"profile,2" frugal:"2,default,User" db:"profile" json:"profile"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewGetProfileResponse, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x12, 0x47,
|
|
0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
|
|
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
|
0x65, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6,
|
|
0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0,
|
|
0x3, 0xc, 0x0, 0x0, 0x0, 0x1, 0x6, 0x0,
|
|
0x1, 0x0, 0x2, 0xb, 0x0, 0x2, 0x0, 0x0,
|
|
0x0, 0x7, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c,
|
|
0x65, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0,
|
|
0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0,
|
|
0x0, 0xc, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewGetProfileResponse() *GetProfileResponse {
|
|
return &GetProfileResponse{}
|
|
}
|
|
|
|
func (p *GetProfileResponse) InitDefault() {
|
|
*p = GetProfileResponse{}
|
|
}
|
|
|
|
var GetProfileResponse_Profile_DEFAULT *User
|
|
|
|
func (p *GetProfileResponse) GetProfile() (v *User) {
|
|
if !p.IsSetProfile() {
|
|
return GetProfileResponse_Profile_DEFAULT
|
|
}
|
|
return p.Profile
|
|
}
|
|
func (p *GetProfileResponse) SetProfile(val *User) {
|
|
p.Profile = val
|
|
}
|
|
|
|
func (p *GetProfileResponse) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_GetProfileResponse = map[int16]string{
|
|
2: "profile",
|
|
}
|
|
|
|
func (p *GetProfileResponse) IsSetProfile() bool {
|
|
return p.Profile != nil
|
|
}
|
|
|
|
func (p *GetProfileResponse) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 2:
|
|
if fieldTypeId == thrift.STRUCT {
|
|
if err = p.ReadField2(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_GetProfileResponse[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *GetProfileResponse) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
|
|
p.Profile = NewUser()
|
|
if err := p.Profile.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *GetProfileResponse) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "GetProfileResponse"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField2(ctx, oprot); err != nil {
|
|
fieldId = 2
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *GetProfileResponse) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "profile", thrift.STRUCT, 2); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := p.Profile.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *GetProfileResponse) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("GetProfileResponse(%+v)", *p)
|
|
}
|
|
|
|
type GetUserListRequest struct {
|
|
Pagination *Pagination `thrift:"pagination,1" frugal:"1,default,Pagination" db:"pagination" json:"pagination"`
|
|
SearchTerm string `thrift:"searchTerm,3" frugal:"3,default,string" db:"searchTerm" json:"searchTerm"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewGetUserListRequest, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x12, 0x47,
|
|
0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69,
|
|
0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
|
0x74, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6,
|
|
0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0,
|
|
0x3, 0xc, 0x0, 0x0, 0x0, 0x2, 0x6, 0x0,
|
|
0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0,
|
|
0x0, 0xa, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61,
|
|
0x74, 0x69, 0x6f, 0x6e, 0x8, 0x0, 0x3, 0x0,
|
|
0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0,
|
|
0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x6,
|
|
0x0, 0x1, 0x0, 0x3, 0xb, 0x0, 0x2, 0x0,
|
|
0x0, 0x0, 0xa, 0x73, 0x65, 0x61, 0x72, 0x63,
|
|
0x68, 0x54, 0x65, 0x72, 0x6d, 0x8, 0x0, 0x3,
|
|
0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8,
|
|
0x0, 0x1, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0,
|
|
0x0,
|
|
})
|
|
}
|
|
|
|
func NewGetUserListRequest() *GetUserListRequest {
|
|
return &GetUserListRequest{}
|
|
}
|
|
|
|
func (p *GetUserListRequest) InitDefault() {
|
|
*p = GetUserListRequest{}
|
|
}
|
|
|
|
var GetUserListRequest_Pagination_DEFAULT *Pagination
|
|
|
|
func (p *GetUserListRequest) GetPagination() (v *Pagination) {
|
|
if !p.IsSetPagination() {
|
|
return GetUserListRequest_Pagination_DEFAULT
|
|
}
|
|
return p.Pagination
|
|
}
|
|
|
|
func (p *GetUserListRequest) GetSearchTerm() (v string) {
|
|
return p.SearchTerm
|
|
}
|
|
func (p *GetUserListRequest) SetPagination(val *Pagination) {
|
|
p.Pagination = val
|
|
}
|
|
func (p *GetUserListRequest) SetSearchTerm(val string) {
|
|
p.SearchTerm = val
|
|
}
|
|
|
|
func (p *GetUserListRequest) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_GetUserListRequest = map[int16]string{
|
|
1: "pagination",
|
|
3: "searchTerm",
|
|
}
|
|
|
|
func (p *GetUserListRequest) IsSetPagination() bool {
|
|
return p.Pagination != nil
|
|
}
|
|
|
|
func (p *GetUserListRequest) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.STRUCT {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 3:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField3(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_GetUserListRequest[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *GetUserListRequest) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
p.Pagination = NewPagination()
|
|
if err := p.Pagination.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *GetUserListRequest) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.SearchTerm = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *GetUserListRequest) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "GetUserListRequest"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField3(ctx, oprot); err != nil {
|
|
fieldId = 3
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *GetUserListRequest) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "pagination", thrift.STRUCT, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := p.Pagination.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *GetUserListRequest) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "searchTerm", thrift.STRING, 3); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.SearchTerm); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *GetUserListRequest) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("GetUserListRequest(%+v)", *p)
|
|
}
|
|
|
|
type GetUserListResponse struct {
|
|
Pagination *Pagination `thrift:"pagination,1" frugal:"1,default,Pagination" db:"pagination" json:"pagination"`
|
|
TotalUsers int64 `thrift:"totalUsers,2" frugal:"2,default,i64" db:"totalUsers" json:"totalUsers"`
|
|
Users []*User `thrift:"users,3" frugal:"3,default,list<User>" db:"users" json:"users"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewGetUserListResponse, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x13, 0x47,
|
|
0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69,
|
|
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
|
0x73, 0x65, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf,
|
|
0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x3, 0x6,
|
|
0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0,
|
|
0x0, 0x0, 0xa, 0x70, 0x61, 0x67, 0x69, 0x6e,
|
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8, 0x0, 0x3,
|
|
0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8,
|
|
0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0,
|
|
0x6, 0x0, 0x1, 0x0, 0x2, 0xb, 0x0, 0x2,
|
|
0x0, 0x0, 0x0, 0xa, 0x74, 0x6f, 0x74, 0x61,
|
|
0x6c, 0x55, 0x73, 0x65, 0x72, 0x73, 0x8, 0x0,
|
|
0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4,
|
|
0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x0,
|
|
0x0, 0x6, 0x0, 0x1, 0x0, 0x3, 0xb, 0x0,
|
|
0x2, 0x0, 0x0, 0x0, 0x5, 0x75, 0x73, 0x65,
|
|
0x72, 0x73, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0,
|
|
0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0,
|
|
0x0, 0x0, 0xf, 0xc, 0x0, 0x3, 0x8, 0x0,
|
|
0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0,
|
|
0x0,
|
|
})
|
|
}
|
|
|
|
func NewGetUserListResponse() *GetUserListResponse {
|
|
return &GetUserListResponse{}
|
|
}
|
|
|
|
func (p *GetUserListResponse) InitDefault() {
|
|
*p = GetUserListResponse{}
|
|
}
|
|
|
|
var GetUserListResponse_Pagination_DEFAULT *Pagination
|
|
|
|
func (p *GetUserListResponse) GetPagination() (v *Pagination) {
|
|
if !p.IsSetPagination() {
|
|
return GetUserListResponse_Pagination_DEFAULT
|
|
}
|
|
return p.Pagination
|
|
}
|
|
|
|
func (p *GetUserListResponse) GetTotalUsers() (v int64) {
|
|
return p.TotalUsers
|
|
}
|
|
|
|
func (p *GetUserListResponse) GetUsers() (v []*User) {
|
|
return p.Users
|
|
}
|
|
func (p *GetUserListResponse) SetPagination(val *Pagination) {
|
|
p.Pagination = val
|
|
}
|
|
func (p *GetUserListResponse) SetTotalUsers(val int64) {
|
|
p.TotalUsers = val
|
|
}
|
|
func (p *GetUserListResponse) SetUsers(val []*User) {
|
|
p.Users = val
|
|
}
|
|
|
|
func (p *GetUserListResponse) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_GetUserListResponse = map[int16]string{
|
|
1: "pagination",
|
|
2: "totalUsers",
|
|
3: "users",
|
|
}
|
|
|
|
func (p *GetUserListResponse) IsSetPagination() bool {
|
|
return p.Pagination != nil
|
|
}
|
|
|
|
func (p *GetUserListResponse) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.STRUCT {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 2:
|
|
if fieldTypeId == thrift.I64 {
|
|
if err = p.ReadField2(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 3:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField3(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_GetUserListResponse[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *GetUserListResponse) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
p.Pagination = NewPagination()
|
|
if err := p.Pagination.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *GetUserListResponse) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadI64(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.TotalUsers = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *GetUserListResponse) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.Users = make([]*User, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
_elem := NewUser()
|
|
if err := _elem.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
|
|
p.Users = append(p.Users, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *GetUserListResponse) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "GetUserListResponse"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField2(ctx, oprot); err != nil {
|
|
fieldId = 2
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField3(ctx, oprot); err != nil {
|
|
fieldId = 3
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *GetUserListResponse) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "pagination", thrift.STRUCT, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := p.Pagination.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *GetUserListResponse) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "totalUsers", thrift.I64, 2); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteI64(ctx, p.TotalUsers); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *GetUserListResponse) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "users", thrift.LIST, 3); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Users)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.Users {
|
|
if err := v.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *GetUserListResponse) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("GetUserListResponse(%+v)", *p)
|
|
}
|
|
|
|
type CreateUserRequest struct {
|
|
User *User `thrift:"user,1" frugal:"1,default,User" db:"user" json:"user"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewCreateUserRequest, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x11, 0x43,
|
|
0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65,
|
|
0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
|
0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73,
|
|
0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3,
|
|
0xc, 0x0, 0x0, 0x0, 0x1, 0x6, 0x0, 0x1,
|
|
0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
0x4, 0x75, 0x73, 0x65, 0x72, 0x8, 0x0, 0x3,
|
|
0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8,
|
|
0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0,
|
|
0x0,
|
|
})
|
|
}
|
|
|
|
func NewCreateUserRequest() *CreateUserRequest {
|
|
return &CreateUserRequest{}
|
|
}
|
|
|
|
func (p *CreateUserRequest) InitDefault() {
|
|
*p = CreateUserRequest{}
|
|
}
|
|
|
|
var CreateUserRequest_User_DEFAULT *User
|
|
|
|
func (p *CreateUserRequest) GetUser() (v *User) {
|
|
if !p.IsSetUser() {
|
|
return CreateUserRequest_User_DEFAULT
|
|
}
|
|
return p.User
|
|
}
|
|
func (p *CreateUserRequest) SetUser(val *User) {
|
|
p.User = val
|
|
}
|
|
|
|
func (p *CreateUserRequest) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_CreateUserRequest = map[int16]string{
|
|
1: "user",
|
|
}
|
|
|
|
func (p *CreateUserRequest) IsSetUser() bool {
|
|
return p.User != nil
|
|
}
|
|
|
|
func (p *CreateUserRequest) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.STRUCT {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_CreateUserRequest[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *CreateUserRequest) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
p.User = NewUser()
|
|
if err := p.User.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *CreateUserRequest) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "CreateUserRequest"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *CreateUserRequest) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "user", thrift.STRUCT, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := p.User.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *CreateUserRequest) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("CreateUserRequest(%+v)", *p)
|
|
}
|
|
|
|
type CreateUserResponse struct {
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewCreateUserResponse, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x12, 0x43,
|
|
0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65,
|
|
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
|
0x65, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6,
|
|
0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0,
|
|
0x3, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewCreateUserResponse() *CreateUserResponse {
|
|
return &CreateUserResponse{}
|
|
}
|
|
|
|
func (p *CreateUserResponse) InitDefault() {
|
|
*p = CreateUserResponse{}
|
|
}
|
|
|
|
func (p *CreateUserResponse) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_CreateUserResponse = map[int16]string{}
|
|
|
|
func (p *CreateUserResponse) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *CreateUserResponse) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteStructBegin(ctx, "CreateUserResponse"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); err != nil {
|
|
goto WriteStructEndError
|
|
}
|
|
return nil
|
|
WriteStructBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *CreateUserResponse) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("CreateUserResponse(%+v)", *p)
|
|
}
|
|
|
|
type DeleteUsersRequest struct {
|
|
UserIds []int64 `thrift:"userIds,1" frugal:"1,default,list<i64>" db:"userIds" json:"userIds"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewDeleteUsersRequest, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x12, 0x44,
|
|
0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65,
|
|
0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
|
0x74, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6,
|
|
0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0,
|
|
0x3, 0xc, 0x0, 0x0, 0x0, 0x1, 0x6, 0x0,
|
|
0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0,
|
|
0x0, 0x7, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
|
|
0x73, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0,
|
|
0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0,
|
|
0x0, 0xf, 0xc, 0x0, 0x3, 0x8, 0x0, 0x1,
|
|
0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewDeleteUsersRequest() *DeleteUsersRequest {
|
|
return &DeleteUsersRequest{}
|
|
}
|
|
|
|
func (p *DeleteUsersRequest) InitDefault() {
|
|
*p = DeleteUsersRequest{}
|
|
}
|
|
|
|
func (p *DeleteUsersRequest) GetUserIds() (v []int64) {
|
|
return p.UserIds
|
|
}
|
|
func (p *DeleteUsersRequest) SetUserIds(val []int64) {
|
|
p.UserIds = val
|
|
}
|
|
|
|
func (p *DeleteUsersRequest) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_DeleteUsersRequest = map[int16]string{
|
|
1: "userIds",
|
|
}
|
|
|
|
func (p *DeleteUsersRequest) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_DeleteUsersRequest[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *DeleteUsersRequest) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.UserIds = make([]int64, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
var _elem int64
|
|
if v, err := iprot.ReadI64(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
_elem = v
|
|
}
|
|
|
|
p.UserIds = append(p.UserIds, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *DeleteUsersRequest) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "DeleteUsersRequest"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *DeleteUsersRequest) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "userIds", thrift.LIST, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.UserIds)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.UserIds {
|
|
if err := oprot.WriteI64(ctx, v); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *DeleteUsersRequest) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("DeleteUsersRequest(%+v)", *p)
|
|
}
|
|
|
|
type DeleteUsersResponse struct {
|
|
Success []int64 `thrift:"success,1" frugal:"1,default,list<i64>" db:"success" json:"success"`
|
|
Ignored []int64 `thrift:"ignored,2" frugal:"2,default,list<i64>" db:"ignored" json:"ignored"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewDeleteUsersResponse, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x13, 0x44,
|
|
0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65,
|
|
0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
|
0x73, 0x65, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf,
|
|
0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x2, 0x6,
|
|
0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0,
|
|
0x0, 0x0, 0x7, 0x73, 0x75, 0x63, 0x63, 0x65,
|
|
0x73, 0x73, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0,
|
|
0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0,
|
|
0x0, 0x0, 0xf, 0xc, 0x0, 0x3, 0x8, 0x0,
|
|
0x1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0,
|
|
0x6, 0x0, 0x1, 0x0, 0x2, 0xb, 0x0, 0x2,
|
|
0x0, 0x0, 0x0, 0x7, 0x69, 0x67, 0x6e, 0x6f,
|
|
0x72, 0x65, 0x64, 0x8, 0x0, 0x3, 0x0, 0x0,
|
|
0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1,
|
|
0x0, 0x0, 0x0, 0xf, 0xc, 0x0, 0x3, 0x8,
|
|
0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0,
|
|
0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewDeleteUsersResponse() *DeleteUsersResponse {
|
|
return &DeleteUsersResponse{}
|
|
}
|
|
|
|
func (p *DeleteUsersResponse) InitDefault() {
|
|
*p = DeleteUsersResponse{}
|
|
}
|
|
|
|
func (p *DeleteUsersResponse) GetSuccess() (v []int64) {
|
|
return p.Success
|
|
}
|
|
|
|
func (p *DeleteUsersResponse) GetIgnored() (v []int64) {
|
|
return p.Ignored
|
|
}
|
|
func (p *DeleteUsersResponse) SetSuccess(val []int64) {
|
|
p.Success = val
|
|
}
|
|
func (p *DeleteUsersResponse) SetIgnored(val []int64) {
|
|
p.Ignored = val
|
|
}
|
|
|
|
func (p *DeleteUsersResponse) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_DeleteUsersResponse = map[int16]string{
|
|
1: "success",
|
|
2: "ignored",
|
|
}
|
|
|
|
func (p *DeleteUsersResponse) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 2:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField2(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_DeleteUsersResponse[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *DeleteUsersResponse) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.Success = make([]int64, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
var _elem int64
|
|
if v, err := iprot.ReadI64(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
_elem = v
|
|
}
|
|
|
|
p.Success = append(p.Success, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *DeleteUsersResponse) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.Ignored = make([]int64, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
var _elem int64
|
|
if v, err := iprot.ReadI64(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
_elem = v
|
|
}
|
|
|
|
p.Ignored = append(p.Ignored, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *DeleteUsersResponse) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "DeleteUsersResponse"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField2(ctx, oprot); err != nil {
|
|
fieldId = 2
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *DeleteUsersResponse) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Success)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.Success {
|
|
if err := oprot.WriteI64(ctx, v); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *DeleteUsersResponse) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "ignored", thrift.LIST, 2); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Ignored)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.Ignored {
|
|
if err := oprot.WriteI64(ctx, v); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *DeleteUsersResponse) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("DeleteUsersResponse(%+v)", *p)
|
|
}
|
|
|
|
type GetWajibPajakListRequest struct {
|
|
Pagination *Pagination `thrift:"pagination,1" frugal:"1,default,Pagination" db:"pagination" json:"pagination"`
|
|
Ownership WajibPajakOwnership `thrift:"ownership,2" frugal:"2,default,WajibPajakOwnership" db:"ownership" json:"ownership"`
|
|
SearchTerm string `thrift:"searchTerm,3" frugal:"3,default,string" db:"searchTerm" json:"searchTerm"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewGetWajibPajakListRequest, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x18, 0x47,
|
|
0x65, 0x74, 0x57, 0x61, 0x6a, 0x69, 0x62, 0x50,
|
|
0x61, 0x6a, 0x61, 0x6b, 0x4c, 0x69, 0x73, 0x74,
|
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0xb,
|
|
0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74,
|
|
0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc,
|
|
0x0, 0x0, 0x0, 0x3, 0x6, 0x0, 0x1, 0x0,
|
|
0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0xa,
|
|
0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69,
|
|
0x6f, 0x6e, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0,
|
|
0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0,
|
|
0x0, 0x0, 0xc, 0x0, 0x0, 0x6, 0x0, 0x1,
|
|
0x0, 0x2, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
0x9, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68,
|
|
0x69, 0x70, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0,
|
|
0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0,
|
|
0x0, 0x0, 0x8, 0x0, 0x0, 0x6, 0x0, 0x1,
|
|
0x0, 0x3, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
0xa, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x54,
|
|
0x65, 0x72, 0x6d, 0x8, 0x0, 0x3, 0x0, 0x0,
|
|
0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1,
|
|
0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewGetWajibPajakListRequest() *GetWajibPajakListRequest {
|
|
return &GetWajibPajakListRequest{}
|
|
}
|
|
|
|
func (p *GetWajibPajakListRequest) InitDefault() {
|
|
*p = GetWajibPajakListRequest{}
|
|
}
|
|
|
|
var GetWajibPajakListRequest_Pagination_DEFAULT *Pagination
|
|
|
|
func (p *GetWajibPajakListRequest) GetPagination() (v *Pagination) {
|
|
if !p.IsSetPagination() {
|
|
return GetWajibPajakListRequest_Pagination_DEFAULT
|
|
}
|
|
return p.Pagination
|
|
}
|
|
|
|
func (p *GetWajibPajakListRequest) GetOwnership() (v WajibPajakOwnership) {
|
|
return p.Ownership
|
|
}
|
|
|
|
func (p *GetWajibPajakListRequest) GetSearchTerm() (v string) {
|
|
return p.SearchTerm
|
|
}
|
|
func (p *GetWajibPajakListRequest) SetPagination(val *Pagination) {
|
|
p.Pagination = val
|
|
}
|
|
func (p *GetWajibPajakListRequest) SetOwnership(val WajibPajakOwnership) {
|
|
p.Ownership = val
|
|
}
|
|
func (p *GetWajibPajakListRequest) SetSearchTerm(val string) {
|
|
p.SearchTerm = val
|
|
}
|
|
|
|
func (p *GetWajibPajakListRequest) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_GetWajibPajakListRequest = map[int16]string{
|
|
1: "pagination",
|
|
2: "ownership",
|
|
3: "searchTerm",
|
|
}
|
|
|
|
func (p *GetWajibPajakListRequest) IsSetPagination() bool {
|
|
return p.Pagination != nil
|
|
}
|
|
|
|
func (p *GetWajibPajakListRequest) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.STRUCT {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 2:
|
|
if fieldTypeId == thrift.I32 {
|
|
if err = p.ReadField2(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 3:
|
|
if fieldTypeId == thrift.STRING {
|
|
if err = p.ReadField3(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_GetWajibPajakListRequest[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *GetWajibPajakListRequest) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
p.Pagination = NewPagination()
|
|
if err := p.Pagination.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *GetWajibPajakListRequest) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadI32(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.Ownership = WajibPajakOwnership(v)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *GetWajibPajakListRequest) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.SearchTerm = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *GetWajibPajakListRequest) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "GetWajibPajakListRequest"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField2(ctx, oprot); err != nil {
|
|
fieldId = 2
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField3(ctx, oprot); err != nil {
|
|
fieldId = 3
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *GetWajibPajakListRequest) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "pagination", thrift.STRUCT, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := p.Pagination.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *GetWajibPajakListRequest) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "ownership", thrift.I32, 2); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteI32(ctx, int32(p.Ownership)); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *GetWajibPajakListRequest) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "searchTerm", thrift.STRING, 3); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteString(ctx, p.SearchTerm); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *GetWajibPajakListRequest) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("GetWajibPajakListRequest(%+v)", *p)
|
|
}
|
|
|
|
type GetWajibPajakListResponse struct {
|
|
Pagination *Pagination `thrift:"pagination,1" frugal:"1,default,Pagination" db:"pagination" json:"pagination"`
|
|
TotalWajibPajak int64 `thrift:"totalWajibPajak,2" frugal:"2,default,i64" db:"totalWajibPajak" json:"totalWajibPajak"`
|
|
WajibPajakList []*WajibPajak `thrift:"wajibPajakList,3" frugal:"3,default,list<WajibPajak>" db:"wajibPajakList" json:"wajibPajakList"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewGetWajibPajakListResponse, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x19, 0x47,
|
|
0x65, 0x74, 0x57, 0x61, 0x6a, 0x69, 0x62, 0x50,
|
|
0x61, 0x6a, 0x61, 0x6b, 0x4c, 0x69, 0x73, 0x74,
|
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
|
0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73,
|
|
0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3,
|
|
0xc, 0x0, 0x0, 0x0, 0x3, 0x6, 0x0, 0x1,
|
|
0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
0xa, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74,
|
|
0x69, 0x6f, 0x6e, 0x8, 0x0, 0x3, 0x0, 0x0,
|
|
0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1,
|
|
0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x6, 0x0,
|
|
0x1, 0x0, 0x2, 0xb, 0x0, 0x2, 0x0, 0x0,
|
|
0x0, 0xf, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57,
|
|
0x61, 0x6a, 0x69, 0x62, 0x50, 0x61, 0x6a, 0x61,
|
|
0x6b, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0,
|
|
0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0,
|
|
0x0, 0xa, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0,
|
|
0x3, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0xe,
|
|
0x77, 0x61, 0x6a, 0x69, 0x62, 0x50, 0x61, 0x6a,
|
|
0x61, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x8, 0x0,
|
|
0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4,
|
|
0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xf, 0xc,
|
|
0x0, 0x3, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0,
|
|
0xc, 0x0, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewGetWajibPajakListResponse() *GetWajibPajakListResponse {
|
|
return &GetWajibPajakListResponse{}
|
|
}
|
|
|
|
func (p *GetWajibPajakListResponse) InitDefault() {
|
|
*p = GetWajibPajakListResponse{}
|
|
}
|
|
|
|
var GetWajibPajakListResponse_Pagination_DEFAULT *Pagination
|
|
|
|
func (p *GetWajibPajakListResponse) GetPagination() (v *Pagination) {
|
|
if !p.IsSetPagination() {
|
|
return GetWajibPajakListResponse_Pagination_DEFAULT
|
|
}
|
|
return p.Pagination
|
|
}
|
|
|
|
func (p *GetWajibPajakListResponse) GetTotalWajibPajak() (v int64) {
|
|
return p.TotalWajibPajak
|
|
}
|
|
|
|
func (p *GetWajibPajakListResponse) GetWajibPajakList() (v []*WajibPajak) {
|
|
return p.WajibPajakList
|
|
}
|
|
func (p *GetWajibPajakListResponse) SetPagination(val *Pagination) {
|
|
p.Pagination = val
|
|
}
|
|
func (p *GetWajibPajakListResponse) SetTotalWajibPajak(val int64) {
|
|
p.TotalWajibPajak = val
|
|
}
|
|
func (p *GetWajibPajakListResponse) SetWajibPajakList(val []*WajibPajak) {
|
|
p.WajibPajakList = val
|
|
}
|
|
|
|
func (p *GetWajibPajakListResponse) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_GetWajibPajakListResponse = map[int16]string{
|
|
1: "pagination",
|
|
2: "totalWajibPajak",
|
|
3: "wajibPajakList",
|
|
}
|
|
|
|
func (p *GetWajibPajakListResponse) IsSetPagination() bool {
|
|
return p.Pagination != nil
|
|
}
|
|
|
|
func (p *GetWajibPajakListResponse) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.STRUCT {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 2:
|
|
if fieldTypeId == thrift.I64 {
|
|
if err = p.ReadField2(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 3:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField3(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_GetWajibPajakListResponse[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *GetWajibPajakListResponse) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
p.Pagination = NewPagination()
|
|
if err := p.Pagination.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *GetWajibPajakListResponse) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadI64(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
p.TotalWajibPajak = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *GetWajibPajakListResponse) ReadField3(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.WajibPajakList = make([]*WajibPajak, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
_elem := NewWajibPajak()
|
|
if err := _elem.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
|
|
p.WajibPajakList = append(p.WajibPajakList, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *GetWajibPajakListResponse) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "GetWajibPajakListResponse"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField2(ctx, oprot); err != nil {
|
|
fieldId = 2
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField3(ctx, oprot); err != nil {
|
|
fieldId = 3
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *GetWajibPajakListResponse) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "pagination", thrift.STRUCT, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := p.Pagination.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *GetWajibPajakListResponse) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "totalWajibPajak", thrift.I64, 2); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteI64(ctx, p.TotalWajibPajak); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *GetWajibPajakListResponse) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "wajibPajakList", thrift.LIST, 3); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.WajibPajakList)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.WajibPajakList {
|
|
if err := v.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *GetWajibPajakListResponse) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("GetWajibPajakListResponse(%+v)", *p)
|
|
}
|
|
|
|
type CreateWajibPajakRequest struct {
|
|
WajibPajak *WajibPajak `thrift:"wajibPajak,1" frugal:"1,default,WajibPajak" core_v1_dto:"required"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewCreateWajibPajakRequest, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x17, 0x43,
|
|
0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6a,
|
|
0x69, 0x62, 0x50, 0x61, 0x6a, 0x61, 0x6b, 0x52,
|
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0xb, 0x0,
|
|
0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72,
|
|
0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0,
|
|
0x0, 0x0, 0x1, 0x6, 0x0, 0x1, 0x0, 0x1,
|
|
0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0xa, 0x77,
|
|
0x61, 0x6a, 0x69, 0x62, 0x50, 0x61, 0x6a, 0x61,
|
|
0x6b, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0,
|
|
0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0,
|
|
0x0, 0xc, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewCreateWajibPajakRequest() *CreateWajibPajakRequest {
|
|
return &CreateWajibPajakRequest{}
|
|
}
|
|
|
|
func (p *CreateWajibPajakRequest) InitDefault() {
|
|
*p = CreateWajibPajakRequest{}
|
|
}
|
|
|
|
var CreateWajibPajakRequest_WajibPajak_DEFAULT *WajibPajak
|
|
|
|
func (p *CreateWajibPajakRequest) GetWajibPajak() (v *WajibPajak) {
|
|
if !p.IsSetWajibPajak() {
|
|
return CreateWajibPajakRequest_WajibPajak_DEFAULT
|
|
}
|
|
return p.WajibPajak
|
|
}
|
|
func (p *CreateWajibPajakRequest) SetWajibPajak(val *WajibPajak) {
|
|
p.WajibPajak = val
|
|
}
|
|
|
|
func (p *CreateWajibPajakRequest) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_CreateWajibPajakRequest = map[int16]string{
|
|
1: "wajibPajak",
|
|
}
|
|
|
|
func (p *CreateWajibPajakRequest) IsSetWajibPajak() bool {
|
|
return p.WajibPajak != nil
|
|
}
|
|
|
|
func (p *CreateWajibPajakRequest) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.STRUCT {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_CreateWajibPajakRequest[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *CreateWajibPajakRequest) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
p.WajibPajak = NewWajibPajak()
|
|
if err := p.WajibPajak.Read(ctx, iprot); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *CreateWajibPajakRequest) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "CreateWajibPajakRequest"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *CreateWajibPajakRequest) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "wajibPajak", thrift.STRUCT, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := p.WajibPajak.Write(ctx, oprot); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *CreateWajibPajakRequest) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("CreateWajibPajakRequest(%+v)", *p)
|
|
}
|
|
|
|
type CreateWajibPajakResponse struct {
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewCreateWajibPajakResponse, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x18, 0x43,
|
|
0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6a,
|
|
0x69, 0x62, 0x50, 0x61, 0x6a, 0x61, 0x6b, 0x52,
|
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0xb,
|
|
0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74,
|
|
0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc,
|
|
0x0, 0x0, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewCreateWajibPajakResponse() *CreateWajibPajakResponse {
|
|
return &CreateWajibPajakResponse{}
|
|
}
|
|
|
|
func (p *CreateWajibPajakResponse) InitDefault() {
|
|
*p = CreateWajibPajakResponse{}
|
|
}
|
|
|
|
func (p *CreateWajibPajakResponse) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_CreateWajibPajakResponse = map[int16]string{}
|
|
|
|
func (p *CreateWajibPajakResponse) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *CreateWajibPajakResponse) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteStructBegin(ctx, "CreateWajibPajakResponse"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); err != nil {
|
|
goto WriteStructEndError
|
|
}
|
|
return nil
|
|
WriteStructBeginError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *CreateWajibPajakResponse) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("CreateWajibPajakResponse(%+v)", *p)
|
|
}
|
|
|
|
type DeleteWajibpajakListRequest struct {
|
|
WpIds []int64 `thrift:"wpIds,1" frugal:"1,default,list<i64>" db:"wpIds" json:"wpIds"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewDeleteWajibpajakListRequest, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1b, 0x44,
|
|
0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x61, 0x6a,
|
|
0x69, 0x62, 0x70, 0x61, 0x6a, 0x61, 0x6b, 0x4c,
|
|
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
|
|
0x73, 0x74, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf,
|
|
0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x1, 0x6,
|
|
0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0,
|
|
0x0, 0x0, 0x5, 0x77, 0x70, 0x49, 0x64, 0x73,
|
|
0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc,
|
|
0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0,
|
|
0xf, 0xc, 0x0, 0x3, 0x8, 0x0, 0x1, 0x0,
|
|
0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewDeleteWajibpajakListRequest() *DeleteWajibpajakListRequest {
|
|
return &DeleteWajibpajakListRequest{}
|
|
}
|
|
|
|
func (p *DeleteWajibpajakListRequest) InitDefault() {
|
|
*p = DeleteWajibpajakListRequest{}
|
|
}
|
|
|
|
func (p *DeleteWajibpajakListRequest) GetWpIds() (v []int64) {
|
|
return p.WpIds
|
|
}
|
|
func (p *DeleteWajibpajakListRequest) SetWpIds(val []int64) {
|
|
p.WpIds = val
|
|
}
|
|
|
|
func (p *DeleteWajibpajakListRequest) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_DeleteWajibpajakListRequest = map[int16]string{
|
|
1: "wpIds",
|
|
}
|
|
|
|
func (p *DeleteWajibpajakListRequest) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_DeleteWajibpajakListRequest[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *DeleteWajibpajakListRequest) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.WpIds = make([]int64, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
var _elem int64
|
|
if v, err := iprot.ReadI64(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
_elem = v
|
|
}
|
|
|
|
p.WpIds = append(p.WpIds, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *DeleteWajibpajakListRequest) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "DeleteWajibpajakListRequest"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *DeleteWajibpajakListRequest) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "wpIds", thrift.LIST, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.WpIds)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.WpIds {
|
|
if err := oprot.WriteI64(ctx, v); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *DeleteWajibpajakListRequest) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("DeleteWajibpajakListRequest(%+v)", *p)
|
|
}
|
|
|
|
type DeleteWajibpajakListResponse struct {
|
|
Success []int64 `thrift:"success,1" frugal:"1,default,list<i64>" db:"success" json:"success"`
|
|
Ignored []int64 `thrift:"ignored,2" frugal:"2,default,list<i64>" db:"ignored" json:"ignored"`
|
|
_unknownFields unknown.Fields
|
|
}
|
|
|
|
func init() {
|
|
meta.RegisterStruct(NewDeleteWajibpajakListResponse, []byte{
|
|
0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1c, 0x44,
|
|
0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x61, 0x6a,
|
|
0x69, 0x62, 0x70, 0x61, 0x6a, 0x61, 0x6b, 0x4c,
|
|
0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
|
0x6e, 0x73, 0x65, 0xb, 0x0, 0x2, 0x0, 0x0,
|
|
0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74,
|
|
0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x2,
|
|
0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2,
|
|
0x0, 0x0, 0x0, 0x7, 0x73, 0x75, 0x63, 0x63,
|
|
0x65, 0x73, 0x73, 0x8, 0x0, 0x3, 0x0, 0x0,
|
|
0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1,
|
|
0x0, 0x0, 0x0, 0xf, 0xc, 0x0, 0x3, 0x8,
|
|
0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0,
|
|
0x0, 0x6, 0x0, 0x1, 0x0, 0x2, 0xb, 0x0,
|
|
0x2, 0x0, 0x0, 0x0, 0x7, 0x69, 0x67, 0x6e,
|
|
0x6f, 0x72, 0x65, 0x64, 0x8, 0x0, 0x3, 0x0,
|
|
0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0,
|
|
0x1, 0x0, 0x0, 0x0, 0xf, 0xc, 0x0, 0x3,
|
|
0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x0,
|
|
0x0, 0x0, 0x0,
|
|
})
|
|
}
|
|
|
|
func NewDeleteWajibpajakListResponse() *DeleteWajibpajakListResponse {
|
|
return &DeleteWajibpajakListResponse{}
|
|
}
|
|
|
|
func (p *DeleteWajibpajakListResponse) InitDefault() {
|
|
*p = DeleteWajibpajakListResponse{}
|
|
}
|
|
|
|
func (p *DeleteWajibpajakListResponse) GetSuccess() (v []int64) {
|
|
return p.Success
|
|
}
|
|
|
|
func (p *DeleteWajibpajakListResponse) GetIgnored() (v []int64) {
|
|
return p.Ignored
|
|
}
|
|
func (p *DeleteWajibpajakListResponse) SetSuccess(val []int64) {
|
|
p.Success = val
|
|
}
|
|
func (p *DeleteWajibpajakListResponse) SetIgnored(val []int64) {
|
|
p.Ignored = val
|
|
}
|
|
|
|
func (p *DeleteWajibpajakListResponse) CarryingUnknownFields() bool {
|
|
return len(p._unknownFields) > 0
|
|
}
|
|
|
|
var fieldIDToName_DeleteWajibpajakListResponse = map[int16]string{
|
|
1: "success",
|
|
2: "ignored",
|
|
}
|
|
|
|
func (p *DeleteWajibpajakListResponse) Read(ctx context.Context, iprot thrift.TProtocol) (err error) {
|
|
var name string
|
|
var fieldTypeId thrift.TType
|
|
var fieldId int16
|
|
|
|
if _, err = iprot.ReadStructBegin(ctx); err != nil {
|
|
goto ReadStructBeginError
|
|
}
|
|
|
|
for {
|
|
name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx)
|
|
if err != nil {
|
|
goto ReadFieldBeginError
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
|
|
switch fieldId {
|
|
case 1:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField1(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
case 2:
|
|
if fieldTypeId == thrift.LIST {
|
|
if err = p.ReadField2(ctx, iprot); err != nil {
|
|
goto ReadFieldError
|
|
}
|
|
} else {
|
|
if err = iprot.Skip(ctx, fieldTypeId); err != nil {
|
|
goto SkipFieldError
|
|
}
|
|
}
|
|
default:
|
|
if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil {
|
|
goto UnknownFieldsAppendError
|
|
}
|
|
}
|
|
|
|
if err = iprot.ReadFieldEnd(ctx); err != nil {
|
|
goto ReadFieldEndError
|
|
}
|
|
}
|
|
if err = iprot.ReadStructEnd(ctx); 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_DeleteWajibpajakListResponse[fieldId]), err)
|
|
SkipFieldError:
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
|
UnknownFieldsAppendError:
|
|
return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), 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 *DeleteWajibpajakListResponse) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.Success = make([]int64, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
var _elem int64
|
|
if v, err := iprot.ReadI64(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
_elem = v
|
|
}
|
|
|
|
p.Success = append(p.Success, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *DeleteWajibpajakListResponse) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
|
|
_, size, err := iprot.ReadListBegin(ctx)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
p.Ignored = make([]int64, 0, size)
|
|
for i := 0; i < size; i++ {
|
|
var _elem int64
|
|
if v, err := iprot.ReadI64(ctx); err != nil {
|
|
return err
|
|
} else {
|
|
_elem = v
|
|
}
|
|
|
|
p.Ignored = append(p.Ignored, _elem)
|
|
}
|
|
if err := iprot.ReadListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *DeleteWajibpajakListResponse) Write(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
var fieldId int16
|
|
if err = oprot.WriteStructBegin(ctx, "DeleteWajibpajakListResponse"); err != nil {
|
|
goto WriteStructBeginError
|
|
}
|
|
if p != nil {
|
|
if err = p.writeField1(ctx, oprot); err != nil {
|
|
fieldId = 1
|
|
goto WriteFieldError
|
|
}
|
|
if err = p.writeField2(ctx, oprot); err != nil {
|
|
fieldId = 2
|
|
goto WriteFieldError
|
|
}
|
|
|
|
if err = p._unknownFields.Write(ctx, oprot); err != nil {
|
|
goto UnknownFieldsWriteError
|
|
}
|
|
}
|
|
if err = oprot.WriteFieldStop(ctx); err != nil {
|
|
goto WriteFieldStopError
|
|
}
|
|
if err = oprot.WriteStructEnd(ctx); 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)
|
|
UnknownFieldsWriteError:
|
|
return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err)
|
|
}
|
|
|
|
func (p *DeleteWajibpajakListResponse) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 1); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Success)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.Success {
|
|
if err := oprot.WriteI64(ctx, v); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *DeleteWajibpajakListResponse) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
|
|
if err = oprot.WriteFieldBegin(ctx, "ignored", thrift.LIST, 2); err != nil {
|
|
goto WriteFieldBeginError
|
|
}
|
|
if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Ignored)); err != nil {
|
|
return err
|
|
}
|
|
for _, v := range p.Ignored {
|
|
if err := oprot.WriteI64(ctx, v); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := oprot.WriteListEnd(ctx); err != nil {
|
|
return err
|
|
}
|
|
if err = oprot.WriteFieldEnd(ctx); 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 *DeleteWajibpajakListResponse) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("DeleteWajibpajakListResponse(%+v)", *p)
|
|
}
|