func (p *ReadResult) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error", p) } 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 } 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 *Contact) readField5(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 5: %s") } else { p.Created = v } return nil }
func (p *Echo2timesArgs) ReadField1(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 1: %s", err) } else { p.String1 = v } return nil }
func (p *Echo2timesResult) ReadField0(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 0: %s", err) } else { p.Success = &v } return nil }
func (p *ReadArgs) readField1(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 1: %s") } else { p.ContactId = v } return nil }
func (p *LogEntry) ReadField1(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 1: %s", err) } else { p.Hostname = v } return nil }
func (p *RestResponse) ReadField3(iprot thrift.TProtocol) error { if v, err := iprot.ReadBinary(); err != nil { return fmt.Errorf("error reading field 3: %s", err) } else { p.Body = v } return nil }
func (p *RestRequest) ReadField2(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 2: %s", err) } else { p.Uri = v } return nil }
func (p *RestResponse) ReadField1(iprot thrift.TProtocol) error { if v, err := iprot.ReadI32(); err != nil { return fmt.Errorf("error reading field 1: %s", err) } else { temp := Status(v) p.Status = temp } return nil }
func (p *RestRequest) ReadField1(iprot thrift.TProtocol) error { if v, err := iprot.ReadI32(); err != nil { return fmt.Errorf("error reading field 1: %s", err) } else { temp := Method(v) p.Method = temp } return nil }
func (p *LogResult) ReadField0(iprot thrift.TProtocol) error { if v, err := iprot.ReadI32(); err != nil { return fmt.Errorf("error reading field 0: %s", err) } else { temp := ResultCode(v) p.Success = &temp } return nil }
func (p *ExecuteArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:request: %s", p, err) } if err := p.Request.Write(oprot); err != nil { return fmt.Errorf("%T error writing struct: %s", p.Request, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 1:request: %s", p, err) } return err }
func (p *RestRequest) ReadField3(iprot thrift.TProtocol) error { _, _, size, err := iprot.ReadMapBegin() if err != nil { return fmt.Errorf("error reading map begin: %s", err) } tMap := make(map[string]string, size) p.Parameters = tMap for i := 0; i < size; i++ { var _key0 string if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 0: %s", err) } else { _key0 = v } var _val1 string if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 0: %s", err) } else { _val1 = v } p.Parameters[_key0] = _val1 } if err := iprot.ReadMapEnd(); err != nil { return fmt.Errorf("error reading map end: %s", err) } return nil }
func (p *CreateArgs) writeField1(oprot thrift.TProtocol) (err error) { if p.Contact != nil { if err := oprot.WriteFieldBegin("contact", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:contact: %s", p, err) } if err := p.Contact.Write(oprot); err != nil { return fmt.Errorf("%T error writing struct: %s", p.Contact) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 1:contact: %s", p, err) } } return err }
func (p *CreateResult) writeField0(oprot thrift.TProtocol) (err error) { if p.Success != nil { 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) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 0:success: %s", p, err) } } return err }
func (p *RestResponse) ReadField2(iprot thrift.TProtocol) error { _, _, size, err := iprot.ReadMapBegin() if err != nil { return fmt.Errorf("error reading map begin: %s", err) } tMap := make(map[string]string, size) p.Headers = tMap for i := 0; i < size; i++ { var _key4 string if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 0: %s", err) } else { _key4 = v } var _val5 string if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 0: %s", err) } else { _val5 = v } p.Headers[_key4] = _val5 } if err := iprot.ReadMapEnd(); err != nil { return fmt.Errorf("error reading map end: %s", err) } return nil }
func (p *RestRequest) 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 } case 3: if err := p.ReadField3(iprot); err != nil { return err } case 4: if err := p.ReadField4(iprot); err != nil { return err } case 5: if err := p.ReadField5(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 *FetchResult) readField0(iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin() if err != nil { return fmt.Errorf("error reading list being: %s") } p.Success = make([]*Contact, 0, size) for i := 0; i < size; i++ { _elem26 := NewContact() if err := _elem26.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", _elem26) } p.Success = append(p.Success, _elem26) } if err := iprot.ReadListEnd(); err != nil { return fmt.Errorf("error reading list end: %s") } return nil }
func (p *LogArgs) ReadField1(iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin() if err != nil { return fmt.Errorf("error reading list begin: %s", err) } tSlice := make([]*LogEntry, 0, size) p.Messages = tSlice for i := 0; i < size; i++ { _elem4 := &LogEntry{} if err := _elem4.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", _elem4, err) } p.Messages = append(p.Messages, _elem4) } if err := iprot.ReadListEnd(); err != nil { return fmt.Errorf("error reading list end: %s", err) } return nil }
func (p *RestRequest) Write(oprot thrift.TProtocol) error { if err := oprot.WriteStructBegin("RestRequest"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { return err } if err := p.writeField2(oprot); err != nil { return 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 := 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 *Contact) writeField5(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("created", thrift.STRING, 5); err != nil { return fmt.Errorf("%T write field begin error 5:created: %s", p, err) } if err := oprot.WriteString(string(p.Created)); err != nil { return fmt.Errorf("%T.created (5) field write error: %s", p) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 5:created: %s", p, err) } return err }
func (p *LogEntry) writeField2(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("message", thrift.STRING, 2); err != nil { return fmt.Errorf("%T write field begin error 2:message: %s", p, err) } if err := oprot.WriteString(string(p.Message)); err != nil { return fmt.Errorf("%T.message (2) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 2:message: %s", p, err) } return err }
func (p *LogEntry) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("hostname", thrift.STRING, 1); err != nil { return fmt.Errorf("%T write field begin error 1:hostname: %s", p, err) } if err := oprot.WriteString(string(p.Hostname)); err != nil { return fmt.Errorf("%T.hostname (1) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 1:hostname: %s", p, err) } return err }
func (p *ResetResult) Write(oprot thrift.TProtocol) error { if err := oprot.WriteStructBegin("reset_result"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := oprot.WriteFieldStop(); err != nil { return fmt.Errorf("%T write field stop error: %s", err) } if err := oprot.WriteStructEnd(); err != nil { return fmt.Errorf("%T write struct stop error: %s", err) } return nil }
func (p *ReadArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("contactId", thrift.STRING, 1); err != nil { return fmt.Errorf("%T write field begin error 1:contactId: %s", p, err) } if err := oprot.WriteString(string(p.ContactId)); err != nil { return fmt.Errorf("%T.contactId (1) field write error: %s", p) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 1:contactId: %s", p, err) } return err }
func (p *FetchArgs) Write(oprot thrift.TProtocol) error { if err := oprot.WriteStructBegin("fetch_args"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := oprot.WriteFieldStop(); err != nil { return fmt.Errorf("%T write field stop error: %s", err) } if err := oprot.WriteStructEnd(); err != nil { return fmt.Errorf("%T write struct stop error: %s", err) } return nil }
func (p *RestResponse) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("status", thrift.I32, 1); err != nil { return fmt.Errorf("%T write field begin error 1:status: %s", p, err) } if err := oprot.WriteI32(int32(p.Status)); err != nil { return fmt.Errorf("%T.status (1) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 1:status: %s", p, err) } return err }
func (p *RestRequest) writeField2(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("uri", thrift.STRING, 2); err != nil { return fmt.Errorf("%T write field begin error 2:uri: %s", p, err) } if err := oprot.WriteString(string(p.Uri)); err != nil { return fmt.Errorf("%T.uri (2) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 2:uri: %s", p, err) } return err }
func (p *RestRequest) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("method", thrift.I32, 1); err != nil { return fmt.Errorf("%T write field begin error 1:method: %s", p, err) } if err := oprot.WriteI32(int32(p.Method)); err != nil { return fmt.Errorf("%T.method (1) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 1:method: %s", p, err) } return err }
func (p *Contact) writeField3(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("phone", thrift.STRING, 3); err != nil { return fmt.Errorf("%T write field begin error 3:phone: %s", p, err) } if err := oprot.WriteString(string(p.Phone)); err != nil { return fmt.Errorf("%T.phone (3) field write error: %s", p) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 3:phone: %s", p, err) } return err }