@milaboratories/pl-client 2.16.7 → 2.16.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/dist/__external/.pnpm/{@rollup_plugin-typescript@12.1.4_rollup@4.52.4_tslib@2.7.0_typescript@5.6.3 → @rollup_plugin-typescript@12.1.4_rollup@4.52.4_tslib@2.8.1_typescript@5.6.3}/__external/tslib/tslib.es6.cjs +2 -2
  2. package/dist/__external/.pnpm/{@rollup_plugin-typescript@12.1.4_rollup@4.52.4_tslib@2.7.0_typescript@5.6.3 → @rollup_plugin-typescript@12.1.4_rollup@4.52.4_tslib@2.8.1_typescript@5.6.3}/__external/tslib/tslib.es6.cjs.map +1 -1
  3. package/dist/__external/.pnpm/{@rollup_plugin-typescript@12.1.4_rollup@4.52.4_tslib@2.7.0_typescript@5.6.3 → @rollup_plugin-typescript@12.1.4_rollup@4.52.4_tslib@2.8.1_typescript@5.6.3}/__external/tslib/tslib.es6.js +2 -2
  4. package/dist/__external/.pnpm/{@rollup_plugin-typescript@12.1.4_rollup@4.52.4_tslib@2.7.0_typescript@5.6.3 → @rollup_plugin-typescript@12.1.4_rollup@4.52.4_tslib@2.8.1_typescript@5.6.3}/__external/tslib/tslib.es6.js.map +1 -1
  5. package/dist/core/abstract_stream.d.ts +18 -0
  6. package/dist/core/abstract_stream.d.ts.map +1 -0
  7. package/dist/core/client.cjs +6 -6
  8. package/dist/core/client.cjs.map +1 -1
  9. package/dist/core/client.d.ts +3 -3
  10. package/dist/core/client.d.ts.map +1 -1
  11. package/dist/core/client.js +6 -6
  12. package/dist/core/client.js.map +1 -1
  13. package/dist/core/config.cjs +3 -0
  14. package/dist/core/config.cjs.map +1 -1
  15. package/dist/core/config.d.ts +4 -0
  16. package/dist/core/config.d.ts.map +1 -1
  17. package/dist/core/config.js +3 -1
  18. package/dist/core/config.js.map +1 -1
  19. package/dist/core/driver.cjs +11 -0
  20. package/dist/core/driver.cjs.map +1 -1
  21. package/dist/core/driver.d.ts +8 -2
  22. package/dist/core/driver.d.ts.map +1 -1
  23. package/dist/core/driver.js +11 -1
  24. package/dist/core/driver.js.map +1 -1
  25. package/dist/core/errors.cjs +9 -0
  26. package/dist/core/errors.cjs.map +1 -1
  27. package/dist/core/errors.d.ts +1 -1
  28. package/dist/core/errors.d.ts.map +1 -1
  29. package/dist/core/errors.js +9 -0
  30. package/dist/core/errors.js.map +1 -1
  31. package/dist/core/ll_client.cjs +194 -39
  32. package/dist/core/ll_client.cjs.map +1 -1
  33. package/dist/core/ll_client.d.ts +36 -15
  34. package/dist/core/ll_client.d.ts.map +1 -1
  35. package/dist/core/ll_client.js +195 -40
  36. package/dist/core/ll_client.js.map +1 -1
  37. package/dist/core/ll_transaction.cjs.map +1 -1
  38. package/dist/core/ll_transaction.d.ts +3 -3
  39. package/dist/core/ll_transaction.d.ts.map +1 -1
  40. package/dist/core/ll_transaction.js.map +1 -1
  41. package/dist/core/transaction.cjs +2 -2
  42. package/dist/core/transaction.cjs.map +1 -1
  43. package/dist/core/transaction.js +2 -2
  44. package/dist/core/transaction.js.map +1 -1
  45. package/dist/core/type_conversion.cjs +2 -2
  46. package/dist/core/type_conversion.cjs.map +1 -1
  47. package/dist/core/type_conversion.d.ts +2 -2
  48. package/dist/core/type_conversion.d.ts.map +1 -1
  49. package/dist/core/type_conversion.js +2 -2
  50. package/dist/core/type_conversion.js.map +1 -1
  51. package/dist/core/unauth_client.cjs +4 -8
  52. package/dist/core/unauth_client.cjs.map +1 -1
  53. package/dist/core/unauth_client.d.ts +1 -1
  54. package/dist/core/unauth_client.d.ts.map +1 -1
  55. package/dist/core/unauth_client.js +4 -8
  56. package/dist/core/unauth_client.js.map +1 -1
  57. package/dist/core/wire.d.ts +34 -0
  58. package/dist/core/wire.d.ts.map +1 -0
  59. package/dist/index.cjs +4 -0
  60. package/dist/index.cjs.map +1 -1
  61. package/dist/index.d.ts +2 -1
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +4 -2
  64. package/dist/index.js.map +1 -1
  65. package/dist/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.cjs.map +1 -0
  66. package/dist/{proto → proto-grpc}/github.com/googleapis/googleapis/google/rpc/status.d.ts +4 -2
  67. package/dist/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.d.ts.map +1 -0
  68. package/dist/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.js.map +1 -0
  69. package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/api.cjs +25 -25
  70. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.cjs.map +1 -0
  71. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.cjs.map +1 -0
  72. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts.map +1 -0
  73. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.js.map +1 -0
  74. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts.map +1 -0
  75. package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/api.js +25 -25
  76. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.js.map +1 -0
  77. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types.cjs.map +1 -0
  78. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts.map +1 -0
  79. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types.js.map +1 -0
  80. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types.cjs.map +1 -0
  81. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts.map +1 -0
  82. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types.js.map +1 -0
  83. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts.map +1 -0
  84. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/resource_types.cjs.map +1 -0
  85. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts.map +1 -0
  86. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/resource_types.js.map +1 -0
  87. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/ws-test.d.ts +73 -0
  88. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/ws-test.d.ts.map +1 -0
  89. package/dist/{proto → proto-grpc}/google/api/http.d.ts +28 -32
  90. package/dist/proto-grpc/google/api/http.d.ts.map +1 -0
  91. package/dist/proto-grpc/google/protobuf/any.cjs.map +1 -0
  92. package/dist/proto-grpc/google/protobuf/any.d.ts.map +1 -0
  93. package/dist/proto-grpc/google/protobuf/any.js.map +1 -0
  94. package/dist/{proto → proto-grpc}/google/protobuf/descriptor.d.ts +6 -152
  95. package/dist/proto-grpc/google/protobuf/descriptor.d.ts.map +1 -0
  96. package/dist/proto-grpc/google/protobuf/duration.cjs.map +1 -0
  97. package/dist/proto-grpc/google/protobuf/duration.d.ts.map +1 -0
  98. package/dist/proto-grpc/google/protobuf/duration.js.map +1 -0
  99. package/dist/proto-grpc/google/protobuf/empty.d.ts.map +1 -0
  100. package/dist/proto-grpc/google/protobuf/struct.d.ts.map +1 -0
  101. package/dist/proto-grpc/google/protobuf/timestamp.cjs.map +1 -0
  102. package/dist/proto-grpc/google/protobuf/timestamp.d.ts.map +1 -0
  103. package/dist/proto-grpc/google/protobuf/timestamp.js.map +1 -0
  104. package/dist/{proto → proto-grpc}/google/protobuf/wrappers.d.ts +0 -27
  105. package/dist/proto-grpc/google/protobuf/wrappers.d.ts.map +1 -0
  106. package/dist/proto-grpc/google/rpc/code.cjs +240 -0
  107. package/dist/proto-grpc/google/rpc/code.cjs.map +1 -0
  108. package/dist/proto-grpc/google/rpc/code.d.ts +219 -0
  109. package/dist/proto-grpc/google/rpc/code.d.ts.map +1 -0
  110. package/dist/proto-grpc/google/rpc/code.js +240 -0
  111. package/dist/proto-grpc/google/rpc/code.js.map +1 -0
  112. package/dist/proto-grpc/google/rpc/error_details.d.ts +654 -0
  113. package/dist/proto-grpc/google/rpc/error_details.d.ts.map +1 -0
  114. package/dist/proto-grpc/google/rpc/http.d.ts +121 -0
  115. package/dist/proto-grpc/google/rpc/http.d.ts.map +1 -0
  116. package/dist/proto-grpc/google/rpc/status.d.ts +55 -0
  117. package/dist/proto-grpc/google/rpc/status.d.ts.map +1 -0
  118. package/dist/proto-rest/index.cjs +64 -0
  119. package/dist/proto-rest/index.cjs.map +1 -0
  120. package/dist/proto-rest/index.d.ts +23 -0
  121. package/dist/proto-rest/index.d.ts.map +1 -0
  122. package/dist/proto-rest/index.js +61 -0
  123. package/dist/proto-rest/index.js.map +1 -0
  124. package/dist/proto-rest/plapi.d.ts +1488 -0
  125. package/dist/proto-rest/plapi.d.ts.map +1 -0
  126. package/package.json +6 -3
  127. package/src/core/abstract_stream.ts +25 -0
  128. package/src/core/client.ts +8 -8
  129. package/src/core/config.ts +9 -0
  130. package/src/core/driver.ts +13 -2
  131. package/src/core/errors.ts +7 -1
  132. package/src/core/ll_client.test.ts +1 -1
  133. package/src/core/ll_client.ts +212 -42
  134. package/src/core/ll_transaction.test.ts +1 -1
  135. package/src/core/ll_transaction.ts +4 -4
  136. package/src/core/transaction.ts +1 -1
  137. package/src/core/type_conversion.ts +3 -3
  138. package/src/core/unauth_client.test.ts +6 -0
  139. package/src/core/unauth_client.ts +8 -12
  140. package/src/core/wire.ts +40 -0
  141. package/src/index.ts +3 -1
  142. package/src/{proto → proto-grpc}/github.com/googleapis/googleapis/google/rpc/status.ts +5 -3
  143. package/src/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/api.ts +25 -25
  144. package/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/ws-test.ts +209 -0
  145. package/src/{proto → proto-grpc}/google/api/http.ts +29 -33
  146. package/src/{proto → proto-grpc}/google/protobuf/descriptor.ts +11 -221
  147. package/src/{proto → proto-grpc}/google/protobuf/wrappers.ts +4 -38
  148. package/src/proto-grpc/google/rpc/code.ts +236 -0
  149. package/src/proto-grpc/google/rpc/error_details.ts +1386 -0
  150. package/src/proto-grpc/google/rpc/http.ts +307 -0
  151. package/src/proto-grpc/google/rpc/status.ts +127 -0
  152. package/src/proto-rest/index.ts +83 -0
  153. package/src/proto-rest/plapi.ts +1488 -0
  154. package/dist/core/grpc.d.ts +0 -16
  155. package/dist/core/grpc.d.ts.map +0 -1
  156. package/dist/core/http.d.ts +0 -2
  157. package/dist/core/http.d.ts.map +0 -1
  158. package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.cjs.map +0 -1
  159. package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts.map +0 -1
  160. package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.js.map +0 -1
  161. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts +0 -40
  162. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts.map +0 -1
  163. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts +0 -116
  164. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts.map +0 -1
  165. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts +0 -46
  166. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts.map +0 -1
  167. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts +0 -170
  168. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts.map +0 -1
  169. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts +0 -51
  170. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts.map +0 -1
  171. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts +0 -176
  172. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts.map +0 -1
  173. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts +0 -131
  174. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts.map +0 -1
  175. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts +0 -320
  176. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts.map +0 -1
  177. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.cjs.map +0 -1
  178. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.cjs.map +0 -1
  179. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts.map +0 -1
  180. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.js.map +0 -1
  181. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts.map +0 -1
  182. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.js.map +0 -1
  183. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.cjs.map +0 -1
  184. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts.map +0 -1
  185. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.js.map +0 -1
  186. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.cjs.map +0 -1
  187. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts.map +0 -1
  188. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.js.map +0 -1
  189. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts.map +0 -1
  190. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.cjs.map +0 -1
  191. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts.map +0 -1
  192. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.js.map +0 -1
  193. package/dist/proto/google/api/http.d.ts.map +0 -1
  194. package/dist/proto/google/protobuf/any.cjs.map +0 -1
  195. package/dist/proto/google/protobuf/any.d.ts.map +0 -1
  196. package/dist/proto/google/protobuf/any.js.map +0 -1
  197. package/dist/proto/google/protobuf/descriptor.d.ts.map +0 -1
  198. package/dist/proto/google/protobuf/duration.cjs.map +0 -1
  199. package/dist/proto/google/protobuf/duration.d.ts.map +0 -1
  200. package/dist/proto/google/protobuf/duration.js.map +0 -1
  201. package/dist/proto/google/protobuf/empty.d.ts.map +0 -1
  202. package/dist/proto/google/protobuf/struct.d.ts.map +0 -1
  203. package/dist/proto/google/protobuf/timestamp.cjs.map +0 -1
  204. package/dist/proto/google/protobuf/timestamp.d.ts.map +0 -1
  205. package/dist/proto/google/protobuf/timestamp.js.map +0 -1
  206. package/dist/proto/google/protobuf/wrappers.d.ts.map +0 -1
  207. package/src/core/grpc.ts +0 -17
  208. package/src/core/http.ts +0 -178
  209. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.ts +0 -45
  210. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.ts +0 -313
  211. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.ts +0 -51
  212. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.ts +0 -406
  213. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.ts +0 -59
  214. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.ts +0 -489
  215. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.ts +0 -148
  216. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.ts +0 -719
  217. /package/dist/{proto → proto-grpc}/github.com/googleapis/googleapis/google/rpc/status.cjs +0 -0
  218. /package/dist/{proto → proto-grpc}/github.com/googleapis/googleapis/google/rpc/status.js +0 -0
  219. /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/api.client.cjs +0 -0
  220. /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts +0 -0
  221. /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/api.client.js +0 -0
  222. /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts +0 -0
  223. /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/api_types.cjs +0 -0
  224. /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts +0 -0
  225. /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/api_types.js +0 -0
  226. /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/base_types.cjs +0 -0
  227. /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts +0 -0
  228. /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/base_types.js +0 -0
  229. /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts +0 -0
  230. /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/resource_types.cjs +0 -0
  231. /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts +0 -0
  232. /package/dist/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/resource_types.js +0 -0
  233. /package/dist/{proto → proto-grpc}/google/protobuf/any.cjs +0 -0
  234. /package/dist/{proto → proto-grpc}/google/protobuf/any.d.ts +0 -0
  235. /package/dist/{proto → proto-grpc}/google/protobuf/any.js +0 -0
  236. /package/dist/{proto → proto-grpc}/google/protobuf/duration.cjs +0 -0
  237. /package/dist/{proto → proto-grpc}/google/protobuf/duration.d.ts +0 -0
  238. /package/dist/{proto → proto-grpc}/google/protobuf/duration.js +0 -0
  239. /package/dist/{proto → proto-grpc}/google/protobuf/empty.d.ts +0 -0
  240. /package/dist/{proto → proto-grpc}/google/protobuf/struct.d.ts +0 -0
  241. /package/dist/{proto → proto-grpc}/google/protobuf/timestamp.cjs +0 -0
  242. /package/dist/{proto → proto-grpc}/google/protobuf/timestamp.d.ts +0 -0
  243. /package/dist/{proto → proto-grpc}/google/protobuf/timestamp.js +0 -0
  244. /package/src/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts +0 -0
  245. /package/src/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/api_types.ts +0 -0
  246. /package/src/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/base_types.ts +0 -0
  247. /package/src/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/import.ts +0 -0
  248. /package/src/{proto → proto-grpc}/github.com/milaboratory/pl/plapi/plapiproto/resource_types.ts +0 -0
  249. /package/src/{proto → proto-grpc}/google/protobuf/any.ts +0 -0
  250. /package/src/{proto → proto-grpc}/google/protobuf/duration.ts +0 -0
  251. /package/src/{proto → proto-grpc}/google/protobuf/empty.ts +0 -0
  252. /package/src/{proto → proto-grpc}/google/protobuf/struct.ts +0 -0
  253. /package/src/{proto → proto-grpc}/google/protobuf/timestamp.ts +0 -0
