GRPC Core  18.0.0
number.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/number.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef ENVOY_TYPE_MATCHER_V3_NUMBER_PROTO_UPB_H_
10 #define ENVOY_TYPE_MATCHER_V3_NUMBER_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 
25 extern const upb_msglayout envoy_type_matcher_v3_DoubleMatcher_msginit;
27 extern const upb_msglayout envoy_type_v3_DoubleRange_msginit;
28 
29 
30 /* envoy.type.matcher.v3.DoubleMatcher */
31 
34 }
36  upb_arena *arena) {
38  return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_DoubleMatcher_msginit, arena)) ? ret : NULL;
39 }
41  upb_arena *arena, int options) {
43  return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_DoubleMatcher_msginit, arena, options))
44  ? ret : NULL;
45 }
46 UPB_INLINE char *envoy_type_matcher_v3_DoubleMatcher_serialize(const envoy_type_matcher_v3_DoubleMatcher *msg, upb_arena *arena, size_t *len) {
47  return upb_encode(msg, &envoy_type_matcher_v3_DoubleMatcher_msginit, arena, len);
48 }
49 
50 typedef enum {
56 
57 UPB_INLINE bool envoy_type_matcher_v3_DoubleMatcher_has_range(const envoy_type_matcher_v3_DoubleMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 8)) == 1; }
58 UPB_INLINE const struct envoy_type_v3_DoubleRange* envoy_type_matcher_v3_DoubleMatcher_range(const envoy_type_matcher_v3_DoubleMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_v3_DoubleRange*, UPB_SIZE(0, 0), UPB_SIZE(8, 8), 1, NULL); }
59 UPB_INLINE bool envoy_type_matcher_v3_DoubleMatcher_has_exact(const envoy_type_matcher_v3_DoubleMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 8)) == 2; }
60 UPB_INLINE double envoy_type_matcher_v3_DoubleMatcher_exact(const envoy_type_matcher_v3_DoubleMatcher *msg) { return UPB_READ_ONEOF(msg, double, UPB_SIZE(0, 0), UPB_SIZE(8, 8), 2, 0); }
61 
63  UPB_WRITE_ONEOF(msg, struct envoy_type_v3_DoubleRange*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 8), 1);
64 }
67  if (sub == NULL) {
69  if (!sub) return NULL;
71  }
72  return sub;
73 }
75  UPB_WRITE_ONEOF(msg, double, UPB_SIZE(0, 0), value, UPB_SIZE(8, 8), 2);
76 }
77 
78 #ifdef __cplusplus
79 } /* extern "C" */
80 #endif
81 
82 #include "upb/port_undef.inc"
83 
84 #endif /* ENVOY_TYPE_MATCHER_V3_NUMBER_PROTO_UPB_H_ */
UPB_INLINE envoy_type_matcher_v3_DoubleMatcher * envoy_type_matcher_v3_DoubleMatcher_parse(const char *buf, size_t size, upb_arena *arena)
Definition: number.upb.h:35
UPB_INLINE bool envoy_type_matcher_v3_DoubleMatcher_has_exact(const envoy_type_matcher_v3_DoubleMatcher *msg)
Definition: number.upb.h:59
UPB_INLINE struct envoy_type_v3_DoubleRange * envoy_type_matcher_v3_DoubleMatcher_mutable_range(envoy_type_matcher_v3_DoubleMatcher *msg, upb_arena *arena)
Definition: number.upb.h:65
UPB_INLINE const struct envoy_type_v3_DoubleRange * envoy_type_matcher_v3_DoubleMatcher_range(const envoy_type_matcher_v3_DoubleMatcher *msg)
Definition: number.upb.h:58
UPB_INLINE envoy_type_matcher_v3_DoubleMatcher_match_pattern_oneofcases envoy_type_matcher_v3_DoubleMatcher_match_pattern_case(const envoy_type_matcher_v3_DoubleMatcher *msg)
Definition: number.upb.h:55
UPB_INLINE envoy_type_matcher_v3_DoubleMatcher * envoy_type_matcher_v3_DoubleMatcher_new(upb_arena *arena)
Definition: number.upb.h:32
struct envoy_type_matcher_v3_DoubleMatcher envoy_type_matcher_v3_DoubleMatcher
Definition: number.upb.h:24
UPB_INLINE void envoy_type_matcher_v3_DoubleMatcher_set_range(envoy_type_matcher_v3_DoubleMatcher *msg, struct envoy_type_v3_DoubleRange *value)
Definition: number.upb.h:62
UPB_INLINE envoy_type_matcher_v3_DoubleMatcher * envoy_type_matcher_v3_DoubleMatcher_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: number.upb.h:40
const upb_msglayout envoy_type_v3_DoubleRange_msginit
Definition: range.upb.c:44
UPB_INLINE bool envoy_type_matcher_v3_DoubleMatcher_has_range(const envoy_type_matcher_v3_DoubleMatcher *msg)
Definition: number.upb.h:57
UPB_INLINE double envoy_type_matcher_v3_DoubleMatcher_exact(const envoy_type_matcher_v3_DoubleMatcher *msg)
Definition: number.upb.h:60
UPB_INLINE char * envoy_type_matcher_v3_DoubleMatcher_serialize(const envoy_type_matcher_v3_DoubleMatcher *msg, upb_arena *arena, size_t *len)
Definition: number.upb.h:46
envoy_type_matcher_v3_DoubleMatcher_match_pattern_oneofcases
Definition: number.upb.h:50
@ envoy_type_matcher_v3_DoubleMatcher_match_pattern_range
Definition: number.upb.h:51
@ envoy_type_matcher_v3_DoubleMatcher_match_pattern_NOT_SET
Definition: number.upb.h:53
@ envoy_type_matcher_v3_DoubleMatcher_match_pattern_exact
Definition: number.upb.h:52
UPB_INLINE void envoy_type_matcher_v3_DoubleMatcher_set_exact(envoy_type_matcher_v3_DoubleMatcher *msg, double value)
Definition: number.upb.h:74
const upb_msglayout envoy_type_matcher_v3_DoubleMatcher_msginit
Definition: number.upb.c:28
struct envoy_type_v3_DoubleRange envoy_type_v3_DoubleRange
Definition: range.upb.h:28
upb_arena * arena
Definition: xds_api.cc:909