• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  *     udpa/annotations/status.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef UDPA_ANNOTATIONS_STATUS_PROTO_UPB_H_
10 #define UDPA_ANNOTATIONS_STATUS_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 udpa_annotations_StatusAnnotation;
24 typedef struct udpa_annotations_StatusAnnotation udpa_annotations_StatusAnnotation;
25 extern const upb_msglayout udpa_annotations_StatusAnnotation_msginit;
26 
27 typedef enum {
28   udpa_annotations_UNKNOWN = 0,
29   udpa_annotations_FROZEN = 1,
30   udpa_annotations_ACTIVE = 2,
31   udpa_annotations_NEXT_MAJOR_VERSION_CANDIDATE = 3
32 } udpa_annotations_PackageVersionStatus;
33 
34 
35 /* udpa.annotations.StatusAnnotation */
36 
udpa_annotations_StatusAnnotation_new(upb_arena * arena)37 UPB_INLINE udpa_annotations_StatusAnnotation *udpa_annotations_StatusAnnotation_new(upb_arena *arena) {
38   return (udpa_annotations_StatusAnnotation *)_upb_msg_new(&udpa_annotations_StatusAnnotation_msginit, arena);
39 }
udpa_annotations_StatusAnnotation_parse(const char * buf,size_t size,upb_arena * arena)40 UPB_INLINE udpa_annotations_StatusAnnotation *udpa_annotations_StatusAnnotation_parse(const char *buf, size_t size,
41                         upb_arena *arena) {
42   udpa_annotations_StatusAnnotation *ret = udpa_annotations_StatusAnnotation_new(arena);
43   return (ret && upb_decode(buf, size, ret, &udpa_annotations_StatusAnnotation_msginit, arena)) ? ret : NULL;
44 }
udpa_annotations_StatusAnnotation_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)45 UPB_INLINE udpa_annotations_StatusAnnotation *udpa_annotations_StatusAnnotation_parse_ex(const char *buf, size_t size,
46                            upb_arena *arena, int options) {
47   udpa_annotations_StatusAnnotation *ret = udpa_annotations_StatusAnnotation_new(arena);
48   return (ret && _upb_decode(buf, size, ret, &udpa_annotations_StatusAnnotation_msginit, arena, options))
49       ? ret : NULL;
50 }
udpa_annotations_StatusAnnotation_serialize(const udpa_annotations_StatusAnnotation * msg,upb_arena * arena,size_t * len)51 UPB_INLINE char *udpa_annotations_StatusAnnotation_serialize(const udpa_annotations_StatusAnnotation *msg, upb_arena *arena, size_t *len) {
52   return upb_encode(msg, &udpa_annotations_StatusAnnotation_msginit, arena, len);
53 }
54 
udpa_annotations_StatusAnnotation_work_in_progress(const udpa_annotations_StatusAnnotation * msg)55 UPB_INLINE bool udpa_annotations_StatusAnnotation_work_in_progress(const udpa_annotations_StatusAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); }
udpa_annotations_StatusAnnotation_package_version_status(const udpa_annotations_StatusAnnotation * msg)56 UPB_INLINE int32_t udpa_annotations_StatusAnnotation_package_version_status(const udpa_annotations_StatusAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
57 
udpa_annotations_StatusAnnotation_set_work_in_progress(udpa_annotations_StatusAnnotation * msg,bool value)58 UPB_INLINE void udpa_annotations_StatusAnnotation_set_work_in_progress(udpa_annotations_StatusAnnotation *msg, bool value) {
59   *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
60 }
udpa_annotations_StatusAnnotation_set_package_version_status(udpa_annotations_StatusAnnotation * msg,int32_t value)61 UPB_INLINE void udpa_annotations_StatusAnnotation_set_package_version_status(udpa_annotations_StatusAnnotation *msg, int32_t value) {
62   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
63 }
64 
65 #ifdef __cplusplus
66 }  /* extern "C" */
67 #endif
68 
69 #include "upb/port_undef.inc"
70 
71 #endif  /* UDPA_ANNOTATIONS_STATUS_PROTO_UPB_H_ */
72