@@ -0,0 +1,1386 @@
1
+ // @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none
2
+ // @generated from protobuf file "google/rpc/error_details.proto" (package "google.rpc", syntax proto3)
3
+ // tslint:disable
4
+ //
5
+ // Copyright 2025 Google LLC
6
+ //
7
+ // Licensed under the Apache License, Version 2.0 (the "License");
8
+ // you may not use this file except in compliance with the License.
9
+ // You may obtain a copy of the License at
10
+ //
11
+ // http://www.apache.org/licenses/LICENSE-2.0
12
+ //
13
+ // Unless required by applicable law or agreed to in writing, software
14
+ // distributed under the License is distributed on an "AS IS" BASIS,
15
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ // See the License for the specific language governing permissions and
17
+ // limitations under the License.
18
+ //
19
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
20
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
21
+ import { WireType } from "@protobuf-ts/runtime";
22
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
23
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
24
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
25
+ import type { PartialMessage } from "@protobuf-ts/runtime";
26
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
27
+ import { MessageType } from "@protobuf-ts/runtime";
28
+ import { Duration } from "../protobuf/duration";
29
+ /**
30
+ * Describes the cause of the error with structured details.
31
+ *
32
+ * Example of an error when contacting the "pubsub.googleapis.com" API when it
33
+ * is not enabled:
34
+ *
35
+ * { "reason": "API_DISABLED"
36
+ * "domain": "googleapis.com"
37
+ * "metadata": {
38
+ * "resource": "projects/123",
39
+ * "service": "pubsub.googleapis.com"
40
+ * }
41
+ * }
42
+ *
43
+ * This response indicates that the pubsub.googleapis.com API is not enabled.
44
+ *
45
+ * Example of an error that is returned when attempting to create a Spanner
46
+ * instance in a region that is out of stock:
47
+ *
48
+ * { "reason": "STOCKOUT"
49
+ * "domain": "spanner.googleapis.com",
50
+ * "metadata": {
51
+ * "availableRegions": "us-central1,us-east2"
52
+ * }
53
+ * }
54
+ *
55
+ * @generated from protobuf message google.rpc.ErrorInfo
56
+ */
57
+ export interface ErrorInfo {
58
+ /**
59
+ * The reason of the error. This is a constant value that identifies the
60
+ * proximate cause of the error. Error reasons are unique within a particular
61
+ * domain of errors. This should be at most 63 characters and match a
62
+ * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents
63
+ * UPPER_SNAKE_CASE.
64
+ *
65
+ * @generated from protobuf field: string reason = 1
66
+ */
67
+ reason: string;
68
+ /**
69
+ * The logical grouping to which the "reason" belongs. The error domain
70
+ * is typically the registered service name of the tool or product that
71
+ * generates the error. Example: "pubsub.googleapis.com". If the error is
72
+ * generated by some common infrastructure, the error domain must be a
73
+ * globally unique value that identifies the infrastructure. For Google API
74
+ * infrastructure, the error domain is "googleapis.com".
75
+ *
76
+ * @generated from protobuf field: string domain = 2
77
+ */
78
+ domain: string;
79
+ /**
80
+ * Additional structured details about this error.
81
+ *
82
+ * Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should
83
+ * ideally be lowerCamelCase. Also, they must be limited to 64 characters in
84
+ * length. When identifying the current value of an exceeded limit, the units
85
+ * should be contained in the key, not the value. For example, rather than
86
+ * `{"instanceLimit": "100/request"}`, should be returned as,
87
+ * `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of
88
+ * instances that can be created in a single (batch) request.
89
+ *
90
+ * @generated from protobuf field: map<string, string> metadata = 3
91
+ */
92
+ metadata: {
93
+ [key: string]: string;
94
+ };
95
+ }
96
+ /**
97
+ * Describes when the clients can retry a failed request. Clients could ignore
98
+ * the recommendation here or retry when this information is missing from error
99
+ * responses.
100
+ *
101
+ * It's always recommended that clients should use exponential backoff when
102
+ * retrying.
103
+ *
104
+ * Clients should wait until `retry_delay` amount of time has passed since
105
+ * receiving the error response before retrying. If retrying requests also
106
+ * fail, clients should use an exponential backoff scheme to gradually increase
107
+ * the delay between retries based on `retry_delay`, until either a maximum
108
+ * number of retries have been reached or a maximum retry delay cap has been
109
+ * reached.
110
+ *
111
+ * @generated from protobuf message google.rpc.RetryInfo
112
+ */
113
+ export interface RetryInfo {
114
+ /**
115
+ * Clients should wait at least this long between retrying the same request.
116
+ *
117
+ * @generated from protobuf field: google.protobuf.Duration retry_delay = 1
118
+ */
119
+ retryDelay?: Duration;
120
+ }
121
+ /**
122
+ * Describes additional debugging info.
123
+ *
124
+ * @generated from protobuf message google.rpc.DebugInfo
125
+ */
126
+ export interface DebugInfo {
127
+ /**
128
+ * The stack trace entries indicating where the error occurred.
129
+ *
130
+ * @generated from protobuf field: repeated string stack_entries = 1
131
+ */
132
+ stackEntries: string[];
133
+ /**
134
+ * Additional debugging information provided by the server.
135
+ *
136
+ * @generated from protobuf field: string detail = 2
137
+ */
138
+ detail: string;
139
+ }
140
+ /**
141
+ * Describes how a quota check failed.
142
+ *
143
+ * For example if a daily limit was exceeded for the calling project,
144
+ * a service could respond with a QuotaFailure detail containing the project
145
+ * id and the description of the quota limit that was exceeded. If the
146
+ * calling project hasn't enabled the service in the developer console, then
147
+ * a service could respond with the project id and set `service_disabled`
148
+ * to true.
149
+ *
150
+ * Also see RetryInfo and Help types for other details about handling a
151
+ * quota failure.
152
+ *
153
+ * @generated from protobuf message google.rpc.QuotaFailure
154
+ */
155
+ export interface QuotaFailure {
156
+ /**
157
+ * Describes all quota violations.
158
+ *
159
+ * @generated from protobuf field: repeated google.rpc.QuotaFailure.Violation violations = 1
160
+ */
161
+ violations: QuotaFailure_Violation[];
162
+ }
163
+ /**
164
+ * A message type used to describe a single quota violation. For example, a
165
+ * daily quota or a custom quota that was exceeded.
166
+ *
167
+ * @generated from protobuf message google.rpc.QuotaFailure.Violation
168
+ */
169
+ export interface QuotaFailure_Violation {
170
+ /**
171
+ * The subject on which the quota check failed.
172
+ * For example, "clientip:<ip address of client>" or "project:<Google
173
+ * developer project id>".
174
+ *
175
+ * @generated from protobuf field: string subject = 1
176
+ */
177
+ subject: string;
178
+ /**
179
+ * A description of how the quota check failed. Clients can use this
180
+ * description to find more about the quota configuration in the service's
181
+ * public documentation, or find the relevant quota limit to adjust through
182
+ * developer console.
183
+ *
184
+ * For example: "Service disabled" or "Daily Limit for read operations
185
+ * exceeded".
186
+ *
187
+ * @generated from protobuf field: string description = 2
188
+ */
189
+ description: string;
190
+ /**
191
+ * The API Service from which the `QuotaFailure.Violation` orginates. In
192
+ * some cases, Quota issues originate from an API Service other than the one
193
+ * that was called. In other words, a dependency of the called API Service
194
+ * could be the cause of the `QuotaFailure`, and this field would have the
195
+ * dependency API service name.
196
+ *
197
+ * For example, if the called API is Kubernetes Engine API
198
+ * (container.googleapis.com), and a quota violation occurs in the
199
+ * Kubernetes Engine API itself, this field would be
200
+ * "container.googleapis.com". On the other hand, if the quota violation
201
+ * occurs when the Kubernetes Engine API creates VMs in the Compute Engine
202
+ * API (compute.googleapis.com), this field would be
203
+ * "compute.googleapis.com".
204
+ *
205
+ * @generated from protobuf field: string api_service = 3
206
+ */
207
+ apiService: string;
208
+ /**
209
+ * The metric of the violated quota. A quota metric is a named counter to
210
+ * measure usage, such as API requests or CPUs. When an activity occurs in a
211
+ * service, such as Virtual Machine allocation, one or more quota metrics
212
+ * may be affected.
213
+ *
214
+ * For example, "compute.googleapis.com/cpus_per_vm_family",
215
+ * "storage.googleapis.com/internet_egress_bandwidth".
216
+ *
217
+ * @generated from protobuf field: string quota_metric = 4
218
+ */
219
+ quotaMetric: string;
220
+ /**
221
+ * The id of the violated quota. Also know as "limit name", this is the
222
+ * unique identifier of a quota in the context of an API service.
223
+ *
224
+ * For example, "CPUS-PER-VM-FAMILY-per-project-region".
225
+ *
226
+ * @generated from protobuf field: string quota_id = 5
227
+ */
228
+ quotaId: string;
229
+ /**
230
+ * The dimensions of the violated quota. Every non-global quota is enforced
231
+ * on a set of dimensions. While quota metric defines what to count, the
232
+ * dimensions specify for what aspects the counter should be increased.
233
+ *
234
+ * For example, the quota "CPUs per region per VM family" enforces a limit
235
+ * on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions
236
+ * "region" and "vm_family". And if the violation occurred in region
237
+ * "us-central1" and for VM family "n1", the quota_dimensions would be,
238
+ *
239
+ * {
240
+ * "region": "us-central1",
241
+ * "vm_family": "n1",
242
+ * }
243
+ *
244
+ * When a quota is enforced globally, the quota_dimensions would always be
245
+ * empty.
246
+ *
247
+ * @generated from protobuf field: map<string, string> quota_dimensions = 6
248
+ */
249
+ quotaDimensions: {
250
+ [key: string]: string;
251
+ };
252
+ /**
253
+ * The enforced quota value at the time of the `QuotaFailure`.
254
+ *
255
+ * For example, if the enforced quota value at the time of the
256
+ * `QuotaFailure` on the number of CPUs is "10", then the value of this
257
+ * field would reflect this quantity.
258
+ *
259
+ * @generated from protobuf field: int64 quota_value = 7
260
+ */
261
+ quotaValue: bigint;
262
+ /**
263
+ * The new quota value being rolled out at the time of the violation. At the
264
+ * completion of the rollout, this value will be enforced in place of
265
+ * quota_value. If no rollout is in progress at the time of the violation,
266
+ * this field is not set.
267
+ *
268
+ * For example, if at the time of the violation a rollout is in progress
269
+ * changing the number of CPUs quota from 10 to 20, 20 would be the value of
270
+ * this field.
271
+ *
272
+ * @generated from protobuf field: optional int64 future_quota_value = 8
273
+ */
274
+ futureQuotaValue?: bigint;
275
+ }
276
+ /**
277
+ * Describes what preconditions have failed.
278
+ *
279
+ * For example, if an RPC failed because it required the Terms of Service to be
280
+ * acknowledged, it could list the terms of service violation in the
281
+ * PreconditionFailure message.
282
+ *
283
+ * @generated from protobuf message google.rpc.PreconditionFailure
284
+ */
285
+ export interface PreconditionFailure {
286
+ /**
287
+ * Describes all precondition violations.
288
+ *
289
+ * @generated from protobuf field: repeated google.rpc.PreconditionFailure.Violation violations = 1
290
+ */
291
+ violations: PreconditionFailure_Violation[];
292
+ }
293
+ /**
294
+ * A message type used to describe a single precondition failure.
295
+ *
296
+ * @generated from protobuf message google.rpc.PreconditionFailure.Violation
297
+ */
298
+ export interface PreconditionFailure_Violation {
299
+ /**
300
+ * The type of PreconditionFailure. We recommend using a service-specific
301
+ * enum type to define the supported precondition violation subjects. For
302
+ * example, "TOS" for "Terms of Service violation".
303
+ *
304
+ * @generated from protobuf field: string type = 1
305
+ */
306
+ type: string;
307
+ /**
308
+ * The subject, relative to the type, that failed.
309
+ * For example, "google.com/cloud" relative to the "TOS" type would indicate
310
+ * which terms of service is being referenced.
311
+ *
312
+ * @generated from protobuf field: string subject = 2
313
+ */
314
+ subject: string;
315
+ /**
316
+ * A description of how the precondition failed. Developers can use this
317
+ * description to understand how to fix the failure.
318
+ *
319
+ * For example: "Terms of service not accepted".
320
+ *
321
+ * @generated from protobuf field: string description = 3
322
+ */
323
+ description: string;
324
+ }
325
+ /**
326
+ * Describes violations in a client request. This error type focuses on the
327
+ * syntactic aspects of the request.
328
+ *
329
+ * @generated from protobuf message google.rpc.BadRequest
330
+ */
331
+ export interface BadRequest {
332
+ /**
333
+ * Describes all violations in a client request.
334
+ *
335
+ * @generated from protobuf field: repeated google.rpc.BadRequest.FieldViolation field_violations = 1
336
+ */
337
+ fieldViolations: BadRequest_FieldViolation[];
338
+ }
339
+ /**
340
+ * A message type used to describe a single bad request field.
341
+ *
342
+ * @generated from protobuf message google.rpc.BadRequest.FieldViolation
343
+ */
344
+ export interface BadRequest_FieldViolation {
345
+ /**
346
+ * A path that leads to a field in the request body. The value will be a
347
+ * sequence of dot-separated identifiers that identify a protocol buffer
348
+ * field.
349
+ *
350
+ * Consider the following:
351
+ *
352
+ * message CreateContactRequest {
353
+ * message EmailAddress {
354
+ * enum Type {
355
+ * TYPE_UNSPECIFIED = 0;
356
+ * HOME = 1;
357
+ * WORK = 2;
358
+ * }
359
+ *
360
+ * optional string email = 1;
361
+ * repeated EmailType type = 2;
362
+ * }
363
+ *
364
+ * string full_name = 1;
365
+ * repeated EmailAddress email_addresses = 2;
366
+ * }
367
+ *
368
+ * In this example, in proto `field` could take one of the following values:
369
+ *
370
+ * * `full_name` for a violation in the `full_name` value
371
+ * * `email_addresses[1].email` for a violation in the `email` field of the
372
+ * first `email_addresses` message
373
+ * * `email_addresses[3].type[2]` for a violation in the second `type`
374
+ * value in the third `email_addresses` message.
375
+ *
376
+ * In JSON, the same values are represented as:
377
+ *
378
+ * * `fullName` for a violation in the `fullName` value
379
+ * * `emailAddresses[1].email` for a violation in the `email` field of the
380
+ * first `emailAddresses` message
381
+ * * `emailAddresses[3].type[2]` for a violation in the second `type`
382
+ * value in the third `emailAddresses` message.
383
+ *
384
+ * @generated from protobuf field: string field = 1
385
+ */
386
+ field: string;
387
+ /**
388
+ * A description of why the request element is bad.
389
+ *
390
+ * @generated from protobuf field: string description = 2
391
+ */
392
+ description: string;
393
+ /**
394
+ * The reason of the field-level error. This is a constant value that
395
+ * identifies the proximate cause of the field-level error. It should
396
+ * uniquely identify the type of the FieldViolation within the scope of the
397
+ * google.rpc.ErrorInfo.domain. This should be at most 63
398
+ * characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`,
399
+ * which represents UPPER_SNAKE_CASE.
400
+ *
401
+ * @generated from protobuf field: string reason = 3
402
+ */
403
+ reason: string;
404
+ /**
405
+ * Provides a localized error message for field-level errors that is safe to
406
+ * return to the API consumer.
407
+ *
408
+ * @generated from protobuf field: google.rpc.LocalizedMessage localized_message = 4
409
+ */
410
+ localizedMessage?: LocalizedMessage;
411
+ }
412
+ /**
413
+ * Contains metadata about the request that clients can attach when filing a bug
414
+ * or providing other forms of feedback.
415
+ *
416
+ * @generated from protobuf message google.rpc.RequestInfo
417
+ */
418
+ export interface RequestInfo {
419
+ /**
420
+ * An opaque string that should only be interpreted by the service generating
421
+ * it. For example, it can be used to identify requests in the service's logs.
422
+ *
423
+ * @generated from protobuf field: string request_id = 1
424
+ */
425
+ requestId: string;
426
+ /**
427
+ * Any data that was used to serve this request. For example, an encrypted
428
+ * stack trace that can be sent back to the service provider for debugging.
429
+ *
430
+ * @generated from protobuf field: string serving_data = 2
431
+ */
432
+ servingData: string;
433
+ }
434
+ /**
435
+ * Describes the resource that is being accessed.
436
+ *
437
+ * @generated from protobuf message google.rpc.ResourceInfo
438
+ */
439
+ export interface ResourceInfo {
440
+ /**
441
+ * A name for the type of resource being accessed, e.g. "sql table",
442
+ * "cloud storage bucket", "file", "Google calendar"; or the type URL
443
+ * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
444
+ *
445
+ * @generated from protobuf field: string resource_type = 1
446
+ */
447
+ resourceType: string;
448
+ /**
449
+ * The name of the resource being accessed. For example, a shared calendar
450
+ * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
451
+ * error is
452
+ * [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
453
+ *
454
+ * @generated from protobuf field: string resource_name = 2
455
+ */
456
+ resourceName: string;
457
+ /**
458
+ * The owner of the resource (optional).
459
+ * For example, "user:<owner email>" or "project:<Google developer project
460
+ * id>".
461
+ *
462
+ * @generated from protobuf field: string owner = 3
463
+ */
464
+ owner: string;
465
+ /**
466
+ * Describes what error is encountered when accessing this resource.
467
+ * For example, updating a cloud project may require the `writer` permission
468
+ * on the developer console project.
469
+ *
470
+ * @generated from protobuf field: string description = 4
471
+ */
472
+ description: string;
473
+ }
474
+ /**
475
+ * Provides links to documentation or for performing an out of band action.
476
+ *
477
+ * For example, if a quota check failed with an error indicating the calling
478
+ * project hasn't enabled the accessed service, this can contain a URL pointing
479
+ * directly to the right place in the developer console to flip the bit.
480
+ *
481
+ * @generated from protobuf message google.rpc.Help
482
+ */
483
+ export interface Help {
484
+ /**
485
+ * URL(s) pointing to additional information on handling the current error.
486
+ *
487
+ * @generated from protobuf field: repeated google.rpc.Help.Link links = 1
488
+ */
489
+ links: Help_Link[];
490
+ }
491
+ /**
492
+ * Describes a URL link.
493
+ *
494
+ * @generated from protobuf message google.rpc.Help.Link
495
+ */
496
+ export interface Help_Link {
497
+ /**
498
+ * Describes what the link offers.
499
+ *
500
+ * @generated from protobuf field: string description = 1
501
+ */
502
+ description: string;
503
+ /**
504
+ * The URL of the link.
505
+ *
506
+ * @generated from protobuf field: string url = 2
507
+ */
508
+ url: string;
509
+ }
510
+ /**
511
+ * Provides a localized error message that is safe to return to the user
512
+ * which can be attached to an RPC error.
513
+ *
514
+ * @generated from protobuf message google.rpc.LocalizedMessage
515
+ */
516
+ export interface LocalizedMessage {
517
+ /**
518
+ * The locale used following the specification defined at
519
+ * https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
520
+ * Examples are: "en-US", "fr-CH", "es-MX"
521
+ *
522
+ * @generated from protobuf field: string locale = 1
523
+ */
524
+ locale: string;
525
+ /**
526
+ * The localized error message in the above locale.
527
+ *
528
+ * @generated from protobuf field: string message = 2
529
+ */
530
+ message: string;
531
+ }
532
+ // @generated message type with reflection information, may provide speed optimized methods
533
+ class ErrorInfo$Type extends MessageType<ErrorInfo> {
534
+ constructor() {
535
+ super("google.rpc.ErrorInfo", [
536
+ { no: 1, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
537
+ { no: 2, name: "domain", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
538
+ { no: 3, name: "metadata", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }
539
+ ]);
540
+ }
541
+ create(value?: PartialMessage<ErrorInfo>): ErrorInfo {
542
+ const message = globalThis.Object.create((this.messagePrototype!));
543
+ message.reason = "";
544
+ message.domain = "";
545
+ message.metadata = {};
546
+ if (value !== undefined)
547
+ reflectionMergePartial<ErrorInfo>(this, message, value);
548
+ return message;
549
+ }
550
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ErrorInfo): ErrorInfo {
551
+ let message = target ?? this.create(), end = reader.pos + length;
552
+ while (reader.pos < end) {
553
+ let [fieldNo, wireType] = reader.tag();
554
+ switch (fieldNo) {
555
+ case /* string reason */ 1:
556
+ message.reason = reader.string();
557
+ break;
558
+ case /* string domain */ 2:
559
+ message.domain = reader.string();
560
+ break;
561
+ case /* map<string, string> metadata */ 3:
562
+ this.binaryReadMap3(message.metadata, reader, options);
563
+ break;
564
+ default:
565
+ let u = options.readUnknownField;
566
+ if (u === "throw")
567
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
568
+ let d = reader.skip(wireType);
569
+ if (u !== false)
570
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
571
+ }
572
+ }
573
+ return message;
574
+ }
575
+ private binaryReadMap3(map: ErrorInfo["metadata"], reader: IBinaryReader, options: BinaryReadOptions): void {
576
+ let len = reader.uint32(), end = reader.pos + len, key: keyof ErrorInfo["metadata"] | undefined, val: ErrorInfo["metadata"][any] | undefined;
577
+ while (reader.pos < end) {
578
+ let [fieldNo, wireType] = reader.tag();
579
+ switch (fieldNo) {
580
+ case 1:
581
+ key = reader.string();
582
+ break;
583
+ case 2:
584
+ val = reader.string();
585
+ break;
586
+ default: throw new globalThis.Error("unknown map entry field for google.rpc.ErrorInfo.metadata");
587
+ }
588
+ }
589
+ map[key ?? ""] = val ?? "";
590
+ }
591
+ internalBinaryWrite(message: ErrorInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
592
+ /* string reason = 1; */
593
+ if (message.reason !== "")
594
+ writer.tag(1, WireType.LengthDelimited).string(message.reason);
595
+ /* string domain = 2; */
596
+ if (message.domain !== "")
597
+ writer.tag(2, WireType.LengthDelimited).string(message.domain);
598
+ /* map<string, string> metadata = 3; */
599
+ for (let k of globalThis.Object.keys(message.metadata))
600
+ writer.tag(3, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.metadata[k]).join();
601
+ let u = options.writeUnknownFields;
602
+ if (u !== false)
603
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
604
+ return writer;
605
+ }
606
+ }
607
+ /**
608
+ * @generated MessageType for protobuf message google.rpc.ErrorInfo
609
+ */
610
+ export const ErrorInfo = new ErrorInfo$Type();
611
+ // @generated message type with reflection information, may provide speed optimized methods
612
+ class RetryInfo$Type extends MessageType<RetryInfo> {
613
+ constructor() {
614
+ super("google.rpc.RetryInfo", [
615
+ { no: 1, name: "retry_delay", kind: "message", T: () => Duration }
616
+ ]);
617
+ }
618
+ create(value?: PartialMessage<RetryInfo>): RetryInfo {
619
+ const message = globalThis.Object.create((this.messagePrototype!));
620
+ if (value !== undefined)
621
+ reflectionMergePartial<RetryInfo>(this, message, value);
622
+ return message;
623
+ }
624
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RetryInfo): RetryInfo {
625
+ let message = target ?? this.create(), end = reader.pos + length;
626
+ while (reader.pos < end) {
627
+ let [fieldNo, wireType] = reader.tag();
628
+ switch (fieldNo) {
629
+ case /* google.protobuf.Duration retry_delay */ 1:
630
+ message.retryDelay = Duration.internalBinaryRead(reader, reader.uint32(), options, message.retryDelay);
631
+ break;
632
+ default:
633
+ let u = options.readUnknownField;
634
+ if (u === "throw")
635
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
636
+ let d = reader.skip(wireType);
637
+ if (u !== false)
638
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
639
+ }
640
+ }
641
+ return message;
642
+ }
643
+ internalBinaryWrite(message: RetryInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
644
+ /* google.protobuf.Duration retry_delay = 1; */
645
+ if (message.retryDelay)
646
+ Duration.internalBinaryWrite(message.retryDelay, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
647
+ let u = options.writeUnknownFields;
648
+ if (u !== false)
649
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
650
+ return writer;
651
+ }
652
+ }
653
+ /**
654
+ * @generated MessageType for protobuf message google.rpc.RetryInfo
655
+ */
656
+ export const RetryInfo = new RetryInfo$Type();
657
+ // @generated message type with reflection information, may provide speed optimized methods
658
+ class DebugInfo$Type extends MessageType<DebugInfo> {
659
+ constructor() {
660
+ super("google.rpc.DebugInfo", [
661
+ { no: 1, name: "stack_entries", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
662
+ { no: 2, name: "detail", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
663
+ ]);
664
+ }
665
+ create(value?: PartialMessage<DebugInfo>): DebugInfo {
666
+ const message = globalThis.Object.create((this.messagePrototype!));
667
+ message.stackEntries = [];
668
+ message.detail = "";
669
+ if (value !== undefined)
670
+ reflectionMergePartial<DebugInfo>(this, message, value);
671
+ return message;
672
+ }
673
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DebugInfo): DebugInfo {
674
+ let message = target ?? this.create(), end = reader.pos + length;
675
+ while (reader.pos < end) {
676
+ let [fieldNo, wireType] = reader.tag();
677
+ switch (fieldNo) {
678
+ case /* repeated string stack_entries */ 1:
679
+ message.stackEntries.push(reader.string());
680
+ break;
681
+ case /* string detail */ 2:
682
+ message.detail = reader.string();
683
+ break;
684
+ default:
685
+ let u = options.readUnknownField;
686
+ if (u === "throw")
687
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
688
+ let d = reader.skip(wireType);
689
+ if (u !== false)
690
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
691
+ }
692
+ }
693
+ return message;
694
+ }
695
+ internalBinaryWrite(message: DebugInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
696
+ /* repeated string stack_entries = 1; */
697
+ for (let i = 0; i < message.stackEntries.length; i++)
698
+ writer.tag(1, WireType.LengthDelimited).string(message.stackEntries[i]);
699
+ /* string detail = 2; */
700
+ if (message.detail !== "")
701
+ writer.tag(2, WireType.LengthDelimited).string(message.detail);
702
+ let u = options.writeUnknownFields;
703
+ if (u !== false)
704
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
705
+ return writer;
706
+ }
707
+ }
708
+ /**
709
+ * @generated MessageType for protobuf message google.rpc.DebugInfo
710
+ */
711
+ export const DebugInfo = new DebugInfo$Type();
712
+ // @generated message type with reflection information, may provide speed optimized methods
713
+ class QuotaFailure$Type extends MessageType<QuotaFailure> {
714
+ constructor() {
715
+ super("google.rpc.QuotaFailure", [
716
+ { no: 1, name: "violations", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QuotaFailure_Violation }
717
+ ]);
718
+ }
719
+ create(value?: PartialMessage<QuotaFailure>): QuotaFailure {
720
+ const message = globalThis.Object.create((this.messagePrototype!));
721
+ message.violations = [];
722
+ if (value !== undefined)
723
+ reflectionMergePartial<QuotaFailure>(this, message, value);
724
+ return message;
725
+ }
726
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: QuotaFailure): QuotaFailure {
727
+ let message = target ?? this.create(), end = reader.pos + length;
728
+ while (reader.pos < end) {
729
+ let [fieldNo, wireType] = reader.tag();
730
+ switch (fieldNo) {
731
+ case /* repeated google.rpc.QuotaFailure.Violation violations */ 1:
732
+ message.violations.push(QuotaFailure_Violation.internalBinaryRead(reader, reader.uint32(), options));
733
+ break;
734
+ default:
735
+ let u = options.readUnknownField;
736
+ if (u === "throw")
737
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
738
+ let d = reader.skip(wireType);
739
+ if (u !== false)
740
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
741
+ }
742
+ }
743
+ return message;
744
+ }
745
+ internalBinaryWrite(message: QuotaFailure, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
746
+ /* repeated google.rpc.QuotaFailure.Violation violations = 1; */
747
+ for (let i = 0; i < message.violations.length; i++)
748
+ QuotaFailure_Violation.internalBinaryWrite(message.violations[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
749
+ let u = options.writeUnknownFields;
750
+ if (u !== false)
751
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
752
+ return writer;
753
+ }
754
+ }
755
+ /**
756
+ * @generated MessageType for protobuf message google.rpc.QuotaFailure
757
+ */
758
+ export const QuotaFailure = new QuotaFailure$Type();
759
+ // @generated message type with reflection information, may provide speed optimized methods
760
+ class QuotaFailure_Violation$Type extends MessageType<QuotaFailure_Violation> {
761
+ constructor() {
762
+ super("google.rpc.QuotaFailure.Violation", [
763
+ { no: 1, name: "subject", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
764
+ { no: 2, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
765
+ { no: 3, name: "api_service", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
766
+ { no: 4, name: "quota_metric", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
767
+ { no: 5, name: "quota_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
768
+ { no: 6, name: "quota_dimensions", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } },
769
+ { no: 7, name: "quota_value", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
770
+ { no: 8, name: "future_quota_value", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
771
+ ]);
772
+ }
773
+ create(value?: PartialMessage<QuotaFailure_Violation>): QuotaFailure_Violation {
774
+ const message = globalThis.Object.create((this.messagePrototype!));
775
+ message.subject = "";
776
+ message.description = "";
777
+ message.apiService = "";
778
+ message.quotaMetric = "";
779
+ message.quotaId = "";
780
+ message.quotaDimensions = {};
781
+ message.quotaValue = 0n;
782
+ if (value !== undefined)
783
+ reflectionMergePartial<QuotaFailure_Violation>(this, message, value);
784
+ return message;
785
+ }
786
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: QuotaFailure_Violation): QuotaFailure_Violation {
787
+ let message = target ?? this.create(), end = reader.pos + length;
788
+ while (reader.pos < end) {
789
+ let [fieldNo, wireType] = reader.tag();
790
+ switch (fieldNo) {
791
+ case /* string subject */ 1:
792
+ message.subject = reader.string();
793
+ break;
794
+ case /* string description */ 2:
795
+ message.description = reader.string();
796
+ break;
797
+ case /* string api_service */ 3:
798
+ message.apiService = reader.string();
799
+ break;
800
+ case /* string quota_metric */ 4:
801
+ message.quotaMetric = reader.string();
802
+ break;
803
+ case /* string quota_id */ 5:
804
+ message.quotaId = reader.string();
805
+ break;
806
+ case /* map<string, string> quota_dimensions */ 6:
807
+ this.binaryReadMap6(message.quotaDimensions, reader, options);
808
+ break;
809
+ case /* int64 quota_value */ 7:
810
+ message.quotaValue = reader.int64().toBigInt();
811
+ break;
812
+ case /* optional int64 future_quota_value */ 8:
813
+ message.futureQuotaValue = reader.int64().toBigInt();
814
+ break;
815
+ default:
816
+ let u = options.readUnknownField;
817
+ if (u === "throw")
818
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
819
+ let d = reader.skip(wireType);
820
+ if (u !== false)
821
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
822
+ }
823
+ }
824
+ return message;
825
+ }
826
+ private binaryReadMap6(map: QuotaFailure_Violation["quotaDimensions"], reader: IBinaryReader, options: BinaryReadOptions): void {
827
+ let len = reader.uint32(), end = reader.pos + len, key: keyof QuotaFailure_Violation["quotaDimensions"] | undefined, val: QuotaFailure_Violation["quotaDimensions"][any] | undefined;
828
+ while (reader.pos < end) {
829
+ let [fieldNo, wireType] = reader.tag();
830
+ switch (fieldNo) {
831
+ case 1:
832
+ key = reader.string();
833
+ break;
834
+ case 2:
835
+ val = reader.string();
836
+ break;
837
+ default: throw new globalThis.Error("unknown map entry field for google.rpc.QuotaFailure.Violation.quota_dimensions");
838
+ }
839
+ }
840
+ map[key ?? ""] = val ?? "";
841
+ }
842
+ internalBinaryWrite(message: QuotaFailure_Violation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
843
+ /* string subject = 1; */
844
+ if (message.subject !== "")
845
+ writer.tag(1, WireType.LengthDelimited).string(message.subject);
846
+ /* string description = 2; */
847
+ if (message.description !== "")
848
+ writer.tag(2, WireType.LengthDelimited).string(message.description);
849
+ /* string api_service = 3; */
850
+ if (message.apiService !== "")
851
+ writer.tag(3, WireType.LengthDelimited).string(message.apiService);
852
+ /* string quota_metric = 4; */
853
+ if (message.quotaMetric !== "")
854
+ writer.tag(4, WireType.LengthDelimited).string(message.quotaMetric);
855
+ /* string quota_id = 5; */
856
+ if (message.quotaId !== "")
857
+ writer.tag(5, WireType.LengthDelimited).string(message.quotaId);
858
+ /* map<string, string> quota_dimensions = 6; */
859
+ for (let k of globalThis.Object.keys(message.quotaDimensions))
860
+ writer.tag(6, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.quotaDimensions[k]).join();
861
+ /* int64 quota_value = 7; */
862
+ if (message.quotaValue !== 0n)
863
+ writer.tag(7, WireType.Varint).int64(message.quotaValue);
864
+ /* optional int64 future_quota_value = 8; */
865
+ if (message.futureQuotaValue !== undefined)
866
+ writer.tag(8, WireType.Varint).int64(message.futureQuotaValue);
867
+ let u = options.writeUnknownFields;
868
+ if (u !== false)
869
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
870
+ return writer;
871
+ }
872
+ }
873
+ /**
874
+ * @generated MessageType for protobuf message google.rpc.QuotaFailure.Violation
875
+ */
876
+ export const QuotaFailure_Violation = new QuotaFailure_Violation$Type();
877
+ // @generated message type with reflection information, may provide speed optimized methods
878
+ class PreconditionFailure$Type extends MessageType<PreconditionFailure> {
879
+ constructor() {
880
+ super("google.rpc.PreconditionFailure", [
881
+ { no: 1, name: "violations", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PreconditionFailure_Violation }
882
+ ]);
883
+ }
884
+ create(value?: PartialMessage<PreconditionFailure>): PreconditionFailure {
885
+ const message = globalThis.Object.create((this.messagePrototype!));
886
+ message.violations = [];
887
+ if (value !== undefined)
888
+ reflectionMergePartial<PreconditionFailure>(this, message, value);
889
+ return message;
890
+ }
891
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PreconditionFailure): PreconditionFailure {
892
+ let message = target ?? this.create(), end = reader.pos + length;
893
+ while (reader.pos < end) {
894
+ let [fieldNo, wireType] = reader.tag();
895
+ switch (fieldNo) {
896
+ case /* repeated google.rpc.PreconditionFailure.Violation violations */ 1:
897
+ message.violations.push(PreconditionFailure_Violation.internalBinaryRead(reader, reader.uint32(), options));
898
+ break;
899
+ default:
900
+ let u = options.readUnknownField;
901
+ if (u === "throw")
902
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
903
+ let d = reader.skip(wireType);
904
+ if (u !== false)
905
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
906
+ }
907
+ }
908
+ return message;
909
+ }
910
+ internalBinaryWrite(message: PreconditionFailure, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
911
+ /* repeated google.rpc.PreconditionFailure.Violation violations = 1; */
912
+ for (let i = 0; i < message.violations.length; i++)
913
+ PreconditionFailure_Violation.internalBinaryWrite(message.violations[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
914
+ let u = options.writeUnknownFields;
915
+ if (u !== false)
916
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
917
+ return writer;
918
+ }
919
+ }
920
+ /**
921
+ * @generated MessageType for protobuf message google.rpc.PreconditionFailure
922
+ */
923
+ export const PreconditionFailure = new PreconditionFailure$Type();
924
+ // @generated message type with reflection information, may provide speed optimized methods
925
+ class PreconditionFailure_Violation$Type extends MessageType<PreconditionFailure_Violation> {
926
+ constructor() {
927
+ super("google.rpc.PreconditionFailure.Violation", [
928
+ { no: 1, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
929
+ { no: 2, name: "subject", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
930
+ { no: 3, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
931
+ ]);
932
+ }
933
+ create(value?: PartialMessage<PreconditionFailure_Violation>): PreconditionFailure_Violation {
934
+ const message = globalThis.Object.create((this.messagePrototype!));
935
+ message.type = "";
936
+ message.subject = "";
937
+ message.description = "";
938
+ if (value !== undefined)
939
+ reflectionMergePartial<PreconditionFailure_Violation>(this, message, value);
940
+ return message;
941
+ }
942
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PreconditionFailure_Violation): PreconditionFailure_Violation {
943
+ let message = target ?? this.create(), end = reader.pos + length;
944
+ while (reader.pos < end) {
945
+ let [fieldNo, wireType] = reader.tag();
946
+ switch (fieldNo) {
947
+ case /* string type */ 1:
948
+ message.type = reader.string();
949
+ break;
950
+ case /* string subject */ 2:
951
+ message.subject = reader.string();
952
+ break;
953
+ case /* string description */ 3:
954
+ message.description = reader.string();
955
+ break;
956
+ default:
957
+ let u = options.readUnknownField;
958
+ if (u === "throw")
959
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
960
+ let d = reader.skip(wireType);
961
+ if (u !== false)
962
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
963
+ }
964
+ }
965
+ return message;
966
+ }
967
+ internalBinaryWrite(message: PreconditionFailure_Violation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
968
+ /* string type = 1; */
969
+ if (message.type !== "")
970
+ writer.tag(1, WireType.LengthDelimited).string(message.type);
971
+ /* string subject = 2; */
972
+ if (message.subject !== "")
973
+ writer.tag(2, WireType.LengthDelimited).string(message.subject);
974
+ /* string description = 3; */
975
+ if (message.description !== "")
976
+ writer.tag(3, WireType.LengthDelimited).string(message.description);
977
+ let u = options.writeUnknownFields;
978
+ if (u !== false)
979
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
980
+ return writer;
981
+ }
982
+ }
983
+ /**
984
+ * @generated MessageType for protobuf message google.rpc.PreconditionFailure.Violation
985
+ */
986
+ export const PreconditionFailure_Violation = new PreconditionFailure_Violation$Type();
987
+ // @generated message type with reflection information, may provide speed optimized methods
988
+ class BadRequest$Type extends MessageType<BadRequest> {
989
+ constructor() {
990
+ super("google.rpc.BadRequest", [
991
+ { no: 1, name: "field_violations", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => BadRequest_FieldViolation }
992
+ ]);
993
+ }
994
+ create(value?: PartialMessage<BadRequest>): BadRequest {
995
+ const message = globalThis.Object.create((this.messagePrototype!));
996
+ message.fieldViolations = [];
997
+ if (value !== undefined)
998
+ reflectionMergePartial<BadRequest>(this, message, value);
999
+ return message;
1000
+ }
1001
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BadRequest): BadRequest {
1002
+ let message = target ?? this.create(), end = reader.pos + length;
1003
+ while (reader.pos < end) {
1004
+ let [fieldNo, wireType] = reader.tag();
1005
+ switch (fieldNo) {
1006
+ case /* repeated google.rpc.BadRequest.FieldViolation field_violations */ 1:
1007
+ message.fieldViolations.push(BadRequest_FieldViolation.internalBinaryRead(reader, reader.uint32(), options));
1008
+ break;
1009
+ default:
1010
+ let u = options.readUnknownField;
1011
+ if (u === "throw")
1012
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1013
+ let d = reader.skip(wireType);
1014
+ if (u !== false)
1015
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1016
+ }
1017
+ }
1018
+ return message;
1019
+ }
1020
+ internalBinaryWrite(message: BadRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1021
+ /* repeated google.rpc.BadRequest.FieldViolation field_violations = 1; */
1022
+ for (let i = 0; i < message.fieldViolations.length; i++)
1023
+ BadRequest_FieldViolation.internalBinaryWrite(message.fieldViolations[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1024
+ let u = options.writeUnknownFields;
1025
+ if (u !== false)
1026
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1027
+ return writer;
1028
+ }
1029
+ }
1030
+ /**
1031
+ * @generated MessageType for protobuf message google.rpc.BadRequest
1032
+ */
1033
+ export const BadRequest = new BadRequest$Type();
1034
+ // @generated message type with reflection information, may provide speed optimized methods
1035
+ class BadRequest_FieldViolation$Type extends MessageType<BadRequest_FieldViolation> {
1036
+ constructor() {
1037
+ super("google.rpc.BadRequest.FieldViolation", [
1038
+ { no: 1, name: "field", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1039
+ { no: 2, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1040
+ { no: 3, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1041
+ { no: 4, name: "localized_message", kind: "message", T: () => LocalizedMessage }
1042
+ ]);
1043
+ }
1044
+ create(value?: PartialMessage<BadRequest_FieldViolation>): BadRequest_FieldViolation {
1045
+ const message = globalThis.Object.create((this.messagePrototype!));
1046
+ message.field = "";
1047
+ message.description = "";
1048
+ message.reason = "";
1049
+ if (value !== undefined)
1050
+ reflectionMergePartial<BadRequest_FieldViolation>(this, message, value);
1051
+ return message;
1052
+ }
1053
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BadRequest_FieldViolation): BadRequest_FieldViolation {
1054
+ let message = target ?? this.create(), end = reader.pos + length;
1055
+ while (reader.pos < end) {
1056
+ let [fieldNo, wireType] = reader.tag();
1057
+ switch (fieldNo) {
1058
+ case /* string field */ 1:
1059
+ message.field = reader.string();
1060
+ break;
1061
+ case /* string description */ 2:
1062
+ message.description = reader.string();
1063
+ break;
1064
+ case /* string reason */ 3:
1065
+ message.reason = reader.string();
1066
+ break;
1067
+ case /* google.rpc.LocalizedMessage localized_message */ 4:
1068
+ message.localizedMessage = LocalizedMessage.internalBinaryRead(reader, reader.uint32(), options, message.localizedMessage);
1069
+ break;
1070
+ default:
1071
+ let u = options.readUnknownField;
1072
+ if (u === "throw")
1073
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1074
+ let d = reader.skip(wireType);
1075
+ if (u !== false)
1076
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1077
+ }
1078
+ }
1079
+ return message;
1080
+ }
1081
+ internalBinaryWrite(message: BadRequest_FieldViolation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1082
+ /* string field = 1; */
1083
+ if (message.field !== "")
1084
+ writer.tag(1, WireType.LengthDelimited).string(message.field);
1085
+ /* string description = 2; */
1086
+ if (message.description !== "")
1087
+ writer.tag(2, WireType.LengthDelimited).string(message.description);
1088
+ /* string reason = 3; */
1089
+ if (message.reason !== "")
1090
+ writer.tag(3, WireType.LengthDelimited).string(message.reason);
1091
+ /* google.rpc.LocalizedMessage localized_message = 4; */
1092
+ if (message.localizedMessage)
1093
+ LocalizedMessage.internalBinaryWrite(message.localizedMessage, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
1094
+ let u = options.writeUnknownFields;
1095
+ if (u !== false)
1096
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1097
+ return writer;
1098
+ }
1099
+ }
1100
+ /**
1101
+ * @generated MessageType for protobuf message google.rpc.BadRequest.FieldViolation
1102
+ */
1103
+ export const BadRequest_FieldViolation = new BadRequest_FieldViolation$Type();
1104
+ // @generated message type with reflection information, may provide speed optimized methods
1105
+ class RequestInfo$Type extends MessageType<RequestInfo> {
1106
+ constructor() {
1107
+ super("google.rpc.RequestInfo", [
1108
+ { no: 1, name: "request_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1109
+ { no: 2, name: "serving_data", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1110
+ ]);
1111
+ }
1112
+ create(value?: PartialMessage<RequestInfo>): RequestInfo {
1113
+ const message = globalThis.Object.create((this.messagePrototype!));
1114
+ message.requestId = "";
1115
+ message.servingData = "";
1116
+ if (value !== undefined)
1117
+ reflectionMergePartial<RequestInfo>(this, message, value);
1118
+ return message;
1119
+ }
1120
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RequestInfo): RequestInfo {
1121
+ let message = target ?? this.create(), end = reader.pos + length;
1122
+ while (reader.pos < end) {
1123
+ let [fieldNo, wireType] = reader.tag();
1124
+ switch (fieldNo) {
1125
+ case /* string request_id */ 1:
1126
+ message.requestId = reader.string();
1127
+ break;
1128
+ case /* string serving_data */ 2:
1129
+ message.servingData = reader.string();
1130
+ break;
1131
+ default:
1132
+ let u = options.readUnknownField;
1133
+ if (u === "throw")
1134
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1135
+ let d = reader.skip(wireType);
1136
+ if (u !== false)
1137
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1138
+ }
1139
+ }
1140
+ return message;
1141
+ }
1142
+ internalBinaryWrite(message: RequestInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1143
+ /* string request_id = 1; */
1144
+ if (message.requestId !== "")
1145
+ writer.tag(1, WireType.LengthDelimited).string(message.requestId);
1146
+ /* string serving_data = 2; */
1147
+ if (message.servingData !== "")
1148
+ writer.tag(2, WireType.LengthDelimited).string(message.servingData);
1149
+ let u = options.writeUnknownFields;
1150
+ if (u !== false)
1151
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1152
+ return writer;
1153
+ }
1154
+ }
1155
+ /**
1156
+ * @generated MessageType for protobuf message google.rpc.RequestInfo
1157
+ */
1158
+ export const RequestInfo = new RequestInfo$Type();
1159
+ // @generated message type with reflection information, may provide speed optimized methods
1160
+ class ResourceInfo$Type extends MessageType<ResourceInfo> {
1161
+ constructor() {
1162
+ super("google.rpc.ResourceInfo", [
1163
+ { no: 1, name: "resource_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1164
+ { no: 2, name: "resource_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1165
+ { no: 3, name: "owner", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1166
+ { no: 4, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1167
+ ]);
1168
+ }
1169
+ create(value?: PartialMessage<ResourceInfo>): ResourceInfo {
1170
+ const message = globalThis.Object.create((this.messagePrototype!));
1171
+ message.resourceType = "";
1172
+ message.resourceName = "";
1173
+ message.owner = "";
1174
+ message.description = "";
1175
+ if (value !== undefined)
1176
+ reflectionMergePartial<ResourceInfo>(this, message, value);
1177
+ return message;
1178
+ }
1179
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceInfo): ResourceInfo {
1180
+ let message = target ?? this.create(), end = reader.pos + length;
1181
+ while (reader.pos < end) {
1182
+ let [fieldNo, wireType] = reader.tag();
1183
+ switch (fieldNo) {
1184
+ case /* string resource_type */ 1:
1185
+ message.resourceType = reader.string();
1186
+ break;
1187
+ case /* string resource_name */ 2:
1188
+ message.resourceName = reader.string();
1189
+ break;
1190
+ case /* string owner */ 3:
1191
+ message.owner = reader.string();
1192
+ break;
1193
+ case /* string description */ 4:
1194
+ message.description = reader.string();
1195
+ break;
1196
+ default:
1197
+ let u = options.readUnknownField;
1198
+ if (u === "throw")
1199
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1200
+ let d = reader.skip(wireType);
1201
+ if (u !== false)
1202
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1203
+ }
1204
+ }
1205
+ return message;
1206
+ }
1207
+ internalBinaryWrite(message: ResourceInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1208
+ /* string resource_type = 1; */
1209
+ if (message.resourceType !== "")
1210
+ writer.tag(1, WireType.LengthDelimited).string(message.resourceType);
1211
+ /* string resource_name = 2; */
1212
+ if (message.resourceName !== "")
1213
+ writer.tag(2, WireType.LengthDelimited).string(message.resourceName);
1214
+ /* string owner = 3; */
1215
+ if (message.owner !== "")
1216
+ writer.tag(3, WireType.LengthDelimited).string(message.owner);
1217
+ /* string description = 4; */
1218
+ if (message.description !== "")
1219
+ writer.tag(4, WireType.LengthDelimited).string(message.description);
1220
+ let u = options.writeUnknownFields;
1221
+ if (u !== false)
1222
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1223
+ return writer;
1224
+ }
1225
+ }
1226
+ /**
1227
+ * @generated MessageType for protobuf message google.rpc.ResourceInfo
1228
+ */
1229
+ export const ResourceInfo = new ResourceInfo$Type();
1230
+ // @generated message type with reflection information, may provide speed optimized methods
1231
+ class Help$Type extends MessageType<Help> {
1232
+ constructor() {
1233
+ super("google.rpc.Help", [
1234
+ { no: 1, name: "links", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Help_Link }
1235
+ ]);
1236
+ }
1237
+ create(value?: PartialMessage<Help>): Help {
1238
+ const message = globalThis.Object.create((this.messagePrototype!));
1239
+ message.links = [];
1240
+ if (value !== undefined)
1241
+ reflectionMergePartial<Help>(this, message, value);
1242
+ return message;
1243
+ }
1244
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Help): Help {
1245
+ let message = target ?? this.create(), end = reader.pos + length;
1246
+ while (reader.pos < end) {
1247
+ let [fieldNo, wireType] = reader.tag();
1248
+ switch (fieldNo) {
1249
+ case /* repeated google.rpc.Help.Link links */ 1:
1250
+ message.links.push(Help_Link.internalBinaryRead(reader, reader.uint32(), options));
1251
+ break;
1252
+ default:
1253
+ let u = options.readUnknownField;
1254
+ if (u === "throw")
1255
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1256
+ let d = reader.skip(wireType);
1257
+ if (u !== false)
1258
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1259
+ }
1260
+ }
1261
+ return message;
1262
+ }
1263
+ internalBinaryWrite(message: Help, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1264
+ /* repeated google.rpc.Help.Link links = 1; */
1265
+ for (let i = 0; i < message.links.length; i++)
1266
+ Help_Link.internalBinaryWrite(message.links[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1267
+ let u = options.writeUnknownFields;
1268
+ if (u !== false)
1269
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1270
+ return writer;
1271
+ }
1272
+ }
1273
+ /**
1274
+ * @generated MessageType for protobuf message google.rpc.Help
1275
+ */
1276
+ export const Help = new Help$Type();
1277
+ // @generated message type with reflection information, may provide speed optimized methods
1278
+ class Help_Link$Type extends MessageType<Help_Link> {
1279
+ constructor() {
1280
+ super("google.rpc.Help.Link", [
1281
+ { no: 1, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1282
+ { no: 2, name: "url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1283
+ ]);
1284
+ }
1285
+ create(value?: PartialMessage<Help_Link>): Help_Link {
1286
+ const message = globalThis.Object.create((this.messagePrototype!));
1287
+ message.description = "";
1288
+ message.url = "";
1289
+ if (value !== undefined)
1290
+ reflectionMergePartial<Help_Link>(this, message, value);
1291
+ return message;
1292
+ }
1293
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Help_Link): Help_Link {
1294
+ let message = target ?? this.create(), end = reader.pos + length;
1295
+ while (reader.pos < end) {
1296
+ let [fieldNo, wireType] = reader.tag();
1297
+ switch (fieldNo) {
1298
+ case /* string description */ 1:
1299
+ message.description = reader.string();
1300
+ break;
1301
+ case /* string url */ 2:
1302
+ message.url = reader.string();
1303
+ break;
1304
+ default:
1305
+ let u = options.readUnknownField;
1306
+ if (u === "throw")
1307
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1308
+ let d = reader.skip(wireType);
1309
+ if (u !== false)
1310
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1311
+ }
1312
+ }
1313
+ return message;
1314
+ }
1315
+ internalBinaryWrite(message: Help_Link, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1316
+ /* string description = 1; */
1317
+ if (message.description !== "")
1318
+ writer.tag(1, WireType.LengthDelimited).string(message.description);
1319
+ /* string url = 2; */
1320
+ if (message.url !== "")
1321
+ writer.tag(2, WireType.LengthDelimited).string(message.url);
1322
+ let u = options.writeUnknownFields;
1323
+ if (u !== false)
1324
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1325
+ return writer;
1326
+ }
1327
+ }
1328
+ /**
1329
+ * @generated MessageType for protobuf message google.rpc.Help.Link
1330
+ */
1331
+ export const Help_Link = new Help_Link$Type();
1332
+ // @generated message type with reflection information, may provide speed optimized methods
1333
+ class LocalizedMessage$Type extends MessageType<LocalizedMessage> {
1334
+ constructor() {
1335
+ super("google.rpc.LocalizedMessage", [
1336
+ { no: 1, name: "locale", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1337
+ { no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1338
+ ]);
1339
+ }
1340
+ create(value?: PartialMessage<LocalizedMessage>): LocalizedMessage {
1341
+ const message = globalThis.Object.create((this.messagePrototype!));
1342
+ message.locale = "";
1343
+ message.message = "";
1344
+ if (value !== undefined)
1345
+ reflectionMergePartial<LocalizedMessage>(this, message, value);
1346
+ return message;
1347
+ }
1348
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LocalizedMessage): LocalizedMessage {
1349
+ let message = target ?? this.create(), end = reader.pos + length;
1350
+ while (reader.pos < end) {
1351
+ let [fieldNo, wireType] = reader.tag();
1352
+ switch (fieldNo) {
1353
+ case /* string locale */ 1:
1354
+ message.locale = reader.string();
1355
+ break;
1356
+ case /* string message */ 2:
1357
+ message.message = reader.string();
1358
+ break;
1359
+ default:
1360
+ let u = options.readUnknownField;
1361
+ if (u === "throw")
1362
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1363
+ let d = reader.skip(wireType);
1364
+ if (u !== false)
1365
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1366
+ }
1367
+ }
1368
+ return message;
1369
+ }
1370
+ internalBinaryWrite(message: LocalizedMessage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1371
+ /* string locale = 1; */
1372
+ if (message.locale !== "")
1373
+ writer.tag(1, WireType.LengthDelimited).string(message.locale);
1374
+ /* string message = 2; */
1375
+ if (message.message !== "")
1376
+ writer.tag(2, WireType.LengthDelimited).string(message.message);
1377
+ let u = options.writeUnknownFields;
1378
+ if (u !== false)
1379
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1380
+ return writer;
1381
+ }
1382
+ }
1383
+ /**
1384
+ * @generated MessageType for protobuf message google.rpc.LocalizedMessage
1385
+ */
1386
+ export const LocalizedMessage = new LocalizedMessage$Type();