1// Copyright 2020 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Code generated by protoc-gen-go. DO NOT EDIT.
16// versions:
17// 	protoc-gen-go v1.25.0
18// 	protoc        v3.13.0
19// source: google/rpc/code.proto
20
21package code
22
23import (
24	reflect "reflect"
25	sync "sync"
26
27	proto "github.com/golang/protobuf/proto"
28	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
29	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
30)
31
32const (
33	// Verify that this generated code is sufficiently up-to-date.
34	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
35	// Verify that runtime/protoimpl is sufficiently up-to-date.
36	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
37)
38
39// This is a compile-time assertion that a sufficiently up-to-date version
40// of the legacy proto package is being used.
41const _ = proto.ProtoPackageIsVersion4
42
43// The canonical error codes for gRPC APIs.
44//
45//
46// Sometimes multiple error codes may apply.  Services should return
47// the most specific error code that applies.  For example, prefer
48// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
49// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
50type Code int32
51
52const (
53	// Not an error; returned on success
54	//
55	// HTTP Mapping: 200 OK
56	Code_OK Code = 0
57	// The operation was cancelled, typically by the caller.
58	//
59	// HTTP Mapping: 499 Client Closed Request
60	Code_CANCELLED Code = 1
61	// Unknown error.  For example, this error may be returned when
62	// a `Status` value received from another address space belongs to
63	// an error space that is not known in this address space.  Also
64	// errors raised by APIs that do not return enough error information
65	// may be converted to this error.
66	//
67	// HTTP Mapping: 500 Internal Server Error
68	Code_UNKNOWN Code = 2
69	// The client specified an invalid argument.  Note that this differs
70	// from `FAILED_PRECONDITION`.  `INVALID_ARGUMENT` indicates arguments
71	// that are problematic regardless of the state of the system
72	// (e.g., a malformed file name).
73	//
74	// HTTP Mapping: 400 Bad Request
75	Code_INVALID_ARGUMENT Code = 3
76	// The deadline expired before the operation could complete. For operations
77	// that change the state of the system, this error may be returned
78	// even if the operation has completed successfully.  For example, a
79	// successful response from a server could have been delayed long
80	// enough for the deadline to expire.
81	//
82	// HTTP Mapping: 504 Gateway Timeout
83	Code_DEADLINE_EXCEEDED Code = 4
84	// Some requested entity (e.g., file or directory) was not found.
85	//
86	// Note to server developers: if a request is denied for an entire class
87	// of users, such as gradual feature rollout or undocumented whitelist,
88	// `NOT_FOUND` may be used. If a request is denied for some users within
89	// a class of users, such as user-based access control, `PERMISSION_DENIED`
90	// must be used.
91	//
92	// HTTP Mapping: 404 Not Found
93	Code_NOT_FOUND Code = 5
94	// The entity that a client attempted to create (e.g., file or directory)
95	// already exists.
96	//
97	// HTTP Mapping: 409 Conflict
98	Code_ALREADY_EXISTS Code = 6
99	// The caller does not have permission to execute the specified
100	// operation. `PERMISSION_DENIED` must not be used for rejections
101	// caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
102	// instead for those errors). `PERMISSION_DENIED` must not be
103	// used if the caller can not be identified (use `UNAUTHENTICATED`
104	// instead for those errors). This error code does not imply the
105	// request is valid or the requested entity exists or satisfies
106	// other pre-conditions.
107	//
108	// HTTP Mapping: 403 Forbidden
109	Code_PERMISSION_DENIED Code = 7
110	// The request does not have valid authentication credentials for the
111	// operation.
112	//
113	// HTTP Mapping: 401 Unauthorized
114	Code_UNAUTHENTICATED Code = 16
115	// Some resource has been exhausted, perhaps a per-user quota, or
116	// perhaps the entire file system is out of space.
117	//
118	// HTTP Mapping: 429 Too Many Requests
119	Code_RESOURCE_EXHAUSTED Code = 8
120	// The operation was rejected because the system is not in a state
121	// required for the operation's execution.  For example, the directory
122	// to be deleted is non-empty, an rmdir operation is applied to
123	// a non-directory, etc.
124	//
125	// Service implementors can use the following guidelines to decide
126	// between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
127	//  (a) Use `UNAVAILABLE` if the client can retry just the failing call.
128	//  (b) Use `ABORTED` if the client should retry at a higher level
129	//      (e.g., when a client-specified test-and-set fails, indicating the
130	//      client should restart a read-modify-write sequence).
131	//  (c) Use `FAILED_PRECONDITION` if the client should not retry until
132	//      the system state has been explicitly fixed.  E.g., if an "rmdir"
133	//      fails because the directory is non-empty, `FAILED_PRECONDITION`
134	//      should be returned since the client should not retry unless
135	//      the files are deleted from the directory.
136	//
137	// HTTP Mapping: 400 Bad Request
138	Code_FAILED_PRECONDITION Code = 9
139	// The operation was aborted, typically due to a concurrency issue such as
140	// a sequencer check failure or transaction abort.
141	//
142	// See the guidelines above for deciding between `FAILED_PRECONDITION`,
143	// `ABORTED`, and `UNAVAILABLE`.
144	//
145	// HTTP Mapping: 409 Conflict
146	Code_ABORTED Code = 10
147	// The operation was attempted past the valid range.  E.g., seeking or
148	// reading past end-of-file.
149	//
150	// Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
151	// be fixed if the system state changes. For example, a 32-bit file
152	// system will generate `INVALID_ARGUMENT` if asked to read at an
153	// offset that is not in the range [0,2^32-1], but it will generate
154	// `OUT_OF_RANGE` if asked to read from an offset past the current
155	// file size.
156	//
157	// There is a fair bit of overlap between `FAILED_PRECONDITION` and
158	// `OUT_OF_RANGE`.  We recommend using `OUT_OF_RANGE` (the more specific
159	// error) when it applies so that callers who are iterating through
160	// a space can easily look for an `OUT_OF_RANGE` error to detect when
161	// they are done.
162	//
163	// HTTP Mapping: 400 Bad Request
164	Code_OUT_OF_RANGE Code = 11
165	// The operation is not implemented or is not supported/enabled in this
166	// service.
167	//
168	// HTTP Mapping: 501 Not Implemented
169	Code_UNIMPLEMENTED Code = 12
170	// Internal errors.  This means that some invariants expected by the
171	// underlying system have been broken.  This error code is reserved
172	// for serious errors.
173	//
174	// HTTP Mapping: 500 Internal Server Error
175	Code_INTERNAL Code = 13
176	// The service is currently unavailable.  This is most likely a
177	// transient condition, which can be corrected by retrying with
178	// a backoff. Note that it is not always safe to retry
179	// non-idempotent operations.
180	//
181	// See the guidelines above for deciding between `FAILED_PRECONDITION`,
182	// `ABORTED`, and `UNAVAILABLE`.
183	//
184	// HTTP Mapping: 503 Service Unavailable
185	Code_UNAVAILABLE Code = 14
186	// Unrecoverable data loss or corruption.
187	//
188	// HTTP Mapping: 500 Internal Server Error
189	Code_DATA_LOSS Code = 15
190)
191
192// Enum value maps for Code.
193var (
194	Code_name = map[int32]string{
195		0:  "OK",
196		1:  "CANCELLED",
197		2:  "UNKNOWN",
198		3:  "INVALID_ARGUMENT",
199		4:  "DEADLINE_EXCEEDED",
200		5:  "NOT_FOUND",
201		6:  "ALREADY_EXISTS",
202		7:  "PERMISSION_DENIED",
203		16: "UNAUTHENTICATED",
204		8:  "RESOURCE_EXHAUSTED",
205		9:  "FAILED_PRECONDITION",
206		10: "ABORTED",
207		11: "OUT_OF_RANGE",
208		12: "UNIMPLEMENTED",
209		13: "INTERNAL",
210		14: "UNAVAILABLE",
211		15: "DATA_LOSS",
212	}
213	Code_value = map[string]int32{
214		"OK":                  0,
215		"CANCELLED":           1,
216		"UNKNOWN":             2,
217		"INVALID_ARGUMENT":    3,
218		"DEADLINE_EXCEEDED":   4,
219		"NOT_FOUND":           5,
220		"ALREADY_EXISTS":      6,
221		"PERMISSION_DENIED":   7,
222		"UNAUTHENTICATED":     16,
223		"RESOURCE_EXHAUSTED":  8,
224		"FAILED_PRECONDITION": 9,
225		"ABORTED":             10,
226		"OUT_OF_RANGE":        11,
227		"UNIMPLEMENTED":       12,
228		"INTERNAL":            13,
229		"UNAVAILABLE":         14,
230		"DATA_LOSS":           15,
231	}
232)
233
234func (x Code) Enum() *Code {
235	p := new(Code)
236	*p = x
237	return p
238}
239
240func (x Code) String() string {
241	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
242}
243
244func (Code) Descriptor() protoreflect.EnumDescriptor {
245	return file_google_rpc_code_proto_enumTypes[0].Descriptor()
246}
247
248func (Code) Type() protoreflect.EnumType {
249	return &file_google_rpc_code_proto_enumTypes[0]
250}
251
252func (x Code) Number() protoreflect.EnumNumber {
253	return protoreflect.EnumNumber(x)
254}
255
256// Deprecated: Use Code.Descriptor instead.
257func (Code) EnumDescriptor() ([]byte, []int) {
258	return file_google_rpc_code_proto_rawDescGZIP(), []int{0}
259}
260
261var File_google_rpc_code_proto protoreflect.FileDescriptor
262
263var file_google_rpc_code_proto_rawDesc = []byte{
264	0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x64,
265	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
266	0x72, 0x70, 0x63, 0x2a, 0xb7, 0x02, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02,
267	0x4f, 0x4b, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45,
268	0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x02,
269	0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55,
270	0x4d, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x45, 0x41, 0x44, 0x4c, 0x49,
271	0x4e, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0d, 0x0a,
272	0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e,
273	0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x06,
274	0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44,
275	0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x41, 0x55, 0x54,
276	0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x10, 0x12, 0x16, 0x0a, 0x12,
277	0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x45, 0x58, 0x48, 0x41, 0x55, 0x53, 0x54,
278	0x45, 0x44, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x50,
279	0x52, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x0b, 0x0a,
280	0x07, 0x41, 0x42, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x55,
281	0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x11, 0x0a, 0x0d,
282	0x55, 0x4e, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x0c, 0x12,
283	0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x0d, 0x12, 0x0f, 0x0a,
284	0x0b, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x0e, 0x12, 0x0d,
285	0x0a, 0x09, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x4c, 0x4f, 0x53, 0x53, 0x10, 0x0f, 0x42, 0x58, 0x0a,
286	0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x42,
287	0x09, 0x43, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x6f,
288	0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f,
289	0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61,
290	0x70, 0x69, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x3b, 0x63, 0x6f, 0x64,
291	0x65, 0xa2, 0x02, 0x03, 0x52, 0x50, 0x43, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
292}
293
294var (
295	file_google_rpc_code_proto_rawDescOnce sync.Once
296	file_google_rpc_code_proto_rawDescData = file_google_rpc_code_proto_rawDesc
297)
298
299func file_google_rpc_code_proto_rawDescGZIP() []byte {
300	file_google_rpc_code_proto_rawDescOnce.Do(func() {
301		file_google_rpc_code_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_rpc_code_proto_rawDescData)
302	})
303	return file_google_rpc_code_proto_rawDescData
304}
305
306var file_google_rpc_code_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
307var file_google_rpc_code_proto_goTypes = []interface{}{
308	(Code)(0), // 0: google.rpc.Code
309}
310var file_google_rpc_code_proto_depIdxs = []int32{
311	0, // [0:0] is the sub-list for method output_type
312	0, // [0:0] is the sub-list for method input_type
313	0, // [0:0] is the sub-list for extension type_name
314	0, // [0:0] is the sub-list for extension extendee
315	0, // [0:0] is the sub-list for field type_name
316}
317
318func init() { file_google_rpc_code_proto_init() }
319func file_google_rpc_code_proto_init() {
320	if File_google_rpc_code_proto != nil {
321		return
322	}
323	type x struct{}
324	out := protoimpl.TypeBuilder{
325		File: protoimpl.DescBuilder{
326			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
327			RawDescriptor: file_google_rpc_code_proto_rawDesc,
328			NumEnums:      1,
329			NumMessages:   0,
330			NumExtensions: 0,
331			NumServices:   0,
332		},
333		GoTypes:           file_google_rpc_code_proto_goTypes,
334		DependencyIndexes: file_google_rpc_code_proto_depIdxs,
335		EnumInfos:         file_google_rpc_code_proto_enumTypes,
336	}.Build()
337	File_google_rpc_code_proto = out.File
338	file_google_rpc_code_proto_rawDesc = nil
339	file_google_rpc_code_proto_goTypes = nil
340	file_google_rpc_code_proto_depIdxs = nil
341}
342