GRPC Core  18.0.0
value.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/type/matcher/v3/value.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef ENVOY_TYPE_MATCHER_V3_VALUE_PROTO_UPB_H_
10 #define ENVOY_TYPE_MATCHER_V3_VALUE_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 extern const upb_msglayout envoy_type_matcher_v3_ValueMatcher_msginit;
31 extern const upb_msglayout envoy_type_matcher_v3_ListMatcher_msginit;
34 extern const upb_msglayout envoy_type_matcher_v3_DoubleMatcher_msginit;
35 extern const upb_msglayout envoy_type_matcher_v3_StringMatcher_msginit;
36 
37 
38 /* envoy.type.matcher.v3.ValueMatcher */
39 
42 }
44  upb_arena *arena) {
46  return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_ValueMatcher_msginit, arena)) ? ret : NULL;
47 }
49  upb_arena *arena, int options) {
51  return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_ValueMatcher_msginit, arena, options))
52  ? ret : NULL;
53 }
54 UPB_INLINE char *envoy_type_matcher_v3_ValueMatcher_serialize(const envoy_type_matcher_v3_ValueMatcher *msg, upb_arena *arena, size_t *len) {
55  return upb_encode(msg, &envoy_type_matcher_v3_ValueMatcher_msginit, arena, len);
56 }
57 
58 typedef enum {
68 
69 UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_has_null_match(const envoy_type_matcher_v3_ValueMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
70 UPB_INLINE const envoy_type_matcher_v3_ValueMatcher_NullMatch* envoy_type_matcher_v3_ValueMatcher_null_match(const envoy_type_matcher_v3_ValueMatcher *msg) { return UPB_READ_ONEOF(msg, const envoy_type_matcher_v3_ValueMatcher_NullMatch*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
71 UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_has_double_match(const envoy_type_matcher_v3_ValueMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; }
72 UPB_INLINE const struct envoy_type_matcher_v3_DoubleMatcher* envoy_type_matcher_v3_ValueMatcher_double_match(const envoy_type_matcher_v3_ValueMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_DoubleMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
73 UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_has_string_match(const envoy_type_matcher_v3_ValueMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; }
74 UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* envoy_type_matcher_v3_ValueMatcher_string_match(const envoy_type_matcher_v3_ValueMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_StringMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); }
75 UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_has_bool_match(const envoy_type_matcher_v3_ValueMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 4; }
76 UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_bool_match(const envoy_type_matcher_v3_ValueMatcher *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, false); }
77 UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_has_present_match(const envoy_type_matcher_v3_ValueMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 5; }
78 UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_present_match(const envoy_type_matcher_v3_ValueMatcher *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 5, false); }
79 UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_has_list_match(const envoy_type_matcher_v3_ValueMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 6; }
80 UPB_INLINE const envoy_type_matcher_v3_ListMatcher* envoy_type_matcher_v3_ValueMatcher_list_match(const envoy_type_matcher_v3_ValueMatcher *msg) { return UPB_READ_ONEOF(msg, const envoy_type_matcher_v3_ListMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 6, NULL); }
81 
83  UPB_WRITE_ONEOF(msg, envoy_type_matcher_v3_ValueMatcher_NullMatch*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
84 }
87  if (sub == NULL) {
89  if (!sub) return NULL;
91  }
92  return sub;
93 }
95  UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_DoubleMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
96 }
99  if (sub == NULL) {
101  if (!sub) return NULL;
103  }
104  return sub;
105 }
107  UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_StringMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3);
108 }
111  if (sub == NULL) {
113  if (!sub) return NULL;
115  }
116  return sub;
117 }
119  UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 4);
120 }
122  UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 5);
123 }
125  UPB_WRITE_ONEOF(msg, envoy_type_matcher_v3_ListMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 6);
126 }
129  if (sub == NULL) {
131  if (!sub) return NULL;
133  }
134  return sub;
135 }
136 
137 /* envoy.type.matcher.v3.ValueMatcher.NullMatch */
138 
141 }
143  upb_arena *arena) {
145  return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_ValueMatcher_NullMatch_msginit, arena)) ? ret : NULL;
146 }
148  upb_arena *arena, int options) {
150  return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_ValueMatcher_NullMatch_msginit, arena, options))
151  ? ret : NULL;
152 }
154  return upb_encode(msg, &envoy_type_matcher_v3_ValueMatcher_NullMatch_msginit, arena, len);
155 }
156 
157 
158 
159 /* envoy.type.matcher.v3.ListMatcher */
160 
163 }
165  upb_arena *arena) {
167  return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_ListMatcher_msginit, arena)) ? ret : NULL;
168 }
170  upb_arena *arena, int options) {
172  return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_ListMatcher_msginit, arena, options))
173  ? ret : NULL;
174 }
175 UPB_INLINE char *envoy_type_matcher_v3_ListMatcher_serialize(const envoy_type_matcher_v3_ListMatcher *msg, upb_arena *arena, size_t *len) {
176  return upb_encode(msg, &envoy_type_matcher_v3_ListMatcher_msginit, arena, len);
177 }
178 
179 typedef enum {
184 
185 UPB_INLINE bool envoy_type_matcher_v3_ListMatcher_has_one_of(const envoy_type_matcher_v3_ListMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
186 UPB_INLINE const envoy_type_matcher_v3_ValueMatcher* envoy_type_matcher_v3_ListMatcher_one_of(const envoy_type_matcher_v3_ListMatcher *msg) { return UPB_READ_ONEOF(msg, const envoy_type_matcher_v3_ValueMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
187 
189  UPB_WRITE_ONEOF(msg, envoy_type_matcher_v3_ValueMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
190 }
193  if (sub == NULL) {
195  if (!sub) return NULL;
197  }
198  return sub;
199 }
200 
201 #ifdef __cplusplus
202 } /* extern "C" */
203 #endif
204 
205 #include "upb/port_undef.inc"
206 
207 #endif /* ENVOY_TYPE_MATCHER_V3_VALUE_PROTO_UPB_H_ */
struct envoy_type_matcher_v3_DoubleMatcher envoy_type_matcher_v3_DoubleMatcher
Definition: number.upb.h:24
struct envoy_type_matcher_v3_StringMatcher envoy_type_matcher_v3_StringMatcher
Definition: string.upb.h:25
UPB_INLINE void envoy_type_matcher_v3_ValueMatcher_set_list_match(envoy_type_matcher_v3_ValueMatcher *msg, envoy_type_matcher_v3_ListMatcher *value)
Definition: value.upb.h:124
UPB_INLINE envoy_type_matcher_v3_ValueMatcher * envoy_type_matcher_v3_ValueMatcher_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: value.upb.h:48
UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_has_double_match(const envoy_type_matcher_v3_ValueMatcher *msg)
Definition: value.upb.h:71
UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_present_match(const envoy_type_matcher_v3_ValueMatcher *msg)
Definition: value.upb.h:78
UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_has_null_match(const envoy_type_matcher_v3_ValueMatcher *msg)
Definition: value.upb.h:69
UPB_INLINE envoy_type_matcher_v3_ListMatcher * envoy_type_matcher_v3_ListMatcher_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: value.upb.h:169
const upb_msglayout envoy_type_matcher_v3_ValueMatcher_msginit
Definition: value.upb.c:36
UPB_INLINE bool envoy_type_matcher_v3_ListMatcher_has_one_of(const envoy_type_matcher_v3_ListMatcher *msg)
Definition: value.upb.h:185
const upb_msglayout envoy_type_matcher_v3_StringMatcher_msginit
Definition: string.upb.c:32
UPB_INLINE char * envoy_type_matcher_v3_ValueMatcher_NullMatch_serialize(const envoy_type_matcher_v3_ValueMatcher_NullMatch *msg, upb_arena *arena, size_t *len)
Definition: value.upb.h:153
UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_has_bool_match(const envoy_type_matcher_v3_ValueMatcher *msg)
Definition: value.upb.h:75
UPB_INLINE const envoy_type_matcher_v3_ValueMatcher * envoy_type_matcher_v3_ListMatcher_one_of(const envoy_type_matcher_v3_ListMatcher *msg)
Definition: value.upb.h:186
UPB_INLINE envoy_type_matcher_v3_ValueMatcher * envoy_type_matcher_v3_ValueMatcher_new(upb_arena *arena)
Definition: value.upb.h:40
UPB_INLINE void envoy_type_matcher_v3_ValueMatcher_set_null_match(envoy_type_matcher_v3_ValueMatcher *msg, envoy_type_matcher_v3_ValueMatcher_NullMatch *value)
Definition: value.upb.h:82
UPB_INLINE char * envoy_type_matcher_v3_ListMatcher_serialize(const envoy_type_matcher_v3_ListMatcher *msg, upb_arena *arena, size_t *len)
Definition: value.upb.h:175
UPB_INLINE void envoy_type_matcher_v3_ValueMatcher_set_bool_match(envoy_type_matcher_v3_ValueMatcher *msg, bool value)
Definition: value.upb.h:118
UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_bool_match(const envoy_type_matcher_v3_ValueMatcher *msg)
Definition: value.upb.h:76
UPB_INLINE struct envoy_type_matcher_v3_DoubleMatcher * envoy_type_matcher_v3_ValueMatcher_mutable_double_match(envoy_type_matcher_v3_ValueMatcher *msg, upb_arena *arena)
Definition: value.upb.h:97
UPB_INLINE envoy_type_matcher_v3_ValueMatcher_NullMatch * envoy_type_matcher_v3_ValueMatcher_NullMatch_new(upb_arena *arena)
Definition: value.upb.h:139
UPB_INLINE envoy_type_matcher_v3_ListMatcher * envoy_type_matcher_v3_ListMatcher_new(upb_arena *arena)
Definition: value.upb.h:161
const upb_msglayout envoy_type_matcher_v3_ValueMatcher_NullMatch_msginit
Definition: value.upb.c:42
envoy_type_matcher_v3_ListMatcher_match_pattern_oneofcases
Definition: value.upb.h:179
@ envoy_type_matcher_v3_ListMatcher_match_pattern_NOT_SET
Definition: value.upb.h:181
@ envoy_type_matcher_v3_ListMatcher_match_pattern_one_of
Definition: value.upb.h:180
struct envoy_type_matcher_v3_ValueMatcher envoy_type_matcher_v3_ValueMatcher
Definition: value.upb.h:26
UPB_INLINE const struct envoy_type_matcher_v3_DoubleMatcher * envoy_type_matcher_v3_ValueMatcher_double_match(const envoy_type_matcher_v3_ValueMatcher *msg)
Definition: value.upb.h:72
UPB_INLINE void envoy_type_matcher_v3_ListMatcher_set_one_of(envoy_type_matcher_v3_ListMatcher *msg, envoy_type_matcher_v3_ValueMatcher *value)
Definition: value.upb.h:188
UPB_INLINE struct envoy_type_matcher_v3_ValueMatcher_NullMatch * envoy_type_matcher_v3_ValueMatcher_mutable_null_match(envoy_type_matcher_v3_ValueMatcher *msg, upb_arena *arena)
Definition: value.upb.h:85
UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_has_string_match(const envoy_type_matcher_v3_ValueMatcher *msg)
Definition: value.upb.h:73
UPB_INLINE char * envoy_type_matcher_v3_ValueMatcher_serialize(const envoy_type_matcher_v3_ValueMatcher *msg, upb_arena *arena, size_t *len)
Definition: value.upb.h:54
struct envoy_type_matcher_v3_ListMatcher envoy_type_matcher_v3_ListMatcher
Definition: value.upb.h:28
UPB_INLINE void envoy_type_matcher_v3_ValueMatcher_set_double_match(envoy_type_matcher_v3_ValueMatcher *msg, struct envoy_type_matcher_v3_DoubleMatcher *value)
Definition: value.upb.h:94
UPB_INLINE struct envoy_type_matcher_v3_ValueMatcher * envoy_type_matcher_v3_ListMatcher_mutable_one_of(envoy_type_matcher_v3_ListMatcher *msg, upb_arena *arena)
Definition: value.upb.h:191
const upb_msglayout envoy_type_matcher_v3_ListMatcher_msginit
Definition: value.upb.c:56
UPB_INLINE void envoy_type_matcher_v3_ValueMatcher_set_present_match(envoy_type_matcher_v3_ValueMatcher *msg, bool value)
Definition: value.upb.h:121
UPB_INLINE envoy_type_matcher_v3_ValueMatcher_NullMatch * envoy_type_matcher_v3_ValueMatcher_NullMatch_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: value.upb.h:147
UPB_INLINE envoy_type_matcher_v3_ValueMatcher * envoy_type_matcher_v3_ValueMatcher_parse(const char *buf, size_t size, upb_arena *arena)
Definition: value.upb.h:43
UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_has_list_match(const envoy_type_matcher_v3_ValueMatcher *msg)
Definition: value.upb.h:79
UPB_INLINE envoy_type_matcher_v3_ListMatcher_match_pattern_oneofcases envoy_type_matcher_v3_ListMatcher_match_pattern_case(const envoy_type_matcher_v3_ListMatcher *msg)
Definition: value.upb.h:183
UPB_INLINE const envoy_type_matcher_v3_ListMatcher * envoy_type_matcher_v3_ValueMatcher_list_match(const envoy_type_matcher_v3_ValueMatcher *msg)
Definition: value.upb.h:80
UPB_INLINE const envoy_type_matcher_v3_ValueMatcher_NullMatch * envoy_type_matcher_v3_ValueMatcher_null_match(const envoy_type_matcher_v3_ValueMatcher *msg)
Definition: value.upb.h:70
UPB_INLINE envoy_type_matcher_v3_ListMatcher * envoy_type_matcher_v3_ListMatcher_parse(const char *buf, size_t size, upb_arena *arena)
Definition: value.upb.h:164
UPB_INLINE bool envoy_type_matcher_v3_ValueMatcher_has_present_match(const envoy_type_matcher_v3_ValueMatcher *msg)
Definition: value.upb.h:77
UPB_INLINE envoy_type_matcher_v3_ValueMatcher_match_pattern_oneofcases envoy_type_matcher_v3_ValueMatcher_match_pattern_case(const envoy_type_matcher_v3_ValueMatcher *msg)
Definition: value.upb.h:67
envoy_type_matcher_v3_ValueMatcher_match_pattern_oneofcases
Definition: value.upb.h:58
@ envoy_type_matcher_v3_ValueMatcher_match_pattern_double_match
Definition: value.upb.h:60
@ envoy_type_matcher_v3_ValueMatcher_match_pattern_bool_match
Definition: value.upb.h:62
@ envoy_type_matcher_v3_ValueMatcher_match_pattern_list_match
Definition: value.upb.h:64
@ envoy_type_matcher_v3_ValueMatcher_match_pattern_null_match
Definition: value.upb.h:59
@ envoy_type_matcher_v3_ValueMatcher_match_pattern_string_match
Definition: value.upb.h:61
@ envoy_type_matcher_v3_ValueMatcher_match_pattern_NOT_SET
Definition: value.upb.h:65
@ envoy_type_matcher_v3_ValueMatcher_match_pattern_present_match
Definition: value.upb.h:63
UPB_INLINE envoy_type_matcher_v3_ValueMatcher_NullMatch * envoy_type_matcher_v3_ValueMatcher_NullMatch_parse(const char *buf, size_t size, upb_arena *arena)
Definition: value.upb.h:142
UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher * envoy_type_matcher_v3_ValueMatcher_string_match(const envoy_type_matcher_v3_ValueMatcher *msg)
Definition: value.upb.h:74
UPB_INLINE void envoy_type_matcher_v3_ValueMatcher_set_string_match(envoy_type_matcher_v3_ValueMatcher *msg, struct envoy_type_matcher_v3_StringMatcher *value)
Definition: value.upb.h:106
struct envoy_type_matcher_v3_ValueMatcher_NullMatch envoy_type_matcher_v3_ValueMatcher_NullMatch
Definition: value.upb.h:27
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher * envoy_type_matcher_v3_ValueMatcher_mutable_string_match(envoy_type_matcher_v3_ValueMatcher *msg, upb_arena *arena)
Definition: value.upb.h:109
UPB_INLINE struct envoy_type_matcher_v3_ListMatcher * envoy_type_matcher_v3_ValueMatcher_mutable_list_match(envoy_type_matcher_v3_ValueMatcher *msg, upb_arena *arena)
Definition: value.upb.h:127
const upb_msglayout envoy_type_matcher_v3_DoubleMatcher_msginit
Definition: number.upb.c:28
upb_arena * arena
Definition: xds_api.cc:909