Imported Upstream version 1.30.0
[platform/upstream/grpc.git] / src / core / ext / upb-generated / udpa / annotations / status.upb.h
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/generated_util.h"
13 #include "upb/msg.h"
14 #include "upb/decode.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
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 }
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 }
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);
47 }
48
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)); }
51
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;
54 }
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;
57 }
58
59 #ifdef __cplusplus
60 }  /* extern "C" */
61 #endif
62
63 #include "upb/port_undef.inc"
64
65 #endif  /* UDPA_ANNOTATIONS_STATUS_PROTO_UPB_H_ */