1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  *     envoy/type/v3/semantic_version.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef ENVOY_TYPE_V3_SEMANTIC_VERSION_PROTO_UPB_H_
10 #define ENVOY_TYPE_V3_SEMANTIC_VERSION_PROTO_UPB_H_
11 
12 #include "upb/msg.h"
13 #include "upb/decode.h"
14 #include "upb/encode.h"
15 
16 #include "upb/port_def.inc"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 struct envoy_type_v3_SemanticVersion;
23 typedef struct envoy_type_v3_SemanticVersion envoy_type_v3_SemanticVersion;
24 extern const upb_msglayout envoy_type_v3_SemanticVersion_msginit;
25 
26 
27 /* envoy.type.v3.SemanticVersion */
28 
envoy_type_v3_SemanticVersion_new(upb_arena * arena)29 UPB_INLINE envoy_type_v3_SemanticVersion *envoy_type_v3_SemanticVersion_new(upb_arena *arena) {
30   return (envoy_type_v3_SemanticVersion *)_upb_msg_new(&envoy_type_v3_SemanticVersion_msginit, arena);
31 }
envoy_type_v3_SemanticVersion_parse(const char * buf,size_t size,upb_arena * arena)32 UPB_INLINE envoy_type_v3_SemanticVersion *envoy_type_v3_SemanticVersion_parse(const char *buf, size_t size,
33                         upb_arena *arena) {
34   envoy_type_v3_SemanticVersion *ret = envoy_type_v3_SemanticVersion_new(arena);
35   return (ret && upb_decode(buf, size, ret, &envoy_type_v3_SemanticVersion_msginit, arena)) ? ret : NULL;
36 }
envoy_type_v3_SemanticVersion_serialize(const envoy_type_v3_SemanticVersion * msg,upb_arena * arena,size_t * len)37 UPB_INLINE char *envoy_type_v3_SemanticVersion_serialize(const envoy_type_v3_SemanticVersion *msg, upb_arena *arena, size_t *len) {
38   return upb_encode(msg, &envoy_type_v3_SemanticVersion_msginit, arena, len);
39 }
40 
envoy_type_v3_SemanticVersion_major_number(const envoy_type_v3_SemanticVersion * msg)41 UPB_INLINE uint32_t envoy_type_v3_SemanticVersion_major_number(const envoy_type_v3_SemanticVersion *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); }
envoy_type_v3_SemanticVersion_minor_number(const envoy_type_v3_SemanticVersion * msg)42 UPB_INLINE uint32_t envoy_type_v3_SemanticVersion_minor_number(const envoy_type_v3_SemanticVersion *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); }
envoy_type_v3_SemanticVersion_patch(const envoy_type_v3_SemanticVersion * msg)43 UPB_INLINE uint32_t envoy_type_v3_SemanticVersion_patch(const envoy_type_v3_SemanticVersion *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); }
44 
envoy_type_v3_SemanticVersion_set_major_number(envoy_type_v3_SemanticVersion * msg,uint32_t value)45 UPB_INLINE void envoy_type_v3_SemanticVersion_set_major_number(envoy_type_v3_SemanticVersion *msg, uint32_t value) {
46   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value;
47 }
envoy_type_v3_SemanticVersion_set_minor_number(envoy_type_v3_SemanticVersion * msg,uint32_t value)48 UPB_INLINE void envoy_type_v3_SemanticVersion_set_minor_number(envoy_type_v3_SemanticVersion *msg, uint32_t value) {
49   *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
50 }
envoy_type_v3_SemanticVersion_set_patch(envoy_type_v3_SemanticVersion * msg,uint32_t value)51 UPB_INLINE void envoy_type_v3_SemanticVersion_set_patch(envoy_type_v3_SemanticVersion *msg, uint32_t value) {
52   *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t) = value;
53 }
54 
55 #ifdef __cplusplus
56 }  /* extern "C" */
57 #endif
58 
59 #include "upb/port_undef.inc"
60 
61 #endif  /* ENVOY_TYPE_V3_SEMANTIC_VERSION_PROTO_UPB_H_ */
62