1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * envoy/config/trace/v3/http_tracer.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef ENVOY_CONFIG_TRACE_V3_HTTP_TRACER_PROTO_UPB_H_
10 #define ENVOY_CONFIG_TRACE_V3_HTTP_TRACER_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_trace_v3_Tracing;
24 struct envoy_config_trace_v3_Tracing_Http;
25 typedef struct envoy_config_trace_v3_Tracing envoy_config_trace_v3_Tracing;
26 typedef struct envoy_config_trace_v3_Tracing_Http envoy_config_trace_v3_Tracing_Http;
27 extern const upb_msglayout envoy_config_trace_v3_Tracing_msginit;
28 extern const upb_msglayout envoy_config_trace_v3_Tracing_Http_msginit;
29 struct google_protobuf_Any;
30 extern const upb_msglayout google_protobuf_Any_msginit;
31
32
33 /* envoy.config.trace.v3.Tracing */
34
envoy_config_trace_v3_Tracing_new(upb_arena * arena)35 UPB_INLINE envoy_config_trace_v3_Tracing *envoy_config_trace_v3_Tracing_new(upb_arena *arena) {
36 return (envoy_config_trace_v3_Tracing *)_upb_msg_new(&envoy_config_trace_v3_Tracing_msginit, arena);
37 }
envoy_config_trace_v3_Tracing_parse(const char * buf,size_t size,upb_arena * arena)38 UPB_INLINE envoy_config_trace_v3_Tracing *envoy_config_trace_v3_Tracing_parse(const char *buf, size_t size,
39 upb_arena *arena) {
40 envoy_config_trace_v3_Tracing *ret = envoy_config_trace_v3_Tracing_new(arena);
41 return (ret && upb_decode(buf, size, ret, &envoy_config_trace_v3_Tracing_msginit, arena)) ? ret : NULL;
42 }
envoy_config_trace_v3_Tracing_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)43 UPB_INLINE envoy_config_trace_v3_Tracing *envoy_config_trace_v3_Tracing_parse_ex(const char *buf, size_t size,
44 upb_arena *arena, int options) {
45 envoy_config_trace_v3_Tracing *ret = envoy_config_trace_v3_Tracing_new(arena);
46 return (ret && _upb_decode(buf, size, ret, &envoy_config_trace_v3_Tracing_msginit, arena, options))
47 ? ret : NULL;
48 }
envoy_config_trace_v3_Tracing_serialize(const envoy_config_trace_v3_Tracing * msg,upb_arena * arena,size_t * len)49 UPB_INLINE char *envoy_config_trace_v3_Tracing_serialize(const envoy_config_trace_v3_Tracing *msg, upb_arena *arena, size_t *len) {
50 return upb_encode(msg, &envoy_config_trace_v3_Tracing_msginit, arena, len);
51 }
52
envoy_config_trace_v3_Tracing_has_http(const envoy_config_trace_v3_Tracing * msg)53 UPB_INLINE bool envoy_config_trace_v3_Tracing_has_http(const envoy_config_trace_v3_Tracing *msg) { return _upb_hasbit(msg, 1); }
envoy_config_trace_v3_Tracing_http(const envoy_config_trace_v3_Tracing * msg)54 UPB_INLINE const envoy_config_trace_v3_Tracing_Http* envoy_config_trace_v3_Tracing_http(const envoy_config_trace_v3_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const envoy_config_trace_v3_Tracing_Http*); }
55
envoy_config_trace_v3_Tracing_set_http(envoy_config_trace_v3_Tracing * msg,envoy_config_trace_v3_Tracing_Http * value)56 UPB_INLINE void envoy_config_trace_v3_Tracing_set_http(envoy_config_trace_v3_Tracing *msg, envoy_config_trace_v3_Tracing_Http* value) {
57 _upb_sethas(msg, 1);
58 *UPB_PTR_AT(msg, UPB_SIZE(4, 8), envoy_config_trace_v3_Tracing_Http*) = value;
59 }
envoy_config_trace_v3_Tracing_mutable_http(envoy_config_trace_v3_Tracing * msg,upb_arena * arena)60 UPB_INLINE struct envoy_config_trace_v3_Tracing_Http* envoy_config_trace_v3_Tracing_mutable_http(envoy_config_trace_v3_Tracing *msg, upb_arena *arena) {
61 struct envoy_config_trace_v3_Tracing_Http* sub = (struct envoy_config_trace_v3_Tracing_Http*)envoy_config_trace_v3_Tracing_http(msg);
62 if (sub == NULL) {
63 sub = (struct envoy_config_trace_v3_Tracing_Http*)_upb_msg_new(&envoy_config_trace_v3_Tracing_Http_msginit, arena);
64 if (!sub) return NULL;
65 envoy_config_trace_v3_Tracing_set_http(msg, sub);
66 }
67 return sub;
68 }
69
70 /* envoy.config.trace.v3.Tracing.Http */
71
envoy_config_trace_v3_Tracing_Http_new(upb_arena * arena)72 UPB_INLINE envoy_config_trace_v3_Tracing_Http *envoy_config_trace_v3_Tracing_Http_new(upb_arena *arena) {
73 return (envoy_config_trace_v3_Tracing_Http *)_upb_msg_new(&envoy_config_trace_v3_Tracing_Http_msginit, arena);
74 }
envoy_config_trace_v3_Tracing_Http_parse(const char * buf,size_t size,upb_arena * arena)75 UPB_INLINE envoy_config_trace_v3_Tracing_Http *envoy_config_trace_v3_Tracing_Http_parse(const char *buf, size_t size,
76 upb_arena *arena) {
77 envoy_config_trace_v3_Tracing_Http *ret = envoy_config_trace_v3_Tracing_Http_new(arena);
78 return (ret && upb_decode(buf, size, ret, &envoy_config_trace_v3_Tracing_Http_msginit, arena)) ? ret : NULL;
79 }
envoy_config_trace_v3_Tracing_Http_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)80 UPB_INLINE envoy_config_trace_v3_Tracing_Http *envoy_config_trace_v3_Tracing_Http_parse_ex(const char *buf, size_t size,
81 upb_arena *arena, int options) {
82 envoy_config_trace_v3_Tracing_Http *ret = envoy_config_trace_v3_Tracing_Http_new(arena);
83 return (ret && _upb_decode(buf, size, ret, &envoy_config_trace_v3_Tracing_Http_msginit, arena, options))
84 ? ret : NULL;
85 }
envoy_config_trace_v3_Tracing_Http_serialize(const envoy_config_trace_v3_Tracing_Http * msg,upb_arena * arena,size_t * len)86 UPB_INLINE char *envoy_config_trace_v3_Tracing_Http_serialize(const envoy_config_trace_v3_Tracing_Http *msg, upb_arena *arena, size_t *len) {
87 return upb_encode(msg, &envoy_config_trace_v3_Tracing_Http_msginit, arena, len);
88 }
89
90 typedef enum {
91 envoy_config_trace_v3_Tracing_Http_config_type_typed_config = 3,
92 envoy_config_trace_v3_Tracing_Http_config_type_NOT_SET = 0
93 } envoy_config_trace_v3_Tracing_Http_config_type_oneofcases;
envoy_config_trace_v3_Tracing_Http_config_type_case(const envoy_config_trace_v3_Tracing_Http * msg)94 UPB_INLINE envoy_config_trace_v3_Tracing_Http_config_type_oneofcases envoy_config_trace_v3_Tracing_Http_config_type_case(const envoy_config_trace_v3_Tracing_Http* msg) { return (envoy_config_trace_v3_Tracing_Http_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); }
95
envoy_config_trace_v3_Tracing_Http_name(const envoy_config_trace_v3_Tracing_Http * msg)96 UPB_INLINE upb_strview envoy_config_trace_v3_Tracing_Http_name(const envoy_config_trace_v3_Tracing_Http *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
envoy_config_trace_v3_Tracing_Http_has_typed_config(const envoy_config_trace_v3_Tracing_Http * msg)97 UPB_INLINE bool envoy_config_trace_v3_Tracing_Http_has_typed_config(const envoy_config_trace_v3_Tracing_Http *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; }
envoy_config_trace_v3_Tracing_Http_typed_config(const envoy_config_trace_v3_Tracing_Http * msg)98 UPB_INLINE const struct google_protobuf_Any* envoy_config_trace_v3_Tracing_Http_typed_config(const envoy_config_trace_v3_Tracing_Http *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
99
envoy_config_trace_v3_Tracing_Http_set_name(envoy_config_trace_v3_Tracing_Http * msg,upb_strview value)100 UPB_INLINE void envoy_config_trace_v3_Tracing_Http_set_name(envoy_config_trace_v3_Tracing_Http *msg, upb_strview value) {
101 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
102 }
envoy_config_trace_v3_Tracing_Http_set_typed_config(envoy_config_trace_v3_Tracing_Http * msg,struct google_protobuf_Any * value)103 UPB_INLINE void envoy_config_trace_v3_Tracing_Http_set_typed_config(envoy_config_trace_v3_Tracing_Http *msg, struct google_protobuf_Any* value) {
104 UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
105 }
envoy_config_trace_v3_Tracing_Http_mutable_typed_config(envoy_config_trace_v3_Tracing_Http * msg,upb_arena * arena)106 UPB_INLINE struct google_protobuf_Any* envoy_config_trace_v3_Tracing_Http_mutable_typed_config(envoy_config_trace_v3_Tracing_Http *msg, upb_arena *arena) {
107 struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_trace_v3_Tracing_Http_typed_config(msg);
108 if (sub == NULL) {
109 sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
110 if (!sub) return NULL;
111 envoy_config_trace_v3_Tracing_Http_set_typed_config(msg, sub);
112 }
113 return sub;
114 }
115
116 #ifdef __cplusplus
117 } /* extern "C" */
118 #endif
119
120 #include "upb/port_undef.inc"
121
122 #endif /* ENVOY_CONFIG_TRACE_V3_HTTP_TRACER_PROTO_UPB_H_ */
123