/* THIS FILE IS GENERATED FROM gtlv_gen.c */
#include <stdint.h>
#include <osmocom/gtlv/gtlv_dec_enc.h>

#include "myproto_ies_custom.h"

struct myproto_ie_moo_nest {
	int foo;
	struct myproto_ie_bar bar;
	struct myproto_ie_baz baz;
};

struct myproto_ie_goo_nest {
	bool val_present;
	uint64_t val;
	struct myproto_ie_moo_nest nest;
};

struct myproto_msg_moo {
	int foo;
	struct myproto_ie_bar bar;
	bool baz_present;
	struct myproto_ie_baz baz;
	int repeat_int[32];
	unsigned int repeat_int_count;
	struct myproto_ie_repeat_struct repeat_struct[32];
	unsigned int repeat_struct_count;
	bool nest_present;
	struct myproto_ie_moo_nest nest;
};

struct myproto_msg_goo {
	int foo;
	bool bar_present;
	struct myproto_ie_bar bar;
	struct myproto_ie_goo_nest nest[8];
	unsigned int nest_count;
};

union myproto_ies {
	struct myproto_msg_moo moo;
	struct myproto_msg_goo goo;
};

const struct osmo_gtlv_coding *myproto_get_msg_coding(enum myproto_msg_type message_type);

int myproto_ies_decode(union myproto_ies *dst, struct osmo_gtlv_load *gtlv, bool tlv_ordered,
	enum myproto_msg_type message_type, osmo_gtlv_err_cb err_cb, void *err_cb_data, const struct value_string *iei_strs);

int myproto_ies_encode(struct osmo_gtlv_put *gtlv, const union myproto_ies *src,
	enum myproto_msg_type message_type, osmo_gtlv_err_cb err_cb, void *err_cb_data, const struct value_string *iei_strs);

int myproto_ies_encode_to_str(char *buf, size_t buflen, const union myproto_ies *src,
	enum myproto_msg_type message_type, const struct value_string *iei_strs);
