GRPC Core  18.0.0
udp_listener_config.upb.h
Go to the documentation of this file.
1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  * envoy/config/listener/v3/udp_listener_config.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef ENVOY_CONFIG_LISTENER_V3_UDP_LISTENER_CONFIG_PROTO_UPB_H_
10 #define ENVOY_CONFIG_LISTENER_V3_UDP_LISTENER_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 
29 struct google_protobuf_Any;
30 extern const upb_msglayout google_protobuf_Any_msginit;
31 
32 
33 /* envoy.config.listener.v3.UdpListenerConfig */
34 
37 }
39  upb_arena *arena) {
41  return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_UdpListenerConfig_msginit, arena)) ? ret : NULL;
42 }
44  upb_arena *arena, int options) {
46  return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_UdpListenerConfig_msginit, arena, options))
47  ? ret : NULL;
48 }
50  return upb_encode(msg, &envoy_config_listener_v3_UdpListenerConfig_msginit, arena, len);
51 }
52 
53 typedef enum {
58 
59 UPB_INLINE upb_strview envoy_config_listener_v3_UdpListenerConfig_udp_listener_name(const envoy_config_listener_v3_UdpListenerConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
60 UPB_INLINE bool envoy_config_listener_v3_UdpListenerConfig_has_typed_config(const envoy_config_listener_v3_UdpListenerConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; }
61 UPB_INLINE const struct google_protobuf_Any* envoy_config_listener_v3_UdpListenerConfig_typed_config(const envoy_config_listener_v3_UdpListenerConfig *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
62 
64  *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
65 }
67  UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
68 }
71  if (sub == NULL) {
72  sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
73  if (!sub) return NULL;
75  }
76  return sub;
77 }
78 
79 /* envoy.config.listener.v3.ActiveRawUdpListenerConfig */
80 
83 }
85  upb_arena *arena) {
87  return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_ActiveRawUdpListenerConfig_msginit, arena)) ? ret : NULL;
88 }
90  upb_arena *arena, int options) {
92  return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_ActiveRawUdpListenerConfig_msginit, arena, options))
93  ? ret : NULL;
94 }
97 }
98 
99 
100 
101 #ifdef __cplusplus
102 } /* extern "C" */
103 #endif
104 
105 #include "upb/port_undef.inc"
106 
107 #endif /* ENVOY_CONFIG_LISTENER_V3_UDP_LISTENER_CONFIG_PROTO_UPB_H_ */
struct google_protobuf_Any google_protobuf_Any
Definition: any.upb.h:24
const upb_msglayout envoy_config_listener_v3_UdpListenerConfig_msginit
Definition: udp_listener_config.upb.c:27
UPB_INLINE envoy_config_listener_v3_UdpListenerConfig * envoy_config_listener_v3_UdpListenerConfig_parse(const char *buf, size_t size, upb_arena *arena)
Definition: udp_listener_config.upb.h:38
const upb_msglayout envoy_config_listener_v3_ActiveRawUdpListenerConfig_msginit
Definition: udp_listener_config.upb.c:33
UPB_INLINE envoy_config_listener_v3_UdpListenerConfig * envoy_config_listener_v3_UdpListenerConfig_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: udp_listener_config.upb.h:43
UPB_INLINE const struct google_protobuf_Any * envoy_config_listener_v3_UdpListenerConfig_typed_config(const envoy_config_listener_v3_UdpListenerConfig *msg)
Definition: udp_listener_config.upb.h:61
struct envoy_config_listener_v3_ActiveRawUdpListenerConfig envoy_config_listener_v3_ActiveRawUdpListenerConfig
Definition: udp_listener_config.upb.h:26
UPB_INLINE struct google_protobuf_Any * envoy_config_listener_v3_UdpListenerConfig_mutable_typed_config(envoy_config_listener_v3_UdpListenerConfig *msg, upb_arena *arena)
Definition: udp_listener_config.upb.h:69
envoy_config_listener_v3_UdpListenerConfig_config_type_oneofcases
Definition: udp_listener_config.upb.h:53
@ envoy_config_listener_v3_UdpListenerConfig_config_type_NOT_SET
Definition: udp_listener_config.upb.h:55
@ envoy_config_listener_v3_UdpListenerConfig_config_type_typed_config
Definition: udp_listener_config.upb.h:54
struct envoy_config_listener_v3_UdpListenerConfig envoy_config_listener_v3_UdpListenerConfig
Definition: udp_listener_config.upb.h:25
UPB_INLINE char * envoy_config_listener_v3_UdpListenerConfig_serialize(const envoy_config_listener_v3_UdpListenerConfig *msg, upb_arena *arena, size_t *len)
Definition: udp_listener_config.upb.h:49
UPB_INLINE bool envoy_config_listener_v3_UdpListenerConfig_has_typed_config(const envoy_config_listener_v3_UdpListenerConfig *msg)
Definition: udp_listener_config.upb.h:60
UPB_INLINE envoy_config_listener_v3_ActiveRawUdpListenerConfig * envoy_config_listener_v3_ActiveRawUdpListenerConfig_new(upb_arena *arena)
Definition: udp_listener_config.upb.h:81
UPB_INLINE void envoy_config_listener_v3_UdpListenerConfig_set_typed_config(envoy_config_listener_v3_UdpListenerConfig *msg, struct google_protobuf_Any *value)
Definition: udp_listener_config.upb.h:66
UPB_INLINE void envoy_config_listener_v3_UdpListenerConfig_set_udp_listener_name(envoy_config_listener_v3_UdpListenerConfig *msg, upb_strview value)
Definition: udp_listener_config.upb.h:63
UPB_INLINE envoy_config_listener_v3_UdpListenerConfig * envoy_config_listener_v3_UdpListenerConfig_new(upb_arena *arena)
Definition: udp_listener_config.upb.h:35
UPB_INLINE upb_strview envoy_config_listener_v3_UdpListenerConfig_udp_listener_name(const envoy_config_listener_v3_UdpListenerConfig *msg)
Definition: udp_listener_config.upb.h:59
UPB_INLINE char * envoy_config_listener_v3_ActiveRawUdpListenerConfig_serialize(const envoy_config_listener_v3_ActiveRawUdpListenerConfig *msg, upb_arena *arena, size_t *len)
Definition: udp_listener_config.upb.h:95
UPB_INLINE envoy_config_listener_v3_ActiveRawUdpListenerConfig * envoy_config_listener_v3_ActiveRawUdpListenerConfig_parse(const char *buf, size_t size, upb_arena *arena)
Definition: udp_listener_config.upb.h:84
const upb_msglayout google_protobuf_Any_msginit
Definition: any.upb.c:20
UPB_INLINE envoy_config_listener_v3_UdpListenerConfig_config_type_oneofcases envoy_config_listener_v3_UdpListenerConfig_config_type_case(const envoy_config_listener_v3_UdpListenerConfig *msg)
Definition: udp_listener_config.upb.h:57
UPB_INLINE envoy_config_listener_v3_ActiveRawUdpListenerConfig * envoy_config_listener_v3_ActiveRawUdpListenerConfig_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: udp_listener_config.upb.h:89
upb_arena * arena
Definition: xds_api.cc:909