// Code generated by protoc-gen-go-frostfs. DO NOT EDIT. package control import ( json "encoding/json" fmt "fmt" pool "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/pool" proto "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto" encoding "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto/encoding" easyproto "github.com/VictoriaMetrics/easyproto" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" strconv "strconv" ) type HealthCheckRequest_Body struct { } var ( _ encoding.ProtoMarshaler = (*HealthCheckRequest_Body)(nil) _ encoding.ProtoUnmarshaler = (*HealthCheckRequest_Body)(nil) _ json.Marshaler = (*HealthCheckRequest_Body)(nil) _ json.Unmarshaler = (*HealthCheckRequest_Body)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *HealthCheckRequest_Body) StableSize() (size int) { if x == nil { return 0 } return size } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *HealthCheckRequest_Body) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *HealthCheckRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *HealthCheckRequest_Body) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "HealthCheckRequest_Body") } switch fc.FieldNum { } } return nil } // MarshalJSON implements the json.Marshaler interface. func (x *HealthCheckRequest_Body) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *HealthCheckRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *HealthCheckRequest_Body) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *HealthCheckRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type HealthCheckRequest struct { Body *HealthCheckRequest_Body `json:"body"` Signature *Signature `json:"signature"` } var ( _ encoding.ProtoMarshaler = (*HealthCheckRequest)(nil) _ encoding.ProtoUnmarshaler = (*HealthCheckRequest)(nil) _ json.Marshaler = (*HealthCheckRequest)(nil) _ json.Unmarshaler = (*HealthCheckRequest)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *HealthCheckRequest) StableSize() (size int) { if x == nil { return 0 } size += proto.NestedStructureSize(1, x.Body) size += proto.NestedStructureSize(2, x.Signature) return size } // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // // Returns any error encountered which did not allow writing the data completely. // Otherwise, returns the buffer in which the data is written. // // Structures with the same field values have the same signed data. func (x *HealthCheckRequest) SignedDataSize() int { return x.GetBody().StableSize() } // SignedDataSize returns size of the request signed data in bytes. // // Structures with the same field values have the same signed data size. func (x *HealthCheckRequest) ReadSignedData(buf []byte) ([]byte, error) { return x.GetBody().MarshalProtobuf(buf), nil } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *HealthCheckRequest) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *HealthCheckRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if x.Body != nil && x.Body.StableSize() != 0 { x.Body.EmitProtobuf(mm.AppendMessage(1)) } if x.Signature != nil && x.Signature.StableSize() != 0 { x.Signature.EmitProtobuf(mm.AppendMessage(2)) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *HealthCheckRequest) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "HealthCheckRequest") } switch fc.FieldNum { case 1: // Body data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Body") } x.Body = new(HealthCheckRequest_Body) if err := x.Body.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } case 2: // Signature data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Signature") } x.Signature = new(Signature) if err := x.Signature.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } } } return nil } func (x *HealthCheckRequest) GetBody() *HealthCheckRequest_Body { if x != nil { return x.Body } return nil } func (x *HealthCheckRequest) SetBody(v *HealthCheckRequest_Body) { x.Body = v } func (x *HealthCheckRequest) GetSignature() *Signature { if x != nil { return x.Signature } return nil } func (x *HealthCheckRequest) SetSignature(v *Signature) { x.Signature = v } // MarshalJSON implements the json.Marshaler interface. func (x *HealthCheckRequest) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *HealthCheckRequest) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"body\":" out.RawString(prefix[1:]) x.Body.MarshalEasyJSON(out) } { const prefix string = ",\"signature\":" out.RawString(prefix) x.Signature.MarshalEasyJSON(out) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *HealthCheckRequest) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *HealthCheckRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "body": { var f *HealthCheckRequest_Body f = new(HealthCheckRequest_Body) f.UnmarshalEasyJSON(in) x.Body = f } case "signature": { var f *Signature f = new(Signature) f.UnmarshalEasyJSON(in) x.Signature = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type HealthCheckResponse_Body struct { HealthStatus HealthStatus `json:"healthStatus"` } var ( _ encoding.ProtoMarshaler = (*HealthCheckResponse_Body)(nil) _ encoding.ProtoUnmarshaler = (*HealthCheckResponse_Body)(nil) _ json.Marshaler = (*HealthCheckResponse_Body)(nil) _ json.Unmarshaler = (*HealthCheckResponse_Body)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *HealthCheckResponse_Body) StableSize() (size int) { if x == nil { return 0 } size += proto.EnumSize(1, int32(x.HealthStatus)) return size } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *HealthCheckResponse_Body) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *HealthCheckResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if int32(x.HealthStatus) != 0 { mm.AppendInt32(1, int32(x.HealthStatus)) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *HealthCheckResponse_Body) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "HealthCheckResponse_Body") } switch fc.FieldNum { case 1: // HealthStatus data, ok := fc.Int32() if !ok { return fmt.Errorf("cannot unmarshal field %s", "HealthStatus") } x.HealthStatus = HealthStatus(data) } } return nil } func (x *HealthCheckResponse_Body) GetHealthStatus() HealthStatus { if x != nil { return x.HealthStatus } return 0 } func (x *HealthCheckResponse_Body) SetHealthStatus(v HealthStatus) { x.HealthStatus = v } // MarshalJSON implements the json.Marshaler interface. func (x *HealthCheckResponse_Body) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *HealthCheckResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"healthStatus\":" out.RawString(prefix[1:]) out.Int32(int32(x.HealthStatus)) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *HealthCheckResponse_Body) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *HealthCheckResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "healthStatus": { var f HealthStatus var parsedValue HealthStatus switch v := in.Interface().(type) { case string: if vv, ok := HealthStatus_value[v]; ok { parsedValue = HealthStatus(vv) break } vv, err := strconv.ParseInt(v, 10, 32) if err != nil { in.AddError(err) return } parsedValue = HealthStatus(vv) case float64: parsedValue = HealthStatus(v) } f = parsedValue x.HealthStatus = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type HealthCheckResponse struct { Body *HealthCheckResponse_Body `json:"body"` Signature *Signature `json:"signature"` } var ( _ encoding.ProtoMarshaler = (*HealthCheckResponse)(nil) _ encoding.ProtoUnmarshaler = (*HealthCheckResponse)(nil) _ json.Marshaler = (*HealthCheckResponse)(nil) _ json.Unmarshaler = (*HealthCheckResponse)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *HealthCheckResponse) StableSize() (size int) { if x == nil { return 0 } size += proto.NestedStructureSize(1, x.Body) size += proto.NestedStructureSize(2, x.Signature) return size } // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // // Returns any error encountered which did not allow writing the data completely. // Otherwise, returns the buffer in which the data is written. // // Structures with the same field values have the same signed data. func (x *HealthCheckResponse) SignedDataSize() int { return x.GetBody().StableSize() } // SignedDataSize returns size of the request signed data in bytes. // // Structures with the same field values have the same signed data size. func (x *HealthCheckResponse) ReadSignedData(buf []byte) ([]byte, error) { return x.GetBody().MarshalProtobuf(buf), nil } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *HealthCheckResponse) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *HealthCheckResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if x.Body != nil && x.Body.StableSize() != 0 { x.Body.EmitProtobuf(mm.AppendMessage(1)) } if x.Signature != nil && x.Signature.StableSize() != 0 { x.Signature.EmitProtobuf(mm.AppendMessage(2)) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *HealthCheckResponse) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "HealthCheckResponse") } switch fc.FieldNum { case 1: // Body data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Body") } x.Body = new(HealthCheckResponse_Body) if err := x.Body.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } case 2: // Signature data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Signature") } x.Signature = new(Signature) if err := x.Signature.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } } } return nil } func (x *HealthCheckResponse) GetBody() *HealthCheckResponse_Body { if x != nil { return x.Body } return nil } func (x *HealthCheckResponse) SetBody(v *HealthCheckResponse_Body) { x.Body = v } func (x *HealthCheckResponse) GetSignature() *Signature { if x != nil { return x.Signature } return nil } func (x *HealthCheckResponse) SetSignature(v *Signature) { x.Signature = v } // MarshalJSON implements the json.Marshaler interface. func (x *HealthCheckResponse) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *HealthCheckResponse) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"body\":" out.RawString(prefix[1:]) x.Body.MarshalEasyJSON(out) } { const prefix string = ",\"signature\":" out.RawString(prefix) x.Signature.MarshalEasyJSON(out) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *HealthCheckResponse) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *HealthCheckResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "body": { var f *HealthCheckResponse_Body f = new(HealthCheckResponse_Body) f.UnmarshalEasyJSON(in) x.Body = f } case "signature": { var f *Signature f = new(Signature) f.UnmarshalEasyJSON(in) x.Signature = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type TickEpochRequest_Body struct { Vub uint32 `json:"vub"` } var ( _ encoding.ProtoMarshaler = (*TickEpochRequest_Body)(nil) _ encoding.ProtoUnmarshaler = (*TickEpochRequest_Body)(nil) _ json.Marshaler = (*TickEpochRequest_Body)(nil) _ json.Unmarshaler = (*TickEpochRequest_Body)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *TickEpochRequest_Body) StableSize() (size int) { if x == nil { return 0 } size += proto.UInt32Size(1, x.Vub) return size } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *TickEpochRequest_Body) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *TickEpochRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if x.Vub != 0 { mm.AppendUint32(1, x.Vub) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *TickEpochRequest_Body) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "TickEpochRequest_Body") } switch fc.FieldNum { case 1: // Vub data, ok := fc.Uint32() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Vub") } x.Vub = data } } return nil } func (x *TickEpochRequest_Body) GetVub() uint32 { if x != nil { return x.Vub } return 0 } func (x *TickEpochRequest_Body) SetVub(v uint32) { x.Vub = v } // MarshalJSON implements the json.Marshaler interface. func (x *TickEpochRequest_Body) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *TickEpochRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"vub\":" out.RawString(prefix[1:]) out.Uint32(x.Vub) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *TickEpochRequest_Body) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *TickEpochRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "vub": { var f uint32 f = in.Uint32() x.Vub = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type TickEpochRequest struct { Body *TickEpochRequest_Body `json:"body"` Signature *Signature `json:"signature"` } var ( _ encoding.ProtoMarshaler = (*TickEpochRequest)(nil) _ encoding.ProtoUnmarshaler = (*TickEpochRequest)(nil) _ json.Marshaler = (*TickEpochRequest)(nil) _ json.Unmarshaler = (*TickEpochRequest)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *TickEpochRequest) StableSize() (size int) { if x == nil { return 0 } size += proto.NestedStructureSize(1, x.Body) size += proto.NestedStructureSize(2, x.Signature) return size } // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // // Returns any error encountered which did not allow writing the data completely. // Otherwise, returns the buffer in which the data is written. // // Structures with the same field values have the same signed data. func (x *TickEpochRequest) SignedDataSize() int { return x.GetBody().StableSize() } // SignedDataSize returns size of the request signed data in bytes. // // Structures with the same field values have the same signed data size. func (x *TickEpochRequest) ReadSignedData(buf []byte) ([]byte, error) { return x.GetBody().MarshalProtobuf(buf), nil } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *TickEpochRequest) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *TickEpochRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if x.Body != nil && x.Body.StableSize() != 0 { x.Body.EmitProtobuf(mm.AppendMessage(1)) } if x.Signature != nil && x.Signature.StableSize() != 0 { x.Signature.EmitProtobuf(mm.AppendMessage(2)) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *TickEpochRequest) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "TickEpochRequest") } switch fc.FieldNum { case 1: // Body data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Body") } x.Body = new(TickEpochRequest_Body) if err := x.Body.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } case 2: // Signature data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Signature") } x.Signature = new(Signature) if err := x.Signature.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } } } return nil } func (x *TickEpochRequest) GetBody() *TickEpochRequest_Body { if x != nil { return x.Body } return nil } func (x *TickEpochRequest) SetBody(v *TickEpochRequest_Body) { x.Body = v } func (x *TickEpochRequest) GetSignature() *Signature { if x != nil { return x.Signature } return nil } func (x *TickEpochRequest) SetSignature(v *Signature) { x.Signature = v } // MarshalJSON implements the json.Marshaler interface. func (x *TickEpochRequest) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *TickEpochRequest) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"body\":" out.RawString(prefix[1:]) x.Body.MarshalEasyJSON(out) } { const prefix string = ",\"signature\":" out.RawString(prefix) x.Signature.MarshalEasyJSON(out) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *TickEpochRequest) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *TickEpochRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "body": { var f *TickEpochRequest_Body f = new(TickEpochRequest_Body) f.UnmarshalEasyJSON(in) x.Body = f } case "signature": { var f *Signature f = new(Signature) f.UnmarshalEasyJSON(in) x.Signature = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type TickEpochResponse_Body struct { Vub uint32 `json:"vub"` } var ( _ encoding.ProtoMarshaler = (*TickEpochResponse_Body)(nil) _ encoding.ProtoUnmarshaler = (*TickEpochResponse_Body)(nil) _ json.Marshaler = (*TickEpochResponse_Body)(nil) _ json.Unmarshaler = (*TickEpochResponse_Body)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *TickEpochResponse_Body) StableSize() (size int) { if x == nil { return 0 } size += proto.UInt32Size(1, x.Vub) return size } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *TickEpochResponse_Body) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *TickEpochResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if x.Vub != 0 { mm.AppendUint32(1, x.Vub) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *TickEpochResponse_Body) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "TickEpochResponse_Body") } switch fc.FieldNum { case 1: // Vub data, ok := fc.Uint32() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Vub") } x.Vub = data } } return nil } func (x *TickEpochResponse_Body) GetVub() uint32 { if x != nil { return x.Vub } return 0 } func (x *TickEpochResponse_Body) SetVub(v uint32) { x.Vub = v } // MarshalJSON implements the json.Marshaler interface. func (x *TickEpochResponse_Body) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *TickEpochResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"vub\":" out.RawString(prefix[1:]) out.Uint32(x.Vub) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *TickEpochResponse_Body) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *TickEpochResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "vub": { var f uint32 f = in.Uint32() x.Vub = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type TickEpochResponse struct { Body *TickEpochResponse_Body `json:"body"` Signature *Signature `json:"signature"` } var ( _ encoding.ProtoMarshaler = (*TickEpochResponse)(nil) _ encoding.ProtoUnmarshaler = (*TickEpochResponse)(nil) _ json.Marshaler = (*TickEpochResponse)(nil) _ json.Unmarshaler = (*TickEpochResponse)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *TickEpochResponse) StableSize() (size int) { if x == nil { return 0 } size += proto.NestedStructureSize(1, x.Body) size += proto.NestedStructureSize(2, x.Signature) return size } // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // // Returns any error encountered which did not allow writing the data completely. // Otherwise, returns the buffer in which the data is written. // // Structures with the same field values have the same signed data. func (x *TickEpochResponse) SignedDataSize() int { return x.GetBody().StableSize() } // SignedDataSize returns size of the request signed data in bytes. // // Structures with the same field values have the same signed data size. func (x *TickEpochResponse) ReadSignedData(buf []byte) ([]byte, error) { return x.GetBody().MarshalProtobuf(buf), nil } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *TickEpochResponse) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *TickEpochResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if x.Body != nil && x.Body.StableSize() != 0 { x.Body.EmitProtobuf(mm.AppendMessage(1)) } if x.Signature != nil && x.Signature.StableSize() != 0 { x.Signature.EmitProtobuf(mm.AppendMessage(2)) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *TickEpochResponse) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "TickEpochResponse") } switch fc.FieldNum { case 1: // Body data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Body") } x.Body = new(TickEpochResponse_Body) if err := x.Body.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } case 2: // Signature data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Signature") } x.Signature = new(Signature) if err := x.Signature.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } } } return nil } func (x *TickEpochResponse) GetBody() *TickEpochResponse_Body { if x != nil { return x.Body } return nil } func (x *TickEpochResponse) SetBody(v *TickEpochResponse_Body) { x.Body = v } func (x *TickEpochResponse) GetSignature() *Signature { if x != nil { return x.Signature } return nil } func (x *TickEpochResponse) SetSignature(v *Signature) { x.Signature = v } // MarshalJSON implements the json.Marshaler interface. func (x *TickEpochResponse) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *TickEpochResponse) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"body\":" out.RawString(prefix[1:]) x.Body.MarshalEasyJSON(out) } { const prefix string = ",\"signature\":" out.RawString(prefix) x.Signature.MarshalEasyJSON(out) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *TickEpochResponse) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *TickEpochResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "body": { var f *TickEpochResponse_Body f = new(TickEpochResponse_Body) f.UnmarshalEasyJSON(in) x.Body = f } case "signature": { var f *Signature f = new(Signature) f.UnmarshalEasyJSON(in) x.Signature = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type RemoveNodeRequest_Body struct { Key []byte `json:"key"` Vub uint32 `json:"vub"` } var ( _ encoding.ProtoMarshaler = (*RemoveNodeRequest_Body)(nil) _ encoding.ProtoUnmarshaler = (*RemoveNodeRequest_Body)(nil) _ json.Marshaler = (*RemoveNodeRequest_Body)(nil) _ json.Unmarshaler = (*RemoveNodeRequest_Body)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *RemoveNodeRequest_Body) StableSize() (size int) { if x == nil { return 0 } size += proto.BytesSize(1, x.Key) size += proto.UInt32Size(2, x.Vub) return size } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *RemoveNodeRequest_Body) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *RemoveNodeRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if len(x.Key) != 0 { mm.AppendBytes(1, x.Key) } if x.Vub != 0 { mm.AppendUint32(2, x.Vub) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *RemoveNodeRequest_Body) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "RemoveNodeRequest_Body") } switch fc.FieldNum { case 1: // Key data, ok := fc.Bytes() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Key") } x.Key = data case 2: // Vub data, ok := fc.Uint32() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Vub") } x.Vub = data } } return nil } func (x *RemoveNodeRequest_Body) GetKey() []byte { if x != nil { return x.Key } return nil } func (x *RemoveNodeRequest_Body) SetKey(v []byte) { x.Key = v } func (x *RemoveNodeRequest_Body) GetVub() uint32 { if x != nil { return x.Vub } return 0 } func (x *RemoveNodeRequest_Body) SetVub(v uint32) { x.Vub = v } // MarshalJSON implements the json.Marshaler interface. func (x *RemoveNodeRequest_Body) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *RemoveNodeRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"key\":" out.RawString(prefix[1:]) out.Base64Bytes(x.Key) } { const prefix string = ",\"vub\":" out.RawString(prefix) out.Uint32(x.Vub) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *RemoveNodeRequest_Body) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *RemoveNodeRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "key": { var f []byte f = in.Bytes() x.Key = f } case "vub": { var f uint32 f = in.Uint32() x.Vub = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type RemoveNodeRequest struct { Body *RemoveNodeRequest_Body `json:"body"` Signature *Signature `json:"signature"` } var ( _ encoding.ProtoMarshaler = (*RemoveNodeRequest)(nil) _ encoding.ProtoUnmarshaler = (*RemoveNodeRequest)(nil) _ json.Marshaler = (*RemoveNodeRequest)(nil) _ json.Unmarshaler = (*RemoveNodeRequest)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *RemoveNodeRequest) StableSize() (size int) { if x == nil { return 0 } size += proto.NestedStructureSize(1, x.Body) size += proto.NestedStructureSize(2, x.Signature) return size } // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // // Returns any error encountered which did not allow writing the data completely. // Otherwise, returns the buffer in which the data is written. // // Structures with the same field values have the same signed data. func (x *RemoveNodeRequest) SignedDataSize() int { return x.GetBody().StableSize() } // SignedDataSize returns size of the request signed data in bytes. // // Structures with the same field values have the same signed data size. func (x *RemoveNodeRequest) ReadSignedData(buf []byte) ([]byte, error) { return x.GetBody().MarshalProtobuf(buf), nil } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *RemoveNodeRequest) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *RemoveNodeRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if x.Body != nil && x.Body.StableSize() != 0 { x.Body.EmitProtobuf(mm.AppendMessage(1)) } if x.Signature != nil && x.Signature.StableSize() != 0 { x.Signature.EmitProtobuf(mm.AppendMessage(2)) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *RemoveNodeRequest) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "RemoveNodeRequest") } switch fc.FieldNum { case 1: // Body data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Body") } x.Body = new(RemoveNodeRequest_Body) if err := x.Body.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } case 2: // Signature data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Signature") } x.Signature = new(Signature) if err := x.Signature.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } } } return nil } func (x *RemoveNodeRequest) GetBody() *RemoveNodeRequest_Body { if x != nil { return x.Body } return nil } func (x *RemoveNodeRequest) SetBody(v *RemoveNodeRequest_Body) { x.Body = v } func (x *RemoveNodeRequest) GetSignature() *Signature { if x != nil { return x.Signature } return nil } func (x *RemoveNodeRequest) SetSignature(v *Signature) { x.Signature = v } // MarshalJSON implements the json.Marshaler interface. func (x *RemoveNodeRequest) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *RemoveNodeRequest) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"body\":" out.RawString(prefix[1:]) x.Body.MarshalEasyJSON(out) } { const prefix string = ",\"signature\":" out.RawString(prefix) x.Signature.MarshalEasyJSON(out) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *RemoveNodeRequest) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *RemoveNodeRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "body": { var f *RemoveNodeRequest_Body f = new(RemoveNodeRequest_Body) f.UnmarshalEasyJSON(in) x.Body = f } case "signature": { var f *Signature f = new(Signature) f.UnmarshalEasyJSON(in) x.Signature = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type RemoveNodeResponse_Body struct { Vub uint32 `json:"vub"` } var ( _ encoding.ProtoMarshaler = (*RemoveNodeResponse_Body)(nil) _ encoding.ProtoUnmarshaler = (*RemoveNodeResponse_Body)(nil) _ json.Marshaler = (*RemoveNodeResponse_Body)(nil) _ json.Unmarshaler = (*RemoveNodeResponse_Body)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *RemoveNodeResponse_Body) StableSize() (size int) { if x == nil { return 0 } size += proto.UInt32Size(1, x.Vub) return size } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *RemoveNodeResponse_Body) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *RemoveNodeResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if x.Vub != 0 { mm.AppendUint32(1, x.Vub) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *RemoveNodeResponse_Body) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "RemoveNodeResponse_Body") } switch fc.FieldNum { case 1: // Vub data, ok := fc.Uint32() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Vub") } x.Vub = data } } return nil } func (x *RemoveNodeResponse_Body) GetVub() uint32 { if x != nil { return x.Vub } return 0 } func (x *RemoveNodeResponse_Body) SetVub(v uint32) { x.Vub = v } // MarshalJSON implements the json.Marshaler interface. func (x *RemoveNodeResponse_Body) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *RemoveNodeResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"vub\":" out.RawString(prefix[1:]) out.Uint32(x.Vub) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *RemoveNodeResponse_Body) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *RemoveNodeResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "vub": { var f uint32 f = in.Uint32() x.Vub = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type RemoveNodeResponse struct { Body *RemoveNodeResponse_Body `json:"body"` Signature *Signature `json:"signature"` } var ( _ encoding.ProtoMarshaler = (*RemoveNodeResponse)(nil) _ encoding.ProtoUnmarshaler = (*RemoveNodeResponse)(nil) _ json.Marshaler = (*RemoveNodeResponse)(nil) _ json.Unmarshaler = (*RemoveNodeResponse)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *RemoveNodeResponse) StableSize() (size int) { if x == nil { return 0 } size += proto.NestedStructureSize(1, x.Body) size += proto.NestedStructureSize(2, x.Signature) return size } // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // // Returns any error encountered which did not allow writing the data completely. // Otherwise, returns the buffer in which the data is written. // // Structures with the same field values have the same signed data. func (x *RemoveNodeResponse) SignedDataSize() int { return x.GetBody().StableSize() } // SignedDataSize returns size of the request signed data in bytes. // // Structures with the same field values have the same signed data size. func (x *RemoveNodeResponse) ReadSignedData(buf []byte) ([]byte, error) { return x.GetBody().MarshalProtobuf(buf), nil } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *RemoveNodeResponse) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *RemoveNodeResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if x.Body != nil && x.Body.StableSize() != 0 { x.Body.EmitProtobuf(mm.AppendMessage(1)) } if x.Signature != nil && x.Signature.StableSize() != 0 { x.Signature.EmitProtobuf(mm.AppendMessage(2)) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *RemoveNodeResponse) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "RemoveNodeResponse") } switch fc.FieldNum { case 1: // Body data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Body") } x.Body = new(RemoveNodeResponse_Body) if err := x.Body.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } case 2: // Signature data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Signature") } x.Signature = new(Signature) if err := x.Signature.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } } } return nil } func (x *RemoveNodeResponse) GetBody() *RemoveNodeResponse_Body { if x != nil { return x.Body } return nil } func (x *RemoveNodeResponse) SetBody(v *RemoveNodeResponse_Body) { x.Body = v } func (x *RemoveNodeResponse) GetSignature() *Signature { if x != nil { return x.Signature } return nil } func (x *RemoveNodeResponse) SetSignature(v *Signature) { x.Signature = v } // MarshalJSON implements the json.Marshaler interface. func (x *RemoveNodeResponse) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *RemoveNodeResponse) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"body\":" out.RawString(prefix[1:]) x.Body.MarshalEasyJSON(out) } { const prefix string = ",\"signature\":" out.RawString(prefix) x.Signature.MarshalEasyJSON(out) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *RemoveNodeResponse) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *RemoveNodeResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "body": { var f *RemoveNodeResponse_Body f = new(RemoveNodeResponse_Body) f.UnmarshalEasyJSON(in) x.Body = f } case "signature": { var f *Signature f = new(Signature) f.UnmarshalEasyJSON(in) x.Signature = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type RemoveContainerRequest_Body struct { ContainerId []byte `json:"containerId"` Owner []byte `json:"owner"` Vub uint32 `json:"vub"` } var ( _ encoding.ProtoMarshaler = (*RemoveContainerRequest_Body)(nil) _ encoding.ProtoUnmarshaler = (*RemoveContainerRequest_Body)(nil) _ json.Marshaler = (*RemoveContainerRequest_Body)(nil) _ json.Unmarshaler = (*RemoveContainerRequest_Body)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *RemoveContainerRequest_Body) StableSize() (size int) { if x == nil { return 0 } size += proto.BytesSize(1, x.ContainerId) size += proto.BytesSize(2, x.Owner) size += proto.UInt32Size(3, x.Vub) return size } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *RemoveContainerRequest_Body) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *RemoveContainerRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if len(x.ContainerId) != 0 { mm.AppendBytes(1, x.ContainerId) } if len(x.Owner) != 0 { mm.AppendBytes(2, x.Owner) } if x.Vub != 0 { mm.AppendUint32(3, x.Vub) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *RemoveContainerRequest_Body) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "RemoveContainerRequest_Body") } switch fc.FieldNum { case 1: // ContainerId data, ok := fc.Bytes() if !ok { return fmt.Errorf("cannot unmarshal field %s", "ContainerId") } x.ContainerId = data case 2: // Owner data, ok := fc.Bytes() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Owner") } x.Owner = data case 3: // Vub data, ok := fc.Uint32() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Vub") } x.Vub = data } } return nil } func (x *RemoveContainerRequest_Body) GetContainerId() []byte { if x != nil { return x.ContainerId } return nil } func (x *RemoveContainerRequest_Body) SetContainerId(v []byte) { x.ContainerId = v } func (x *RemoveContainerRequest_Body) GetOwner() []byte { if x != nil { return x.Owner } return nil } func (x *RemoveContainerRequest_Body) SetOwner(v []byte) { x.Owner = v } func (x *RemoveContainerRequest_Body) GetVub() uint32 { if x != nil { return x.Vub } return 0 } func (x *RemoveContainerRequest_Body) SetVub(v uint32) { x.Vub = v } // MarshalJSON implements the json.Marshaler interface. func (x *RemoveContainerRequest_Body) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *RemoveContainerRequest_Body) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"containerId\":" out.RawString(prefix[1:]) out.Base64Bytes(x.ContainerId) } { const prefix string = ",\"owner\":" out.RawString(prefix) out.Base64Bytes(x.Owner) } { const prefix string = ",\"vub\":" out.RawString(prefix) out.Uint32(x.Vub) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *RemoveContainerRequest_Body) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *RemoveContainerRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "containerId": { var f []byte f = in.Bytes() x.ContainerId = f } case "owner": { var f []byte f = in.Bytes() x.Owner = f } case "vub": { var f uint32 f = in.Uint32() x.Vub = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type RemoveContainerRequest struct { Body *RemoveContainerRequest_Body `json:"body"` Signature *Signature `json:"signature"` } var ( _ encoding.ProtoMarshaler = (*RemoveContainerRequest)(nil) _ encoding.ProtoUnmarshaler = (*RemoveContainerRequest)(nil) _ json.Marshaler = (*RemoveContainerRequest)(nil) _ json.Unmarshaler = (*RemoveContainerRequest)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *RemoveContainerRequest) StableSize() (size int) { if x == nil { return 0 } size += proto.NestedStructureSize(1, x.Body) size += proto.NestedStructureSize(2, x.Signature) return size } // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // // Returns any error encountered which did not allow writing the data completely. // Otherwise, returns the buffer in which the data is written. // // Structures with the same field values have the same signed data. func (x *RemoveContainerRequest) SignedDataSize() int { return x.GetBody().StableSize() } // SignedDataSize returns size of the request signed data in bytes. // // Structures with the same field values have the same signed data size. func (x *RemoveContainerRequest) ReadSignedData(buf []byte) ([]byte, error) { return x.GetBody().MarshalProtobuf(buf), nil } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *RemoveContainerRequest) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *RemoveContainerRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if x.Body != nil && x.Body.StableSize() != 0 { x.Body.EmitProtobuf(mm.AppendMessage(1)) } if x.Signature != nil && x.Signature.StableSize() != 0 { x.Signature.EmitProtobuf(mm.AppendMessage(2)) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *RemoveContainerRequest) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "RemoveContainerRequest") } switch fc.FieldNum { case 1: // Body data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Body") } x.Body = new(RemoveContainerRequest_Body) if err := x.Body.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } case 2: // Signature data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Signature") } x.Signature = new(Signature) if err := x.Signature.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } } } return nil } func (x *RemoveContainerRequest) GetBody() *RemoveContainerRequest_Body { if x != nil { return x.Body } return nil } func (x *RemoveContainerRequest) SetBody(v *RemoveContainerRequest_Body) { x.Body = v } func (x *RemoveContainerRequest) GetSignature() *Signature { if x != nil { return x.Signature } return nil } func (x *RemoveContainerRequest) SetSignature(v *Signature) { x.Signature = v } // MarshalJSON implements the json.Marshaler interface. func (x *RemoveContainerRequest) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *RemoveContainerRequest) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"body\":" out.RawString(prefix[1:]) x.Body.MarshalEasyJSON(out) } { const prefix string = ",\"signature\":" out.RawString(prefix) x.Signature.MarshalEasyJSON(out) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *RemoveContainerRequest) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *RemoveContainerRequest) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "body": { var f *RemoveContainerRequest_Body f = new(RemoveContainerRequest_Body) f.UnmarshalEasyJSON(in) x.Body = f } case "signature": { var f *Signature f = new(Signature) f.UnmarshalEasyJSON(in) x.Signature = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type RemoveContainerResponse_Body struct { Vub uint32 `json:"vub"` } var ( _ encoding.ProtoMarshaler = (*RemoveContainerResponse_Body)(nil) _ encoding.ProtoUnmarshaler = (*RemoveContainerResponse_Body)(nil) _ json.Marshaler = (*RemoveContainerResponse_Body)(nil) _ json.Unmarshaler = (*RemoveContainerResponse_Body)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *RemoveContainerResponse_Body) StableSize() (size int) { if x == nil { return 0 } size += proto.UInt32Size(1, x.Vub) return size } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *RemoveContainerResponse_Body) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *RemoveContainerResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if x.Vub != 0 { mm.AppendUint32(1, x.Vub) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *RemoveContainerResponse_Body) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "RemoveContainerResponse_Body") } switch fc.FieldNum { case 1: // Vub data, ok := fc.Uint32() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Vub") } x.Vub = data } } return nil } func (x *RemoveContainerResponse_Body) GetVub() uint32 { if x != nil { return x.Vub } return 0 } func (x *RemoveContainerResponse_Body) SetVub(v uint32) { x.Vub = v } // MarshalJSON implements the json.Marshaler interface. func (x *RemoveContainerResponse_Body) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *RemoveContainerResponse_Body) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"vub\":" out.RawString(prefix[1:]) out.Uint32(x.Vub) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *RemoveContainerResponse_Body) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *RemoveContainerResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "vub": { var f uint32 f = in.Uint32() x.Vub = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } type RemoveContainerResponse struct { Body *RemoveContainerResponse_Body `json:"body"` Signature *Signature `json:"signature"` } var ( _ encoding.ProtoMarshaler = (*RemoveContainerResponse)(nil) _ encoding.ProtoUnmarshaler = (*RemoveContainerResponse)(nil) _ json.Marshaler = (*RemoveContainerResponse)(nil) _ json.Unmarshaler = (*RemoveContainerResponse)(nil) ) // StableSize returns the size of x in protobuf format. // // Structures with the same field values have the same binary size. func (x *RemoveContainerResponse) StableSize() (size int) { if x == nil { return 0 } size += proto.NestedStructureSize(1, x.Body) size += proto.NestedStructureSize(2, x.Signature) return size } // ReadSignedData fills buf with signed data of x. // If buffer length is less than x.SignedDataSize(), new buffer is allocated. // // Returns any error encountered which did not allow writing the data completely. // Otherwise, returns the buffer in which the data is written. // // Structures with the same field values have the same signed data. func (x *RemoveContainerResponse) SignedDataSize() int { return x.GetBody().StableSize() } // SignedDataSize returns size of the request signed data in bytes. // // Structures with the same field values have the same signed data size. func (x *RemoveContainerResponse) ReadSignedData(buf []byte) ([]byte, error) { return x.GetBody().MarshalProtobuf(buf), nil } // MarshalProtobuf implements the encoding.ProtoMarshaler interface. func (x *RemoveContainerResponse) MarshalProtobuf(dst []byte) []byte { m := pool.MarshalerPool.Get() defer pool.MarshalerPool.Put(m) x.EmitProtobuf(m.MessageMarshaler()) dst = m.Marshal(dst) return dst } func (x *RemoveContainerResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) { if x == nil { return } if x.Body != nil && x.Body.StableSize() != 0 { x.Body.EmitProtobuf(mm.AppendMessage(1)) } if x.Signature != nil && x.Signature.StableSize() != 0 { x.Signature.EmitProtobuf(mm.AppendMessage(2)) } } // UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface. func (x *RemoveContainerResponse) UnmarshalProtobuf(src []byte) (err error) { var fc easyproto.FieldContext for len(src) > 0 { src, err = fc.NextField(src) if err != nil { return fmt.Errorf("cannot read next field in %s", "RemoveContainerResponse") } switch fc.FieldNum { case 1: // Body data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Body") } x.Body = new(RemoveContainerResponse_Body) if err := x.Body.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } case 2: // Signature data, ok := fc.MessageData() if !ok { return fmt.Errorf("cannot unmarshal field %s", "Signature") } x.Signature = new(Signature) if err := x.Signature.UnmarshalProtobuf(data); err != nil { return fmt.Errorf("unmarshal: %w", err) } } } return nil } func (x *RemoveContainerResponse) GetBody() *RemoveContainerResponse_Body { if x != nil { return x.Body } return nil } func (x *RemoveContainerResponse) SetBody(v *RemoveContainerResponse_Body) { x.Body = v } func (x *RemoveContainerResponse) GetSignature() *Signature { if x != nil { return x.Signature } return nil } func (x *RemoveContainerResponse) SetSignature(v *Signature) { x.Signature = v } // MarshalJSON implements the json.Marshaler interface. func (x *RemoveContainerResponse) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} x.MarshalEasyJSON(&w) return w.Buffer.BuildBytes(), w.Error } func (x *RemoveContainerResponse) MarshalEasyJSON(out *jwriter.Writer) { if x == nil { out.RawString("null") return } out.RawByte('{') { const prefix string = ",\"body\":" out.RawString(prefix[1:]) x.Body.MarshalEasyJSON(out) } { const prefix string = ",\"signature\":" out.RawString(prefix) x.Signature.MarshalEasyJSON(out) } out.RawByte('}') } // UnmarshalJSON implements the json.Unmarshaler interface. func (x *RemoveContainerResponse) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} x.UnmarshalEasyJSON(&r) return r.Error() } func (x *RemoveContainerResponse) UnmarshalEasyJSON(in *jlexer.Lexer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeFieldName(false) in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "body": { var f *RemoveContainerResponse_Body f = new(RemoveContainerResponse_Body) f.UnmarshalEasyJSON(in) x.Body = f } case "signature": { var f *Signature f = new(Signature) f.UnmarshalEasyJSON(in) x.Signature = f } } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } }