| 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_internal.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_MiniTable udpa_annotations_StatusAnnotation_msginit; |
| 26 |
extern const upb_MiniTable_Extension udpa_annotations_file_status_ext; |
| 27 |
struct google_protobuf_FileOptions; |
| 28 |
extern const upb_MiniTable google_protobuf_FileOptions_msginit; |
| 29 |
|
| 30 |
typedef enum { |
| 31 |
udpa_annotations_UNKNOWN = 0, |
| 32 |
udpa_annotations_FROZEN = 1, |
| 33 |
udpa_annotations_ACTIVE = 2, |
| 34 |
udpa_annotations_NEXT_MAJOR_VERSION_CANDIDATE = 3 |
| 35 |
} udpa_annotations_PackageVersionStatus; |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
/* udpa.annotations.StatusAnnotation */ |
| 40 |
|
| 41 |
UPB_INLINE udpa_annotations_StatusAnnotation* udpa_annotations_StatusAnnotation_new(upb_Arena* arena) { |
| 42 |
return (udpa_annotations_StatusAnnotation*)_upb_Message_New(&udpa_annotations_StatusAnnotation_msginit, arena); |
| 43 |
} |
| 44 |
UPB_INLINE udpa_annotations_StatusAnnotation* udpa_annotations_StatusAnnotation_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 45 |
udpa_annotations_StatusAnnotation* ret = udpa_annotations_StatusAnnotation_new(arena); |
| 46 |
if (!ret) return NULL; |
| 47 |
if (upb_Decode(buf, size, ret, &udpa_annotations_StatusAnnotation_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 48 |
return NULL; |
| 49 |
} |
| 50 |
return ret; |
| 51 |
} |
| 52 |
UPB_INLINE udpa_annotations_StatusAnnotation* udpa_annotations_StatusAnnotation_parse_ex(const char* buf, size_t size, |
| 53 |
const upb_ExtensionRegistry* extreg, |
| 54 |
int options, upb_Arena* arena) { |
| 55 |
udpa_annotations_StatusAnnotation* ret = udpa_annotations_StatusAnnotation_new(arena); |
| 56 |
if (!ret) return NULL; |
| 57 |
if (upb_Decode(buf, size, ret, &udpa_annotations_StatusAnnotation_msginit, extreg, options, arena) != |
| 58 |
kUpb_DecodeStatus_Ok) { |
| 59 |
return NULL; |
| 60 |
} |
| 61 |
return ret; |
| 62 |
} |
| 63 |
UPB_INLINE char* udpa_annotations_StatusAnnotation_serialize(const udpa_annotations_StatusAnnotation* msg, upb_Arena* arena, size_t* len) { |
| 64 |
char* ptr; |
| 65 |
(void)upb_Encode(msg, &udpa_annotations_StatusAnnotation_msginit, 0, arena, &ptr, len); |
| 66 |
return ptr; |
| 67 |
} |
| 68 |
UPB_INLINE char* udpa_annotations_StatusAnnotation_serialize_ex(const udpa_annotations_StatusAnnotation* msg, int options, |
| 69 |
upb_Arena* arena, size_t* len) { |
| 70 |
char* ptr; |
| 71 |
(void)upb_Encode(msg, &udpa_annotations_StatusAnnotation_msginit, options, arena, &ptr, len); |
| 72 |
return ptr; |
| 73 |
} |
| 74 |
UPB_INLINE void udpa_annotations_StatusAnnotation_clear_work_in_progress(const udpa_annotations_StatusAnnotation* msg) { |
| 75 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = 0; |
| 76 |
} |
| 77 |
UPB_INLINE bool udpa_annotations_StatusAnnotation_work_in_progress(const udpa_annotations_StatusAnnotation* msg) { |
| 78 |
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); |
| 79 |
} |
| 80 |
UPB_INLINE void udpa_annotations_StatusAnnotation_clear_package_version_status(const udpa_annotations_StatusAnnotation* msg) { |
| 81 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0; |
| 82 |
} |
| 83 |
UPB_INLINE int32_t udpa_annotations_StatusAnnotation_package_version_status(const udpa_annotations_StatusAnnotation* msg) { |
| 84 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); |
| 85 |
} |
| 86 |
|
| 87 |
UPB_INLINE void udpa_annotations_StatusAnnotation_set_work_in_progress(udpa_annotations_StatusAnnotation *msg, bool value) { |
| 88 |
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; |
| 89 |
} |
| 90 |
UPB_INLINE void udpa_annotations_StatusAnnotation_set_package_version_status(udpa_annotations_StatusAnnotation *msg, int32_t value) { |
| 91 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; |
| 92 |
} |
| 93 |
|
| 94 |
UPB_INLINE bool udpa_annotations_has_file_status(const struct google_protobuf_FileOptions* msg) { |
| 95 |
return _upb_Message_Getext(msg, &udpa_annotations_file_status_ext) != NULL; |
| 96 |
} |
| 97 |
UPB_INLINE void udpa_annotations_clear_file_status(struct google_protobuf_FileOptions* msg) { |
| 98 |
_upb_Message_Clearext(msg, &udpa_annotations_file_status_ext); |
| 99 |
} |
| 100 |
UPB_INLINE const udpa_annotations_StatusAnnotation* udpa_annotations_file_status(const struct google_protobuf_FileOptions* msg) { |
| 101 |
const upb_Message_Extension* ext = _upb_Message_Getext(msg, &udpa_annotations_file_status_ext); |
| 102 |
UPB_ASSERT(ext); |
| 103 |
return *UPB_PTR_AT(&ext->data, 0, const udpa_annotations_StatusAnnotation*); |
| 104 |
} |
| 105 |
UPB_INLINE void udpa_annotations_set_file_status(struct google_protobuf_FileOptions* msg, const udpa_annotations_StatusAnnotation* ext, upb_Arena* arena) { |
| 106 |
const upb_Message_Extension* msg_ext = |
| 107 |
_upb_Message_GetOrCreateExtension(msg, &udpa_annotations_file_status_ext, arena); |
| 108 |
UPB_ASSERT(msg_ext); |
| 109 |
*UPB_PTR_AT(&msg_ext->data, 0, const udpa_annotations_StatusAnnotation*) = ext; |
| 110 |
} |
| 111 |
extern const upb_MiniTable_File udpa_annotations_status_proto_upb_file_layout; |
| 112 |
|
| 113 |
#ifdef __cplusplus |
| 114 |
} /* extern "C" */ |
| 115 |
#endif |
| 116 |
|
| 117 |
#include "upb/port_undef.inc" |
| 118 |
|
| 119 |
#endif /* UDPA_ANNOTATIONS_STATUS_PROTO_UPB_H_ */ |