1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * envoy/api/v2/core/event_service_config.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef ENVOY_API_V2_CORE_EVENT_SERVICE_CONFIG_PROTO_UPB_H_
10 #define ENVOY_API_V2_CORE_EVENT_SERVICE_CONFIG_PROTO_UPB_H_
11
12 #include "upb/msg.h"
13 #include "upb/decode.h"
14 #include "upb/encode.h"
15
16 #include "upb/port_def.inc"
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 struct envoy_api_v2_core_EventServiceConfig;
23 typedef struct envoy_api_v2_core_EventServiceConfig envoy_api_v2_core_EventServiceConfig;
24 extern const upb_msglayout envoy_api_v2_core_EventServiceConfig_msginit;
25 struct envoy_api_v2_core_GrpcService;
26 extern const upb_msglayout envoy_api_v2_core_GrpcService_msginit;
27
28
29 /* envoy.api.v2.core.EventServiceConfig */
30
envoy_api_v2_core_EventServiceConfig_new(upb_arena * arena)31 UPB_INLINE envoy_api_v2_core_EventServiceConfig *envoy_api_v2_core_EventServiceConfig_new(upb_arena *arena) {
32 return (envoy_api_v2_core_EventServiceConfig *)_upb_msg_new(&envoy_api_v2_core_EventServiceConfig_msginit, arena);
33 }
envoy_api_v2_core_EventServiceConfig_parse(const char * buf,size_t size,upb_arena * arena)34 UPB_INLINE envoy_api_v2_core_EventServiceConfig *envoy_api_v2_core_EventServiceConfig_parse(const char *buf, size_t size,
35 upb_arena *arena) {
36 envoy_api_v2_core_EventServiceConfig *ret = envoy_api_v2_core_EventServiceConfig_new(arena);
37 return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_EventServiceConfig_msginit, arena)) ? ret : NULL;
38 }
envoy_api_v2_core_EventServiceConfig_serialize(const envoy_api_v2_core_EventServiceConfig * msg,upb_arena * arena,size_t * len)39 UPB_INLINE char *envoy_api_v2_core_EventServiceConfig_serialize(const envoy_api_v2_core_EventServiceConfig *msg, upb_arena *arena, size_t *len) {
40 return upb_encode(msg, &envoy_api_v2_core_EventServiceConfig_msginit, arena, len);
41 }
42
43 typedef enum {
44 envoy_api_v2_core_EventServiceConfig_config_source_specifier_grpc_service = 1,
45 envoy_api_v2_core_EventServiceConfig_config_source_specifier_NOT_SET = 0
46 } envoy_api_v2_core_EventServiceConfig_config_source_specifier_oneofcases;
envoy_api_v2_core_EventServiceConfig_config_source_specifier_case(const envoy_api_v2_core_EventServiceConfig * msg)47 UPB_INLINE envoy_api_v2_core_EventServiceConfig_config_source_specifier_oneofcases envoy_api_v2_core_EventServiceConfig_config_source_specifier_case(const envoy_api_v2_core_EventServiceConfig* msg) { return (envoy_api_v2_core_EventServiceConfig_config_source_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); }
48
envoy_api_v2_core_EventServiceConfig_has_grpc_service(const envoy_api_v2_core_EventServiceConfig * msg)49 UPB_INLINE bool envoy_api_v2_core_EventServiceConfig_has_grpc_service(const envoy_api_v2_core_EventServiceConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
envoy_api_v2_core_EventServiceConfig_grpc_service(const envoy_api_v2_core_EventServiceConfig * msg)50 UPB_INLINE const struct envoy_api_v2_core_GrpcService* envoy_api_v2_core_EventServiceConfig_grpc_service(const envoy_api_v2_core_EventServiceConfig *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_core_GrpcService*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
51
envoy_api_v2_core_EventServiceConfig_set_grpc_service(envoy_api_v2_core_EventServiceConfig * msg,struct envoy_api_v2_core_GrpcService * value)52 UPB_INLINE void envoy_api_v2_core_EventServiceConfig_set_grpc_service(envoy_api_v2_core_EventServiceConfig *msg, struct envoy_api_v2_core_GrpcService* value) {
53 UPB_WRITE_ONEOF(msg, struct envoy_api_v2_core_GrpcService*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
54 }
envoy_api_v2_core_EventServiceConfig_mutable_grpc_service(envoy_api_v2_core_EventServiceConfig * msg,upb_arena * arena)55 UPB_INLINE struct envoy_api_v2_core_GrpcService* envoy_api_v2_core_EventServiceConfig_mutable_grpc_service(envoy_api_v2_core_EventServiceConfig *msg, upb_arena *arena) {
56 struct envoy_api_v2_core_GrpcService* sub = (struct envoy_api_v2_core_GrpcService*)envoy_api_v2_core_EventServiceConfig_grpc_service(msg);
57 if (sub == NULL) {
58 sub = (struct envoy_api_v2_core_GrpcService*)_upb_msg_new(&envoy_api_v2_core_GrpcService_msginit, arena);
59 if (!sub) return NULL;
60 envoy_api_v2_core_EventServiceConfig_set_grpc_service(msg, sub);
61 }
62 return sub;
63 }
64
65 #ifdef __cplusplus
66 } /* extern "C" */
67 #endif
68
69 #include "upb/port_undef.inc"
70
71 #endif /* ENVOY_API_V2_CORE_EVENT_SERVICE_CONFIG_PROTO_UPB_H_ */
72