1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  *     google/api/annotations.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef GOOGLE_API_ANNOTATIONS_PROTO_UPB_H_
10 #define GOOGLE_API_ANNOTATIONS_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 extern const upb_MiniTableExtension google_api_http_ext;
29 struct google_protobuf_MethodOptions;
30 extern const upb_MiniTable google_protobuf_MethodOptions_msg_init;
31 
32 
google_api_has_http(const struct google_protobuf_MethodOptions * msg)33 UPB_INLINE bool google_api_has_http(const struct google_protobuf_MethodOptions* msg) {
34   return _upb_Message_HasExtensionField(msg, &google_api_http_ext);
35 }
google_api_clear_http(struct google_protobuf_MethodOptions * msg)36 UPB_INLINE void google_api_clear_http(struct google_protobuf_MethodOptions* msg) {
37   _upb_Message_ClearExtensionField(msg, &google_api_http_ext);
38 }
google_api_http(const struct google_protobuf_MethodOptions * msg)39 UPB_INLINE const struct google_api_HttpRule* google_api_http(const struct google_protobuf_MethodOptions* msg) {
40   const upb_MiniTableExtension* ext = &google_api_http_ext;
41   UPB_ASSUME(!upb_IsRepeatedOrMap(&ext->field));
42   UPB_ASSUME(_upb_MiniTableField_GetRep(&ext->field) == kUpb_FieldRep_8Byte);
43   const struct google_api_HttpRule* default_val = NULL;
44   const struct google_api_HttpRule* ret;
45   _upb_Message_GetExtensionField(msg, ext, &default_val, &ret);
46   return ret;
47 }
google_api_set_http(struct google_protobuf_MethodOptions * msg,const struct google_api_HttpRule * val,upb_Arena * arena)48 UPB_INLINE void google_api_set_http(struct google_protobuf_MethodOptions* msg, const struct google_api_HttpRule* val, upb_Arena* arena) {
49   const upb_MiniTableExtension* ext = &google_api_http_ext;
50   UPB_ASSUME(!upb_IsRepeatedOrMap(&ext->field));
51   UPB_ASSUME(_upb_MiniTableField_GetRep(&ext->field) == kUpb_FieldRep_8Byte);
52   bool ok = _upb_Message_SetExtensionField(msg, ext, &val, arena);
53   UPB_ASSERT(ok);
54 }
55 extern const upb_MiniTableFile google_api_annotations_proto_upb_file_layout;
56 
57 #ifdef __cplusplus
58 }  /* extern "C" */
59 #endif
60 
61 #include "upb/port/undef.inc"
62 
63 #endif  /* GOOGLE_API_ANNOTATIONS_PROTO_UPB_H_ */
64