1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * envoy/config/core/v3/proxy_protocol.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef ENVOY_CONFIG_CORE_V3_PROXY_PROTOCOL_PROTO_UPB_H_
10 #define ENVOY_CONFIG_CORE_V3_PROXY_PROTOCOL_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_ProxyProtocolConfig;
24 typedef struct envoy_config_core_v3_ProxyProtocolConfig envoy_config_core_v3_ProxyProtocolConfig;
25 extern const upb_msglayout envoy_config_core_v3_ProxyProtocolConfig_msginit;
26
27 typedef enum {
28 envoy_config_core_v3_ProxyProtocolConfig_V1 = 0,
29 envoy_config_core_v3_ProxyProtocolConfig_V2 = 1
30 } envoy_config_core_v3_ProxyProtocolConfig_Version;
31
32
33 /* envoy.config.core.v3.ProxyProtocolConfig */
34
envoy_config_core_v3_ProxyProtocolConfig_new(upb_arena * arena)35 UPB_INLINE envoy_config_core_v3_ProxyProtocolConfig *envoy_config_core_v3_ProxyProtocolConfig_new(upb_arena *arena) {
36 return (envoy_config_core_v3_ProxyProtocolConfig *)_upb_msg_new(&envoy_config_core_v3_ProxyProtocolConfig_msginit, arena);
37 }
envoy_config_core_v3_ProxyProtocolConfig_parse(const char * buf,size_t size,upb_arena * arena)38 UPB_INLINE envoy_config_core_v3_ProxyProtocolConfig *envoy_config_core_v3_ProxyProtocolConfig_parse(const char *buf, size_t size,
39 upb_arena *arena) {
40 envoy_config_core_v3_ProxyProtocolConfig *ret = envoy_config_core_v3_ProxyProtocolConfig_new(arena);
41 return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_ProxyProtocolConfig_msginit, arena)) ? ret : NULL;
42 }
envoy_config_core_v3_ProxyProtocolConfig_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)43 UPB_INLINE envoy_config_core_v3_ProxyProtocolConfig *envoy_config_core_v3_ProxyProtocolConfig_parse_ex(const char *buf, size_t size,
44 upb_arena *arena, int options) {
45 envoy_config_core_v3_ProxyProtocolConfig *ret = envoy_config_core_v3_ProxyProtocolConfig_new(arena);
46 return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_ProxyProtocolConfig_msginit, arena, options))
47 ? ret : NULL;
48 }
envoy_config_core_v3_ProxyProtocolConfig_serialize(const envoy_config_core_v3_ProxyProtocolConfig * msg,upb_arena * arena,size_t * len)49 UPB_INLINE char *envoy_config_core_v3_ProxyProtocolConfig_serialize(const envoy_config_core_v3_ProxyProtocolConfig *msg, upb_arena *arena, size_t *len) {
50 return upb_encode(msg, &envoy_config_core_v3_ProxyProtocolConfig_msginit, arena, len);
51 }
52
envoy_config_core_v3_ProxyProtocolConfig_version(const envoy_config_core_v3_ProxyProtocolConfig * msg)53 UPB_INLINE int32_t envoy_config_core_v3_ProxyProtocolConfig_version(const envoy_config_core_v3_ProxyProtocolConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
54
envoy_config_core_v3_ProxyProtocolConfig_set_version(envoy_config_core_v3_ProxyProtocolConfig * msg,int32_t value)55 UPB_INLINE void envoy_config_core_v3_ProxyProtocolConfig_set_version(envoy_config_core_v3_ProxyProtocolConfig *msg, int32_t value) {
56 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
57 }
58
59 #ifdef __cplusplus
60 } /* extern "C" */
61 #endif
62
63 #include "upb/port_undef.inc"
64
65 #endif /* ENVOY_CONFIG_CORE_V3_PROXY_PROTOCOL_PROTO_UPB_H_ */
66