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