| 1 |
/* This file was generated by upbc (the upb compiler) from the input |
| 2 |
* file: |
| 3 |
* |
| 4 |
* envoy/config/trace/v3/lightstep.proto |
| 5 |
* |
| 6 |
* Do not edit -- your changes will be discarded when the file is |
| 7 |
* regenerated. */ |
| 8 |
|
| 9 |
#ifndef ENVOY_CONFIG_TRACE_V3_LIGHTSTEP_PROTO_UPB_H_ |
| 10 |
#define ENVOY_CONFIG_TRACE_V3_LIGHTSTEP_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_LightstepConfig; |
| 24 |
typedef struct envoy_config_trace_v3_LightstepConfig envoy_config_trace_v3_LightstepConfig; |
| 25 |
extern const upb_MiniTable envoy_config_trace_v3_LightstepConfig_msginit; |
| 26 |
struct envoy_config_core_v3_DataSource; |
| 27 |
extern const upb_MiniTable envoy_config_core_v3_DataSource_msginit; |
| 28 |
|
| 29 |
typedef enum { |
| 30 |
envoy_config_trace_v3_LightstepConfig_ENVOY = 0, |
| 31 |
envoy_config_trace_v3_LightstepConfig_LIGHTSTEP = 1, |
| 32 |
envoy_config_trace_v3_LightstepConfig_B3 = 2, |
| 33 |
envoy_config_trace_v3_LightstepConfig_TRACE_CONTEXT = 3 |
| 34 |
} envoy_config_trace_v3_LightstepConfig_PropagationMode; |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
/* envoy.config.trace.v3.LightstepConfig */ |
| 39 |
|
| 40 |
UPB_INLINE envoy_config_trace_v3_LightstepConfig* envoy_config_trace_v3_LightstepConfig_new(upb_Arena* arena) { |
| 41 |
return (envoy_config_trace_v3_LightstepConfig*)_upb_Message_New(&envoy_config_trace_v3_LightstepConfig_msginit, arena); |
| 42 |
} |
| 43 |
UPB_INLINE envoy_config_trace_v3_LightstepConfig* envoy_config_trace_v3_LightstepConfig_parse(const char* buf, size_t size, upb_Arena* arena) { |
| 44 |
envoy_config_trace_v3_LightstepConfig* ret = envoy_config_trace_v3_LightstepConfig_new(arena); |
| 45 |
if (!ret) return NULL; |
| 46 |
if (upb_Decode(buf, size, ret, &envoy_config_trace_v3_LightstepConfig_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
| 47 |
return NULL; |
| 48 |
} |
| 49 |
return ret; |
| 50 |
} |
| 51 |
UPB_INLINE envoy_config_trace_v3_LightstepConfig* envoy_config_trace_v3_LightstepConfig_parse_ex(const char* buf, size_t size, |
| 52 |
const upb_ExtensionRegistry* extreg, |
| 53 |
int options, upb_Arena* arena) { |
| 54 |
envoy_config_trace_v3_LightstepConfig* ret = envoy_config_trace_v3_LightstepConfig_new(arena); |
| 55 |
if (!ret) return NULL; |
| 56 |
if (upb_Decode(buf, size, ret, &envoy_config_trace_v3_LightstepConfig_msginit, extreg, options, arena) != |
| 57 |
kUpb_DecodeStatus_Ok) { |
| 58 |
return NULL; |
| 59 |
} |
| 60 |
return ret; |
| 61 |
} |
| 62 |
UPB_INLINE char* envoy_config_trace_v3_LightstepConfig_serialize(const envoy_config_trace_v3_LightstepConfig* msg, upb_Arena* arena, size_t* len) { |
| 63 |
char* ptr; |
| 64 |
(void)upb_Encode(msg, &envoy_config_trace_v3_LightstepConfig_msginit, 0, arena, &ptr, len); |
| 65 |
return ptr; |
| 66 |
} |
| 67 |
UPB_INLINE char* envoy_config_trace_v3_LightstepConfig_serialize_ex(const envoy_config_trace_v3_LightstepConfig* msg, int options, |
| 68 |
upb_Arena* arena, size_t* len) { |
| 69 |
char* ptr; |
| 70 |
(void)upb_Encode(msg, &envoy_config_trace_v3_LightstepConfig_msginit, options, arena, &ptr, len); |
| 71 |
return ptr; |
| 72 |
} |
| 73 |
UPB_INLINE void envoy_config_trace_v3_LightstepConfig_clear_collector_cluster(const envoy_config_trace_v3_LightstepConfig* msg) { |
| 74 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 75 |
} |
| 76 |
UPB_INLINE upb_StringView envoy_config_trace_v3_LightstepConfig_collector_cluster(const envoy_config_trace_v3_LightstepConfig* msg) { |
| 77 |
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
| 78 |
} |
| 79 |
UPB_INLINE void envoy_config_trace_v3_LightstepConfig_clear_access_token_file(const envoy_config_trace_v3_LightstepConfig* msg) { |
| 80 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0); |
| 81 |
} |
| 82 |
UPB_INLINE upb_StringView envoy_config_trace_v3_LightstepConfig_access_token_file(const envoy_config_trace_v3_LightstepConfig* msg) { |
| 83 |
return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView); |
| 84 |
} |
| 85 |
UPB_INLINE void envoy_config_trace_v3_LightstepConfig_clear_propagation_modes(const envoy_config_trace_v3_LightstepConfig* msg) { |
| 86 |
_upb_array_detach(msg, UPB_SIZE(20, 40)); |
| 87 |
} |
| 88 |
UPB_INLINE int32_t const* envoy_config_trace_v3_LightstepConfig_propagation_modes(const envoy_config_trace_v3_LightstepConfig* msg, size_t* len) { |
| 89 |
return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); |
| 90 |
} |
| 91 |
UPB_INLINE bool envoy_config_trace_v3_LightstepConfig_has_access_token(const envoy_config_trace_v3_LightstepConfig* msg) { |
| 92 |
return _upb_hasbit(msg, 1); |
| 93 |
} |
| 94 |
UPB_INLINE void envoy_config_trace_v3_LightstepConfig_clear_access_token(const envoy_config_trace_v3_LightstepConfig* msg) { |
| 95 |
*UPB_PTR_AT(msg, UPB_SIZE(24, 48), const upb_Message*) = NULL; |
| 96 |
} |
| 97 |
UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_config_trace_v3_LightstepConfig_access_token(const envoy_config_trace_v3_LightstepConfig* msg) { |
| 98 |
return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct envoy_config_core_v3_DataSource*); |
| 99 |
} |
| 100 |
|
| 101 |
UPB_INLINE void envoy_config_trace_v3_LightstepConfig_set_collector_cluster(envoy_config_trace_v3_LightstepConfig *msg, upb_StringView value) { |
| 102 |
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
| 103 |
} |
| 104 |
UPB_INLINE void envoy_config_trace_v3_LightstepConfig_set_access_token_file(envoy_config_trace_v3_LightstepConfig *msg, upb_StringView value) { |
| 105 |
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = value; |
| 106 |
} |
| 107 |
UPB_INLINE int32_t* envoy_config_trace_v3_LightstepConfig_mutable_propagation_modes(envoy_config_trace_v3_LightstepConfig* msg, size_t* len) { |
| 108 |
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); |
| 109 |
} |
| 110 |
UPB_INLINE int32_t* envoy_config_trace_v3_LightstepConfig_resize_propagation_modes(envoy_config_trace_v3_LightstepConfig* msg, size_t len, upb_Arena* arena) { |
| 111 |
return (int32_t*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 40), len, 2, arena); |
| 112 |
} |
| 113 |
UPB_INLINE bool envoy_config_trace_v3_LightstepConfig_add_propagation_modes(envoy_config_trace_v3_LightstepConfig* msg, int32_t val, upb_Arena* arena) { |
| 114 |
return _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 40), 2, &val, arena); |
| 115 |
} |
| 116 |
UPB_INLINE void envoy_config_trace_v3_LightstepConfig_set_access_token(envoy_config_trace_v3_LightstepConfig *msg, struct envoy_config_core_v3_DataSource* value) { |
| 117 |
_upb_sethas(msg, 1); |
| 118 |
*UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct envoy_config_core_v3_DataSource*) = value; |
| 119 |
} |
| 120 |
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_config_trace_v3_LightstepConfig_mutable_access_token(envoy_config_trace_v3_LightstepConfig* msg, upb_Arena* arena) { |
| 121 |
struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_config_trace_v3_LightstepConfig_access_token(msg); |
| 122 |
if (sub == NULL) { |
| 123 |
sub = (struct envoy_config_core_v3_DataSource*)_upb_Message_New(&envoy_config_core_v3_DataSource_msginit, arena); |
| 124 |
if (!sub) return NULL; |
| 125 |
envoy_config_trace_v3_LightstepConfig_set_access_token(msg, sub); |
| 126 |
} |
| 127 |
return sub; |
| 128 |
} |
| 129 |
|
| 130 |
extern const upb_MiniTable_File envoy_config_trace_v3_lightstep_proto_upb_file_layout; |
| 131 |
|
| 132 |
#ifdef __cplusplus |
| 133 |
} /* extern "C" */ |
| 134 |
#endif |
| 135 |
|
| 136 |
#include "upb/port_undef.inc" |
| 137 |
|
| 138 |
#endif /* ENVOY_CONFIG_TRACE_V3_LIGHTSTEP_PROTO_UPB_H_ */ |