-- Code generated by protoc-gen-tarantool. DO NOT EDIT. -- source: c_nested.proto -- syntax: proto3 -- package: c_nested local pb = require("pb") local wire = pb.wire local string_byte = string.byte local utf8_len = require('utf8').len local band = bit.band local rshift = bit.rshift local CHARS = wire.CHARS local table_new = require('table.new') local M = {} M.options = {go_package = "tarantoolpb_synthetic/c_nested"} -- Pre-declare message descriptors so cross-references resolve. M.L1_descriptor = {name = "c_nested.L1"} M.L2_descriptor = {name = "c_nested.L2"} M.L3_descriptor = {name = "c_nested.L3"} M.L4_descriptor = {name = "c_nested.L4"} M.L5_descriptor = {name = "c_nested.L5"} -- Message: c_nested.L1 M.L1_descriptor.fields = { {name="next", id=1, kind='message', message=M.L2_descriptor}, {name="v", id=2, kind='scalar', proto_type="int32"}, } pb.finalize_message(M.L1_descriptor) M.L1_fields = pb.field_names({ next = "next", v = "v", }) -- Message: c_nested.L2 M.L2_descriptor.fields = { {name="next", id=1, kind='message', message=M.L3_descriptor}, {name="v", id=2, kind='scalar', proto_type="int32"}, } pb.finalize_message(M.L2_descriptor) M.L2_fields = pb.field_names({ next = "next", v = "v", }) -- Message: c_nested.L3 M.L3_descriptor.fields = { {name="next", id=1, kind='message', message=M.L4_descriptor}, {name="v", id=2, kind='scalar', proto_type="int32"}, } pb.finalize_message(M.L3_descriptor) M.L3_fields = pb.field_names({ next = "next", v = "v", }) -- Message: c_nested.L4 M.L4_descriptor.fields = { {name="next", id=1, kind='message', message=M.L5_descriptor}, {name="v", id=2, kind='scalar', proto_type="int32"}, } pb.finalize_message(M.L4_descriptor) M.L4_fields = pb.field_names({ next = "next", v = "v", }) -- Message: c_nested.L5 M.L5_descriptor.fields = { {name="v", id=2, kind='scalar', proto_type="int32"}, } pb.finalize_message(M.L5_descriptor) M.L5_fields = pb.field_names({ v = "v", }) -- EmmyLua / lua-language-server type annotations. -- These are comments — no runtime effect. They give editors -- autocomplete and type-checking for the generated wrappers. --- 5-level chain of singular sub-messages. Used by the bd-hwe (ra6 3d) --- C-runtime tests to verify recursion across non-trivial depth. Each --- level carries an int32 so the encoded body at each level is --- non-empty (catches off-by-one bugs in the length-prefix path). ---@class c_nested.L1 ---@field next c_nested.L2 ---@field v integer ---@class c_nested.L2 ---@field next c_nested.L3 ---@field v integer ---@class c_nested.L3 ---@field next c_nested.L4 ---@field v integer ---@class c_nested.L4 ---@field next c_nested.L5 ---@field v integer ---@class c_nested.L5 ---@field v integer ---@param t? c_nested.L1 ---@return c_nested.L1 function M.L1_new(t) return t or {} end ---@param t c_nested.L1 ---@return string function M.L1_encode(t) return pb.encode(M.L1_descriptor, t) end ---@param b string ---@return c_nested.L1 function M.L1_decode(b) return pb.decode(M.L1_descriptor, b) end ---@param b string ---@return pb.MessageView function M.L1_decode_lazy(b) return pb.decode_lazy(M.L1_descriptor, b) end ---@param t c_nested.L1 ---@param opts? {single_line: boolean?, indent: string?} ---@return string function M.L1_text(t, opts) return pb.text.encode(M.L1_descriptor, t, opts) end ---@param t? c_nested.L2 ---@return c_nested.L2 function M.L2_new(t) return t or {} end ---@param t c_nested.L2 ---@return string function M.L2_encode(t) return pb.encode(M.L2_descriptor, t) end ---@param b string ---@return c_nested.L2 function M.L2_decode(b) return pb.decode(M.L2_descriptor, b) end ---@param b string ---@return pb.MessageView function M.L2_decode_lazy(b) return pb.decode_lazy(M.L2_descriptor, b) end ---@param t c_nested.L2 ---@param opts? {single_line: boolean?, indent: string?} ---@return string function M.L2_text(t, opts) return pb.text.encode(M.L2_descriptor, t, opts) end ---@param t? c_nested.L3 ---@return c_nested.L3 function M.L3_new(t) return t or {} end ---@param t c_nested.L3 ---@return string function M.L3_encode(t) return pb.encode(M.L3_descriptor, t) end ---@param b string ---@return c_nested.L3 function M.L3_decode(b) return pb.decode(M.L3_descriptor, b) end ---@param b string ---@return pb.MessageView function M.L3_decode_lazy(b) return pb.decode_lazy(M.L3_descriptor, b) end ---@param t c_nested.L3 ---@param opts? {single_line: boolean?, indent: string?} ---@return string function M.L3_text(t, opts) return pb.text.encode(M.L3_descriptor, t, opts) end ---@param t? c_nested.L4 ---@return c_nested.L4 function M.L4_new(t) return t or {} end ---@param t c_nested.L4 ---@return string function M.L4_encode(t) return pb.encode(M.L4_descriptor, t) end ---@param b string ---@return c_nested.L4 function M.L4_decode(b) return pb.decode(M.L4_descriptor, b) end ---@param b string ---@return pb.MessageView function M.L4_decode_lazy(b) return pb.decode_lazy(M.L4_descriptor, b) end ---@param t c_nested.L4 ---@param opts? {single_line: boolean?, indent: string?} ---@return string function M.L4_text(t, opts) return pb.text.encode(M.L4_descriptor, t, opts) end ---@param t? c_nested.L5 ---@return c_nested.L5 function M.L5_new(t) return t or {} end ---@param t c_nested.L5 ---@return string function M.L5_encode(t) return pb.encode(M.L5_descriptor, t) end ---@param b string ---@return c_nested.L5 function M.L5_decode(b) return pb.decode(M.L5_descriptor, b) end ---@param b string ---@return pb.MessageView function M.L5_decode_lazy(b) return pb.decode_lazy(M.L5_descriptor, b) end ---@param t c_nested.L5 ---@param opts? {single_line: boolean?, indent: string?} ---@return string function M.L5_text(t, opts) return pb.text.encode(M.L5_descriptor, t, opts) end return M