1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  *     google/protobuf/empty.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef GOOGLE_PROTOBUF_EMPTY_PROTO_UPB_H_
10 #define GOOGLE_PROTOBUF_EMPTY_PROTO_UPB_H_
11 
12 #include "upb/collections/array_internal.h"
13 #include "upb/collections/map_gencode_util.h"
14 #include "upb/message/accessors.h"
15 #include "upb/message/internal.h"
16 #include "upb/mini_table/enum_internal.h"
17 #include "upb/wire/decode.h"
18 #include "upb/wire/decode_fast.h"
19 #include "upb/wire/encode.h"
20 
21 // Must be last.
22 #include "upb/port/def.inc"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 typedef struct google_protobuf_Empty google_protobuf_Empty;
29 extern const upb_MiniTable google_protobuf_Empty_msg_init;
30 
31 
32 
33 /* google.protobuf.Empty */
34 
google_protobuf_Empty_new(upb_Arena * arena)35 UPB_INLINE google_protobuf_Empty* google_protobuf_Empty_new(upb_Arena* arena) {
36   return (google_protobuf_Empty*)_upb_Message_New(&google_protobuf_Empty_msg_init, arena);
37 }
google_protobuf_Empty_parse(const char * buf,size_t size,upb_Arena * arena)38 UPB_INLINE google_protobuf_Empty* google_protobuf_Empty_parse(const char* buf, size_t size, upb_Arena* arena) {
39   google_protobuf_Empty* ret = google_protobuf_Empty_new(arena);
40   if (!ret) return NULL;
41   if (upb_Decode(buf, size, ret, &google_protobuf_Empty_msg_init, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
42     return NULL;
43   }
44   return ret;
45 }
google_protobuf_Empty_parse_ex(const char * buf,size_t size,const upb_ExtensionRegistry * extreg,int options,upb_Arena * arena)46 UPB_INLINE google_protobuf_Empty* google_protobuf_Empty_parse_ex(const char* buf, size_t size,
47                            const upb_ExtensionRegistry* extreg,
48                            int options, upb_Arena* arena) {
49   google_protobuf_Empty* ret = google_protobuf_Empty_new(arena);
50   if (!ret) return NULL;
51   if (upb_Decode(buf, size, ret, &google_protobuf_Empty_msg_init, extreg, options, arena) !=
52       kUpb_DecodeStatus_Ok) {
53     return NULL;
54   }
55   return ret;
56 }
google_protobuf_Empty_serialize(const google_protobuf_Empty * msg,upb_Arena * arena,size_t * len)57 UPB_INLINE char* google_protobuf_Empty_serialize(const google_protobuf_Empty* msg, upb_Arena* arena, size_t* len) {
58   char* ptr;
59   (void)upb_Encode(msg, &google_protobuf_Empty_msg_init, 0, arena, &ptr, len);
60   return ptr;
61 }
google_protobuf_Empty_serialize_ex(const google_protobuf_Empty * msg,int options,upb_Arena * arena,size_t * len)62 UPB_INLINE char* google_protobuf_Empty_serialize_ex(const google_protobuf_Empty* msg, int options,
63                                  upb_Arena* arena, size_t* len) {
64   char* ptr;
65   (void)upb_Encode(msg, &google_protobuf_Empty_msg_init, options, arena, &ptr, len);
66   return ptr;
67 }
68 
69 
70 extern const upb_MiniTableFile google_protobuf_empty_proto_upb_file_layout;
71 
72 #ifdef __cplusplus
73 }  /* extern "C" */
74 #endif
75 
76 #include "upb/port/undef.inc"
77 
78 #endif  /* GOOGLE_PROTOBUF_EMPTY_PROTO_UPB_H_ */
79