code.pb.go 13 KB

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