1 /* This file was generated by upbc (the upb compiler) from the input
4 * udpa/annotations/security.proto
6 * Do not edit -- your changes will be discarded when the file is
9 #ifndef UDPA_ANNOTATIONS_SECURITY_PROTO_UPB_H_
10 #define UDPA_ANNOTATIONS_SECURITY_PROTO_UPB_H_
12 #include "upb/msg_internal.h"
13 #include "upb/decode.h"
14 #include "upb/decode_fast.h"
15 #include "upb/encode.h"
17 #include "upb/port_def.inc"
23 struct udpa_annotations_FieldSecurityAnnotation;
24 typedef struct udpa_annotations_FieldSecurityAnnotation udpa_annotations_FieldSecurityAnnotation;
25 extern const upb_msglayout udpa_annotations_FieldSecurityAnnotation_msginit;
28 /* udpa.annotations.FieldSecurityAnnotation */
30 UPB_INLINE udpa_annotations_FieldSecurityAnnotation *udpa_annotations_FieldSecurityAnnotation_new(upb_arena *arena) {
31 return (udpa_annotations_FieldSecurityAnnotation *)_upb_msg_new(&udpa_annotations_FieldSecurityAnnotation_msginit, arena);
33 UPB_INLINE udpa_annotations_FieldSecurityAnnotation *udpa_annotations_FieldSecurityAnnotation_parse(const char *buf, size_t size,
35 udpa_annotations_FieldSecurityAnnotation *ret = udpa_annotations_FieldSecurityAnnotation_new(arena);
36 if (!ret) return NULL;
37 if (!upb_decode(buf, size, ret, &udpa_annotations_FieldSecurityAnnotation_msginit, arena)) return NULL;
40 UPB_INLINE udpa_annotations_FieldSecurityAnnotation *udpa_annotations_FieldSecurityAnnotation_parse_ex(const char *buf, size_t size,
41 const upb_extreg *extreg, int options,
43 udpa_annotations_FieldSecurityAnnotation *ret = udpa_annotations_FieldSecurityAnnotation_new(arena);
44 if (!ret) return NULL;
45 if (!_upb_decode(buf, size, ret, &udpa_annotations_FieldSecurityAnnotation_msginit, extreg, options, arena)) {
50 UPB_INLINE char *udpa_annotations_FieldSecurityAnnotation_serialize(const udpa_annotations_FieldSecurityAnnotation *msg, upb_arena *arena, size_t *len) {
51 return upb_encode(msg, &udpa_annotations_FieldSecurityAnnotation_msginit, arena, len);
54 UPB_INLINE bool udpa_annotations_FieldSecurityAnnotation_configure_for_untrusted_downstream(const udpa_annotations_FieldSecurityAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
55 UPB_INLINE bool udpa_annotations_FieldSecurityAnnotation_configure_for_untrusted_upstream(const udpa_annotations_FieldSecurityAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
57 UPB_INLINE void udpa_annotations_FieldSecurityAnnotation_set_configure_for_untrusted_downstream(udpa_annotations_FieldSecurityAnnotation *msg, bool value) {
58 *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
60 UPB_INLINE void udpa_annotations_FieldSecurityAnnotation_set_configure_for_untrusted_upstream(udpa_annotations_FieldSecurityAnnotation *msg, bool value) {
61 *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
68 #include "upb/port_undef.inc"
70 #endif /* UDPA_ANNOTATIONS_SECURITY_PROTO_UPB_H_ */