1// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: google/rpc/code.proto
3
4package code
5
6import (
7	fmt "fmt"
8	math "math"
9
10	proto "github.com/golang/protobuf/proto"
11)
12
13// Reference imports to suppress errors if they are not otherwise used.
14var _ = proto.Marshal
15var _ = fmt.Errorf
16var _ = math.Inf
17
18// This is a compile-time assertion to ensure that this generated file
19// is compatible with the proto package it is being compiled against.
20// A compilation error at this line likely means your copy of the
21// proto package needs to be updated.
22const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
23
24// The canonical error codes for gRPC APIs.
25//
26//
27// Sometimes multiple error codes may apply.  Services should return
28// the most specific error code that applies.  For example, prefer
29// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
30// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
31type Code int32
32
33const (
34	// Not an error; returned on success
35	//
36	// HTTP Mapping: 200 OK
37	Code_OK Code = 0
38	// The operation was cancelled, typically by the caller.
39	//
40	// HTTP Mapping: 499 Client Closed Request
41	Code_CANCELLED Code = 1
42	// Unknown error.  For example, this error may be returned when
43	// a `Status` value received from another address space belongs to
44	// an error space that is not known in this address space.  Also
45	// errors raised by APIs that do not return enough error information
46	// may be converted to this error.
47	//
48	// HTTP Mapping: 500 Internal Server Error
49	Code_UNKNOWN Code = 2
50	// The client specified an invalid argument.  Note that this differs
51	// from `FAILED_PRECONDITION`.  `INVALID_ARGUMENT` indicates arguments
52	// that are problematic regardless of the state of the system
53	// (e.g., a malformed file name).
54	//
55	// HTTP Mapping: 400 Bad Request
56	Code_INVALID_ARGUMENT Code = 3
57	// The deadline expired before the operation could complete. For operations
58	// that change the state of the system, this error may be returned
59	// even if the operation has completed successfully.  For example, a
60	// successful response from a server could have been delayed long
61	// enough for the deadline to expire.
62	//
63	// HTTP Mapping: 504 Gateway Timeout
64	Code_DEADLINE_EXCEEDED Code = 4
65	// Some requested entity (e.g., file or directory) was not found.
66	//
67	// Note to server developers: if a request is denied for an entire class
68	// of users, such as gradual feature rollout or undocumented whitelist,
69	// `NOT_FOUND` may be used. If a request is denied for some users within
70	// a class of users, such as user-based access control, `PERMISSION_DENIED`
71	// must be used.
72	//
73	// HTTP Mapping: 404 Not Found
74	Code_NOT_FOUND Code = 5
75	// The entity that a client attempted to create (e.g., file or directory)
76	// already exists.
77	//
78	// HTTP Mapping: 409 Conflict
79	Code_ALREADY_EXISTS Code = 6
80	// The caller does not have permission to execute the specified
81	// operation. `PERMISSION_DENIED` must not be used for rejections
82	// caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
83	// instead for those errors). `PERMISSION_DENIED` must not be
84	// used if the caller can not be identified (use `UNAUTHENTICATED`
85	// instead for those errors). This error code does not imply the
86	// request is valid or the requested entity exists or satisfies
87	// other pre-conditions.
88	//
89	// HTTP Mapping: 403 Forbidden
90	Code_PERMISSION_DENIED Code = 7
91	// The request does not have valid authentication credentials for the
92	// operation.
93	//
94	// HTTP Mapping: 401 Unauthorized
95	Code_UNAUTHENTICATED Code = 16
96	// Some resource has been exhausted, perhaps a per-user quota, or
97	// perhaps the entire file system is out of space.
98	//
99	// HTTP Mapping: 429 Too Many Requests
100	Code_RESOURCE_EXHAUSTED Code = 8
101	// The operation was rejected because the system is not in a state
102	// required for the operation's execution.  For example, the directory
103	// to be deleted is non-empty, an rmdir operation is applied to
104	// a non-directory, etc.
105	//
106	// Service implementors can use the following guidelines to decide
107	// between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
108	//  (a) Use `UNAVAILABLE` if the client can retry just the failing call.
109	//  (b) Use `ABORTED` if the client should retry at a higher level
110	//      (e.g., when a client-specified test-and-set fails, indicating the
111	//      client should restart a read-modify-write sequence).
112	//  (c) Use `FAILED_PRECONDITION` if the client should not retry until
113	//      the system state has been explicitly fixed.  E.g., if an "rmdir"
114	//      fails because the directory is non-empty, `FAILED_PRECONDITION`
115	//      should be returned since the client should not retry unless
116	//      the files are deleted from the directory.
117	//
118	// HTTP Mapping: 400 Bad Request
119	Code_FAILED_PRECONDITION Code = 9
120	// The operation was aborted, typically due to a concurrency issue such as
121	// a sequencer check failure or transaction abort.
122	//
123	// See the guidelines above for deciding between `FAILED_PRECONDITION`,
124	// `ABORTED`, and `UNAVAILABLE`.
125	//
126	// HTTP Mapping: 409 Conflict
127	Code_ABORTED Code = 10
128	// The operation was attempted past the valid range.  E.g., seeking or
129	// reading past end-of-file.
130	//
131	// Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
132	// be fixed if the system state changes. For example, a 32-bit file
133	// system will generate `INVALID_ARGUMENT` if asked to read at an
134	// offset that is not in the range [0,2^32-1], but it will generate
135	// `OUT_OF_RANGE` if asked to read from an offset past the current
136	// file size.
137	//
138	// There is a fair bit of overlap between `FAILED_PRECONDITION` and
139	// `OUT_OF_RANGE`.  We recommend using `OUT_OF_RANGE` (the more specific
140	// error) when it applies so that callers who are iterating through
141	// a space can easily look for an `OUT_OF_RANGE` error to detect when
142	// they are done.
143	//
144	// HTTP Mapping: 400 Bad Request
145	Code_OUT_OF_RANGE Code = 11
146	// The operation is not implemented or is not supported/enabled in this
147	// service.
148	//
149	// HTTP Mapping: 501 Not Implemented
150	Code_UNIMPLEMENTED Code = 12
151	// Internal errors.  This means that some invariants expected by the
152	// underlying system have been broken.  This error code is reserved
153	// for serious errors.
154	//
155	// HTTP Mapping: 500 Internal Server Error
156	Code_INTERNAL Code = 13
157	// The service is currently unavailable.  This is most likely a
158	// transient condition, which can be corrected by retrying with
159	// a backoff. Note that it is not always safe to retry
160	// non-idempotent operations.
161	//
162	// See the guidelines above for deciding between `FAILED_PRECONDITION`,
163	// `ABORTED`, and `UNAVAILABLE`.
164	//
165	// HTTP Mapping: 503 Service Unavailable
166	Code_UNAVAILABLE Code = 14
167	// Unrecoverable data loss or corruption.
168	//
169	// HTTP Mapping: 500 Internal Server Error
170	Code_DATA_LOSS Code = 15
171)
172
173var Code_name = map[int32]string{
174	0:  "OK",
175	1:  "CANCELLED",
176	2:  "UNKNOWN",
177	3:  "INVALID_ARGUMENT",
178	4:  "DEADLINE_EXCEEDED",
179	5:  "NOT_FOUND",
180	6:  "ALREADY_EXISTS",
181	7:  "PERMISSION_DENIED",
182	16: "UNAUTHENTICATED",
183	8:  "RESOURCE_EXHAUSTED",
184	9:  "FAILED_PRECONDITION",
185	10: "ABORTED",
186	11: "OUT_OF_RANGE",
187	12: "UNIMPLEMENTED",
188	13: "INTERNAL",
189	14: "UNAVAILABLE",
190	15: "DATA_LOSS",
191}
192
193var Code_value = map[string]int32{
194	"OK":                  0,
195	"CANCELLED":           1,
196	"UNKNOWN":             2,
197	"INVALID_ARGUMENT":    3,
198	"DEADLINE_EXCEEDED":   4,
199	"NOT_FOUND":           5,
200	"ALREADY_EXISTS":      6,
201	"PERMISSION_DENIED":   7,
202	"UNAUTHENTICATED":     16,
203	"RESOURCE_EXHAUSTED":  8,
204	"FAILED_PRECONDITION": 9,
205	"ABORTED":             10,
206	"OUT_OF_RANGE":        11,
207	"UNIMPLEMENTED":       12,
208	"INTERNAL":            13,
209	"UNAVAILABLE":         14,
210	"DATA_LOSS":           15,
211}
212
213func (x Code) String() string {
214	return proto.EnumName(Code_name, int32(x))
215}
216
217func (Code) EnumDescriptor() ([]byte, []int) {
218	return fileDescriptor_fe593a732623ccf0, []int{0}
219}
220
221func init() {
222	proto.RegisterEnum("google.rpc.Code", Code_name, Code_value)
223}
224
225func init() {
226	proto.RegisterFile("google/rpc/code.proto", fileDescriptor_fe593a732623ccf0)
227}
228
229var fileDescriptor_fe593a732623ccf0 = []byte{
230	// 362 bytes of a gzipped FileDescriptorProto
231	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x51, 0xcd, 0x6e, 0x93, 0x31,
232	0x10, 0xa4, 0x69, 0x49, 0x9b, 0xcd, 0xdf, 0xd6, 0xa5, 0xf0, 0x0e, 0x1c, 0x92, 0x43, 0x8f, 0x9c,
233	0x36, 0x9f, 0x37, 0xad,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0x99, 0xfa, 0x00, 0x17, 0x6b, 0x32, 0x96, 0x75,
245	0x6e, 0x3d, 0x37, 0x4e, 0xb4, 0x89, 0xc6, 0x09, 0x8e, 0xea, 0xe5, 0xb4, 0x72, 0xbe, 0xaa, 0x40,
246	0x21, 0x4c, 0x5c, 0x8a, 0xd9, 0xad, 0xb3, 0x27, 0xb9, 0x66, 0x1c, 0xab, 0x73, 0x98, 0x26, 0x31,
247	0x9b, 0xd6, 0x72, 0xb5, 0xc1, 0x1a, 0x27, 0x6a, 0x02, 0x67, 0x46, 0x22, 0x7b, 0x21, 0x8b, 0x53,
248	0x35, 0x87, 0x71, 0x12, 0xba, 0x23, 0x63, 0x69, 0x65, 0x19, 0x67, 0xd5, 0x90, 0xa6, 0x48, 0xd9,
249	0xba, 0x10, 0x70, 0xbe, 0xda, 0xc2, 0x6c, 0x57, 0x7e, 0x2c, 0x5e, 0xb3, 0x5c, 0x8d, 0x6a, 0x90,
250	0x6d, 0x8d, 0xb8, 0x3d, 0xfa, 0x7a, 0xf5, 0x8f, 0xe8, 0xca, 0xe3, 0xfd, 0x53, 0xb7, 0x28, 0x7d,
251	0xb7, 0xec, 0xf6, 0x4f, 0xcf, 0x05, 0x2c, 0x5f, 0xa8, 0xfb, 0xc3, 0xf7, 0x9f, 0xff, 0xab, 0xf9,
252	0x54, 0x9f, 0xdf, 0x83, 0x63, 0xdf, 0x36, 0xdf, 0x86, 0xcf, 0xaa, 0xab, 0xbf, 0x01, 0x00, 0x00,
253	0xff, 0xff, 0x8e, 0x97, 0x77, 0xc2, 0xbf, 0x01, 0x00, 0x00,
254}
255