GRPC C++  1.39.1
altscontext.upb.h
Go to the documentation of this file.
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/decode_fast.h"
15 #include "upb/encode.h"
16 
17 #include "upb/port_def.inc"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
27 extern const upb_msglayout grpc_gcp_AltsContext_msginit;
28 extern const upb_msglayout grpc_gcp_AltsContext_PeerAttributesEntry_msginit;
30 extern const upb_msglayout grpc_gcp_RpcProtocolVersions_msginit;
31 
32 
33 /* grpc.gcp.AltsContext */
34 
37 }
38 UPB_INLINE grpc_gcp_AltsContext *grpc_gcp_AltsContext_parse(const char *buf, size_t size,
39  upb_arena *arena) {
41  return (ret && upb_decode(buf, size, ret, &grpc_gcp_AltsContext_msginit, arena)) ? ret : NULL;
42 }
43 UPB_INLINE grpc_gcp_AltsContext *grpc_gcp_AltsContext_parse_ex(const char *buf, size_t size,
44  upb_arena *arena, int options) {
46  return (ret && _upb_decode(buf, size, ret, &grpc_gcp_AltsContext_msginit, arena, options))
47  ? ret : NULL;
48 }
49 UPB_INLINE char *grpc_gcp_AltsContext_serialize(const grpc_gcp_AltsContext *msg, upb_arena *arena, size_t *len) {
50  return upb_encode(msg, &grpc_gcp_AltsContext_msginit, arena, len);
51 }
52 
53 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); }
54 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); }
55 UPB_INLINE int32_t grpc_gcp_AltsContext_security_level(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
56 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); }
57 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); }
58 UPB_INLINE bool grpc_gcp_AltsContext_has_peer_rpc_versions(const grpc_gcp_AltsContext *msg) { return _upb_hasbit(msg, 1); }
59 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*); }
60 UPB_INLINE bool grpc_gcp_AltsContext_has_peer_attributes(const grpc_gcp_AltsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); }
61 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)); }
62 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); }
63 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); }
64 
65 UPB_INLINE void grpc_gcp_AltsContext_set_application_protocol(grpc_gcp_AltsContext *msg, upb_strview value) {
66  *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
67 }
68 UPB_INLINE void grpc_gcp_AltsContext_set_record_protocol(grpc_gcp_AltsContext *msg, upb_strview value) {
69  *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
70 }
71 UPB_INLINE void grpc_gcp_AltsContext_set_security_level(grpc_gcp_AltsContext *msg, int32_t value) {
72  *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
73 }
74 UPB_INLINE void grpc_gcp_AltsContext_set_peer_service_account(grpc_gcp_AltsContext *msg, upb_strview value) {
75  *UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_strview) = value;
76 }
77 UPB_INLINE void grpc_gcp_AltsContext_set_local_service_account(grpc_gcp_AltsContext *msg, upb_strview value) {
78  *UPB_PTR_AT(msg, UPB_SIZE(32, 56), upb_strview) = value;
79 }
81  _upb_sethas(msg, 1);
82  *UPB_PTR_AT(msg, UPB_SIZE(40, 72), struct grpc_gcp_RpcProtocolVersions*) = value;
83 }
86  if (sub == NULL) {
88  if (!sub) return NULL;
90  }
91  return sub;
92 }
93 UPB_INLINE void grpc_gcp_AltsContext_peer_attributes_clear(grpc_gcp_AltsContext *msg) { _upb_msg_map_clear(msg, UPB_SIZE(44, 80)); }
94 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); }
95 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); }
97 
98 /* grpc.gcp.AltsContext.PeerAttributesEntry */
99 
101  upb_strview ret;
102  _upb_msg_map_key(msg, &ret, 0);
103  return ret;
104 }
106  upb_strview ret;
107  _upb_msg_map_value(msg, &ret, 0);
108  return ret;
109 }
110 
112  _upb_msg_map_set_value(msg, &value, 0);
113 }
114 
115 #ifdef __cplusplus
116 } /* extern "C" */
117 #endif
118 
119 #include "upb/port_undef.inc"
120 
121 #endif /* SRC_PROTO_GRPC_GCP_ALTSCONTEXT_PROTO_UPB_H_ */
UPB_INLINE upb_strview grpc_gcp_AltsContext_application_protocol(const grpc_gcp_AltsContext *msg)
Definition: altscontext.upb.h:53
UPB_INLINE void grpc_gcp_AltsContext_set_security_level(grpc_gcp_AltsContext *msg, int32_t value)
Definition: altscontext.upb.h:71
UPB_INLINE char * grpc_gcp_AltsContext_serialize(const grpc_gcp_AltsContext *msg, upb_arena *arena, size_t *len)
Definition: altscontext.upb.h:49
UPB_INLINE int32_t grpc_gcp_AltsContext_security_level(const grpc_gcp_AltsContext *msg)
Definition: altscontext.upb.h:55
struct grpc_gcp_AltsContext grpc_gcp_AltsContext
Definition: altscontext.upb.h:25
const upb_msglayout grpc_gcp_AltsContext_PeerAttributesEntry_msginit
Definition: altscontext.upb.c:42
UPB_INLINE void grpc_gcp_AltsContext_set_application_protocol(grpc_gcp_AltsContext *msg, upb_strview value)
Definition: altscontext.upb.h:65
UPB_INLINE upb_strview grpc_gcp_AltsContext_record_protocol(const grpc_gcp_AltsContext *msg)
Definition: altscontext.upb.h:54
UPB_INLINE const struct grpc_gcp_RpcProtocolVersions * grpc_gcp_AltsContext_peer_rpc_versions(const grpc_gcp_AltsContext *msg)
Definition: altscontext.upb.h:59
UPB_INLINE bool grpc_gcp_AltsContext_has_peer_attributes(const grpc_gcp_AltsContext *msg)
Definition: altscontext.upb.h:60
UPB_INLINE grpc_gcp_AltsContext * grpc_gcp_AltsContext_parse(const char *buf, size_t size, upb_arena *arena)
Definition: altscontext.upb.h:38
UPB_INLINE grpc_gcp_AltsContext * grpc_gcp_AltsContext_parse_ex(const char *buf, size_t size, upb_arena *arena, int options)
Definition: altscontext.upb.h:43
const upb_msglayout grpc_gcp_RpcProtocolVersions_msginit
Definition: transport_security_common.upb.c:24
UPB_INLINE void grpc_gcp_AltsContext_PeerAttributesEntry_set_value(grpc_gcp_AltsContext_PeerAttributesEntry *msg, upb_strview value)
Definition: altscontext.upb.h:111
UPB_INLINE bool grpc_gcp_AltsContext_peer_attributes_set(grpc_gcp_AltsContext *msg, upb_strview key, upb_strview val, upb_arena *a)
Definition: altscontext.upb.h:94
UPB_INLINE void grpc_gcp_AltsContext_peer_attributes_clear(grpc_gcp_AltsContext *msg)
Definition: altscontext.upb.h:93
UPB_INLINE void grpc_gcp_AltsContext_set_local_service_account(grpc_gcp_AltsContext *msg, upb_strview value)
Definition: altscontext.upb.h:77
UPB_INLINE bool grpc_gcp_AltsContext_peer_attributes_get(const grpc_gcp_AltsContext *msg, upb_strview key, upb_strview *val)
Definition: altscontext.upb.h:62
UPB_INLINE bool grpc_gcp_AltsContext_peer_attributes_delete(grpc_gcp_AltsContext *msg, upb_strview key)
Definition: altscontext.upb.h:95
UPB_INLINE size_t grpc_gcp_AltsContext_peer_attributes_size(const grpc_gcp_AltsContext *msg)
Definition: altscontext.upb.h:61
const upb_msglayout grpc_gcp_AltsContext_msginit
Definition: altscontext.upb.c:31
UPB_INLINE upb_strview grpc_gcp_AltsContext_PeerAttributesEntry_value(const grpc_gcp_AltsContext_PeerAttributesEntry *msg)
Definition: altscontext.upb.h:105
UPB_INLINE upb_strview grpc_gcp_AltsContext_PeerAttributesEntry_key(const grpc_gcp_AltsContext_PeerAttributesEntry *msg)
Definition: altscontext.upb.h:100
UPB_INLINE grpc_gcp_AltsContext_PeerAttributesEntry * grpc_gcp_AltsContext_peer_attributes_nextmutable(grpc_gcp_AltsContext *msg, size_t *iter)
Definition: altscontext.upb.h:96
UPB_INLINE upb_strview grpc_gcp_AltsContext_local_service_account(const grpc_gcp_AltsContext *msg)
Definition: altscontext.upb.h:57
UPB_INLINE void grpc_gcp_AltsContext_set_peer_rpc_versions(grpc_gcp_AltsContext *msg, struct grpc_gcp_RpcProtocolVersions *value)
Definition: altscontext.upb.h:80
UPB_INLINE upb_strview grpc_gcp_AltsContext_peer_service_account(const grpc_gcp_AltsContext *msg)
Definition: altscontext.upb.h:56
UPB_INLINE const grpc_gcp_AltsContext_PeerAttributesEntry * grpc_gcp_AltsContext_peer_attributes_next(const grpc_gcp_AltsContext *msg, size_t *iter)
Definition: altscontext.upb.h:63
UPB_INLINE struct grpc_gcp_RpcProtocolVersions * grpc_gcp_AltsContext_mutable_peer_rpc_versions(grpc_gcp_AltsContext *msg, upb_arena *arena)
Definition: altscontext.upb.h:84
UPB_INLINE grpc_gcp_AltsContext * grpc_gcp_AltsContext_new(upb_arena *arena)
Definition: altscontext.upb.h:35
UPB_INLINE void grpc_gcp_AltsContext_set_peer_service_account(grpc_gcp_AltsContext *msg, upb_strview value)
Definition: altscontext.upb.h:74
UPB_INLINE bool grpc_gcp_AltsContext_has_peer_rpc_versions(const grpc_gcp_AltsContext *msg)
Definition: altscontext.upb.h:58
UPB_INLINE void grpc_gcp_AltsContext_set_record_protocol(grpc_gcp_AltsContext *msg, upb_strview value)
Definition: altscontext.upb.h:68
struct grpc_gcp_AltsContext_PeerAttributesEntry grpc_gcp_AltsContext_PeerAttributesEntry
Definition: altscontext.upb.h:26
struct grpc_gcp_RpcProtocolVersions grpc_gcp_RpcProtocolVersions
Definition: transport_security_common.upb.h:25
upb_arena * arena
Definition: xds_api.cc:909