/* This file was generated by upbc (the upb compiler) from the input * file: * * envoy/type/v3/http_status.proto * * Do not edit -- your changes will be discarded when the file is * regenerated. */ #ifndef ENVOY_TYPE_V3_HTTP_STATUS_PROTO_UPB_H_ #define ENVOY_TYPE_V3_HTTP_STATUS_PROTO_UPB_H_ #include "upb/msg_internal.h" #include "upb/decode.h" #include "upb/decode_fast.h" #include "upb/encode.h" #include "upb/port_def.inc" #ifdef __cplusplus extern "C" { #endif struct envoy_type_v3_HttpStatus; typedef struct envoy_type_v3_HttpStatus envoy_type_v3_HttpStatus; extern const upb_MiniTable envoy_type_v3_HttpStatus_msginit; typedef enum { envoy_type_v3_Empty = 0, envoy_type_v3_Continue = 100, envoy_type_v3_OK = 200, envoy_type_v3_Created = 201, envoy_type_v3_Accepted = 202, envoy_type_v3_NonAuthoritativeInformation = 203, envoy_type_v3_NoContent = 204, envoy_type_v3_ResetContent = 205, envoy_type_v3_PartialContent = 206, envoy_type_v3_MultiStatus = 207, envoy_type_v3_AlreadyReported = 208, envoy_type_v3_IMUsed = 226, envoy_type_v3_MultipleChoices = 300, envoy_type_v3_MovedPermanently = 301, envoy_type_v3_Found = 302, envoy_type_v3_SeeOther = 303, envoy_type_v3_NotModified = 304, envoy_type_v3_UseProxy = 305, envoy_type_v3_TemporaryRedirect = 307, envoy_type_v3_PermanentRedirect = 308, envoy_type_v3_BadRequest = 400, envoy_type_v3_Unauthorized = 401, envoy_type_v3_PaymentRequired = 402, envoy_type_v3_Forbidden = 403, envoy_type_v3_NotFound = 404, envoy_type_v3_MethodNotAllowed = 405, envoy_type_v3_NotAcceptable = 406, envoy_type_v3_ProxyAuthenticationRequired = 407, envoy_type_v3_RequestTimeout = 408, envoy_type_v3_Conflict = 409, envoy_type_v3_Gone = 410, envoy_type_v3_LengthRequired = 411, envoy_type_v3_PreconditionFailed = 412, envoy_type_v3_PayloadTooLarge = 413, envoy_type_v3_URITooLong = 414, envoy_type_v3_UnsupportedMediaType = 415, envoy_type_v3_RangeNotSatisfiable = 416, envoy_type_v3_ExpectationFailed = 417, envoy_type_v3_MisdirectedRequest = 421, envoy_type_v3_UnprocessableEntity = 422, envoy_type_v3_Locked = 423, envoy_type_v3_FailedDependency = 424, envoy_type_v3_UpgradeRequired = 426, envoy_type_v3_PreconditionRequired = 428, envoy_type_v3_TooManyRequests = 429, envoy_type_v3_RequestHeaderFieldsTooLarge = 431, envoy_type_v3_InternalServerError = 500, envoy_type_v3_NotImplemented = 501, envoy_type_v3_BadGateway = 502, envoy_type_v3_ServiceUnavailable = 503, envoy_type_v3_GatewayTimeout = 504, envoy_type_v3_HTTPVersionNotSupported = 505, envoy_type_v3_VariantAlsoNegotiates = 506, envoy_type_v3_InsufficientStorage = 507, envoy_type_v3_LoopDetected = 508, envoy_type_v3_NotExtended = 510, envoy_type_v3_NetworkAuthenticationRequired = 511 } envoy_type_v3_StatusCode; /* envoy.type.v3.HttpStatus */ UPB_INLINE envoy_type_v3_HttpStatus* envoy_type_v3_HttpStatus_new(upb_Arena* arena) { return (envoy_type_v3_HttpStatus*)_upb_Message_New(&envoy_type_v3_HttpStatus_msginit, arena); } UPB_INLINE envoy_type_v3_HttpStatus* envoy_type_v3_HttpStatus_parse(const char* buf, size_t size, upb_Arena* arena) { envoy_type_v3_HttpStatus* ret = envoy_type_v3_HttpStatus_new(arena); if (!ret) return NULL; if (upb_Decode(buf, size, ret, &envoy_type_v3_HttpStatus_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { return NULL; } return ret; } UPB_INLINE envoy_type_v3_HttpStatus* envoy_type_v3_HttpStatus_parse_ex(const char* buf, size_t size, const upb_ExtensionRegistry* extreg, int options, upb_Arena* arena) { envoy_type_v3_HttpStatus* ret = envoy_type_v3_HttpStatus_new(arena); if (!ret) return NULL; if (upb_Decode(buf, size, ret, &envoy_type_v3_HttpStatus_msginit, extreg, options, arena) != kUpb_DecodeStatus_Ok) { return NULL; } return ret; } UPB_INLINE char* envoy_type_v3_HttpStatus_serialize(const envoy_type_v3_HttpStatus* msg, upb_Arena* arena, size_t* len) { char* ptr; (void)upb_Encode(msg, &envoy_type_v3_HttpStatus_msginit, 0, arena, &ptr, len); return ptr; } UPB_INLINE char* envoy_type_v3_HttpStatus_serialize_ex(const envoy_type_v3_HttpStatus* msg, int options, upb_Arena* arena, size_t* len) { char* ptr; (void)upb_Encode(msg, &envoy_type_v3_HttpStatus_msginit, options, arena, &ptr, len); return ptr; } UPB_INLINE void envoy_type_v3_HttpStatus_clear_code(const envoy_type_v3_HttpStatus* msg) { *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = 0; } UPB_INLINE int32_t envoy_type_v3_HttpStatus_code(const envoy_type_v3_HttpStatus* msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE void envoy_type_v3_HttpStatus_set_code(envoy_type_v3_HttpStatus *msg, int32_t value) { *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } extern const upb_MiniTable_File envoy_type_v3_http_status_proto_upb_file_layout; #ifdef __cplusplus } /* extern "C" */ #endif #include "upb/port_undef.inc" #endif /* ENVOY_TYPE_V3_HTTP_STATUS_PROTO_UPB_H_ */