func (p *FindAndAddContactsByUseridArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) } if fieldTypeId == thrift.STOP { break } switch fieldId { case 1: if err := p.ReadField1(iprot); err != nil { return err } case 2: if err := p.ReadField2(iprot); err != nil { return err } default: if err := iprot.Skip(fieldTypeId); err != nil { return err } } if err := iprot.ReadFieldEnd(); err != nil { return err } } if err := iprot.ReadStructEnd(); err != nil { return fmt.Errorf("%T read struct end error: %s", p, err) } return nil }
func (p *GetLastReadMessageIdsResult) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) } if fieldTypeId == thrift.STOP { break } switch fieldId { case 0: if err := p.ReadField0(iprot); err != nil { return err } case 1: if err := p.ReadField1(iprot); err != nil { return err } default: if err := iprot.Skip(fieldTypeId); err != nil { return err } } if err := iprot.ReadFieldEnd(); err != nil { return err } } if err := iprot.ReadStructEnd(); err != nil { return fmt.Errorf("%T read struct end error: %s", p, err) } return nil }
func (p *FindAndAddContactsByUseridResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin("success", thrift.MAP, 0); err != nil { return fmt.Errorf("%T write field begin error 0:success: %s", p, err) } if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRUCT, len(p.Success)); err != nil { return fmt.Errorf("error writing map begin: %s", err) } for k, v := range p.Success { if err := oprot.WriteString(string(k)); err != nil { return fmt.Errorf("%T. (0) field write error: %s", p, err) } if err := v.Write(oprot); err != nil { return fmt.Errorf("%T error writing struct: %s", v, err) } } if err := oprot.WriteMapEnd(); err != nil { return fmt.Errorf("error writing map end: %s", err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 0:success: %s", p, err) } } return err }
func (p *LoginWithVerifierForCertificateArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) } if fieldTypeId == thrift.STOP { break } switch fieldId { case 3: if err := p.ReadField3(iprot); err != nil { return err } default: if err := iprot.Skip(fieldTypeId); err != nil { return err } } if err := iprot.ReadFieldEnd(); err != nil { return err } } if err := iprot.ReadStructEnd(); err != nil { return fmt.Errorf("%T read struct end error: %s", p, err) } return nil }
func (p *GetMessageBoxCompactWrapUpListArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) } if fieldTypeId == thrift.STOP { break } switch fieldId { case 2: if err := p.ReadField2(iprot); err != nil { return err } case 3: if err := p.ReadField3(iprot); err != nil { return err } default: if err := iprot.Skip(fieldTypeId); err != nil { return err } } if err := iprot.ReadFieldEnd(); err != nil { return err } } if err := iprot.ReadStructEnd(); err != nil { return fmt.Errorf("%T read struct end error: %s", p, err) } return nil }
func (p *LoginWithVerifierForCertificateArgs) ReadField3(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 3: %s", err) } else { p.Verifier = v } return nil }
func (p *LoginWithIdentityCredentialForCertificateArgs) ReadField9(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 9: %s", err) } else { p.Certificate = v } return nil }
func (p *LoginWithIdentityCredentialForCertificateArgs) ReadField5(iprot thrift.TProtocol) error { if v, err := iprot.ReadBool(); err != nil { return fmt.Errorf("error reading field 5: %s", err) } else { p.KeepLoggedIn = v } return nil }
func (p *GetLastOpRevisionResult) ReadField0(iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(); err != nil { return fmt.Errorf("error reading field 0: %s", err) } else { p.Success = &v } return nil }
func (p *FetchMessageOperationsArgs) ReadField4(iprot thrift.TProtocol) error { if v, err := iprot.ReadI32(); err != nil { return fmt.Errorf("error reading field 4: %s", err) } else { p.Count = v } return nil }
func (p *FindAndAddContactsByMidArgs) ReadField1(iprot thrift.TProtocol) error { if v, err := iprot.ReadI32(); err != nil { return fmt.Errorf("error reading field 1: %s", err) } else { p.ReqSeq = v } return nil }
func (p *GetLastReadMessageIdsArgs) ReadField2(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 2: %s", err) } else { p.ChatId = v } return nil }
func (p *FetchMessageOperationsArgs) ReadField3(iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(); err != nil { return fmt.Errorf("error reading field 3: %s", err) } else { p.LastOpTimestamp = v } return nil }
func (p *FetchMessageOperationsArgs) ReadField2(iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(); err != nil { return fmt.Errorf("error reading field 2: %s", err) } else { p.LocalRevision = v } return nil }
func (p *GetMessageBoxCompactWrapUpListArgs) ReadField3(iprot thrift.TProtocol) error { if v, err := iprot.ReadI32(); err != nil { return fmt.Errorf("error reading field 3: %s", err) } else { p.MessageBoxCount = v } return nil }
func (p *FindAndAddContactsByUseridArgs) ReadField2(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 2: %s", err) } else { p.Userid = v } return nil }
func (p *LoginWithIdentityCredentialForCertificateArgs) ReadField8(iprot thrift.TProtocol) error { if v, err := iprot.ReadI32(); err != nil { return fmt.Errorf("error reading field 8: %s", err) } else { temp := IdentityProvider(v) p.IdentityProvider = temp } return nil }
func (p *LoginWithVerifierForCertificateResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { return fmt.Errorf("%T write field begin error 0:success: %s", p, err) } if err := p.Success.Write(oprot); err != nil { return fmt.Errorf("%T error writing struct: %s", p.Success, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 0:success: %s", p, err) } } return err }
func (p *LoginWithVerifierForCertificateResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) } if err := p.E.Write(oprot); err != nil { return fmt.Errorf("%T error writing struct: %s", p.E, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 1:e: %s", p, err) } } return err }
func (p *GetMessageBoxCompactWrapUpListResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) } if err := p.E.Write(oprot); err != nil { return fmt.Errorf("%T error writing struct: %s", p.E, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 1:e: %s", p, err) } } return err }
func (p *FindAndAddContactsByUseridResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) } if err := p.E.Write(oprot); err != nil { return fmt.Errorf("%T error writing struct: %s", p.E, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 1:e: %s", p, err) } } return err }
func (p *GetMessageBoxCompactWrapUpListResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { return fmt.Errorf("%T write field begin error 0:success: %s", p, err) } if err := p.Success.Write(oprot); err != nil { return fmt.Errorf("%T error writing struct: %s", p.Success, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 0:success: %s", p, err) } } return err }
func (p *GetContactsResult) ReadField0(iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin() if err != nil { return fmt.Errorf("error reading list begin: %s", err) } tSlice := make([]*Contact, 0, size) p.Success = tSlice for i := 0; i < size; i++ { _elem1358 := &Contact{} if err := _elem1358.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", _elem1358, err) } p.Success = append(p.Success, _elem1358) } if err := iprot.ReadListEnd(); err != nil { return fmt.Errorf("error reading list end: %s", err) } return nil }
func (p *MultiGetLastReadMessageIdsResult) ReadField0(iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin() if err != nil { return fmt.Errorf("error reading list begin: %s", err) } tSlice := make([]*LastReadMessageIds, 0, size) p.Success = tSlice for i := 0; i < size; i++ { _elem745 := &LastReadMessageIds{} if err := _elem745.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", _elem745, err) } p.Success = append(p.Success, _elem745) } if err := iprot.ReadListEnd(); err != nil { return fmt.Errorf("error reading list end: %s", err) } return nil }
func (p *MultiGetLastReadMessageIdsArgs) writeField2(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("chatIds", thrift.LIST, 2); err != nil { return fmt.Errorf("%T write field begin error 2:chatIds: %s", p, err) } if err := oprot.WriteListBegin(thrift.STRING, len(p.ChatIds)); err != nil { return fmt.Errorf("error writing list begin: %s", err) } for _, v := range p.ChatIds { 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 2:chatIds: %s", p, err) } return err }
func (p *LoginWithIdentityCredentialForCertificateArgs) Write(oprot thrift.TProtocol) error { if err := oprot.WriteStructBegin("loginWithIdentityCredentialForCertificate_args"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField3(oprot); err != nil { return err } if err := p.writeField4(oprot); err != nil { return err } if err := p.writeField5(oprot); err != nil { return err } if err := p.writeField6(oprot); err != nil { return err } if err := p.writeField7(oprot); err != nil { return err } if err := p.writeField8(oprot); err != nil { return err } if err := p.writeField9(oprot); err != nil { return err } if err := oprot.WriteFieldStop(); err != nil { return fmt.Errorf("write field stop error: %s", err) } if err := oprot.WriteStructEnd(); err != nil { return fmt.Errorf("write struct stop error: %s", err) } return nil }
func (p *FindAndAddContactsByUseridResult) ReadField0(iprot thrift.TProtocol) error { _, _, size, err := iprot.ReadMapBegin() if err != nil { return fmt.Errorf("error reading map begin: %s", err) } tMap := make(map[string]*Contact, size) p.Success = tMap for i := 0; i < size; i++ { var _key1341 string if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 0: %s", err) } else { _key1341 = v } _val1342 := &Contact{} if err := _val1342.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", _val1342, err) } p.Success[_key1341] = _val1342 } if err := iprot.ReadMapEnd(); err != nil { return fmt.Errorf("error reading map end: %s", err) } return nil }
func (p *GetAllContactIdsResult) 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 }
func (p *GetAllContactIdsArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) } if fieldTypeId == thrift.STOP { break } if err := iprot.Skip(fieldTypeId); err != nil { return err } if err := iprot.ReadFieldEnd(); err != nil { return err } } if err := iprot.ReadStructEnd(); err != nil { return fmt.Errorf("%T read struct end error: %s", p, err) } return nil }
func (p *GetMessageBoxCompactWrapUpListArgs) writeField3(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("messageBoxCount", thrift.I32, 3); err != nil { return fmt.Errorf("%T write field begin error 3:messageBoxCount: %s", p, err) } if err := oprot.WriteI32(int32(p.MessageBoxCount)); err != nil { return fmt.Errorf("%T.messageBoxCount (3) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 3:messageBoxCount: %s", p, err) } return err }