1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * envoy/config/core/v3/extension.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef ENVOY_CONFIG_CORE_V3_EXTENSION_PROTO_UPB_H_
10 #define ENVOY_CONFIG_CORE_V3_EXTENSION_PROTO_UPB_H_
11
12 #include "upb/msg.h"
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
16
17 #include "upb/port_def.inc"
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 struct envoy_config_core_v3_TypedExtensionConfig;
24 struct envoy_config_core_v3_ExtensionConfigSource;
25 typedef struct envoy_config_core_v3_TypedExtensionConfig envoy_config_core_v3_TypedExtensionConfig;
26 typedef struct envoy_config_core_v3_ExtensionConfigSource envoy_config_core_v3_ExtensionConfigSource;
27 extern const upb_msglayout envoy_config_core_v3_TypedExtensionConfig_msginit;
28 extern const upb_msglayout envoy_config_core_v3_ExtensionConfigSource_msginit;
29 struct envoy_config_core_v3_ConfigSource;
30 struct google_protobuf_Any;
31 extern const upb_msglayout envoy_config_core_v3_ConfigSource_msginit;
32 extern const upb_msglayout google_protobuf_Any_msginit;
33
34
35 /* envoy.config.core.v3.TypedExtensionConfig */
36
envoy_config_core_v3_TypedExtensionConfig_new(upb_arena * arena)37 UPB_INLINE envoy_config_core_v3_TypedExtensionConfig *envoy_config_core_v3_TypedExtensionConfig_new(upb_arena *arena) {
38 return (envoy_config_core_v3_TypedExtensionConfig *)_upb_msg_new(&envoy_config_core_v3_TypedExtensionConfig_msginit, arena);
39 }
envoy_config_core_v3_TypedExtensionConfig_parse(const char * buf,size_t size,upb_arena * arena)40 UPB_INLINE envoy_config_core_v3_TypedExtensionConfig *envoy_config_core_v3_TypedExtensionConfig_parse(const char *buf, size_t size,
41 upb_arena *arena) {
42 envoy_config_core_v3_TypedExtensionConfig *ret = envoy_config_core_v3_TypedExtensionConfig_new(arena);
43 return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_TypedExtensionConfig_msginit, arena)) ? ret : NULL;
44 }
envoy_config_core_v3_TypedExtensionConfig_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)45 UPB_INLINE envoy_config_core_v3_TypedExtensionConfig *envoy_config_core_v3_TypedExtensionConfig_parse_ex(const char *buf, size_t size,
46 upb_arena *arena, int options) {
47 envoy_config_core_v3_TypedExtensionConfig *ret = envoy_config_core_v3_TypedExtensionConfig_new(arena);
48 return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_TypedExtensionConfig_msginit, arena, options))
49 ? ret : NULL;
50 }
envoy_config_core_v3_TypedExtensionConfig_serialize(const envoy_config_core_v3_TypedExtensionConfig * msg,upb_arena * arena,size_t * len)51 UPB_INLINE char *envoy_config_core_v3_TypedExtensionConfig_serialize(const envoy_config_core_v3_TypedExtensionConfig *msg, upb_arena *arena, size_t *len) {
52 return upb_encode(msg, &envoy_config_core_v3_TypedExtensionConfig_msginit, arena, len);
53 }
54
envoy_config_core_v3_TypedExtensionConfig_name(const envoy_config_core_v3_TypedExtensionConfig * msg)55 UPB_INLINE upb_strview envoy_config_core_v3_TypedExtensionConfig_name(const envoy_config_core_v3_TypedExtensionConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
envoy_config_core_v3_TypedExtensionConfig_has_typed_config(const envoy_config_core_v3_TypedExtensionConfig * msg)56 UPB_INLINE bool envoy_config_core_v3_TypedExtensionConfig_has_typed_config(const envoy_config_core_v3_TypedExtensionConfig *msg) { return _upb_hasbit(msg, 1); }
envoy_config_core_v3_TypedExtensionConfig_typed_config(const envoy_config_core_v3_TypedExtensionConfig * msg)57 UPB_INLINE const struct google_protobuf_Any* envoy_config_core_v3_TypedExtensionConfig_typed_config(const envoy_config_core_v3_TypedExtensionConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Any*); }
58
envoy_config_core_v3_TypedExtensionConfig_set_name(envoy_config_core_v3_TypedExtensionConfig * msg,upb_strview value)59 UPB_INLINE void envoy_config_core_v3_TypedExtensionConfig_set_name(envoy_config_core_v3_TypedExtensionConfig *msg, upb_strview value) {
60 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
61 }
envoy_config_core_v3_TypedExtensionConfig_set_typed_config(envoy_config_core_v3_TypedExtensionConfig * msg,struct google_protobuf_Any * value)62 UPB_INLINE void envoy_config_core_v3_TypedExtensionConfig_set_typed_config(envoy_config_core_v3_TypedExtensionConfig *msg, struct google_protobuf_Any* value) {
63 _upb_sethas(msg, 1);
64 *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Any*) = value;
65 }
envoy_config_core_v3_TypedExtensionConfig_mutable_typed_config(envoy_config_core_v3_TypedExtensionConfig * msg,upb_arena * arena)66 UPB_INLINE struct google_protobuf_Any* envoy_config_core_v3_TypedExtensionConfig_mutable_typed_config(envoy_config_core_v3_TypedExtensionConfig *msg, upb_arena *arena) {
67 struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_core_v3_TypedExtensionConfig_typed_config(msg);
68 if (sub == NULL) {
69 sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
70 if (!sub) return NULL;
71 envoy_config_core_v3_TypedExtensionConfig_set_typed_config(msg, sub);
72 }
73 return sub;
74 }
75
76 /* envoy.config.core.v3.ExtensionConfigSource */
77
envoy_config_core_v3_ExtensionConfigSource_new(upb_arena * arena)78 UPB_INLINE envoy_config_core_v3_ExtensionConfigSource *envoy_config_core_v3_ExtensionConfigSource_new(upb_arena *arena) {
79 return (envoy_config_core_v3_ExtensionConfigSource *)_upb_msg_new(&envoy_config_core_v3_ExtensionConfigSource_msginit, arena);
80 }
envoy_config_core_v3_ExtensionConfigSource_parse(const char * buf,size_t size,upb_arena * arena)81 UPB_INLINE envoy_config_core_v3_ExtensionConfigSource *envoy_config_core_v3_ExtensionConfigSource_parse(const char *buf, size_t size,
82 upb_arena *arena) {
83 envoy_config_core_v3_ExtensionConfigSource *ret = envoy_config_core_v3_ExtensionConfigSource_new(arena);
84 return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_ExtensionConfigSource_msginit, arena)) ? ret : NULL;
85 }
envoy_config_core_v3_ExtensionConfigSource_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)86 UPB_INLINE envoy_config_core_v3_ExtensionConfigSource *envoy_config_core_v3_ExtensionConfigSource_parse_ex(const char *buf, size_t size,
87 upb_arena *arena, int options) {
88 envoy_config_core_v3_ExtensionConfigSource *ret = envoy_config_core_v3_ExtensionConfigSource_new(arena);
89 return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_ExtensionConfigSource_msginit, arena, options))
90 ? ret : NULL;
91 }
envoy_config_core_v3_ExtensionConfigSource_serialize(const envoy_config_core_v3_ExtensionConfigSource * msg,upb_arena * arena,size_t * len)92 UPB_INLINE char *envoy_config_core_v3_ExtensionConfigSource_serialize(const envoy_config_core_v3_ExtensionConfigSource *msg, upb_arena *arena, size_t *len) {
93 return upb_encode(msg, &envoy_config_core_v3_ExtensionConfigSource_msginit, arena, len);
94 }
95
envoy_config_core_v3_ExtensionConfigSource_has_config_source(const envoy_config_core_v3_ExtensionConfigSource * msg)96 UPB_INLINE bool envoy_config_core_v3_ExtensionConfigSource_has_config_source(const envoy_config_core_v3_ExtensionConfigSource *msg) { return _upb_hasbit(msg, 1); }
envoy_config_core_v3_ExtensionConfigSource_config_source(const envoy_config_core_v3_ExtensionConfigSource * msg)97 UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_config_core_v3_ExtensionConfigSource_config_source(const envoy_config_core_v3_ExtensionConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_ConfigSource*); }
envoy_config_core_v3_ExtensionConfigSource_has_default_config(const envoy_config_core_v3_ExtensionConfigSource * msg)98 UPB_INLINE bool envoy_config_core_v3_ExtensionConfigSource_has_default_config(const envoy_config_core_v3_ExtensionConfigSource *msg) { return _upb_hasbit(msg, 2); }
envoy_config_core_v3_ExtensionConfigSource_default_config(const envoy_config_core_v3_ExtensionConfigSource * msg)99 UPB_INLINE const struct google_protobuf_Any* envoy_config_core_v3_ExtensionConfigSource_default_config(const envoy_config_core_v3_ExtensionConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Any*); }
envoy_config_core_v3_ExtensionConfigSource_apply_default_config_without_warming(const envoy_config_core_v3_ExtensionConfigSource * msg)100 UPB_INLINE bool envoy_config_core_v3_ExtensionConfigSource_apply_default_config_without_warming(const envoy_config_core_v3_ExtensionConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
envoy_config_core_v3_ExtensionConfigSource_type_urls(const envoy_config_core_v3_ExtensionConfigSource * msg,size_t * len)101 UPB_INLINE upb_strview const* envoy_config_core_v3_ExtensionConfigSource_type_urls(const envoy_config_core_v3_ExtensionConfigSource *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
102
envoy_config_core_v3_ExtensionConfigSource_set_config_source(envoy_config_core_v3_ExtensionConfigSource * msg,struct envoy_config_core_v3_ConfigSource * value)103 UPB_INLINE void envoy_config_core_v3_ExtensionConfigSource_set_config_source(envoy_config_core_v3_ExtensionConfigSource *msg, struct envoy_config_core_v3_ConfigSource* value) {
104 _upb_sethas(msg, 1);
105 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_ConfigSource*) = value;
106 }
envoy_config_core_v3_ExtensionConfigSource_mutable_config_source(envoy_config_core_v3_ExtensionConfigSource * msg,upb_arena * arena)107 UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_config_core_v3_ExtensionConfigSource_mutable_config_source(envoy_config_core_v3_ExtensionConfigSource *msg, upb_arena *arena) {
108 struct envoy_config_core_v3_ConfigSource* sub = (struct envoy_config_core_v3_ConfigSource*)envoy_config_core_v3_ExtensionConfigSource_config_source(msg);
109 if (sub == NULL) {
110 sub = (struct envoy_config_core_v3_ConfigSource*)_upb_msg_new(&envoy_config_core_v3_ConfigSource_msginit, arena);
111 if (!sub) return NULL;
112 envoy_config_core_v3_ExtensionConfigSource_set_config_source(msg, sub);
113 }
114 return sub;
115 }
envoy_config_core_v3_ExtensionConfigSource_set_default_config(envoy_config_core_v3_ExtensionConfigSource * msg,struct google_protobuf_Any * value)116 UPB_INLINE void envoy_config_core_v3_ExtensionConfigSource_set_default_config(envoy_config_core_v3_ExtensionConfigSource *msg, struct google_protobuf_Any* value) {
117 _upb_sethas(msg, 2);
118 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Any*) = value;
119 }
envoy_config_core_v3_ExtensionConfigSource_mutable_default_config(envoy_config_core_v3_ExtensionConfigSource * msg,upb_arena * arena)120 UPB_INLINE struct google_protobuf_Any* envoy_config_core_v3_ExtensionConfigSource_mutable_default_config(envoy_config_core_v3_ExtensionConfigSource *msg, upb_arena *arena) {
121 struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_core_v3_ExtensionConfigSource_default_config(msg);
122 if (sub == NULL) {
123 sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
124 if (!sub) return NULL;
125 envoy_config_core_v3_ExtensionConfigSource_set_default_config(msg, sub);
126 }
127 return sub;
128 }
envoy_config_core_v3_ExtensionConfigSource_set_apply_default_config_without_warming(envoy_config_core_v3_ExtensionConfigSource * msg,bool value)129 UPB_INLINE void envoy_config_core_v3_ExtensionConfigSource_set_apply_default_config_without_warming(envoy_config_core_v3_ExtensionConfigSource *msg, bool value) {
130 *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
131 }
envoy_config_core_v3_ExtensionConfigSource_mutable_type_urls(envoy_config_core_v3_ExtensionConfigSource * msg,size_t * len)132 UPB_INLINE upb_strview* envoy_config_core_v3_ExtensionConfigSource_mutable_type_urls(envoy_config_core_v3_ExtensionConfigSource *msg, size_t *len) {
133 return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
134 }
envoy_config_core_v3_ExtensionConfigSource_resize_type_urls(envoy_config_core_v3_ExtensionConfigSource * msg,size_t len,upb_arena * arena)135 UPB_INLINE upb_strview* envoy_config_core_v3_ExtensionConfigSource_resize_type_urls(envoy_config_core_v3_ExtensionConfigSource *msg, size_t len, upb_arena *arena) {
136 return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(3, 4), arena);
137 }
envoy_config_core_v3_ExtensionConfigSource_add_type_urls(envoy_config_core_v3_ExtensionConfigSource * msg,upb_strview val,upb_arena * arena)138 UPB_INLINE bool envoy_config_core_v3_ExtensionConfigSource_add_type_urls(envoy_config_core_v3_ExtensionConfigSource *msg, upb_strview val, upb_arena *arena) {
139 return _upb_array_append_accessor2(msg, UPB_SIZE(12, 24), UPB_SIZE(3, 4), &val,
140 arena);
141 }
142
143 #ifdef __cplusplus
144 } /* extern "C" */
145 #endif
146
147 #include "upb/port_undef.inc"
148
149 #endif /* ENVOY_CONFIG_CORE_V3_EXTENSION_PROTO_UPB_H_ */
150