• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  *     envoy/type/v3/range.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef ENVOY_TYPE_V3_RANGE_PROTO_UPB_H_
10 #define ENVOY_TYPE_V3_RANGE_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_type_v3_Int64Range;
24 struct envoy_type_v3_Int32Range;
25 struct envoy_type_v3_DoubleRange;
26 typedef struct envoy_type_v3_Int64Range envoy_type_v3_Int64Range;
27 typedef struct envoy_type_v3_Int32Range envoy_type_v3_Int32Range;
28 typedef struct envoy_type_v3_DoubleRange envoy_type_v3_DoubleRange;
29 extern const upb_msglayout envoy_type_v3_Int64Range_msginit;
30 extern const upb_msglayout envoy_type_v3_Int32Range_msginit;
31 extern const upb_msglayout envoy_type_v3_DoubleRange_msginit;
32 
33 
34 /* envoy.type.v3.Int64Range */
35 
envoy_type_v3_Int64Range_new(upb_arena * arena)36 UPB_INLINE envoy_type_v3_Int64Range *envoy_type_v3_Int64Range_new(upb_arena *arena) {
37   return (envoy_type_v3_Int64Range *)_upb_msg_new(&envoy_type_v3_Int64Range_msginit, arena);
38 }
envoy_type_v3_Int64Range_parse(const char * buf,size_t size,upb_arena * arena)39 UPB_INLINE envoy_type_v3_Int64Range *envoy_type_v3_Int64Range_parse(const char *buf, size_t size,
40                         upb_arena *arena) {
41   envoy_type_v3_Int64Range *ret = envoy_type_v3_Int64Range_new(arena);
42   return (ret && upb_decode(buf, size, ret, &envoy_type_v3_Int64Range_msginit, arena)) ? ret : NULL;
43 }
envoy_type_v3_Int64Range_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)44 UPB_INLINE envoy_type_v3_Int64Range *envoy_type_v3_Int64Range_parse_ex(const char *buf, size_t size,
45                            upb_arena *arena, int options) {
46   envoy_type_v3_Int64Range *ret = envoy_type_v3_Int64Range_new(arena);
47   return (ret && _upb_decode(buf, size, ret, &envoy_type_v3_Int64Range_msginit, arena, options))
48       ? ret : NULL;
49 }
envoy_type_v3_Int64Range_serialize(const envoy_type_v3_Int64Range * msg,upb_arena * arena,size_t * len)50 UPB_INLINE char *envoy_type_v3_Int64Range_serialize(const envoy_type_v3_Int64Range *msg, upb_arena *arena, size_t *len) {
51   return upb_encode(msg, &envoy_type_v3_Int64Range_msginit, arena, len);
52 }
53 
envoy_type_v3_Int64Range_start(const envoy_type_v3_Int64Range * msg)54 UPB_INLINE int64_t envoy_type_v3_Int64Range_start(const envoy_type_v3_Int64Range *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); }
envoy_type_v3_Int64Range_end(const envoy_type_v3_Int64Range * msg)55 UPB_INLINE int64_t envoy_type_v3_Int64Range_end(const envoy_type_v3_Int64Range *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); }
56 
envoy_type_v3_Int64Range_set_start(envoy_type_v3_Int64Range * msg,int64_t value)57 UPB_INLINE void envoy_type_v3_Int64Range_set_start(envoy_type_v3_Int64Range *msg, int64_t value) {
58   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value;
59 }
envoy_type_v3_Int64Range_set_end(envoy_type_v3_Int64Range * msg,int64_t value)60 UPB_INLINE void envoy_type_v3_Int64Range_set_end(envoy_type_v3_Int64Range *msg, int64_t value) {
61   *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value;
62 }
63 
64 /* envoy.type.v3.Int32Range */
65 
envoy_type_v3_Int32Range_new(upb_arena * arena)66 UPB_INLINE envoy_type_v3_Int32Range *envoy_type_v3_Int32Range_new(upb_arena *arena) {
67   return (envoy_type_v3_Int32Range *)_upb_msg_new(&envoy_type_v3_Int32Range_msginit, arena);
68 }
envoy_type_v3_Int32Range_parse(const char * buf,size_t size,upb_arena * arena)69 UPB_INLINE envoy_type_v3_Int32Range *envoy_type_v3_Int32Range_parse(const char *buf, size_t size,
70                         upb_arena *arena) {
71   envoy_type_v3_Int32Range *ret = envoy_type_v3_Int32Range_new(arena);
72   return (ret && upb_decode(buf, size, ret, &envoy_type_v3_Int32Range_msginit, arena)) ? ret : NULL;
73 }
envoy_type_v3_Int32Range_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)74 UPB_INLINE envoy_type_v3_Int32Range *envoy_type_v3_Int32Range_parse_ex(const char *buf, size_t size,
75                            upb_arena *arena, int options) {
76   envoy_type_v3_Int32Range *ret = envoy_type_v3_Int32Range_new(arena);
77   return (ret && _upb_decode(buf, size, ret, &envoy_type_v3_Int32Range_msginit, arena, options))
78       ? ret : NULL;
79 }
envoy_type_v3_Int32Range_serialize(const envoy_type_v3_Int32Range * msg,upb_arena * arena,size_t * len)80 UPB_INLINE char *envoy_type_v3_Int32Range_serialize(const envoy_type_v3_Int32Range *msg, upb_arena *arena, size_t *len) {
81   return upb_encode(msg, &envoy_type_v3_Int32Range_msginit, arena, len);
82 }
83 
envoy_type_v3_Int32Range_start(const envoy_type_v3_Int32Range * msg)84 UPB_INLINE int32_t envoy_type_v3_Int32Range_start(const envoy_type_v3_Int32Range *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
envoy_type_v3_Int32Range_end(const envoy_type_v3_Int32Range * msg)85 UPB_INLINE int32_t envoy_type_v3_Int32Range_end(const envoy_type_v3_Int32Range *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
86 
envoy_type_v3_Int32Range_set_start(envoy_type_v3_Int32Range * msg,int32_t value)87 UPB_INLINE void envoy_type_v3_Int32Range_set_start(envoy_type_v3_Int32Range *msg, int32_t value) {
88   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
89 }
envoy_type_v3_Int32Range_set_end(envoy_type_v3_Int32Range * msg,int32_t value)90 UPB_INLINE void envoy_type_v3_Int32Range_set_end(envoy_type_v3_Int32Range *msg, int32_t value) {
91   *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
92 }
93 
94 /* envoy.type.v3.DoubleRange */
95 
envoy_type_v3_DoubleRange_new(upb_arena * arena)96 UPB_INLINE envoy_type_v3_DoubleRange *envoy_type_v3_DoubleRange_new(upb_arena *arena) {
97   return (envoy_type_v3_DoubleRange *)_upb_msg_new(&envoy_type_v3_DoubleRange_msginit, arena);
98 }
envoy_type_v3_DoubleRange_parse(const char * buf,size_t size,upb_arena * arena)99 UPB_INLINE envoy_type_v3_DoubleRange *envoy_type_v3_DoubleRange_parse(const char *buf, size_t size,
100                         upb_arena *arena) {
101   envoy_type_v3_DoubleRange *ret = envoy_type_v3_DoubleRange_new(arena);
102   return (ret && upb_decode(buf, size, ret, &envoy_type_v3_DoubleRange_msginit, arena)) ? ret : NULL;
103 }
envoy_type_v3_DoubleRange_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)104 UPB_INLINE envoy_type_v3_DoubleRange *envoy_type_v3_DoubleRange_parse_ex(const char *buf, size_t size,
105                            upb_arena *arena, int options) {
106   envoy_type_v3_DoubleRange *ret = envoy_type_v3_DoubleRange_new(arena);
107   return (ret && _upb_decode(buf, size, ret, &envoy_type_v3_DoubleRange_msginit, arena, options))
108       ? ret : NULL;
109 }
envoy_type_v3_DoubleRange_serialize(const envoy_type_v3_DoubleRange * msg,upb_arena * arena,size_t * len)110 UPB_INLINE char *envoy_type_v3_DoubleRange_serialize(const envoy_type_v3_DoubleRange *msg, upb_arena *arena, size_t *len) {
111   return upb_encode(msg, &envoy_type_v3_DoubleRange_msginit, arena, len);
112 }
113 
envoy_type_v3_DoubleRange_start(const envoy_type_v3_DoubleRange * msg)114 UPB_INLINE double envoy_type_v3_DoubleRange_start(const envoy_type_v3_DoubleRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double); }
envoy_type_v3_DoubleRange_end(const envoy_type_v3_DoubleRange * msg)115 UPB_INLINE double envoy_type_v3_DoubleRange_end(const envoy_type_v3_DoubleRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double); }
116 
envoy_type_v3_DoubleRange_set_start(envoy_type_v3_DoubleRange * msg,double value)117 UPB_INLINE void envoy_type_v3_DoubleRange_set_start(envoy_type_v3_DoubleRange *msg, double value) {
118   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double) = value;
119 }
envoy_type_v3_DoubleRange_set_end(envoy_type_v3_DoubleRange * msg,double value)120 UPB_INLINE void envoy_type_v3_DoubleRange_set_end(envoy_type_v3_DoubleRange *msg, double value) {
121   *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double) = value;
122 }
123 
124 #ifdef __cplusplus
125 }  /* extern "C" */
126 #endif
127 
128 #include "upb/port_undef.inc"
129 
130 #endif  /* ENVOY_TYPE_V3_RANGE_PROTO_UPB_H_ */
131