| 1 |
/* This file was generated by upbc (the upb compiler) from the input |
| 2 |
* file: |
| 3 |
* |
| 4 |
* envoy/config/trace/v3/skywalking.proto |
| 5 |
* |
| 6 |
* Do not edit -- your changes will be discarded when the file is |
| 7 |
* regenerated. */ |
| 8 |
|
| 9 |
#ifndef ENVOY_CONFIG_TRACE_V3_SKYWALKING_PROTO_UPB_H_ |
| 10 |
#define ENVOY_CONFIG_TRACE_V3_SKYWALKING_PROTO_UPB_H_ |
| 11 |
|
| 12 |
#include "upb/msg_internal.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 |
|
| 23 |
struct envoy_config_trace_v3_SkyWalkingConfig; |
| 24 |
struct envoy_config_trace_v3_ClientConfig; |
| 25 |
typedef struct envoy_config_trace_v3_SkyWalkingConfig envoy_config_trace_v3_SkyWalkingConfig; |
| 26 |
typedef struct envoy_config_trace_v3_ClientConfig envoy_config_trace_v3_ClientConfig; |
| 27 |
extern const upb_MiniTable envoy_config_trace_v3_SkyWalkingConfig_msginit; |
| 28 |
extern const upb_MiniTable envoy_config_trace_v3_ClientConfig_msginit; |
| 29 |
struct envoy_config_core_v3_GrpcService; |
| 30 |
struct google_protobuf_UInt32Value; |
| 31 |
extern const upb_MiniTable envoy_config_core_v3_GrpcService_msginit; |
| 32 |
extern const upb_MiniTable google_protobuf_UInt32Value_msginit; |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
/* envoy.config.trace.v3.SkyWalkingConfig */ |
| 37 |
|
| 38 |
UPB_INLINE envoy_config_trace_v3_SkyWalkingConfig* envoy_config_trace_v3_SkyWalkingConfig_new(upb_Arena* arena) { |
| 39 |
return (envoy_config_trace_v3_SkyWalkingConfig*)_upb_Message_New(&envoy_config_trace_v3_SkyWalkingConfig_msginit, arena); |
| 40 |
} |
| 41 |
UPB_INLINE envoy_config_trace_v3_SkyWalkingConfig* envoy_config_trace_v3_SkyWalkingConfig_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 42 |
envoy_config_trace_v3_SkyWalkingConfig* ret = envoy_config_trace_v3_SkyWalkingConfig_new(arena); |
| 43 |
if (!ret) return NULL; |
| 44 |
if (upb_Decode(buf, size, ret, &envoy_config_trace_v3_SkyWalkingConfig_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 45 |
return NULL; |
| 46 |
} |
| 47 |
return ret; |
| 48 |
} |
| 49 |
UPB_INLINE envoy_config_trace_v3_SkyWalkingConfig* envoy_config_trace_v3_SkyWalkingConfig_parse_ex(const char* buf, size_t size, |
| 50 |
const upb_ExtensionRegistry* extreg, |
| 51 |
int options, upb_Arena* arena) { |
| 52 |
envoy_config_trace_v3_SkyWalkingConfig* ret = envoy_config_trace_v3_SkyWalkingConfig_new(arena); |
| 53 |
if (!ret) return NULL; |
| 54 |
if (upb_Decode(buf, size, ret, &envoy_config_trace_v3_SkyWalkingConfig_msginit, extreg, options, arena) != |
| 55 |
kUpb_DecodeStatus_Ok) { |
| 56 |
return NULL; |
| 57 |
} |
| 58 |
return ret; |
| 59 |
} |
| 60 |
UPB_INLINE char* envoy_config_trace_v3_SkyWalkingConfig_serialize(const envoy_config_trace_v3_SkyWalkingConfig* msg, upb_Arena* arena, size_t* len) { |
| 61 |
char* ptr; |
| 62 |
(void)upb_Encode(msg, &envoy_config_trace_v3_SkyWalkingConfig_msginit, 0, arena, &ptr, len); |
| 63 |
return ptr; |
| 64 |
} |
| 65 |
UPB_INLINE char* envoy_config_trace_v3_SkyWalkingConfig_serialize_ex(const envoy_config_trace_v3_SkyWalkingConfig* msg, int options, |
| 66 |
upb_Arena* arena, size_t* len) { |
| 67 |
char* ptr; |
| 68 |
(void)upb_Encode(msg, &envoy_config_trace_v3_SkyWalkingConfig_msginit, options, arena, &ptr, len); |
| 69 |
return ptr; |
| 70 |
} |
| 71 |
UPB_INLINE bool envoy_config_trace_v3_SkyWalkingConfig_has_grpc_service(const envoy_config_trace_v3_SkyWalkingConfig* msg) { |
| 72 |
return _upb_hasbit(msg, 1); |
| 73 |
} |
| 74 |
UPB_INLINE void envoy_config_trace_v3_SkyWalkingConfig_clear_grpc_service(const envoy_config_trace_v3_SkyWalkingConfig* msg) { |
| 75 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), const upb_Message*) = NULL; |
| 76 |
} |
| 77 |
UPB_INLINE const struct envoy_config_core_v3_GrpcService* envoy_config_trace_v3_SkyWalkingConfig_grpc_service(const envoy_config_trace_v3_SkyWalkingConfig* msg) { |
| 78 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_GrpcService*); |
| 79 |
} |
| 80 |
UPB_INLINE bool envoy_config_trace_v3_SkyWalkingConfig_has_client_config(const envoy_config_trace_v3_SkyWalkingConfig* msg) { |
| 81 |
return _upb_hasbit(msg, 2); |
| 82 |
} |
| 83 |
UPB_INLINE void envoy_config_trace_v3_SkyWalkingConfig_clear_client_config(const envoy_config_trace_v3_SkyWalkingConfig* msg) { |
| 84 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), const upb_Message*) = NULL; |
| 85 |
} |
| 86 |
UPB_INLINE const envoy_config_trace_v3_ClientConfig* envoy_config_trace_v3_SkyWalkingConfig_client_config(const envoy_config_trace_v3_SkyWalkingConfig* msg) { |
| 87 |
return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_config_trace_v3_ClientConfig*); |
| 88 |
} |
| 89 |
|
| 90 |
UPB_INLINE void envoy_config_trace_v3_SkyWalkingConfig_set_grpc_service(envoy_config_trace_v3_SkyWalkingConfig *msg, struct envoy_config_core_v3_GrpcService* value) { |
| 91 |
_upb_sethas(msg, 1); |
| 92 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_GrpcService*) = value; |
| 93 |
} |
| 94 |
UPB_INLINE struct envoy_config_core_v3_GrpcService* envoy_config_trace_v3_SkyWalkingConfig_mutable_grpc_service(envoy_config_trace_v3_SkyWalkingConfig* msg, upb_Arena* arena) { |
| 95 |
struct envoy_config_core_v3_GrpcService* sub = (struct envoy_config_core_v3_GrpcService*)envoy_config_trace_v3_SkyWalkingConfig_grpc_service(msg); |
| 96 |
if (sub == NULL) { |
| 97 |
sub = (struct envoy_config_core_v3_GrpcService*)_upb_Message_New(&envoy_config_core_v3_GrpcService_msginit, arena); |
| 98 |
if (!sub) return NULL; |
| 99 |
envoy_config_trace_v3_SkyWalkingConfig_set_grpc_service(msg, sub); |
| 100 |
} |
| 101 |
return sub; |
| 102 |
} |
| 103 |
UPB_INLINE void envoy_config_trace_v3_SkyWalkingConfig_set_client_config(envoy_config_trace_v3_SkyWalkingConfig *msg, envoy_config_trace_v3_ClientConfig* value) { |
| 104 |
_upb_sethas(msg, 2); |
| 105 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_config_trace_v3_ClientConfig*) = value; |
| 106 |
} |
| 107 |
UPB_INLINE struct envoy_config_trace_v3_ClientConfig* envoy_config_trace_v3_SkyWalkingConfig_mutable_client_config(envoy_config_trace_v3_SkyWalkingConfig* msg, upb_Arena* arena) { |
| 108 |
struct envoy_config_trace_v3_ClientConfig* sub = (struct envoy_config_trace_v3_ClientConfig*)envoy_config_trace_v3_SkyWalkingConfig_client_config(msg); |
| 109 |
if (sub == NULL) { |
| 110 |
sub = (struct envoy_config_trace_v3_ClientConfig*)_upb_Message_New(&envoy_config_trace_v3_ClientConfig_msginit, arena); |
| 111 |
if (!sub) return NULL; |
| 112 |
envoy_config_trace_v3_SkyWalkingConfig_set_client_config(msg, sub); |
| 113 |
} |
| 114 |
return sub; |
| 115 |
} |
| 116 |
|
| 117 |
/* envoy.config.trace.v3.ClientConfig */ |
| 118 |
|
| 119 |
UPB_INLINE envoy_config_trace_v3_ClientConfig* envoy_config_trace_v3_ClientConfig_new(upb_Arena* arena) { |
| 120 |
return (envoy_config_trace_v3_ClientConfig*)_upb_Message_New(&envoy_config_trace_v3_ClientConfig_msginit, arena); |
| 121 |
} |
| 122 |
UPB_INLINE envoy_config_trace_v3_ClientConfig* envoy_config_trace_v3_ClientConfig_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 123 |
envoy_config_trace_v3_ClientConfig* ret = envoy_config_trace_v3_ClientConfig_new(arena); |
| 124 |
if (!ret) return NULL; |
| 125 |
if (upb_Decode(buf, size, ret, &envoy_config_trace_v3_ClientConfig_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 126 |
return NULL; |
| 127 |
} |
| 128 |
return ret; |
| 129 |
} |
| 130 |
UPB_INLINE envoy_config_trace_v3_ClientConfig* envoy_config_trace_v3_ClientConfig_parse_ex(const char* buf, size_t size, |
| 131 |
const upb_ExtensionRegistry* extreg, |
| 132 |
int options, upb_Arena* arena) { |
| 133 |
envoy_config_trace_v3_ClientConfig* ret = envoy_config_trace_v3_ClientConfig_new(arena); |
| 134 |
if (!ret) return NULL; |
| 135 |
if (upb_Decode(buf, size, ret, &envoy_config_trace_v3_ClientConfig_msginit, extreg, options, arena) != |
| 136 |
kUpb_DecodeStatus_Ok) { |
| 137 |
return NULL; |
| 138 |
} |
| 139 |
return ret; |
| 140 |
} |
| 141 |
UPB_INLINE char* envoy_config_trace_v3_ClientConfig_serialize(const envoy_config_trace_v3_ClientConfig* msg, upb_Arena* arena, size_t* len) { |
| 142 |
char* ptr; |
| 143 |
(void)upb_Encode(msg, &envoy_config_trace_v3_ClientConfig_msginit, 0, arena, &ptr, len); |
| 144 |
return ptr; |
| 145 |
} |
| 146 |
UPB_INLINE char* envoy_config_trace_v3_ClientConfig_serialize_ex(const envoy_config_trace_v3_ClientConfig* msg, int options, |
| 147 |
upb_Arena* arena, size_t* len) { |
| 148 |
char* ptr; |
| 149 |
(void)upb_Encode(msg, &envoy_config_trace_v3_ClientConfig_msginit, options, arena, &ptr, len); |
| 150 |
return ptr; |
| 151 |
} |
| 152 |
typedef enum { |
| 153 |
envoy_config_trace_v3_ClientConfig_backend_token_specifier_backend_token = 3, |
| 154 |
envoy_config_trace_v3_ClientConfig_backend_token_specifier_NOT_SET = 0 |
| 155 |
} envoy_config_trace_v3_ClientConfig_backend_token_specifier_oneofcases; |
| 156 |
UPB_INLINE envoy_config_trace_v3_ClientConfig_backend_token_specifier_oneofcases envoy_config_trace_v3_ClientConfig_backend_token_specifier_case(const envoy_config_trace_v3_ClientConfig* msg) { |
| 157 |
return (envoy_config_trace_v3_ClientConfig_backend_token_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); |
| 158 |
} |
| 159 |
UPB_INLINE void envoy_config_trace_v3_ClientConfig_clear_service_name(const envoy_config_trace_v3_ClientConfig* msg) { |
| 160 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 161 |
} |
| 162 |
UPB_INLINE upb_StringView envoy_config_trace_v3_ClientConfig_service_name(const envoy_config_trace_v3_ClientConfig* msg) { |
| 163 |
return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_StringView); |
| 164 |
} |
| 165 |
UPB_INLINE void envoy_config_trace_v3_ClientConfig_clear_instance_name(const envoy_config_trace_v3_ClientConfig* msg) { |
| 166 |
*UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 167 |
} |
| 168 |
UPB_INLINE upb_StringView envoy_config_trace_v3_ClientConfig_instance_name(const envoy_config_trace_v3_ClientConfig* msg) { |
| 169 |
return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_StringView); |
| 170 |
} |
| 171 |
UPB_INLINE bool envoy_config_trace_v3_ClientConfig_has_backend_token(const envoy_config_trace_v3_ClientConfig* msg) { |
| 172 |
return _upb_getoneofcase(msg, UPB_SIZE(4, 4)) == 3; |
| 173 |
} |
| 174 |
UPB_INLINE void envoy_config_trace_v3_ClientConfig_clear_backend_token(const envoy_config_trace_v3_ClientConfig* msg) { |
| 175 |
UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(8, 8), upb_StringView_FromDataAndSize(NULL, 0), UPB_SIZE(4, 4), envoy_config_trace_v3_ClientConfig_backend_token_specifier_NOT_SET); |
| 176 |
} |
| 177 |
UPB_INLINE upb_StringView envoy_config_trace_v3_ClientConfig_backend_token(const envoy_config_trace_v3_ClientConfig* msg) { |
| 178 |
return UPB_READ_ONEOF(msg, upb_StringView, UPB_SIZE(8, 8), UPB_SIZE(4, 4), 3, upb_StringView_FromString("")); |
| 179 |
} |
| 180 |
UPB_INLINE bool envoy_config_trace_v3_ClientConfig_has_max_cache_size(const envoy_config_trace_v3_ClientConfig* msg) { |
| 181 |
return _upb_hasbit(msg, 1); |
| 182 |
} |
| 183 |
UPB_INLINE void envoy_config_trace_v3_ClientConfig_clear_max_cache_size(const envoy_config_trace_v3_ClientConfig* msg) { |
| 184 |
*UPB_PTR_AT(msg, UPB_SIZE(32, 56), const upb_Message*) = NULL; |
| 185 |
} |
| 186 |
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_trace_v3_ClientConfig_max_cache_size(const envoy_config_trace_v3_ClientConfig* msg) { |
| 187 |
return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const struct google_protobuf_UInt32Value*); |
| 188 |
} |
| 189 |
|
| 190 |
UPB_INLINE void envoy_config_trace_v3_ClientConfig_set_service_name(envoy_config_trace_v3_ClientConfig *msg, upb_StringView value) { |
| 191 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_StringView) = value; |
| 192 |
} |
| 193 |
UPB_INLINE void envoy_config_trace_v3_ClientConfig_set_instance_name(envoy_config_trace_v3_ClientConfig *msg, upb_StringView value) { |
| 194 |
*UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_StringView) = value; |
| 195 |
} |
| 196 |
UPB_INLINE void envoy_config_trace_v3_ClientConfig_set_backend_token(envoy_config_trace_v3_ClientConfig *msg, upb_StringView value) { |
| 197 |
UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(8, 8), value, UPB_SIZE(4, 4), 3); |
| 198 |
} |
| 199 |
UPB_INLINE void envoy_config_trace_v3_ClientConfig_set_max_cache_size(envoy_config_trace_v3_ClientConfig *msg, struct google_protobuf_UInt32Value* value) { |
| 200 |
_upb_sethas(msg, 1); |
| 201 |
*UPB_PTR_AT(msg, UPB_SIZE(32, 56), struct google_protobuf_UInt32Value*) = value; |
| 202 |
} |
| 203 |
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_trace_v3_ClientConfig_mutable_max_cache_size(envoy_config_trace_v3_ClientConfig* msg, upb_Arena* arena) { |
| 204 |
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_trace_v3_ClientConfig_max_cache_size(msg); |
| 205 |
if (sub == NULL) { |
| 206 |
sub = (struct google_protobuf_UInt32Value*)_upb_Message_New(&google_protobuf_UInt32Value_msginit, arena); |
| 207 |
if (!sub) return NULL; |
| 208 |
envoy_config_trace_v3_ClientConfig_set_max_cache_size(msg, sub); |
| 209 |
} |
| 210 |
return sub; |
| 211 |
} |
| 212 |
|
| 213 |
extern const upb_MiniTable_File envoy_config_trace_v3_skywalking_proto_upb_file_layout; |
| 214 |
|
| 215 |
#ifdef __cplusplus |
| 216 |
} /* extern "C" */ |
| 217 |
#endif |
| 218 |
|
| 219 |
#include "upb/port_undef.inc" |
| 220 |
|
| 221 |
#endif /* ENVOY_CONFIG_TRACE_V3_SKYWALKING_PROTO_UPB_H_ */ |