1 /* This file was generated by upbc (the upb compiler) from the input
4 * udpa/annotations/status.proto
6 * Do not edit -- your changes will be discarded when the file is
9 #ifndef UDPA_ANNOTATIONS_STATUS_PROTO_UPB_H_
10 #define UDPA_ANNOTATIONS_STATUS_PROTO_UPB_H_
12 #include "upb/generated_util.h"
14 #include "upb/decode.h"
15 #include "upb/encode.h"
17 #include "upb/port_def.inc"
23 struct udpa_annotations_StatusAnnotation;
24 typedef struct udpa_annotations_StatusAnnotation udpa_annotations_StatusAnnotation;
25 extern const upb_msglayout udpa_annotations_StatusAnnotation_msginit;
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;
35 /* udpa.annotations.StatusAnnotation */
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);
40 UPB_INLINE udpa_annotations_StatusAnnotation *udpa_annotations_StatusAnnotation_parse(const char *buf, size_t size,
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;
45 UPB_INLINE char *udpa_annotations_StatusAnnotation_serialize(const udpa_annotations_StatusAnnotation *msg, upb_arena *arena, size_t *len) {
46 return upb_encode(msg, &udpa_annotations_StatusAnnotation_msginit, arena, len);
49 UPB_INLINE bool udpa_annotations_StatusAnnotation_work_in_progress(const udpa_annotations_StatusAnnotation *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); }
50 UPB_INLINE int32_t udpa_annotations_StatusAnnotation_package_version_status(const udpa_annotations_StatusAnnotation *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); }
52 UPB_INLINE void udpa_annotations_StatusAnnotation_set_work_in_progress(udpa_annotations_StatusAnnotation *msg, bool value) {
53 UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value;
55 UPB_INLINE void udpa_annotations_StatusAnnotation_set_package_version_status(udpa_annotations_StatusAnnotation *msg, int32_t value) {
56 UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value;
63 #include "upb/port_undef.inc"
65 #endif /* UDPA_ANNOTATIONS_STATUS_PROTO_UPB_H_ */