Пример #1
0
func (p *Span) writeField6(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("annotations", thrift.LIST, 6); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:annotations: ", p), err)
	}
	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Annotations)); err != nil {
		return thrift.PrependError("error writing list begin: ", err)
	}
	for _, v := range p.Annotations {
		if err := v.Write(oprot); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
		}
	}
	if err := oprot.WriteListEnd(); err != nil {
		return thrift.PrependError("error writing list end: ", err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 6:annotations: ", p), err)
	}
	return err
}
Пример #2
0
func (p *CitySvcCreateCityArgs) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("coords", thrift.LIST, 3); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:coords: ", p), err)
	}
	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Coords)); err != nil {
		return thrift.PrependError("error writing list begin: ", err)
	}
	for _, v := range p.Coords {
		if err := v.Write(oprot); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
		}
	}
	if err := oprot.WriteListEnd(); err != nil {
		return thrift.PrependError("error writing list end: ", err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 3:coords: ", p), err)
	}
	return err
}
Пример #3
0
func (p *TestCase4Args) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("blog", thrift.LIST, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:blog: %s", p, err)
	}
	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Blog)); err != nil {
		return fmt.Errorf("error writing list begin: %s", err)
	}
	for _, v := range p.Blog {
		if err := v.Write(oprot); err != nil {
			return fmt.Errorf("%T error writing struct: %s", v, err)
		}
	}
	if err := oprot.WriteListEnd(); err != nil {
		return fmt.Errorf("error writing list end: %s", err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:blog: %s", p, err)
	}
	return err
}
Пример #4
0
func (p *Span) writeField8(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("binary_annotations", thrift.LIST, 8); err != nil {
		return fmt.Errorf("%T write field begin error 8:binary_annotations: %s", p, err)
	}
	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.BinaryAnnotations)); err != nil {
		return fmt.Errorf("error writing list begin: %s", err)
	}
	for _, v := range p.BinaryAnnotations {
		if err := v.Write(oprot); err != nil {
			return fmt.Errorf("%T error writing struct: %s", v, err)
		}
	}
	if err := oprot.WriteListEnd(); err != nil {
		return fmt.Errorf("error writing list end: %s", err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 8:binary_annotations: %s", p, err)
	}
	return err
}
Пример #5
0
func (p *AddTagArgs) writeField4(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("tags", thrift.LIST, 4); err != nil {
		return fmt.Errorf("%T write field begin error 4:tags: %s", p, err)
	}
	if err := oprot.WriteListBegin(thrift.STRING, len(p.Tags)); err != nil {
		return fmt.Errorf("error writing list begin: %s", err)
	}
	for _, v := range p.Tags {
		if err := oprot.WriteString(string(v)); err != nil {
			return fmt.Errorf("%T. (0) field write error: %s", p, err)
		}
	}
	if err := oprot.WriteListEnd(); err != nil {
		return fmt.Errorf("error writing list end: %s", err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 4:tags: %s", p, err)
	}
	return err
}
Пример #6
0
func (p *DeletePrivateMessageArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("keyList", thrift.LIST, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:keyList: %s", p, err)
	}
	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.KeyList)); err != nil {
		return fmt.Errorf("error writing list begin: %s", err)
	}
	for _, v := range p.KeyList {
		if err := v.Write(oprot); err != nil {
			return fmt.Errorf("%T error writing struct: %s", v, err)
		}
	}
	if err := oprot.WriteListEnd(); err != nil {
		return fmt.Errorf("error writing list end: %s", err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:keyList: %s", p, err)
	}
	return err
}
Пример #7
0
func (p *ThriftColorGroup) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("colors", thrift.LIST, 3); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:colors: ", p), err)
	}
	if err := oprot.WriteListBegin(thrift.STRING, len(p.Colors)); err != nil {
		return thrift.PrependError("error writing list begin: ", err)
	}
	for _, v := range p.Colors {
		if err := oprot.WriteString(string(v)); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
		}
	}
	if err := oprot.WriteListEnd(); err != nil {
		return thrift.PrependError("error writing list end: ", err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 3:colors: ", p), err)
	}
	return err
}
Пример #8
0
func (p *TerminalServicePushPendingRequestFormArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("forms", thrift.LIST, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:forms: ", p), err)
	}
	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Forms)); err != nil {
		return thrift.PrependError("error writing list begin: ", err)
	}
	for _, v := range p.Forms {
		if err := v.Write(oprot); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
		}
	}
	if err := oprot.WriteListEnd(); err != nil {
		return thrift.PrependError("error writing list end: ", err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:forms: ", p), err)
	}
	return err
}
Пример #9
0
func (p *Recommender) writeField11(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("displayItems", thrift.LIST, 11); err != nil {
		return fmt.Errorf("%T write field begin error 11:displayItems: %s", p, err)
	}
	if err := oprot.WriteListBegin(thrift.STRING, len(p.DisplayItems)); err != nil {
		return fmt.Errorf("error writing list begin: %s", err)
	}
	for _, v := range p.DisplayItems {
		if err := oprot.WriteString(string(v)); err != nil {
			return fmt.Errorf("%T. (0) field write error: %s", p, err)
		}
	}
	if err := oprot.WriteListEnd(); err != nil {
		return fmt.Errorf("error writing list end: %s", err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 11:displayItems: %s", p, err)
	}
	return err
}
Пример #10
0
func (p *AppendBatchArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("events", thrift.LIST, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:events: %s", p, err)
	}
	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Events)); err != nil {
		return fmt.Errorf("error writing list begin: %s", err)
	}
	for _, v := range p.Events {
		if err := v.Write(oprot); err != nil {
			return fmt.Errorf("%T error writing struct: %s", v, err)
		}
	}
	if err := oprot.WriteListEnd(); err != nil {
		return fmt.Errorf("error writing list end: %s", err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:events: %s", p, err)
	}
	return err
}
Пример #11
0
func (p *DeleteRemindingMsgByTypeArgs) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("types", thrift.LIST, 2); err != nil {
		return fmt.Errorf("%T write field begin error 2:types: %s", p, err)
	}
	if err := oprot.WriteListBegin(thrift.I32, len(p.Types)); err != nil {
		return fmt.Errorf("error writing list begin: %s", err)
	}
	for _, v := range p.Types {
		if err := oprot.WriteI32(int32(v)); err != nil {
			return fmt.Errorf("%T. (0) field write error: %s", p, err)
		}
	}
	if err := oprot.WriteListEnd(); err != nil {
		return fmt.Errorf("error writing list end: %s", err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 2:types: %s", p, err)
	}
	return err
}
Пример #12
0
func (p *Coffee) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("sweetners", thrift.LIST, 3); err != nil {
		return fmt.Errorf("%T write field begin error 3:sweetners: %s", p, err)
	}
	if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Sweetners)); err != nil {
		return fmt.Errorf("error writing list begin: %s", err)
	}
	for _, v := range p.Sweetners {
		if err := v.Write(oprot); err != nil {
			return fmt.Errorf("%T error writing struct: %s", v, err)
		}
	}
	if err := oprot.WriteListEnd(); err != nil {
		return fmt.Errorf("error writing list end: %s", err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 3:sweetners: %s", p, err)
	}
	return err
}
Пример #13
0
func (p *GrantUserAccessToGroupRegionArgs) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("zones", thrift.LIST, 3); err != nil {
		return fmt.Errorf("%T write field begin error 3:zones: %s", p, err)
	}
	if err := oprot.WriteListBegin(thrift.I32, len(p.Zones)); err != nil {
		return fmt.Errorf("error writing list begin: %s", err)
	}
	for _, v := range p.Zones {
		if err := oprot.WriteI32(int32(v)); err != nil {
			return fmt.Errorf("%T. (0) field write error: %s", p, err)
		}
	}
	if err := oprot.WriteListEnd(); err != nil {
		return fmt.Errorf("error writing list end: %s", err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 3:zones: %s", p, err)
	}
	return err
}
Пример #14
0
func (p *FichaVisitaDomiciliarChildThrift) writeField7(oprot thrift.TProtocol) (err error) {
	if p.IsSetMotivosVisita() {
		if err := oprot.WriteFieldBegin("motivosVisita", thrift.LIST, 7); err != nil {
			return fmt.Errorf("%T write field begin error 7:motivosVisita: %s", p, err)
		}
		if err := oprot.WriteListBegin(thrift.I64, len(p.MotivosVisita)); err != nil {
			return fmt.Errorf("error writing list begin: %s", err)
		}
		for _, v := range p.MotivosVisita {
			if err := oprot.WriteI64(int64(v)); err != nil {
				return fmt.Errorf("%T. (0) field write error: %s", p, err)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return fmt.Errorf("error writing list end: %s", err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 7:motivosVisita: %s", p, err)
		}
	}
	return err
}
Пример #15
0
func (p *QueryResult) writeField5(oprot thrift.TProtocol) (err error) {
	if p.VmMoneyList != nil {
		if err := oprot.WriteFieldBegin("vmMoneyList", thrift.LIST, 5); err != nil {
			return fmt.Errorf("%T write field begin error 5:vmMoneyList: %s", p, err)
		}
		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.VmMoneyList)); err != nil {
			return fmt.Errorf("error writing list begin: %s")
		}
		for _, v := range p.VmMoneyList {
			if err := v.Write(oprot); err != nil {
				return fmt.Errorf("%T error writing struct: %s", v)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return fmt.Errorf("error writing list end: %s")
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 5:vmMoneyList: %s", p, err)
		}
	}
	return err
}
Пример #16
0
func (p *FichaAtividadeColetivaThrift) writeField26(oprot thrift.TProtocol) (err error) {
	if p.IsSetPraticasEmSaude() {
		if err := oprot.WriteFieldBegin("praticasEmSaude", thrift.LIST, 26); err != nil {
			return fmt.Errorf("%T write field begin error 26:praticasEmSaude: %s", p, err)
		}
		if err := oprot.WriteListBegin(thrift.I64, len(p.PraticasEmSaude)); err != nil {
			return fmt.Errorf("error writing list begin: %s", err)
		}
		for _, v := range p.PraticasEmSaude {
			if err := oprot.WriteI64(int64(v)); err != nil {
				return fmt.Errorf("%T. (0) field write error: %s", p, err)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return fmt.Errorf("error writing list end: %s", err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 26:praticasEmSaude: %s", p, err)
		}
	}
	return err
}
Пример #17
0
func (p *FichaAtividadeColetivaThrift) writeField18(oprot thrift.TProtocol) (err error) {
	if p.IsSetParticipantes() {
		if err := oprot.WriteFieldBegin("participantes", thrift.LIST, 18); err != nil {
			return fmt.Errorf("%T write field begin error 18:participantes: %s", p, err)
		}
		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Participantes)); err != nil {
			return fmt.Errorf("error writing list begin: %s", err)
		}
		for _, v := range p.Participantes {
			if err := v.Write(oprot); err != nil {
				return fmt.Errorf("%T error writing struct: %s", v, err)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return fmt.Errorf("error writing list end: %s", err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 18:participantes: %s", p, err)
		}
	}
	return err
}
Пример #18
0
func (p *FichaAtividadeColetivaThrift) writeField16(oprot thrift.TProtocol) (err error) {
	if p.IsSetPublicoAlvo() {
		if err := oprot.WriteFieldBegin("publicoAlvo", thrift.LIST, 16); err != nil {
			return fmt.Errorf("%T write field begin error 16:publicoAlvo: %s", p, err)
		}
		if err := oprot.WriteListBegin(thrift.I64, len(p.PublicoAlvo)); err != nil {
			return fmt.Errorf("error writing list begin: %s", err)
		}
		for _, v := range p.PublicoAlvo {
			if err := oprot.WriteI64(int64(v)); err != nil {
				return fmt.Errorf("%T. (0) field write error: %s", p, err)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return fmt.Errorf("error writing list end: %s", err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 16:publicoAlvo: %s", p, err)
		}
	}
	return err
}
Пример #19
0
func (p *FichaAtividadeColetivaThrift) writeField15(oprot thrift.TProtocol) (err error) {
	if p.IsSetTemasParaReuniao() {
		if err := oprot.WriteFieldBegin("temasParaReuniao", thrift.LIST, 15); err != nil {
			return fmt.Errorf("%T write field begin error 15:temasParaReuniao: %s", p, err)
		}
		if err := oprot.WriteListBegin(thrift.I64, len(p.TemasParaReuniao)); err != nil {
			return fmt.Errorf("error writing list begin: %s", err)
		}
		for _, v := range p.TemasParaReuniao {
			if err := oprot.WriteI64(int64(v)); err != nil {
				return fmt.Errorf("%T. (0) field write error: %s", p, err)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return fmt.Errorf("error writing list end: %s", err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 15:temasParaReuniao: %s", p, err)
		}
	}
	return err
}
Пример #20
0
func (p *LogArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if p.Messages != nil {
		if err := oprot.WriteFieldBegin("messages", thrift.LIST, 1); err != nil {
			return fmt.Errorf("%T write field begin error 1:messages: %s", p, err)
		}
		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Messages)); err != nil {
			return fmt.Errorf("error writing list begin: %s")
		}
		for _, v := range p.Messages {
			if err := v.Write(oprot); err != nil {
				return fmt.Errorf("%T error writing struct: %s", v, err)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return fmt.Errorf("error writing list end: %s")
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 1:messages: %s", p, err)
		}
	}
	return err
}
Пример #21
0
func (p *GetPrivateMessageListResult) writeField0(oprot thrift.TProtocol) (err error) {
	if p.IsSetSuccess() {
		if err := oprot.WriteFieldBegin("success", thrift.LIST, 0); err != nil {
			return fmt.Errorf("%T write field begin error 0:success: %s", p, err)
		}
		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Success)); err != nil {
			return fmt.Errorf("error writing list begin: %s", err)
		}
		for _, v := range p.Success {
			if err := v.Write(oprot); err != nil {
				return fmt.Errorf("%T error writing struct: %s", v, err)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return fmt.Errorf("error writing list end: %s", err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 0:success: %s", p, err)
		}
	}
	return err
}
Пример #22
0
func (p *PersonServiceGetAllResult) writeField0(oprot thrift.TProtocol) (err error) {
	if p.IsSetSuccess() {
		if err := oprot.WriteFieldBegin("success", thrift.LIST, 0); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
		}
		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Success)); err != nil {
			return thrift.PrependError("error writing list begin: ", err)
		}
		for _, v := range p.Success {
			if err := v.Write(oprot); err != nil {
				return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return thrift.PrependError("error writing list end: ", err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
		}
	}
	return err
}
Пример #23
0
func (p *News) writeField2(oprot thrift.TProtocol) (err error) {
	if p.Articles != nil {
		if err := oprot.WriteFieldBegin("articles", thrift.LIST, 2); err != nil {
			return fmt.Errorf("%T write field begin error 2:articles: %s", p, err)
		}
		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Articles)); err != nil {
			return fmt.Errorf("error writing list begin: %s")
		}
		for _, v := range p.Articles {
			if err := v.Write(oprot); err != nil {
				return fmt.Errorf("%T error writing struct: %s", v)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return fmt.Errorf("error writing list end: %s")
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 2:articles: %s", p, err)
		}
	}
	return err
}
Пример #24
0
func (p *FichaVisitaDomiciliarMasterThrift) writeField4(oprot thrift.TProtocol) (err error) {
	if p.IsSetVisitasDomiciliares() {
		if err := oprot.WriteFieldBegin("visitasDomiciliares", thrift.LIST, 4); err != nil {
			return fmt.Errorf("%T write field begin error 4:visitasDomiciliares: %s", p, err)
		}
		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.VisitasDomiciliares)); err != nil {
			return fmt.Errorf("error writing list begin: %s", err)
		}
		for _, v := range p.VisitasDomiciliares {
			if err := v.Write(oprot); err != nil {
				return fmt.Errorf("%T error writing struct: %s", v, err)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return fmt.Errorf("error writing list end: %s", err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 4:visitasDomiciliares: %s", p, err)
		}
	}
	return err
}
Пример #25
0
func (p *ColorMeta) writeField2(oprot thrift.TProtocol) (err error) {
	if p.Colors != nil {
		if err := oprot.WriteFieldBegin("colors", thrift.LIST, 2); err != nil {
			return fmt.Errorf("%T write field begin error 2:colors: %s", p, err)
		}
		if err := oprot.WriteListBegin(thrift.STRING, len(p.Colors)); err != nil {
			return fmt.Errorf("error writing list begin: %s")
		}
		for _, v := range p.Colors {
			if err := oprot.WriteString(string(v)); err != nil {
				return fmt.Errorf("%T. (0) field write error: %s", p)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return fmt.Errorf("error writing list end: %s")
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 2:colors: %s", p, err)
		}
	}
	return err
}
Пример #26
0
func (p *RpcServiceFunCallResult) writeField0(oprot thrift.TProtocol) (err error) {
	if p.IsSetSuccess() {
		if err := oprot.WriteFieldBegin("success", thrift.LIST, 0); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
		}
		if err := oprot.WriteListBegin(thrift.STRING, len(p.Success)); err != nil {
			return thrift.PrependError("error writing list begin: ", err)
		}
		for _, v := range p.Success {
			if err := oprot.WriteString(string(v)); err != nil {
				return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return thrift.PrependError("error writing list end: ", err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
		}
	}
	return err
}
Пример #27
0
func (p *Types) writeField7(oprot thrift.TProtocol) (err error) {
	if p.IsSetListValue() {
		if err := oprot.WriteFieldBegin("list_value", thrift.LIST, 7); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:list_value: ", p), err)
		}
		if err := oprot.WriteListBegin(thrift.STRING, len(p.ListValue)); err != nil {
			return thrift.PrependError("error writing list begin: ", err)
		}
		for _, v := range p.ListValue {
			if err := oprot.WriteString(string(v)); err != nil {
				return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return thrift.PrependError("error writing list end: ", err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 7:list_value: ", p), err)
		}
	}
	return err
}
Пример #28
0
func (p *PushNewsArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if p.Data != nil {
		if err := oprot.WriteFieldBegin("data", thrift.LIST, 1); err != nil {
			return fmt.Errorf("%T write field begin error 1:data: %s", p, err)
		}
		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Data)); err != nil {
			return fmt.Errorf("error writing list begin: %s")
		}
		for _, v := range p.Data {
			if err := v.Write(oprot); err != nil {
				return fmt.Errorf("%T error writing struct: %s", v)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return fmt.Errorf("error writing list end: %s")
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 1:data: %s", p, err)
		}
	}
	return err
}
Пример #29
0
func (p *FetchResult) writeField0(oprot thrift.TProtocol) (err error) {
	if p.IsSetSuccess() {
		if err := oprot.WriteFieldBegin("success", thrift.LIST, 0); err != nil {
			return fmt.Errorf("%T write field begin error 0:success: %s", p, err)
		}
		if err := oprot.WriteListBegin(thrift.STRING, len(p.Success)); err != nil {
			return fmt.Errorf("error writing list begin: %s", err)
		}
		for _, v := range p.Success {
			if err := oprot.WriteString(string(v)); err != nil {
				return fmt.Errorf("%T. (0) field write error: %s", p, err)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return fmt.Errorf("error writing list end: %s", err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 0:success: %s", p, err)
		}
	}
	return err
}
Пример #30
0
func (p *Entry) writeField4(oprot thrift.TProtocol) (err error) {
	if p.IsSetContext() {
		if err := oprot.WriteFieldBegin("context", thrift.LIST, 4); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:context: ", p), err)
		}
		if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Context)); err != nil {
			return thrift.PrependError("error writing list begin: ", err)
		}
		for _, v := range p.Context {
			if err := v.Write(oprot); err != nil {
				return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
			}
		}
		if err := oprot.WriteListEnd(); err != nil {
			return thrift.PrependError("error writing list end: ", err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 4:context: ", p), err)
		}
	}
	return err
}