1 /* This file was generated by upbc (the upb compiler) from the input
4 * udpa/core/v1/context_params.proto
6 * Do not edit -- your changes will be discarded when the file is
9 #ifndef UDPA_CORE_V1_CONTEXT_PARAMS_PROTO_UPB_H_
10 #define UDPA_CORE_V1_CONTEXT_PARAMS_PROTO_UPB_H_
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
17 #include "upb/port_def.inc"
23 struct udpa_core_v1_ContextParams;
24 struct udpa_core_v1_ContextParams_ParamsEntry;
25 typedef struct udpa_core_v1_ContextParams udpa_core_v1_ContextParams;
26 typedef struct udpa_core_v1_ContextParams_ParamsEntry udpa_core_v1_ContextParams_ParamsEntry;
27 extern const upb_msglayout udpa_core_v1_ContextParams_msginit;
28 extern const upb_msglayout udpa_core_v1_ContextParams_ParamsEntry_msginit;
31 /* udpa.core.v1.ContextParams */
33 UPB_INLINE udpa_core_v1_ContextParams *udpa_core_v1_ContextParams_new(upb_arena *arena) {
34 return (udpa_core_v1_ContextParams *)_upb_msg_new(&udpa_core_v1_ContextParams_msginit, arena);
36 UPB_INLINE udpa_core_v1_ContextParams *udpa_core_v1_ContextParams_parse(const char *buf, size_t size,
38 udpa_core_v1_ContextParams *ret = udpa_core_v1_ContextParams_new(arena);
39 return (ret && upb_decode(buf, size, ret, &udpa_core_v1_ContextParams_msginit, arena)) ? ret : NULL;
41 UPB_INLINE udpa_core_v1_ContextParams *udpa_core_v1_ContextParams_parse_ex(const char *buf, size_t size,
42 upb_arena *arena, int options) {
43 udpa_core_v1_ContextParams *ret = udpa_core_v1_ContextParams_new(arena);
44 return (ret && _upb_decode(buf, size, ret, &udpa_core_v1_ContextParams_msginit, arena, options))
47 UPB_INLINE char *udpa_core_v1_ContextParams_serialize(const udpa_core_v1_ContextParams *msg, upb_arena *arena, size_t *len) {
48 return upb_encode(msg, &udpa_core_v1_ContextParams_msginit, arena, len);
51 UPB_INLINE bool udpa_core_v1_ContextParams_has_params(const udpa_core_v1_ContextParams *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
52 UPB_INLINE size_t udpa_core_v1_ContextParams_params_size(const udpa_core_v1_ContextParams *msg) {return _upb_msg_map_size(msg, UPB_SIZE(0, 0)); }
53 UPB_INLINE bool udpa_core_v1_ContextParams_params_get(const udpa_core_v1_ContextParams *msg, upb_strview key, upb_strview *val) { return _upb_msg_map_get(msg, UPB_SIZE(0, 0), &key, 0, val, 0); }
54 UPB_INLINE const udpa_core_v1_ContextParams_ParamsEntry* udpa_core_v1_ContextParams_params_next(const udpa_core_v1_ContextParams *msg, size_t* iter) { return (const udpa_core_v1_ContextParams_ParamsEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); }
56 UPB_INLINE void udpa_core_v1_ContextParams_params_clear(udpa_core_v1_ContextParams *msg) { _upb_msg_map_clear(msg, UPB_SIZE(0, 0)); }
57 UPB_INLINE bool udpa_core_v1_ContextParams_params_set(udpa_core_v1_ContextParams *msg, upb_strview key, upb_strview val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(0, 0), &key, 0, &val, 0, a); }
58 UPB_INLINE bool udpa_core_v1_ContextParams_params_delete(udpa_core_v1_ContextParams *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(0, 0), &key, 0); }
59 UPB_INLINE udpa_core_v1_ContextParams_ParamsEntry* udpa_core_v1_ContextParams_params_nextmutable(udpa_core_v1_ContextParams *msg, size_t* iter) { return (udpa_core_v1_ContextParams_ParamsEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); }
61 /* udpa.core.v1.ContextParams.ParamsEntry */
63 UPB_INLINE upb_strview udpa_core_v1_ContextParams_ParamsEntry_key(const udpa_core_v1_ContextParams_ParamsEntry *msg) {
65 _upb_msg_map_key(msg, &ret, 0);
68 UPB_INLINE upb_strview udpa_core_v1_ContextParams_ParamsEntry_value(const udpa_core_v1_ContextParams_ParamsEntry *msg) {
70 _upb_msg_map_value(msg, &ret, 0);
74 UPB_INLINE void udpa_core_v1_ContextParams_ParamsEntry_set_value(udpa_core_v1_ContextParams_ParamsEntry *msg, upb_strview value) {
75 _upb_msg_map_set_value(msg, &value, 0);
82 #include "upb/port_undef.inc"
84 #endif /* UDPA_CORE_V1_CONTEXT_PARAMS_PROTO_UPB_H_ */