aboutsummaryrefslogtreecommitdiff
path: root/src/core/ext/upb-generated/envoy/type/v3/http_status.upb.h
blob: d3bd26d3ce7d8e0d2a294824cd2ef65eb14867a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/* 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/generated_code_support.h"
// Must be last. 
#include "upb/port/def.inc"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct envoy_type_v3_HttpStatus envoy_type_v3_HttpStatus;
extern const upb_MiniTable envoy_type_v3_HttpStatus_msg_init;

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_msg_init, 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_msg_init, 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_msg_init, 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_msg_init, 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_msg_init, options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void envoy_type_v3_HttpStatus_clear_code(envoy_type_v3_HttpStatus* msg) {
  const upb_MiniTableField field = {1, 0, 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
  _upb_Message_ClearNonExtensionField(msg, &field);
}
UPB_INLINE int32_t envoy_type_v3_HttpStatus_code(const envoy_type_v3_HttpStatus* msg) {
  int32_t default_val = 0;
  int32_t ret;
  const upb_MiniTableField field = {1, 0, 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
  _upb_Message_GetNonExtensionField(msg, &field, &default_val, &ret);
  return ret;
}

UPB_INLINE void envoy_type_v3_HttpStatus_set_code(envoy_type_v3_HttpStatus *msg, int32_t value) {
  const upb_MiniTableField field = {1, 0, 0, kUpb_NoSub, 5, (int)kUpb_FieldMode_Scalar | (int)kUpb_LabelFlags_IsAlternate | ((int)kUpb_FieldRep_4Byte << kUpb_FieldRep_Shift)};
  _upb_Message_SetNonExtensionField(msg, &field, &value);
}

extern const upb_MiniTableFile 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_ */