• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* This file was generated by upbc (the upb compiler) from the input
2  * file:
3  *
4  *     src/proto/grpc/gcp/altscontext.proto
5  *
6  * Do not edit -- your changes will be discarded when the file is
7  * regenerated. */
8 
9 #ifndef SRC_PROTO_GRPC_GCP_ALTSCONTEXT_PROTO_UPB_H_
10 #define SRC_PROTO_GRPC_GCP_ALTSCONTEXT_PROTO_UPB_H_
11 
12 #include "upb/msg.h"
13 #include "upb/decode.h"
14 #include "upb/encode.h"
15 
16 #include "upb/port_def.inc"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 struct grpc_gcp_AltsContext;
23 struct grpc_gcp_AltsContext_PeerAttributesEntry;
24 typedef struct grpc_gcp_AltsContext grpc_gcp_AltsContext;
25 typedef struct grpc_gcp_AltsContext_PeerAttributesEntry grpc_gcp_AltsContext_PeerAttributesEntry;
26 extern const upb_msglayout grpc_gcp_AltsContext_msginit;
27 extern const upb_msglayout grpc_gcp_AltsContext_PeerAttributesEntry_msginit;
28 struct grpc_gcp_RpcProtocolVersions;
29 extern const upb_msglayout grpc_gcp_RpcProtocolVersions_msginit;
30 
31 
32 /* grpc.gcp.AltsContext */
33 
grpc_gcp_AltsContext_new(upb_arena * arena)34 UPB_INLINE grpc_gcp_AltsContext *grpc_gcp_AltsContext_new(upb_arena *arena) {
35   return (grpc_gcp_AltsContext *)_upb_msg_new(&grpc_gcp_AltsContext_msginit, arena);
36 }
grpc_gcp_AltsContext_parse(const char * buf,size_t size,upb_arena * arena)37 UPB_INLINE grpc_gcp_AltsContext *grpc_gcp_AltsContext_parse(const char *buf, size_t size,
38                         upb_arena *arena) {
39   grpc_gcp_AltsContext *ret = grpc_gcp_AltsContext_new(arena);
40   return (ret && upb_decode(buf, size, ret, &grpc_gcp_AltsContext_msginit, arena)) ? ret : NULL;
41 }
grpc_gcp_AltsContext_serialize(const grpc_gcp_AltsContext * msg,upb_arena * arena,size_t * len)42 UPB_INLINE char *grpc_gcp_AltsContext_serialize(const grpc_gcp_AltsContext *msg, upb_arena *arena, size_t *len) {
43   return upb_encode(msg, &grpc_gcp_AltsContext_msginit, arena, len);
44 }
45 
grpc_gcp_AltsContext_application_protocol(const grpc_gcp_AltsContext * msg)46 UPB_INLINE upb_strview grpc_gcp_AltsContext_application_protocol(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
grpc_gcp_AltsContext_record_protocol(const grpc_gcp_AltsContext * msg)47 UPB_INLINE upb_strview grpc_gcp_AltsContext_record_protocol(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); }
grpc_gcp_AltsContext_security_level(const grpc_gcp_AltsContext * msg)48 UPB_INLINE int32_t grpc_gcp_AltsContext_security_level(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
grpc_gcp_AltsContext_peer_service_account(const grpc_gcp_AltsContext * msg)49 UPB_INLINE upb_strview grpc_gcp_AltsContext_peer_service_account(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_strview); }
grpc_gcp_AltsContext_local_service_account(const grpc_gcp_AltsContext * msg)50 UPB_INLINE upb_strview grpc_gcp_AltsContext_local_service_account(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), upb_strview); }
grpc_gcp_AltsContext_has_peer_rpc_versions(const grpc_gcp_AltsContext * msg)51 UPB_INLINE bool grpc_gcp_AltsContext_has_peer_rpc_versions(const grpc_gcp_AltsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 72)); }
grpc_gcp_AltsContext_peer_rpc_versions(const grpc_gcp_AltsContext * msg)52 UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_AltsContext_peer_rpc_versions(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const struct grpc_gcp_RpcProtocolVersions*); }
grpc_gcp_AltsContext_has_peer_attributes(const grpc_gcp_AltsContext * msg)53 UPB_INLINE bool grpc_gcp_AltsContext_has_peer_attributes(const grpc_gcp_AltsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); }
grpc_gcp_AltsContext_peer_attributes_size(const grpc_gcp_AltsContext * msg)54 UPB_INLINE size_t grpc_gcp_AltsContext_peer_attributes_size(const grpc_gcp_AltsContext *msg) {return _upb_msg_map_size(msg, UPB_SIZE(44, 80)); }
grpc_gcp_AltsContext_peer_attributes_get(const grpc_gcp_AltsContext * msg,upb_strview key,upb_strview * val)55 UPB_INLINE bool grpc_gcp_AltsContext_peer_attributes_get(const grpc_gcp_AltsContext *msg, upb_strview key, upb_strview *val) { return _upb_msg_map_get(msg, UPB_SIZE(44, 80), &key, 0, val, 0); }
grpc_gcp_AltsContext_peer_attributes_next(const grpc_gcp_AltsContext * msg,size_t * iter)56 UPB_INLINE const grpc_gcp_AltsContext_PeerAttributesEntry* grpc_gcp_AltsContext_peer_attributes_next(const grpc_gcp_AltsContext *msg, size_t* iter) { return (const grpc_gcp_AltsContext_PeerAttributesEntry*)_upb_msg_map_next(msg, UPB_SIZE(44, 80), iter); }
57 
grpc_gcp_AltsContext_set_application_protocol(grpc_gcp_AltsContext * msg,upb_strview value)58 UPB_INLINE void grpc_gcp_AltsContext_set_application_protocol(grpc_gcp_AltsContext *msg, upb_strview value) {
59   *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
60 }
grpc_gcp_AltsContext_set_record_protocol(grpc_gcp_AltsContext * msg,upb_strview value)61 UPB_INLINE void grpc_gcp_AltsContext_set_record_protocol(grpc_gcp_AltsContext *msg, upb_strview value) {
62   *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
63 }
grpc_gcp_AltsContext_set_security_level(grpc_gcp_AltsContext * msg,int32_t value)64 UPB_INLINE void grpc_gcp_AltsContext_set_security_level(grpc_gcp_AltsContext *msg, int32_t value) {
65   *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
66 }
grpc_gcp_AltsContext_set_peer_service_account(grpc_gcp_AltsContext * msg,upb_strview value)67 UPB_INLINE void grpc_gcp_AltsContext_set_peer_service_account(grpc_gcp_AltsContext *msg, upb_strview value) {
68   *UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_strview) = value;
69 }
grpc_gcp_AltsContext_set_local_service_account(grpc_gcp_AltsContext * msg,upb_strview value)70 UPB_INLINE void grpc_gcp_AltsContext_set_local_service_account(grpc_gcp_AltsContext *msg, upb_strview value) {
71   *UPB_PTR_AT(msg, UPB_SIZE(32, 56), upb_strview) = value;
72 }
grpc_gcp_AltsContext_set_peer_rpc_versions(grpc_gcp_AltsContext * msg,struct grpc_gcp_RpcProtocolVersions * value)73 UPB_INLINE void grpc_gcp_AltsContext_set_peer_rpc_versions(grpc_gcp_AltsContext *msg, struct grpc_gcp_RpcProtocolVersions* value) {
74   *UPB_PTR_AT(msg, UPB_SIZE(40, 72), struct grpc_gcp_RpcProtocolVersions*) = value;
75 }
grpc_gcp_AltsContext_mutable_peer_rpc_versions(grpc_gcp_AltsContext * msg,upb_arena * arena)76 UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_AltsContext_mutable_peer_rpc_versions(grpc_gcp_AltsContext *msg, upb_arena *arena) {
77   struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_AltsContext_peer_rpc_versions(msg);
78   if (sub == NULL) {
79     sub = (struct grpc_gcp_RpcProtocolVersions*)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena);
80     if (!sub) return NULL;
81     grpc_gcp_AltsContext_set_peer_rpc_versions(msg, sub);
82   }
83   return sub;
84 }
grpc_gcp_AltsContext_peer_attributes_clear(grpc_gcp_AltsContext * msg)85 UPB_INLINE void grpc_gcp_AltsContext_peer_attributes_clear(grpc_gcp_AltsContext *msg) { _upb_msg_map_clear(msg, UPB_SIZE(44, 80)); }
grpc_gcp_AltsContext_peer_attributes_set(grpc_gcp_AltsContext * msg,upb_strview key,upb_strview val,upb_arena * a)86 UPB_INLINE bool grpc_gcp_AltsContext_peer_attributes_set(grpc_gcp_AltsContext *msg, upb_strview key, upb_strview val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(44, 80), &key, 0, &val, 0, a); }
grpc_gcp_AltsContext_peer_attributes_delete(grpc_gcp_AltsContext * msg,upb_strview key)87 UPB_INLINE bool grpc_gcp_AltsContext_peer_attributes_delete(grpc_gcp_AltsContext *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(44, 80), &key, 0); }
grpc_gcp_AltsContext_peer_attributes_nextmutable(grpc_gcp_AltsContext * msg,size_t * iter)88 UPB_INLINE grpc_gcp_AltsContext_PeerAttributesEntry* grpc_gcp_AltsContext_peer_attributes_nextmutable(grpc_gcp_AltsContext *msg, size_t* iter) { return (grpc_gcp_AltsContext_PeerAttributesEntry*)_upb_msg_map_next(msg, UPB_SIZE(44, 80), iter); }
89 
90 /* grpc.gcp.AltsContext.PeerAttributesEntry */
91 
grpc_gcp_AltsContext_PeerAttributesEntry_key(const grpc_gcp_AltsContext_PeerAttributesEntry * msg)92 UPB_INLINE upb_strview grpc_gcp_AltsContext_PeerAttributesEntry_key(const grpc_gcp_AltsContext_PeerAttributesEntry *msg) {
93   upb_strview ret;
94   _upb_msg_map_key(msg, &ret, 0);
95   return ret;
96 }
grpc_gcp_AltsContext_PeerAttributesEntry_value(const grpc_gcp_AltsContext_PeerAttributesEntry * msg)97 UPB_INLINE upb_strview grpc_gcp_AltsContext_PeerAttributesEntry_value(const grpc_gcp_AltsContext_PeerAttributesEntry *msg) {
98   upb_strview ret;
99   _upb_msg_map_value(msg, &ret, 0);
100   return ret;
101 }
102 
grpc_gcp_AltsContext_PeerAttributesEntry_set_value(grpc_gcp_AltsContext_PeerAttributesEntry * msg,upb_strview value)103 UPB_INLINE void grpc_gcp_AltsContext_PeerAttributesEntry_set_value(grpc_gcp_AltsContext_PeerAttributesEntry *msg, upb_strview value) {
104   _upb_msg_map_set_value(msg, &value, 0);
105 }
106 
107 #ifdef __cplusplus
108 }  /* extern "C" */
109 #endif
110 
111 #include "upb/port_undef.inc"
112 
113 #endif  /* SRC_PROTO_GRPC_GCP_ALTSCONTEXT_PROTO_UPB_H_ */
114