1 /* This file was generated by upbc (the upb compiler) from the input
2 * file:
3 *
4 * udpa/annotations/migrate.proto
5 *
6 * Do not edit -- your changes will be discarded when the file is
7 * regenerated. */
8
9 #ifndef UDPA_ANNOTATIONS_MIGRATE_PROTO_UPB_H_
10 #define UDPA_ANNOTATIONS_MIGRATE_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_MigrateAnnotation;
24 struct udpa_annotations_FieldMigrateAnnotation;
25 struct udpa_annotations_FileMigrateAnnotation;
26 typedef struct udpa_annotations_MigrateAnnotation udpa_annotations_MigrateAnnotation;
27 typedef struct udpa_annotations_FieldMigrateAnnotation udpa_annotations_FieldMigrateAnnotation;
28 typedef struct udpa_annotations_FileMigrateAnnotation udpa_annotations_FileMigrateAnnotation;
29 extern const upb_msglayout udpa_annotations_MigrateAnnotation_msginit;
30 extern const upb_msglayout udpa_annotations_FieldMigrateAnnotation_msginit;
31 extern const upb_msglayout udpa_annotations_FileMigrateAnnotation_msginit;
32
33
34 /* udpa.annotations.MigrateAnnotation */
35
udpa_annotations_MigrateAnnotation_new(upb_arena * arena)36 UPB_INLINE udpa_annotations_MigrateAnnotation *udpa_annotations_MigrateAnnotation_new(upb_arena *arena) {
37 return (udpa_annotations_MigrateAnnotation *)_upb_msg_new(&udpa_annotations_MigrateAnnotation_msginit, arena);
38 }
udpa_annotations_MigrateAnnotation_parse(const char * buf,size_t size,upb_arena * arena)39 UPB_INLINE udpa_annotations_MigrateAnnotation *udpa_annotations_MigrateAnnotation_parse(const char *buf, size_t size,
40 upb_arena *arena) {
41 udpa_annotations_MigrateAnnotation *ret = udpa_annotations_MigrateAnnotation_new(arena);
42 return (ret && upb_decode(buf, size, ret, &udpa_annotations_MigrateAnnotation_msginit, arena)) ? ret : NULL;
43 }
udpa_annotations_MigrateAnnotation_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)44 UPB_INLINE udpa_annotations_MigrateAnnotation *udpa_annotations_MigrateAnnotation_parse_ex(const char *buf, size_t size,
45 upb_arena *arena, int options) {
46 udpa_annotations_MigrateAnnotation *ret = udpa_annotations_MigrateAnnotation_new(arena);
47 return (ret && _upb_decode(buf, size, ret, &udpa_annotations_MigrateAnnotation_msginit, arena, options))
48 ? ret : NULL;
49 }
udpa_annotations_MigrateAnnotation_serialize(const udpa_annotations_MigrateAnnotation * msg,upb_arena * arena,size_t * len)50 UPB_INLINE char *udpa_annotations_MigrateAnnotation_serialize(const udpa_annotations_MigrateAnnotation *msg, upb_arena *arena, size_t *len) {
51 return upb_encode(msg, &udpa_annotations_MigrateAnnotation_msginit, arena, len);
52 }
53
udpa_annotations_MigrateAnnotation_rename(const udpa_annotations_MigrateAnnotation * msg)54 UPB_INLINE upb_strview udpa_annotations_MigrateAnnotation_rename(const udpa_annotations_MigrateAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
55
udpa_annotations_MigrateAnnotation_set_rename(udpa_annotations_MigrateAnnotation * msg,upb_strview value)56 UPB_INLINE void udpa_annotations_MigrateAnnotation_set_rename(udpa_annotations_MigrateAnnotation *msg, upb_strview value) {
57 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
58 }
59
60 /* udpa.annotations.FieldMigrateAnnotation */
61
udpa_annotations_FieldMigrateAnnotation_new(upb_arena * arena)62 UPB_INLINE udpa_annotations_FieldMigrateAnnotation *udpa_annotations_FieldMigrateAnnotation_new(upb_arena *arena) {
63 return (udpa_annotations_FieldMigrateAnnotation *)_upb_msg_new(&udpa_annotations_FieldMigrateAnnotation_msginit, arena);
64 }
udpa_annotations_FieldMigrateAnnotation_parse(const char * buf,size_t size,upb_arena * arena)65 UPB_INLINE udpa_annotations_FieldMigrateAnnotation *udpa_annotations_FieldMigrateAnnotation_parse(const char *buf, size_t size,
66 upb_arena *arena) {
67 udpa_annotations_FieldMigrateAnnotation *ret = udpa_annotations_FieldMigrateAnnotation_new(arena);
68 return (ret && upb_decode(buf, size, ret, &udpa_annotations_FieldMigrateAnnotation_msginit, arena)) ? ret : NULL;
69 }
udpa_annotations_FieldMigrateAnnotation_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)70 UPB_INLINE udpa_annotations_FieldMigrateAnnotation *udpa_annotations_FieldMigrateAnnotation_parse_ex(const char *buf, size_t size,
71 upb_arena *arena, int options) {
72 udpa_annotations_FieldMigrateAnnotation *ret = udpa_annotations_FieldMigrateAnnotation_new(arena);
73 return (ret && _upb_decode(buf, size, ret, &udpa_annotations_FieldMigrateAnnotation_msginit, arena, options))
74 ? ret : NULL;
75 }
udpa_annotations_FieldMigrateAnnotation_serialize(const udpa_annotations_FieldMigrateAnnotation * msg,upb_arena * arena,size_t * len)76 UPB_INLINE char *udpa_annotations_FieldMigrateAnnotation_serialize(const udpa_annotations_FieldMigrateAnnotation *msg, upb_arena *arena, size_t *len) {
77 return upb_encode(msg, &udpa_annotations_FieldMigrateAnnotation_msginit, arena, len);
78 }
79
udpa_annotations_FieldMigrateAnnotation_rename(const udpa_annotations_FieldMigrateAnnotation * msg)80 UPB_INLINE upb_strview udpa_annotations_FieldMigrateAnnotation_rename(const udpa_annotations_FieldMigrateAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
udpa_annotations_FieldMigrateAnnotation_oneof_promotion(const udpa_annotations_FieldMigrateAnnotation * msg)81 UPB_INLINE upb_strview udpa_annotations_FieldMigrateAnnotation_oneof_promotion(const udpa_annotations_FieldMigrateAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); }
82
udpa_annotations_FieldMigrateAnnotation_set_rename(udpa_annotations_FieldMigrateAnnotation * msg,upb_strview value)83 UPB_INLINE void udpa_annotations_FieldMigrateAnnotation_set_rename(udpa_annotations_FieldMigrateAnnotation *msg, upb_strview value) {
84 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
85 }
udpa_annotations_FieldMigrateAnnotation_set_oneof_promotion(udpa_annotations_FieldMigrateAnnotation * msg,upb_strview value)86 UPB_INLINE void udpa_annotations_FieldMigrateAnnotation_set_oneof_promotion(udpa_annotations_FieldMigrateAnnotation *msg, upb_strview value) {
87 *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value;
88 }
89
90 /* udpa.annotations.FileMigrateAnnotation */
91
udpa_annotations_FileMigrateAnnotation_new(upb_arena * arena)92 UPB_INLINE udpa_annotations_FileMigrateAnnotation *udpa_annotations_FileMigrateAnnotation_new(upb_arena *arena) {
93 return (udpa_annotations_FileMigrateAnnotation *)_upb_msg_new(&udpa_annotations_FileMigrateAnnotation_msginit, arena);
94 }
udpa_annotations_FileMigrateAnnotation_parse(const char * buf,size_t size,upb_arena * arena)95 UPB_INLINE udpa_annotations_FileMigrateAnnotation *udpa_annotations_FileMigrateAnnotation_parse(const char *buf, size_t size,
96 upb_arena *arena) {
97 udpa_annotations_FileMigrateAnnotation *ret = udpa_annotations_FileMigrateAnnotation_new(arena);
98 return (ret && upb_decode(buf, size, ret, &udpa_annotations_FileMigrateAnnotation_msginit, arena)) ? ret : NULL;
99 }
udpa_annotations_FileMigrateAnnotation_parse_ex(const char * buf,size_t size,upb_arena * arena,int options)100 UPB_INLINE udpa_annotations_FileMigrateAnnotation *udpa_annotations_FileMigrateAnnotation_parse_ex(const char *buf, size_t size,
101 upb_arena *arena, int options) {
102 udpa_annotations_FileMigrateAnnotation *ret = udpa_annotations_FileMigrateAnnotation_new(arena);
103 return (ret && _upb_decode(buf, size, ret, &udpa_annotations_FileMigrateAnnotation_msginit, arena, options))
104 ? ret : NULL;
105 }
udpa_annotations_FileMigrateAnnotation_serialize(const udpa_annotations_FileMigrateAnnotation * msg,upb_arena * arena,size_t * len)106 UPB_INLINE char *udpa_annotations_FileMigrateAnnotation_serialize(const udpa_annotations_FileMigrateAnnotation *msg, upb_arena *arena, size_t *len) {
107 return upb_encode(msg, &udpa_annotations_FileMigrateAnnotation_msginit, arena, len);
108 }
109
udpa_annotations_FileMigrateAnnotation_move_to_package(const udpa_annotations_FileMigrateAnnotation * msg)110 UPB_INLINE upb_strview udpa_annotations_FileMigrateAnnotation_move_to_package(const udpa_annotations_FileMigrateAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
111
udpa_annotations_FileMigrateAnnotation_set_move_to_package(udpa_annotations_FileMigrateAnnotation * msg,upb_strview value)112 UPB_INLINE void udpa_annotations_FileMigrateAnnotation_set_move_to_package(udpa_annotations_FileMigrateAnnotation *msg, upb_strview value) {
113 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
114 }
115
116 #ifdef __cplusplus
117 } /* extern "C" */
118 #endif
119
120 #include "upb/port_undef.inc"
121
122 #endif /* UDPA_ANNOTATIONS_MIGRATE_PROTO_UPB_H_ */
123