code.pb.go 10 KB

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