Debian Codegraph @

src/core/ext/upb-generated/udpa/annotations/versioning.upb.h

raw
1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * udpa/annotations/versioning.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef UDPA_ANNOTATIONS_VERSIONING_PROTO_UPB_H_
10 #define UDPA_ANNOTATIONS_VERSIONING_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_VersioningAnnotation;
24 typedef struct udpa_annotations_VersioningAnnotation udpa_annotations_VersioningAnnotation;
25 extern const upb_MiniTable udpa_annotations_VersioningAnnotation_msginit;
26 extern const upb_MiniTable_Extension udpa_annotations_versioning_ext;
27 struct google_protobuf_MessageOptions;
28 extern const upb_MiniTable google_protobuf_MessageOptions_msginit;
29
30
31
32 /* udpa.annotations.VersioningAnnotation */
33
34 UPB_INLINE udpa_annotations_VersioningAnnotation* udpa_annotations_VersioningAnnotation_new(upb_Arena* arena) {
35 return (udpa_annotations_VersioningAnnotation*)_upb_Message_New(&udpa_annotations_VersioningAnnotation_msginit, arena);
36 }
37 UPB_INLINE udpa_annotations_VersioningAnnotation* udpa_annotations_VersioningAnnotation_parse(const char* buf, size_t size, upb_Arena* arena) {
38 udpa_annotations_VersioningAnnotation* ret = udpa_annotations_VersioningAnnotation_new(arena);
39 if (!ret) return NULL;
40 if (upb_Decode(buf, size, ret, &udpa_annotations_VersioningAnnotation_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
41 return NULL;
42 }
43 return ret;
44 }
45 UPB_INLINE udpa_annotations_VersioningAnnotation* udpa_annotations_VersioningAnnotation_parse_ex(const char* buf, size_t size,
46 const upb_ExtensionRegistry* extreg,
47 int options, upb_Arena* arena) {
48 udpa_annotations_VersioningAnnotation* ret = udpa_annotations_VersioningAnnotation_new(arena);
49 if (!ret) return NULL;
50 if (upb_Decode(buf, size, ret, &udpa_annotations_VersioningAnnotation_msginit, extreg, options, arena) !=
51 kUpb_DecodeStatus_Ok) {
52 return NULL;
53 }
54 return ret;
55 }
56 UPB_INLINE char* udpa_annotations_VersioningAnnotation_serialize(const udpa_annotations_VersioningAnnotation* msg, upb_Arena* arena, size_t* len) {
57 char* ptr;
58 (void)upb_Encode(msg, &udpa_annotations_VersioningAnnotation_msginit, 0, arena, &ptr, len);
59 return ptr;
60 }
61 UPB_INLINE char* udpa_annotations_VersioningAnnotation_serialize_ex(const udpa_annotations_VersioningAnnotation* msg, int options,
62 upb_Arena* arena, size_t* len) {
63 char* ptr;
64 (void)upb_Encode(msg, &udpa_annotations_VersioningAnnotation_msginit, options, arena, &ptr, len);
65 return ptr;
66 }
67 UPB_INLINE void udpa_annotations_VersioningAnnotation_clear_previous_message_type(const udpa_annotations_VersioningAnnotation* msg) {
68 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
69 }
70 UPB_INLINE upb_StringView udpa_annotations_VersioningAnnotation_previous_message_type(const udpa_annotations_VersioningAnnotation* msg) {
71 return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView);
72 }
73
74 UPB_INLINE void udpa_annotations_VersioningAnnotation_set_previous_message_type(udpa_annotations_VersioningAnnotation *msg, upb_StringView value) {
75 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value;
76 }
77
78 UPB_INLINE bool udpa_annotations_has_versioning(const struct google_protobuf_MessageOptions* msg) {
79 return _upb_Message_Getext(msg, &udpa_annotations_versioning_ext) != NULL;
80 }
81 UPB_INLINE void udpa_annotations_clear_versioning(struct google_protobuf_MessageOptions* msg) {
82 _upb_Message_Clearext(msg, &udpa_annotations_versioning_ext);
83 }
84 UPB_INLINE const udpa_annotations_VersioningAnnotation* udpa_annotations_versioning(const struct google_protobuf_MessageOptions* msg) {
85 const upb_Message_Extension* ext = _upb_Message_Getext(msg, &udpa_annotations_versioning_ext);
86 UPB_ASSERT(ext);
87 return *UPB_PTR_AT(&ext->data, 0, const udpa_annotations_VersioningAnnotation*);
88 }
89 UPB_INLINE void udpa_annotations_set_versioning(struct google_protobuf_MessageOptions* msg, const udpa_annotations_VersioningAnnotation* ext, upb_Arena* arena) {
90 const upb_Message_Extension* msg_ext =
91 _upb_Message_GetOrCreateExtension(msg, &udpa_annotations_versioning_ext, arena);
92 UPB_ASSERT(msg_ext);
93 *UPB_PTR_AT(&msg_ext->data, 0, const udpa_annotations_VersioningAnnotation*) = ext;
94 }
95 extern const upb_MiniTable_File udpa_annotations_versioning_proto_upb_file_layout;
96
97 #ifdef __cplusplus
98 } /* extern "C" */
99 #endif
100
101 #include "upb/port_undef.inc"
102
103 #endif /* UDPA_ANNOTATIONS_VERSIONING_PROTO_UPB_H_ */