| 1 |
/* This file was generated by upbc (the upb compiler) from the input |
| 2 |
* file: |
| 3 |
* |
| 4 |
* envoy/config/trace/v3/zipkin.proto |
| 5 |
* |
| 6 |
* Do not edit -- your changes will be discarded when the file is |
| 7 |
* regenerated. */ |
| 8 |
|
| 9 |
#ifndef ENVOY_CONFIG_TRACE_V3_ZIPKIN_PROTO_UPB_H_ |
| 10 |
#define ENVOY_CONFIG_TRACE_V3_ZIPKIN_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_ZipkinConfig; |
| 24 |
typedef struct envoy_config_trace_v3_ZipkinConfig envoy_config_trace_v3_ZipkinConfig; |
| 25 |
extern const upb_MiniTable envoy_config_trace_v3_ZipkinConfig_msginit; |
| 26 |
struct google_protobuf_BoolValue; |
| 27 |
extern const upb_MiniTable google_protobuf_BoolValue_msginit; |
| 28 |
|
| 29 |
typedef enum { |
| 30 |
envoy_config_trace_v3_ZipkinConfig_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0, |
| 31 |
envoy_config_trace_v3_ZipkinConfig_HTTP_JSON = 1, |
| 32 |
envoy_config_trace_v3_ZipkinConfig_HTTP_PROTO = 2, |
| 33 |
envoy_config_trace_v3_ZipkinConfig_GRPC = 3 |
| 34 |
} envoy_config_trace_v3_ZipkinConfig_CollectorEndpointVersion; |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
/* envoy.config.trace.v3.ZipkinConfig */ |
| 39 |
|
| 40 |
UPB_INLINE envoy_config_trace_v3_ZipkinConfig* envoy_config_trace_v3_ZipkinConfig_new(upb_Arena* arena) { |
| 41 |
return (envoy_config_trace_v3_ZipkinConfig*)_upb_Message_New(&envoy_config_trace_v3_ZipkinConfig_msginit, arena); |
| 42 |
} |
| 43 |
UPB_INLINE envoy_config_trace_v3_ZipkinConfig* envoy_config_trace_v3_ZipkinConfig_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 44 |
envoy_config_trace_v3_ZipkinConfig* ret = envoy_config_trace_v3_ZipkinConfig_new(arena); |
| 45 |
if (!ret) return NULL; |
| 46 |
if (upb_Decode(buf, size, ret, &envoy_config_trace_v3_ZipkinConfig_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 47 |
return NULL; |
| 48 |
} |
| 49 |
return ret; |
| 50 |
} |
| 51 |
UPB_INLINE envoy_config_trace_v3_ZipkinConfig* envoy_config_trace_v3_ZipkinConfig_parse_ex(const char* buf, size_t size, |
| 52 |
const upb_ExtensionRegistry* extreg, |
| 53 |
int options, upb_Arena* arena) { |
| 54 |
envoy_config_trace_v3_ZipkinConfig* ret = envoy_config_trace_v3_ZipkinConfig_new(arena); |
| 55 |
if (!ret) return NULL; |
| 56 |
if (upb_Decode(buf, size, ret, &envoy_config_trace_v3_ZipkinConfig_msginit, extreg, options, arena) != |
| 57 |
kUpb_DecodeStatus_Ok) { |
| 58 |
return NULL; |
| 59 |
} |
| 60 |
return ret; |
| 61 |
} |
| 62 |
UPB_INLINE char* envoy_config_trace_v3_ZipkinConfig_serialize(const envoy_config_trace_v3_ZipkinConfig* msg, upb_Arena* arena, size_t* len) { |
| 63 |
char* ptr; |
| 64 |
(void)upb_Encode(msg, &envoy_config_trace_v3_ZipkinConfig_msginit, 0, arena, &ptr, len); |
| 65 |
return ptr; |
| 66 |
} |
| 67 |
UPB_INLINE char* envoy_config_trace_v3_ZipkinConfig_serialize_ex(const envoy_config_trace_v3_ZipkinConfig* msg, int options, |
| 68 |
upb_Arena* arena, size_t* len) { |
| 69 |
char* ptr; |
| 70 |
(void)upb_Encode(msg, &envoy_config_trace_v3_ZipkinConfig_msginit, options, arena, &ptr, len); |
| 71 |
return ptr; |
| 72 |
} |
| 73 |
UPB_INLINE void envoy_config_trace_v3_ZipkinConfig_clear_collector_cluster(const envoy_config_trace_v3_ZipkinConfig* msg) { |
| 74 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 75 |
} |
| 76 |
UPB_INLINE upb_StringView envoy_config_trace_v3_ZipkinConfig_collector_cluster(const envoy_config_trace_v3_ZipkinConfig* msg) { |
| 77 |
return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView); |
| 78 |
} |
| 79 |
UPB_INLINE void envoy_config_trace_v3_ZipkinConfig_clear_collector_endpoint(const envoy_config_trace_v3_ZipkinConfig* msg) { |
| 80 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 81 |
} |
| 82 |
UPB_INLINE upb_StringView envoy_config_trace_v3_ZipkinConfig_collector_endpoint(const envoy_config_trace_v3_ZipkinConfig* msg) { |
| 83 |
return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_StringView); |
| 84 |
} |
| 85 |
UPB_INLINE void envoy_config_trace_v3_ZipkinConfig_clear_trace_id_128bit(const envoy_config_trace_v3_ZipkinConfig* msg) { |
| 86 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = 0; |
| 87 |
} |
| 88 |
UPB_INLINE bool envoy_config_trace_v3_ZipkinConfig_trace_id_128bit(const envoy_config_trace_v3_ZipkinConfig* msg) { |
| 89 |
return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); |
| 90 |
} |
| 91 |
UPB_INLINE bool envoy_config_trace_v3_ZipkinConfig_has_shared_span_context(const envoy_config_trace_v3_ZipkinConfig* msg) { |
| 92 |
return _upb_hasbit(msg, 1); |
| 93 |
} |
| 94 |
UPB_INLINE void envoy_config_trace_v3_ZipkinConfig_clear_shared_span_context(const envoy_config_trace_v3_ZipkinConfig* msg) { |
| 95 |
*UPB_PTR_AT(msg, UPB_SIZE(24, 40), const upb_Message*) = NULL; |
| 96 |
} |
| 97 |
UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_trace_v3_ZipkinConfig_shared_span_context(const envoy_config_trace_v3_ZipkinConfig* msg) { |
| 98 |
return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_BoolValue*); |
| 99 |
} |
| 100 |
UPB_INLINE void envoy_config_trace_v3_ZipkinConfig_clear_collector_endpoint_version(const envoy_config_trace_v3_ZipkinConfig* msg) { |
| 101 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0; |
| 102 |
} |
| 103 |
UPB_INLINE int32_t envoy_config_trace_v3_ZipkinConfig_collector_endpoint_version(const envoy_config_trace_v3_ZipkinConfig* msg) { |
| 104 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); |
| 105 |
} |
| 106 |
UPB_INLINE void envoy_config_trace_v3_ZipkinConfig_clear_collector_hostname(const envoy_config_trace_v3_ZipkinConfig* msg) { |
| 107 |
*UPB_PTR_AT(msg, UPB_SIZE(28, 48), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 108 |
} |
| 109 |
UPB_INLINE upb_StringView envoy_config_trace_v3_ZipkinConfig_collector_hostname(const envoy_config_trace_v3_ZipkinConfig* msg) { |
| 110 |
return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), upb_StringView); |
| 111 |
} |
| 112 |
|
| 113 |
UPB_INLINE void envoy_config_trace_v3_ZipkinConfig_set_collector_cluster(envoy_config_trace_v3_ZipkinConfig *msg, upb_StringView value) { |
| 114 |
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_StringView) = value; |
| 115 |
} |
| 116 |
UPB_INLINE void envoy_config_trace_v3_ZipkinConfig_set_collector_endpoint(envoy_config_trace_v3_ZipkinConfig *msg, upb_StringView value) { |
| 117 |
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_StringView) = value; |
| 118 |
} |
| 119 |
UPB_INLINE void envoy_config_trace_v3_ZipkinConfig_set_trace_id_128bit(envoy_config_trace_v3_ZipkinConfig *msg, bool value) { |
| 120 |
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; |
| 121 |
} |
| 122 |
UPB_INLINE void envoy_config_trace_v3_ZipkinConfig_set_shared_span_context(envoy_config_trace_v3_ZipkinConfig *msg, struct google_protobuf_BoolValue* value) { |
| 123 |
_upb_sethas(msg, 1); |
| 124 |
*UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_BoolValue*) = value; |
| 125 |
} |
| 126 |
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_trace_v3_ZipkinConfig_mutable_shared_span_context(envoy_config_trace_v3_ZipkinConfig* msg, upb_Arena* arena) { |
| 127 |
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_trace_v3_ZipkinConfig_shared_span_context(msg); |
| 128 |
if (sub == NULL) { |
| 129 |
sub = (struct google_protobuf_BoolValue*)_upb_Message_New(&google_protobuf_BoolValue_msginit, arena); |
| 130 |
if (!sub) return NULL; |
| 131 |
envoy_config_trace_v3_ZipkinConfig_set_shared_span_context(msg, sub); |
| 132 |
} |
| 133 |
return sub; |
| 134 |
} |
| 135 |
UPB_INLINE void envoy_config_trace_v3_ZipkinConfig_set_collector_endpoint_version(envoy_config_trace_v3_ZipkinConfig *msg, int32_t value) { |
| 136 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; |
| 137 |
} |
| 138 |
UPB_INLINE void envoy_config_trace_v3_ZipkinConfig_set_collector_hostname(envoy_config_trace_v3_ZipkinConfig *msg, upb_StringView value) { |
| 139 |
*UPB_PTR_AT(msg, UPB_SIZE(28, 48), upb_StringView) = value; |
| 140 |
} |
| 141 |
|
| 142 |
extern const upb_MiniTable_File envoy_config_trace_v3_zipkin_proto_upb_file_layout; |
| 143 |
|
| 144 |
#ifdef __cplusplus |
| 145 |
} /* extern "C" */ |
| 146 |
#endif |
| 147 |
|
| 148 |
#include "upb/port_undef.inc" |
| 149 |
|
| 150 |
#endif /* ENVOY_CONFIG_TRACE_V3_ZIPKIN_PROTO_UPB_H_ */ |