Imported Upstream version 1.41.0
[platform/upstream/grpc.git] / src / core / ext / upb-generated / envoy / config / listener / v3 / api_listener.upb.h
1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  *     envoy/config/listener/v3/api_listener.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8
9 #ifndef ENVOY_CONFIG_LISTENER_V3_API_LISTENER_PROTO_UPB_H_
10 #define ENVOY_CONFIG_LISTENER_V3_API_LISTENER_PROTO_UPB_H_
11
12 #include "upb/msg_internal.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_listener_v3_ApiListener;
24 typedef struct envoy_config_listener_v3_ApiListener envoy_config_listener_v3_ApiListener;
25 extern const upb_msglayout envoy_config_listener_v3_ApiListener_msginit;
26 struct google_protobuf_Any;
27 extern const upb_msglayout google_protobuf_Any_msginit;
28
29
30 /* envoy.config.listener.v3.ApiListener */
31
32 UPB_INLINE envoy_config_listener_v3_ApiListener *envoy_config_listener_v3_ApiListener_new(upb_arena *arena) {
33   return (envoy_config_listener_v3_ApiListener *)_upb_msg_new(&envoy_config_listener_v3_ApiListener_msginit, arena);
34 }
35 UPB_INLINE envoy_config_listener_v3_ApiListener *envoy_config_listener_v3_ApiListener_parse(const char *buf, size_t size,
36                         upb_arena *arena) {
37   envoy_config_listener_v3_ApiListener *ret = envoy_config_listener_v3_ApiListener_new(arena);
38   if (!ret) return NULL;
39   if (!upb_decode(buf, size, ret, &envoy_config_listener_v3_ApiListener_msginit, arena)) return NULL;
40   return ret;
41 }
42 UPB_INLINE envoy_config_listener_v3_ApiListener *envoy_config_listener_v3_ApiListener_parse_ex(const char *buf, size_t size,
43                            const upb_extreg *extreg, int options,
44                            upb_arena *arena) {
45   envoy_config_listener_v3_ApiListener *ret = envoy_config_listener_v3_ApiListener_new(arena);
46   if (!ret) return NULL;
47   if (!_upb_decode(buf, size, ret, &envoy_config_listener_v3_ApiListener_msginit, extreg, options, arena)) {
48     return NULL;
49   }
50   return ret;
51 }
52 UPB_INLINE char *envoy_config_listener_v3_ApiListener_serialize(const envoy_config_listener_v3_ApiListener *msg, upb_arena *arena, size_t *len) {
53   return upb_encode(msg, &envoy_config_listener_v3_ApiListener_msginit, arena, len);
54 }
55
56 UPB_INLINE bool envoy_config_listener_v3_ApiListener_has_api_listener(const envoy_config_listener_v3_ApiListener *msg) { return _upb_hasbit(msg, 1); }
57 UPB_INLINE const struct google_protobuf_Any* envoy_config_listener_v3_ApiListener_api_listener(const envoy_config_listener_v3_ApiListener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Any*); }
58
59 UPB_INLINE void envoy_config_listener_v3_ApiListener_set_api_listener(envoy_config_listener_v3_ApiListener *msg, struct google_protobuf_Any* value) {
60   _upb_sethas(msg, 1);
61   *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Any*) = value;
62 }
63 UPB_INLINE struct google_protobuf_Any* envoy_config_listener_v3_ApiListener_mutable_api_listener(envoy_config_listener_v3_ApiListener *msg, upb_arena *arena) {
64   struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_listener_v3_ApiListener_api_listener(msg);
65   if (sub == NULL) {
66     sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
67     if (!sub) return NULL;
68     envoy_config_listener_v3_ApiListener_set_api_listener(msg, sub);
69   }
70   return sub;
71 }
72
73 #ifdef __cplusplus
74 }  /* extern "C" */
75 #endif
76
77 #include "upb/port_undef.inc"
78
79 #endif  /* ENVOY_CONFIG_LISTENER_V3_API_LISTENER_PROTO_UPB_H_ */