Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / grpc-cloned / deps / grpc / src / core / ext / upb-generated / src / proto / grpc / gcp / altscontext.upb.h
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/generated_util.h"
13 #include "upb/msg.h"
14 #include "upb/decode.h"
15 #include "upb/encode.h"
16
17 #include "upb/port_def.inc"
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 struct grpc_gcp_AltsContext;
24 struct grpc_gcp_AltsContext_PeerAttributesEntry;
25 typedef struct grpc_gcp_AltsContext grpc_gcp_AltsContext;
26 typedef struct grpc_gcp_AltsContext_PeerAttributesEntry grpc_gcp_AltsContext_PeerAttributesEntry;
27 extern const upb_msglayout grpc_gcp_AltsContext_msginit;
28 extern const upb_msglayout grpc_gcp_AltsContext_PeerAttributesEntry_msginit;
29 struct grpc_gcp_RpcProtocolVersions;
30 extern const upb_msglayout grpc_gcp_RpcProtocolVersions_msginit;
31
32
33 /* grpc.gcp.AltsContext */
34
35 UPB_INLINE grpc_gcp_AltsContext *grpc_gcp_AltsContext_new(upb_arena *arena) {
36   return (grpc_gcp_AltsContext *)upb_msg_new(&grpc_gcp_AltsContext_msginit, arena);
37 }
38 UPB_INLINE grpc_gcp_AltsContext *grpc_gcp_AltsContext_parse(const char *buf, size_t size,
39                         upb_arena *arena) {
40   grpc_gcp_AltsContext *ret = grpc_gcp_AltsContext_new(arena);
41   return (ret && upb_decode(buf, size, ret, &grpc_gcp_AltsContext_msginit, arena)) ? ret : NULL;
42 }
43 UPB_INLINE char *grpc_gcp_AltsContext_serialize(const grpc_gcp_AltsContext *msg, upb_arena *arena, size_t *len) {
44   return upb_encode(msg, &grpc_gcp_AltsContext_msginit, arena, len);
45 }
46
47 UPB_INLINE upb_strview grpc_gcp_AltsContext_application_protocol(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); }
48 UPB_INLINE upb_strview grpc_gcp_AltsContext_record_protocol(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)); }
49 UPB_INLINE int32_t grpc_gcp_AltsContext_security_level(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); }
50 UPB_INLINE upb_strview grpc_gcp_AltsContext_peer_service_account(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 40)); }
51 UPB_INLINE upb_strview grpc_gcp_AltsContext_local_service_account(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 56)); }
52 UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_AltsContext_peer_rpc_versions(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, const struct grpc_gcp_RpcProtocolVersions*, UPB_SIZE(40, 72)); }
53 UPB_INLINE const grpc_gcp_AltsContext_PeerAttributesEntry* const* grpc_gcp_AltsContext_peer_attributes(const grpc_gcp_AltsContext *msg, size_t *len) { return (const grpc_gcp_AltsContext_PeerAttributesEntry* const*)_upb_array_accessor(msg, UPB_SIZE(44, 80), len); }
54
55 UPB_INLINE void grpc_gcp_AltsContext_set_application_protocol(grpc_gcp_AltsContext *msg, upb_strview value) {
56   UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value;
57 }
58 UPB_INLINE void grpc_gcp_AltsContext_set_record_protocol(grpc_gcp_AltsContext *msg, upb_strview value) {
59   UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)) = value;
60 }
61 UPB_INLINE void grpc_gcp_AltsContext_set_security_level(grpc_gcp_AltsContext *msg, int32_t value) {
62   UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value;
63 }
64 UPB_INLINE void grpc_gcp_AltsContext_set_peer_service_account(grpc_gcp_AltsContext *msg, upb_strview value) {
65   UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 40)) = value;
66 }
67 UPB_INLINE void grpc_gcp_AltsContext_set_local_service_account(grpc_gcp_AltsContext *msg, upb_strview value) {
68   UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 56)) = value;
69 }
70 UPB_INLINE void grpc_gcp_AltsContext_set_peer_rpc_versions(grpc_gcp_AltsContext *msg, struct grpc_gcp_RpcProtocolVersions* value) {
71   UPB_FIELD_AT(msg, struct grpc_gcp_RpcProtocolVersions*, UPB_SIZE(40, 72)) = value;
72 }
73 UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_AltsContext_mutable_peer_rpc_versions(grpc_gcp_AltsContext *msg, upb_arena *arena) {
74   struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_AltsContext_peer_rpc_versions(msg);
75   if (sub == NULL) {
76     sub = (struct grpc_gcp_RpcProtocolVersions*)upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena);
77     if (!sub) return NULL;
78     grpc_gcp_AltsContext_set_peer_rpc_versions(msg, sub);
79   }
80   return sub;
81 }
82 UPB_INLINE grpc_gcp_AltsContext_PeerAttributesEntry** grpc_gcp_AltsContext_mutable_peer_attributes(grpc_gcp_AltsContext *msg, size_t *len) {
83   return (grpc_gcp_AltsContext_PeerAttributesEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len);
84 }
85 UPB_INLINE grpc_gcp_AltsContext_PeerAttributesEntry** grpc_gcp_AltsContext_resize_peer_attributes(grpc_gcp_AltsContext *msg, size_t len, upb_arena *arena) {
86   return (grpc_gcp_AltsContext_PeerAttributesEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
87 }
88 UPB_INLINE struct grpc_gcp_AltsContext_PeerAttributesEntry* grpc_gcp_AltsContext_add_peer_attributes(grpc_gcp_AltsContext *msg, upb_arena *arena) {
89   struct grpc_gcp_AltsContext_PeerAttributesEntry* sub = (struct grpc_gcp_AltsContext_PeerAttributesEntry*)upb_msg_new(&grpc_gcp_AltsContext_PeerAttributesEntry_msginit, arena);
90   bool ok = _upb_array_append_accessor(
91       msg, UPB_SIZE(44, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
92   if (!ok) return NULL;
93   return sub;
94 }
95
96 /* grpc.gcp.AltsContext.PeerAttributesEntry */
97
98 UPB_INLINE grpc_gcp_AltsContext_PeerAttributesEntry *grpc_gcp_AltsContext_PeerAttributesEntry_new(upb_arena *arena) {
99   return (grpc_gcp_AltsContext_PeerAttributesEntry *)upb_msg_new(&grpc_gcp_AltsContext_PeerAttributesEntry_msginit, arena);
100 }
101 UPB_INLINE grpc_gcp_AltsContext_PeerAttributesEntry *grpc_gcp_AltsContext_PeerAttributesEntry_parse(const char *buf, size_t size,
102                         upb_arena *arena) {
103   grpc_gcp_AltsContext_PeerAttributesEntry *ret = grpc_gcp_AltsContext_PeerAttributesEntry_new(arena);
104   return (ret && upb_decode(buf, size, ret, &grpc_gcp_AltsContext_PeerAttributesEntry_msginit, arena)) ? ret : NULL;
105 }
106 UPB_INLINE char *grpc_gcp_AltsContext_PeerAttributesEntry_serialize(const grpc_gcp_AltsContext_PeerAttributesEntry *msg, upb_arena *arena, size_t *len) {
107   return upb_encode(msg, &grpc_gcp_AltsContext_PeerAttributesEntry_msginit, arena, len);
108 }
109
110 UPB_INLINE upb_strview grpc_gcp_AltsContext_PeerAttributesEntry_key(const grpc_gcp_AltsContext_PeerAttributesEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
111 UPB_INLINE upb_strview grpc_gcp_AltsContext_PeerAttributesEntry_value(const grpc_gcp_AltsContext_PeerAttributesEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); }
112
113 UPB_INLINE void grpc_gcp_AltsContext_PeerAttributesEntry_set_key(grpc_gcp_AltsContext_PeerAttributesEntry *msg, upb_strview value) {
114   UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
115 }
116 UPB_INLINE void grpc_gcp_AltsContext_PeerAttributesEntry_set_value(grpc_gcp_AltsContext_PeerAttributesEntry *msg, upb_strview value) {
117   UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value;
118 }
119
120 #ifdef __cplusplus
121 }  /* extern "C" */
122 #endif
123
124 #include "upb/port_undef.inc"
125
126 #endif  /* SRC_PROTO_GRPC_GCP_ALTSCONTEXT_PROTO_UPB_H_ */