/* This file was generated by upb_generator from the input file: * * envoy/config/core/v3/http_service.proto * * Do not edit -- your changes will be discarded when the file is * regenerated. * NO CHECKED-IN PROTOBUF GENCODE */ #ifndef ENVOY_CONFIG_CORE_V3_HTTP_SERVICE_PROTO_UPB_H_ #define ENVOY_CONFIG_CORE_V3_HTTP_SERVICE_PROTO_UPB_H_ #include "upb/generated_code_support.h" #include "envoy/config/core/v3/http_service.upb_minitable.h" #include "envoy/config/core/v3/base.upb_minitable.h" #include "envoy/config/core/v3/http_uri.upb_minitable.h" #include "udpa/annotations/status.upb_minitable.h" #include "validate/validate.upb_minitable.h" // Must be last. #include "upb/port/def.inc" #ifdef __cplusplus extern "C" { #endif typedef struct envoy_config_core_v3_HttpService { upb_Message UPB_PRIVATE(base); } envoy_config_core_v3_HttpService; struct envoy_config_core_v3_HeaderValueOption; struct envoy_config_core_v3_HttpUri; /* envoy.config.core.v3.HttpService */ UPB_INLINE envoy_config_core_v3_HttpService* envoy_config_core_v3_HttpService_new(upb_Arena* arena) { return (envoy_config_core_v3_HttpService*)_upb_Message_New(&envoy__config__core__v3__HttpService_msg_init, arena); } UPB_INLINE envoy_config_core_v3_HttpService* envoy_config_core_v3_HttpService_parse(const char* buf, size_t size, upb_Arena* arena) { envoy_config_core_v3_HttpService* ret = envoy_config_core_v3_HttpService_new(arena); if (!ret) return NULL; if (upb_Decode(buf, size, UPB_UPCAST(ret), &envoy__config__core__v3__HttpService_msg_init, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { return NULL; } return ret; } UPB_INLINE envoy_config_core_v3_HttpService* envoy_config_core_v3_HttpService_parse_ex(const char* buf, size_t size, const upb_ExtensionRegistry* extreg, int options, upb_Arena* arena) { envoy_config_core_v3_HttpService* ret = envoy_config_core_v3_HttpService_new(arena); if (!ret) return NULL; if (upb_Decode(buf, size, UPB_UPCAST(ret), &envoy__config__core__v3__HttpService_msg_init, extreg, options, arena) != kUpb_DecodeStatus_Ok) { return NULL; } return ret; } UPB_INLINE char* envoy_config_core_v3_HttpService_serialize(const envoy_config_core_v3_HttpService* msg, upb_Arena* arena, size_t* len) { char* ptr; (void)upb_Encode(UPB_UPCAST(msg), &envoy__config__core__v3__HttpService_msg_init, 0, arena, &ptr, len); return ptr; } UPB_INLINE char* envoy_config_core_v3_HttpService_serialize_ex(const envoy_config_core_v3_HttpService* msg, int options, upb_Arena* arena, size_t* len) { char* ptr; (void)upb_Encode(UPB_UPCAST(msg), &envoy__config__core__v3__HttpService_msg_init, options, arena, &ptr, len); return ptr; } UPB_INLINE void envoy_config_core_v3_HttpService_clear_http_uri(envoy_config_core_v3_HttpService* msg) { const upb_MiniTableField field = {1, UPB_SIZE(12, 16), 64, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); } UPB_INLINE const struct envoy_config_core_v3_HttpUri* envoy_config_core_v3_HttpService_http_uri(const envoy_config_core_v3_HttpService* msg) { const struct envoy_config_core_v3_HttpUri* default_val = NULL; const struct envoy_config_core_v3_HttpUri* ret; const upb_MiniTableField field = {1, UPB_SIZE(12, 16), 64, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; UPB_PRIVATE(_upb_MiniTable_StrongReference)(&envoy__config__core__v3__HttpUri_msg_init); _upb_Message_GetNonExtensionField(UPB_UPCAST(msg), &field, &default_val, &ret); return ret; } UPB_INLINE bool envoy_config_core_v3_HttpService_has_http_uri(const envoy_config_core_v3_HttpService* msg) { const upb_MiniTableField field = {1, UPB_SIZE(12, 16), 64, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; return upb_Message_HasBaseField(UPB_UPCAST(msg), &field); } UPB_INLINE void envoy_config_core_v3_HttpService_clear_request_headers_to_add(envoy_config_core_v3_HttpService* msg) { const upb_MiniTableField field = {2, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; upb_Message_ClearBaseField(UPB_UPCAST(msg), &field); } UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_core_v3_HttpService_request_headers_to_add(const envoy_config_core_v3_HttpService* msg, size_t* size) { const upb_MiniTableField field = {2, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; UPB_PRIVATE(_upb_MiniTable_StrongReference)(&envoy__config__core__v3__HeaderValueOption_msg_init); const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); if (arr) { if (size) *size = arr->UPB_PRIVATE(size); return (const struct envoy_config_core_v3_HeaderValueOption* const*)upb_Array_DataPtr(arr); } else { if (size) *size = 0; return NULL; } } UPB_INLINE const upb_Array* _envoy_config_core_v3_HttpService_request_headers_to_add_upb_array(const envoy_config_core_v3_HttpService* msg, size_t* size) { const upb_MiniTableField field = {2, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; UPB_PRIVATE(_upb_MiniTable_StrongReference)(&envoy__config__core__v3__HeaderValueOption_msg_init); const upb_Array* arr = upb_Message_GetArray(UPB_UPCAST(msg), &field); if (size) { *size = arr ? arr->UPB_PRIVATE(size) : 0; } return arr; } UPB_INLINE upb_Array* _envoy_config_core_v3_HttpService_request_headers_to_add_mutable_upb_array(envoy_config_core_v3_HttpService* msg, size_t* size, upb_Arena* arena) { const upb_MiniTableField field = {2, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; UPB_PRIVATE(_upb_MiniTable_StrongReference)(&envoy__config__core__v3__HeaderValueOption_msg_init); upb_Array* arr = upb_Message_GetOrCreateMutableArray(UPB_UPCAST(msg), &field, arena); if (size) { *size = arr ? arr->UPB_PRIVATE(size) : 0; } return arr; } UPB_INLINE void envoy_config_core_v3_HttpService_set_http_uri(envoy_config_core_v3_HttpService *msg, struct envoy_config_core_v3_HttpUri* value) { const upb_MiniTableField field = {1, UPB_SIZE(12, 16), 64, 0, 11, (int)kUpb_FieldMode_Scalar | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; UPB_PRIVATE(_upb_MiniTable_StrongReference)(&envoy__config__core__v3__HttpUri_msg_init); upb_Message_SetBaseField((upb_Message *)msg, &field, &value); } UPB_INLINE struct envoy_config_core_v3_HttpUri* envoy_config_core_v3_HttpService_mutable_http_uri(envoy_config_core_v3_HttpService* msg, upb_Arena* arena) { struct envoy_config_core_v3_HttpUri* sub = (struct envoy_config_core_v3_HttpUri*)envoy_config_core_v3_HttpService_http_uri(msg); if (sub == NULL) { sub = (struct envoy_config_core_v3_HttpUri*)_upb_Message_New(&envoy__config__core__v3__HttpUri_msg_init, arena); if (sub) envoy_config_core_v3_HttpService_set_http_uri(msg, sub); } return sub; } UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_core_v3_HttpService_mutable_request_headers_to_add(envoy_config_core_v3_HttpService* msg, size_t* size) { upb_MiniTableField field = {2, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; UPB_PRIVATE(_upb_MiniTable_StrongReference)(&envoy__config__core__v3__HeaderValueOption_msg_init); upb_Array* arr = upb_Message_GetMutableArray(UPB_UPCAST(msg), &field); if (arr) { if (size) *size = arr->UPB_PRIVATE(size); return (struct envoy_config_core_v3_HeaderValueOption**)upb_Array_MutableDataPtr(arr); } else { if (size) *size = 0; return NULL; } } UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_core_v3_HttpService_resize_request_headers_to_add(envoy_config_core_v3_HttpService* msg, size_t size, upb_Arena* arena) { upb_MiniTableField field = {2, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; return (struct envoy_config_core_v3_HeaderValueOption**)upb_Message_ResizeArrayUninitialized(UPB_UPCAST(msg), &field, size, arena); } UPB_INLINE struct envoy_config_core_v3_HeaderValueOption* envoy_config_core_v3_HttpService_add_request_headers_to_add(envoy_config_core_v3_HttpService* msg, upb_Arena* arena) { upb_MiniTableField field = {2, UPB_SIZE(16, 24), 0, 1, 11, (int)kUpb_FieldMode_Array | ((int)UPB_SIZE(kUpb_FieldRep_4Byte, kUpb_FieldRep_8Byte) << kUpb_FieldRep_Shift)}; UPB_PRIVATE(_upb_MiniTable_StrongReference)(&envoy__config__core__v3__HeaderValueOption_msg_init); upb_Array* arr = upb_Message_GetOrCreateMutableArray( UPB_UPCAST(msg), &field, arena); if (!arr || !UPB_PRIVATE(_upb_Array_ResizeUninitialized)( arr, arr->UPB_PRIVATE(size) + 1, arena)) { return NULL; } struct envoy_config_core_v3_HeaderValueOption* sub = (struct envoy_config_core_v3_HeaderValueOption*)_upb_Message_New(&envoy__config__core__v3__HeaderValueOption_msg_init, arena); if (!arr || !sub) return NULL; UPB_PRIVATE(_upb_Array_Set) (arr, arr->UPB_PRIVATE(size) - 1, &sub, sizeof(sub)); return sub; } #ifdef __cplusplus } /* extern "C" */ #endif #include "upb/port/undef.inc" #endif /* ENVOY_CONFIG_CORE_V3_HTTP_SERVICE_PROTO_UPB_H_ */