GRPC C++  1.39.1
regex.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/regex.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef ENVOY_TYPE_MATCHER_V3_REGEX_PROTO_UPB_H_
10 #define ENVOY_TYPE_MATCHER_V3_REGEX_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_RegexMatcher_msginit;
33 extern const upb_msglayout google_protobuf_UInt32Value_msginit;
34 
35 
36 /* envoy.type.matcher.v3.RegexMatcher */
37 
40 }
42  upb_arena *arena) {
44  return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_RegexMatcher_msginit, arena)) ? ret : NULL;
45 }
47  upb_arena *arena, int options) {
49  return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_RegexMatcher_msginit, arena, options))
50  ? ret : NULL;
51 }
52 UPB_INLINE char *envoy_type_matcher_v3_RegexMatcher_serialize(const envoy_type_matcher_v3_RegexMatcher *msg, upb_arena *arena, size_t *len) {
53  return upb_encode(msg, &envoy_type_matcher_v3_RegexMatcher_msginit, arena, len);
54 }
55 
56 typedef enum {
61 
62 UPB_INLINE bool envoy_type_matcher_v3_RegexMatcher_has_google_re2(const envoy_type_matcher_v3_RegexMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 1; }
63 UPB_INLINE const envoy_type_matcher_v3_RegexMatcher_GoogleRE2* envoy_type_matcher_v3_RegexMatcher_google_re2(const envoy_type_matcher_v3_RegexMatcher *msg) { return UPB_READ_ONEOF(msg, const envoy_type_matcher_v3_RegexMatcher_GoogleRE2*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 1, NULL); }
64 UPB_INLINE upb_strview envoy_type_matcher_v3_RegexMatcher_regex(const envoy_type_matcher_v3_RegexMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
65 
67  UPB_WRITE_ONEOF(msg, envoy_type_matcher_v3_RegexMatcher_GoogleRE2*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 1);
68 }
71  if (sub == NULL) {
73  if (!sub) return NULL;
75  }
76  return sub;
77 }
79  *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
80 }
81 
82 /* envoy.type.matcher.v3.RegexMatcher.GoogleRE2 */
83 
86 }
88  upb_arena *arena) {
90  return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_RegexMatcher_GoogleRE2_msginit, arena)) ? ret : NULL;
91 }
93  upb_arena *arena, int options) {
95  return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_RegexMatcher_GoogleRE2_msginit, arena, options))
96  ? ret : NULL;
97 }
99  return upb_encode(msg, &envoy_type_matcher_v3_RegexMatcher_GoogleRE2_msginit, arena, len);
100 }
101 
104 
106  _upb_sethas(msg, 1);
107  *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
108 }
111  if (sub == NULL) {
113  if (!sub) return NULL;
115  }
116  return sub;
117 }
118 
119 /* envoy.type.matcher.v3.RegexMatchAndSubstitute */
120 
123 }
125  upb_arena *arena) {
127  return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_RegexMatchAndSubstitute_msginit, arena)) ? ret : NULL;
128 }
130  upb_arena *arena, int options) {
132  return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_RegexMatchAndSubstitute_msginit, arena, options))
133  ? ret : NULL;
134 }
136  return upb_encode(msg, &envoy_type_matcher_v3_RegexMatchAndSubstitute_msginit, arena, len);
137 }
138 
141 UPB_INLINE upb_strview envoy_type_matcher_v3_RegexMatchAndSubstitute_substitution(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
142 
144  _upb_sethas(msg, 1);
145  *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_type_matcher_v3_RegexMatcher*) = value;
146 }
149  if (sub == NULL) {
151  if (!sub) return NULL;
153  }
154  return sub;
155 }
157  *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
158 }
159 
160 #ifdef __cplusplus
161 } /* extern "C" */
162 #endif
163 
164 #include "upb/port_undef.inc"
165 
166 #endif /* ENVOY_TYPE_MATCHER_V3_REGEX_PROTO_UPB_H_ */
UPB_INLINE envoy_type_matcher_v3_RegexMatchAndSubstitute * envoy_type_matcher_v3_RegexMatchAndSubstitute_new(upb_arena *arena)
Definition: regex.upb.h:121
UPB_INLINE struct envoy_type_matcher_v3_RegexMatcher_GoogleRE2 * envoy_type_matcher_v3_RegexMatcher_mutable_google_re2(envoy_type_matcher_v3_RegexMatcher *msg, upb_arena *arena)
Definition: regex.upb.h:69
UPB_INLINE envoy_type_matcher_v3_RegexMatcher_GoogleRE2 * envoy_type_matcher_v3_RegexMatcher_GoogleRE2_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: regex.upb.h:92
UPB_INLINE envoy_type_matcher_v3_RegexMatcher_GoogleRE2 * envoy_type_matcher_v3_RegexMatcher_GoogleRE2_new(upb_arena *arena)
Definition: regex.upb.h:84
UPB_INLINE void envoy_type_matcher_v3_RegexMatcher_set_google_re2(envoy_type_matcher_v3_RegexMatcher *msg, envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *value)
Definition: regex.upb.h:66
UPB_INLINE const envoy_type_matcher_v3_RegexMatcher_GoogleRE2 * envoy_type_matcher_v3_RegexMatcher_google_re2(const envoy_type_matcher_v3_RegexMatcher *msg)
Definition: regex.upb.h:63
UPB_INLINE bool envoy_type_matcher_v3_RegexMatcher_has_google_re2(const envoy_type_matcher_v3_RegexMatcher *msg)
Definition: regex.upb.h:62
UPB_INLINE struct envoy_type_matcher_v3_RegexMatcher * envoy_type_matcher_v3_RegexMatchAndSubstitute_mutable_pattern(envoy_type_matcher_v3_RegexMatchAndSubstitute *msg, upb_arena *arena)
Definition: regex.upb.h:147
UPB_INLINE envoy_type_matcher_v3_RegexMatchAndSubstitute * envoy_type_matcher_v3_RegexMatchAndSubstitute_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: regex.upb.h:129
UPB_INLINE upb_strview envoy_type_matcher_v3_RegexMatchAndSubstitute_substitution(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg)
Definition: regex.upb.h:141
UPB_INLINE char * envoy_type_matcher_v3_RegexMatcher_GoogleRE2_serialize(const envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *msg, upb_arena *arena, size_t *len)
Definition: regex.upb.h:98
UPB_INLINE struct google_protobuf_UInt32Value * envoy_type_matcher_v3_RegexMatcher_GoogleRE2_mutable_max_program_size(envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *msg, upb_arena *arena)
Definition: regex.upb.h:109
UPB_INLINE bool envoy_type_matcher_v3_RegexMatcher_GoogleRE2_has_max_program_size(const envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *msg)
Definition: regex.upb.h:102
UPB_INLINE envoy_type_matcher_v3_RegexMatcher * envoy_type_matcher_v3_RegexMatcher_parse(const char *buf, size_t size, upb_arena *arena)
Definition: regex.upb.h:41
const upb_msglayout google_protobuf_UInt32Value_msginit
Definition: wrappers.upb.c:69
UPB_INLINE bool envoy_type_matcher_v3_RegexMatchAndSubstitute_has_pattern(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg)
Definition: regex.upb.h:139
UPB_INLINE void envoy_type_matcher_v3_RegexMatchAndSubstitute_set_substitution(envoy_type_matcher_v3_RegexMatchAndSubstitute *msg, upb_strview value)
Definition: regex.upb.h:156
UPB_INLINE char * envoy_type_matcher_v3_RegexMatchAndSubstitute_serialize(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg, upb_arena *arena, size_t *len)
Definition: regex.upb.h:135
UPB_INLINE upb_strview envoy_type_matcher_v3_RegexMatcher_regex(const envoy_type_matcher_v3_RegexMatcher *msg)
Definition: regex.upb.h:64
UPB_INLINE envoy_type_matcher_v3_RegexMatcher_engine_type_oneofcases envoy_type_matcher_v3_RegexMatcher_engine_type_case(const envoy_type_matcher_v3_RegexMatcher *msg)
Definition: regex.upb.h:60
UPB_INLINE void envoy_type_matcher_v3_RegexMatcher_set_regex(envoy_type_matcher_v3_RegexMatcher *msg, upb_strview value)
Definition: regex.upb.h:78
UPB_INLINE envoy_type_matcher_v3_RegexMatchAndSubstitute * envoy_type_matcher_v3_RegexMatchAndSubstitute_parse(const char *buf, size_t size, upb_arena *arena)
Definition: regex.upb.h:124
struct envoy_type_matcher_v3_RegexMatcher envoy_type_matcher_v3_RegexMatcher
Definition: regex.upb.h:26
UPB_INLINE void envoy_type_matcher_v3_RegexMatchAndSubstitute_set_pattern(envoy_type_matcher_v3_RegexMatchAndSubstitute *msg, envoy_type_matcher_v3_RegexMatcher *value)
Definition: regex.upb.h:143
envoy_type_matcher_v3_RegexMatcher_engine_type_oneofcases
Definition: regex.upb.h:56
@ envoy_type_matcher_v3_RegexMatcher_engine_type_google_re2
Definition: regex.upb.h:57
@ envoy_type_matcher_v3_RegexMatcher_engine_type_NOT_SET
Definition: regex.upb.h:58
UPB_INLINE const envoy_type_matcher_v3_RegexMatcher * envoy_type_matcher_v3_RegexMatchAndSubstitute_pattern(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg)
Definition: regex.upb.h:140
const upb_msglayout envoy_type_matcher_v3_RegexMatcher_GoogleRE2_msginit
Definition: regex.upb.c:42
UPB_INLINE char * envoy_type_matcher_v3_RegexMatcher_serialize(const envoy_type_matcher_v3_RegexMatcher *msg, upb_arena *arena, size_t *len)
Definition: regex.upb.h:52
UPB_INLINE envoy_type_matcher_v3_RegexMatcher * envoy_type_matcher_v3_RegexMatcher_new(upb_arena *arena)
Definition: regex.upb.h:38
UPB_INLINE void envoy_type_matcher_v3_RegexMatcher_GoogleRE2_set_max_program_size(envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *msg, struct google_protobuf_UInt32Value *value)
Definition: regex.upb.h:105
struct envoy_type_matcher_v3_RegexMatcher_GoogleRE2 envoy_type_matcher_v3_RegexMatcher_GoogleRE2
Definition: regex.upb.h:27
const upb_msglayout envoy_type_matcher_v3_RegexMatchAndSubstitute_msginit
Definition: regex.upb.c:57
const upb_msglayout envoy_type_matcher_v3_RegexMatcher_msginit
Definition: regex.upb.c:28
struct envoy_type_matcher_v3_RegexMatchAndSubstitute envoy_type_matcher_v3_RegexMatchAndSubstitute
Definition: regex.upb.h:28
UPB_INLINE envoy_type_matcher_v3_RegexMatcher * envoy_type_matcher_v3_RegexMatcher_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: regex.upb.h:46
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_type_matcher_v3_RegexMatcher_GoogleRE2_max_program_size(const envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *msg)
Definition: regex.upb.h:103
UPB_INLINE envoy_type_matcher_v3_RegexMatcher_GoogleRE2 * envoy_type_matcher_v3_RegexMatcher_GoogleRE2_parse(const char *buf, size_t size, upb_arena *arena)
Definition: regex.upb.h:87
struct google_protobuf_UInt32Value google_protobuf_UInt32Value
Definition: wrappers.upb.h:37
upb_arena * arena
Definition: xds_api.cc:909