1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * envoy/config/core/v3/event_service_config.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef ENVOY_CONFIG_CORE_V3_EVENT_SERVICE_CONFIG_PROTO_UPB_H_
10 #define ENVOY_CONFIG_CORE_V3_EVENT_SERVICE_CONFIG_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_EventServiceConfig;
24 typedef struct envoy_config_core_v3_EventServiceConfig envoy_config_core_v3_EventServiceConfig;
25 extern const upb_msglayout envoy_config_core_v3_EventServiceConfig_msginit;
26 struct envoy_config_core_v3_GrpcService;
27 extern const upb_msglayout envoy_config_core_v3_GrpcService_msginit;
28
29
30 /* envoy.config.core.v3.EventServiceConfig */
31
envoy_config_core_v3_EventServiceConfig_new(upb_arena * arena)32 UPB_INLINE envoy_config_core_v3_EventServiceConfig *envoy_config_core_v3_EventServiceConfig_new(upb_arena *arena) {
33 return (envoy_config_core_v3_EventServiceConfig *)_upb_msg_new(&envoy_config_core_v3_EventServiceConfig_msginit, arena);
34 }
envoy_config_core_v3_EventServiceConfig_parse(const char * buf,size_t size,upb_arena * arena)35 UPB_INLINE envoy_config_core_v3_EventServiceConfig *envoy_config_core_v3_EventServiceConfig_parse(const char *buf, size_t size,
36 upb_arena *arena) {
37 envoy_config_core_v3_EventServiceConfig *ret = envoy_config_core_v3_EventServiceConfig_new(arena);
38 return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_EventServiceConfig_msginit, arena)) ? ret : NULL;
39 }
envoy_config_core_v3_EventServiceConfig_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)40 UPB_INLINE envoy_config_core_v3_EventServiceConfig *envoy_config_core_v3_EventServiceConfig_parse_ex(const char *buf, size_t size,
41 upb_arena *arena, int options) {
42 envoy_config_core_v3_EventServiceConfig *ret = envoy_config_core_v3_EventServiceConfig_new(arena);
43 return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_EventServiceConfig_msginit, arena, options))
44 ? ret : NULL;
45 }
envoy_config_core_v3_EventServiceConfig_serialize(const envoy_config_core_v3_EventServiceConfig * msg,upb_arena * arena,size_t * len)46 UPB_INLINE char *envoy_config_core_v3_EventServiceConfig_serialize(const envoy_config_core_v3_EventServiceConfig *msg, upb_arena *arena, size_t *len) {
47 return upb_encode(msg, &envoy_config_core_v3_EventServiceConfig_msginit, arena, len);
48 }
49
50 typedef enum {
51 envoy_config_core_v3_EventServiceConfig_config_source_specifier_grpc_service = 1,
52 envoy_config_core_v3_EventServiceConfig_config_source_specifier_NOT_SET = 0
53 } envoy_config_core_v3_EventServiceConfig_config_source_specifier_oneofcases;
envoy_config_core_v3_EventServiceConfig_config_source_specifier_case(const envoy_config_core_v3_EventServiceConfig * msg)54 UPB_INLINE envoy_config_core_v3_EventServiceConfig_config_source_specifier_oneofcases envoy_config_core_v3_EventServiceConfig_config_source_specifier_case(const envoy_config_core_v3_EventServiceConfig* msg) { return (envoy_config_core_v3_EventServiceConfig_config_source_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); }
55
envoy_config_core_v3_EventServiceConfig_has_grpc_service(const envoy_config_core_v3_EventServiceConfig * msg)56 UPB_INLINE bool envoy_config_core_v3_EventServiceConfig_has_grpc_service(const envoy_config_core_v3_EventServiceConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
envoy_config_core_v3_EventServiceConfig_grpc_service(const envoy_config_core_v3_EventServiceConfig * msg)57 UPB_INLINE const struct envoy_config_core_v3_GrpcService* envoy_config_core_v3_EventServiceConfig_grpc_service(const envoy_config_core_v3_EventServiceConfig *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_GrpcService*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
58
envoy_config_core_v3_EventServiceConfig_set_grpc_service(envoy_config_core_v3_EventServiceConfig * msg,struct envoy_config_core_v3_GrpcService * value)59 UPB_INLINE void envoy_config_core_v3_EventServiceConfig_set_grpc_service(envoy_config_core_v3_EventServiceConfig *msg, struct envoy_config_core_v3_GrpcService* value) {
60 UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_GrpcService*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
61 }
envoy_config_core_v3_EventServiceConfig_mutable_grpc_service(envoy_config_core_v3_EventServiceConfig * msg,upb_arena * arena)62 UPB_INLINE struct envoy_config_core_v3_GrpcService* envoy_config_core_v3_EventServiceConfig_mutable_grpc_service(envoy_config_core_v3_EventServiceConfig *msg, upb_arena *arena) {
63 struct envoy_config_core_v3_GrpcService* sub = (struct envoy_config_core_v3_GrpcService*)envoy_config_core_v3_EventServiceConfig_grpc_service(msg);
64 if (sub == NULL) {
65 sub = (struct envoy_config_core_v3_GrpcService*)_upb_msg_new(&envoy_config_core_v3_GrpcService_msginit, arena);
66 if (!sub) return NULL;
67 envoy_config_core_v3_EventServiceConfig_set_grpc_service(msg, sub);
68 }
69 return sub;
70 }
71
72 #ifdef __cplusplus
73 } /* extern "C" */
74 #endif
75
76 #include "upb/port_undef.inc"
77
78 #endif /* ENVOY_CONFIG_CORE_V3_EVENT_SERVICE_CONFIG_PROTO_UPB_H_ */
79