xref: /aosp_15_r20/external/grpc-grpc/src/core/ext/upb-gen/google/api/annotations.upb.h (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1 /* This file was generated by upb_generator from the input file:
2  *
3  *     google/api/annotations.proto
4  *
5  * Do not edit -- your changes will be discarded when the file is
6  * regenerated. */
7 
8 #ifndef GOOGLE_API_ANNOTATIONS_PROTO_UPB_H_
9 #define GOOGLE_API_ANNOTATIONS_PROTO_UPB_H_
10 
11 #include "upb/generated_code_support.h"
12 
13 #include "google/api/annotations.upb_minitable.h"
14 
15 #include "google/api/http.upb_minitable.h"
16 #include "google/protobuf/descriptor.upb_minitable.h"
17 
18 // Must be last.
19 #include "upb/port/def.inc"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 struct google_protobuf_MethodOptions;
26 
27 
google_api_has_http(const struct google_protobuf_MethodOptions * msg)28 UPB_INLINE bool google_api_has_http(const struct google_protobuf_MethodOptions* msg) {
29   return upb_Message_HasExtension((upb_Message*)msg, &google_api_http_ext);
30 }
google_api_clear_http(struct google_protobuf_MethodOptions * msg)31 UPB_INLINE void google_api_clear_http(struct google_protobuf_MethodOptions* msg) {
32   upb_Message_ClearExtension((upb_Message*)msg, &google_api_http_ext);
33 }
google_api_http(const struct google_protobuf_MethodOptions * msg)34 UPB_INLINE const struct google_api_HttpRule* google_api_http(const struct google_protobuf_MethodOptions* msg) {
35   const upb_MiniTableExtension* ext = &google_api_http_ext;
36   UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
37   UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
38                  &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_8Byte);
39   const struct google_api_HttpRule* default_val = NULL;
40   const struct google_api_HttpRule* ret;
41   _upb_Message_GetExtensionField((upb_Message*)msg, ext, &default_val, &ret);
42   return ret;
43 }
google_api_set_http(struct google_protobuf_MethodOptions * msg,const struct google_api_HttpRule * val,upb_Arena * arena)44 UPB_INLINE void google_api_set_http(struct google_protobuf_MethodOptions* msg, const struct google_api_HttpRule* val, upb_Arena* arena) {
45   const upb_MiniTableExtension* ext = &google_api_http_ext;
46   UPB_ASSUME(upb_MiniTableField_IsScalar(&ext->UPB_PRIVATE(field)));
47   UPB_ASSUME(UPB_PRIVATE(_upb_MiniTableField_GetRep)(
48                  &ext->UPB_PRIVATE(field)) == kUpb_FieldRep_8Byte);
49   bool ok = _upb_Message_SetExtensionField((upb_Message*)msg, ext, &val, arena);
50   UPB_ASSERT(ok);
51 }
52 #ifdef __cplusplus
53 }  /* extern "C" */
54 #endif
55 
56 #include "upb/port/undef.inc"
57 
58 #endif  /* GOOGLE_API_ANNOTATIONS_PROTO_UPB_H_ */
59