@burnt-labs/xion-types 0.0.1-test.1762962136

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 (554) hide show
  1. package/jest.config.js +18 -0
  2. package/package.json +56 -0
  3. package/scripts/aminos.ts +29 -0
  4. package/scripts/codegen.ts +94 -0
  5. package/scripts/download-protos.ts +248 -0
  6. package/telescope.config.json +84 -0
  7. package/tsconfig.esm.json +9 -0
  8. package/tsconfig.json +18 -0
  9. package/types/abstractaccount/bundle.ts +35 -0
  10. package/types/abstractaccount/client.ts +48 -0
  11. package/types/abstractaccount/lcd.ts +130 -0
  12. package/types/abstractaccount/rpc.query.ts +93 -0
  13. package/types/abstractaccount/rpc.tx.ts +74 -0
  14. package/types/abstractaccount/v1/account.ts +250 -0
  15. package/types/abstractaccount/v1/events.ts +135 -0
  16. package/types/abstractaccount/v1/genesis.ts +106 -0
  17. package/types/abstractaccount/v1/params.ts +192 -0
  18. package/types/abstractaccount/v1/query.lcd.ts +19 -0
  19. package/types/abstractaccount/v1/query.rpc.Query.ts +31 -0
  20. package/types/abstractaccount/v1/query.ts +160 -0
  21. package/types/abstractaccount/v1/tx.amino.ts +14 -0
  22. package/types/abstractaccount/v1/tx.registry.ts +53 -0
  23. package/types/abstractaccount/v1/tx.rpc.msg.ts +29 -0
  24. package/types/abstractaccount/v1/tx.ts +454 -0
  25. package/types/amino/amino.ts +1 -0
  26. package/types/amino/bundle.ts +5 -0
  27. package/types/binary.ts +535 -0
  28. package/types/cosmos/app/runtime/v1alpha1/module.ts +492 -0
  29. package/types/cosmos/app/v1alpha1/config.ts +437 -0
  30. package/types/cosmos/app/v1alpha1/module.ts +466 -0
  31. package/types/cosmos/app/v1alpha1/query.rpc.Query.ts +31 -0
  32. package/types/cosmos/app/v1alpha1/query.ts +176 -0
  33. package/types/cosmos/auth/module/v1/module.ts +288 -0
  34. package/types/cosmos/auth/v1beta1/auth.ts +562 -0
  35. package/types/cosmos/auth/v1beta1/genesis.ts +123 -0
  36. package/types/cosmos/auth/v1beta1/query.lcd.ts +91 -0
  37. package/types/cosmos/auth/v1beta1/query.rpc.Query.ts +137 -0
  38. package/types/cosmos/auth/v1beta1/query.ts +2005 -0
  39. package/types/cosmos/auth/v1beta1/tx.amino.ts +9 -0
  40. package/types/cosmos/auth/v1beta1/tx.registry.ts +35 -0
  41. package/types/cosmos/auth/v1beta1/tx.rpc.msg.ts +24 -0
  42. package/types/cosmos/auth/v1beta1/tx.ts +208 -0
  43. package/types/cosmos/authz/module/v1/module.ts +77 -0
  44. package/types/cosmos/authz/v1beta1/authz.ts +599 -0
  45. package/types/cosmos/authz/v1beta1/event.ts +274 -0
  46. package/types/cosmos/authz/v1beta1/genesis.ts +99 -0
  47. package/types/cosmos/authz/v1beta1/query.lcd.ts +59 -0
  48. package/types/cosmos/authz/v1beta1/query.rpc.Query.ts +53 -0
  49. package/types/cosmos/authz/v1beta1/query.ts +734 -0
  50. package/types/cosmos/authz/v1beta1/tx.amino.ts +19 -0
  51. package/types/cosmos/authz/v1beta1/tx.registry.ts +71 -0
  52. package/types/cosmos/authz/v1beta1/tx.rpc.msg.ts +49 -0
  53. package/types/cosmos/authz/v1beta1/tx.ts +666 -0
  54. package/types/cosmos/autocli/v1/options.ts +1317 -0
  55. package/types/cosmos/autocli/v1/query.rpc.Query.ts +32 -0
  56. package/types/cosmos/autocli/v1/query.ts +298 -0
  57. package/types/cosmos/bank/module/v1/module.ts +156 -0
  58. package/types/cosmos/bank/v1beta1/authz.ts +134 -0
  59. package/types/cosmos/bank/v1beta1/bank.ts +984 -0
  60. package/types/cosmos/bank/v1beta1/genesis.ts +316 -0
  61. package/types/cosmos/bank/v1beta1/query.lcd.ts +207 -0
  62. package/types/cosmos/bank/v1beta1/query.rpc.Query.ts +212 -0
  63. package/types/cosmos/bank/v1beta1/query.ts +3051 -0
  64. package/types/cosmos/bank/v1beta1/tx.amino.ts +24 -0
  65. package/types/cosmos/bank/v1beta1/tx.registry.ts +89 -0
  66. package/types/cosmos/bank/v1beta1/tx.rpc.msg.ts +53 -0
  67. package/types/cosmos/bank/v1beta1/tx.ts +845 -0
  68. package/types/cosmos/base/abci/v1beta1/abci.ts +1776 -0
  69. package/types/cosmos/base/node/v1beta1/query.lcd.ts +25 -0
  70. package/types/cosmos/base/node/v1beta1/query.rpc.Service.ts +42 -0
  71. package/types/cosmos/base/node/v1beta1/query.ts +467 -0
  72. package/types/cosmos/base/query/v1beta1/pagination.ts +372 -0
  73. package/types/cosmos/base/reflection/v1beta1/reflection.ts +385 -0
  74. package/types/cosmos/base/reflection/v2alpha1/reflection.ts +2790 -0
  75. package/types/cosmos/base/tendermint/v1beta1/query.lcd.ts +87 -0
  76. package/types/cosmos/base/tendermint/v1beta1/query.rpc.Service.ts +103 -0
  77. package/types/cosmos/base/tendermint/v1beta1/query.ts +2358 -0
  78. package/types/cosmos/base/tendermint/v1beta1/types.ts +492 -0
  79. package/types/cosmos/base/v1beta1/coin.ts +449 -0
  80. package/types/cosmos/benchmark/module/v1/module.ts +384 -0
  81. package/types/cosmos/benchmark/v1/benchmark.ts +186 -0
  82. package/types/cosmos/benchmark/v1/tx.amino.ts +9 -0
  83. package/types/cosmos/benchmark/v1/tx.registry.ts +35 -0
  84. package/types/cosmos/benchmark/v1/tx.rpc.msg.ts +21 -0
  85. package/types/cosmos/benchmark/v1/tx.ts +224 -0
  86. package/types/cosmos/bundle.ts +807 -0
  87. package/types/cosmos/circuit/module/v1/module.ts +100 -0
  88. package/types/cosmos/circuit/v1/query.lcd.ts +40 -0
  89. package/types/cosmos/circuit/v1/query.rpc.Query.ts +55 -0
  90. package/types/cosmos/circuit/v1/query.ts +576 -0
  91. package/types/cosmos/circuit/v1/tx.amino.ts +19 -0
  92. package/types/cosmos/circuit/v1/tx.registry.ts +71 -0
  93. package/types/cosmos/circuit/v1/tx.rpc.msg.ts +43 -0
  94. package/types/cosmos/circuit/v1/tx.ts +685 -0
  95. package/types/cosmos/circuit/v1/types.ts +419 -0
  96. package/types/cosmos/client.ts +100 -0
  97. package/types/cosmos/consensus/module/v1/module.ts +100 -0
  98. package/types/cosmos/consensus/v1/query.lcd.ts +19 -0
  99. package/types/cosmos/consensus/v1/query.rpc.Query.ts +31 -0
  100. package/types/cosmos/consensus/v1/query.ts +182 -0
  101. package/types/cosmos/consensus/v1/tx.amino.ts +9 -0
  102. package/types/cosmos/consensus/v1/tx.registry.ts +35 -0
  103. package/types/cosmos/consensus/v1/tx.rpc.msg.ts +24 -0
  104. package/types/cosmos/consensus/v1/tx.ts +257 -0
  105. package/types/cosmos/counter/module/v1/module.ts +100 -0
  106. package/types/cosmos/counter/v1/query.rpc.Query.ts +31 -0
  107. package/types/cosmos/counter/v1/query.ts +171 -0
  108. package/types/cosmos/counter/v1/tx.amino.ts +9 -0
  109. package/types/cosmos/counter/v1/tx.registry.ts +35 -0
  110. package/types/cosmos/counter/v1/tx.rpc.msg.ts +21 -0
  111. package/types/cosmos/counter/v1/tx.ts +217 -0
  112. package/types/cosmos/crisis/module/v1/module.ts +119 -0
  113. package/types/cosmos/crisis/v1beta1/genesis.ts +105 -0
  114. package/types/cosmos/crisis/v1beta1/tx.amino.ts +14 -0
  115. package/types/cosmos/crisis/v1beta1/tx.registry.ts +53 -0
  116. package/types/cosmos/crisis/v1beta1/tx.rpc.msg.ts +32 -0
  117. package/types/cosmos/crisis/v1beta1/tx.ts +413 -0
  118. package/types/cosmos/crypto/bls12_381/keys.ts +207 -0
  119. package/types/cosmos/crypto/ed25519/keys.ts +214 -0
  120. package/types/cosmos/crypto/hd/v1/hd.ts +180 -0
  121. package/types/cosmos/crypto/keyring/v1/record.ts +542 -0
  122. package/types/cosmos/crypto/multisig/keys.ts +124 -0
  123. package/types/cosmos/crypto/multisig/v1beta1/multisig.ts +231 -0
  124. package/types/cosmos/crypto/secp256k1/keys.ts +207 -0
  125. package/types/cosmos/crypto/secp256r1/keys.ts +203 -0
  126. package/types/cosmos/distribution/module/v1/module.ts +115 -0
  127. package/types/cosmos/distribution/v1beta1/distribution.ts +1551 -0
  128. package/types/cosmos/distribution/v1beta1/genesis.ts +1208 -0
  129. package/types/cosmos/distribution/v1beta1/query.lcd.ts +89 -0
  130. package/types/cosmos/distribution/v1beta1/query.rpc.Query.ts +137 -0
  131. package/types/cosmos/distribution/v1beta1/query.ts +2195 -0
  132. package/types/cosmos/distribution/v1beta1/tx.amino.ts +39 -0
  133. package/types/cosmos/distribution/v1beta1/tx.registry.ts +143 -0
  134. package/types/cosmos/distribution/v1beta1/tx.rpc.msg.ts +96 -0
  135. package/types/cosmos/distribution/v1beta1/tx.ts +1460 -0
  136. package/types/cosmos/epochs/module/v1/module.ts +77 -0
  137. package/types/cosmos/epochs/v1beta1/events.ts +205 -0
  138. package/types/cosmos/epochs/v1beta1/genesis.ts +384 -0
  139. package/types/cosmos/epochs/v1beta1/query.lcd.ts +31 -0
  140. package/types/cosmos/epochs/v1beta1/query.rpc.Query.ts +42 -0
  141. package/types/cosmos/epochs/v1beta1/query.ts +390 -0
  142. package/types/cosmos/evidence/module/v1/module.ts +77 -0
  143. package/types/cosmos/evidence/v1beta1/evidence.ts +166 -0
  144. package/types/cosmos/evidence/v1beta1/genesis.ts +103 -0
  145. package/types/cosmos/evidence/v1beta1/query.lcd.ts +40 -0
  146. package/types/cosmos/evidence/v1beta1/query.rpc.Query.ts +44 -0
  147. package/types/cosmos/evidence/v1beta1/query.ts +458 -0
  148. package/types/cosmos/evidence/v1beta1/tx.amino.ts +9 -0
  149. package/types/cosmos/evidence/v1beta1/tx.registry.ts +35 -0
  150. package/types/cosmos/evidence/v1beta1/tx.rpc.msg.ts +24 -0
  151. package/types/cosmos/evidence/v1beta1/tx.ts +243 -0
  152. package/types/cosmos/feegrant/module/v1/module.ts +77 -0
  153. package/types/cosmos/feegrant/v1beta1/feegrant.ts +701 -0
  154. package/types/cosmos/feegrant/v1beta1/genesis.ts +99 -0
  155. package/types/cosmos/feegrant/v1beta1/query.lcd.ts +44 -0
  156. package/types/cosmos/feegrant/v1beta1/query.rpc.Query.ts +53 -0
  157. package/types/cosmos/feegrant/v1beta1/query.ts +683 -0
  158. package/types/cosmos/feegrant/v1beta1/tx.amino.ts +19 -0
  159. package/types/cosmos/feegrant/v1beta1/tx.registry.ts +71 -0
  160. package/types/cosmos/feegrant/v1beta1/tx.rpc.msg.ts +43 -0
  161. package/types/cosmos/feegrant/v1beta1/tx.ts +683 -0
  162. package/types/cosmos/genutil/module/v1/module.ts +77 -0
  163. package/types/cosmos/genutil/v1beta1/genesis.ts +103 -0
  164. package/types/cosmos/gov/module/v1/module.ts +123 -0
  165. package/types/cosmos/gov/v1/genesis.ts +288 -0
  166. package/types/cosmos/gov/v1/gov.ts +1889 -0
  167. package/types/cosmos/gov/v1/query.lcd.ts +95 -0
  168. package/types/cosmos/gov/v1/query.rpc.Query.ts +119 -0
  169. package/types/cosmos/gov/v1/query.ts +2026 -0
  170. package/types/cosmos/gov/v1/tx.amino.ts +39 -0
  171. package/types/cosmos/gov/v1/tx.registry.ts +143 -0
  172. package/types/cosmos/gov/v1/tx.rpc.msg.ts +75 -0
  173. package/types/cosmos/gov/v1/tx.ts +1911 -0
  174. package/types/cosmos/gov/v1beta1/genesis.ts +221 -0
  175. package/types/cosmos/gov/v1beta1/gov.ts +1725 -0
  176. package/types/cosmos/gov/v1beta1/query.lcd.ts +89 -0
  177. package/types/cosmos/gov/v1beta1/query.rpc.Query.ts +108 -0
  178. package/types/cosmos/gov/v1beta1/query.ts +1813 -0
  179. package/types/cosmos/gov/v1beta1/tx.amino.ts +24 -0
  180. package/types/cosmos/gov/v1beta1/tx.registry.ts +89 -0
  181. package/types/cosmos/gov/v1beta1/tx.rpc.msg.ts +45 -0
  182. package/types/cosmos/gov/v1beta1/tx.ts +1128 -0
  183. package/types/cosmos/group/module/v1/module.ts +128 -0
  184. package/types/cosmos/group/v1/events.ts +1195 -0
  185. package/types/cosmos/group/v1/genesis.ts +256 -0
  186. package/types/cosmos/group/v1/query.lcd.ts +158 -0
  187. package/types/cosmos/group/v1/query.rpc.Query.ts +182 -0
  188. package/types/cosmos/group/v1/query.ts +3108 -0
  189. package/types/cosmos/group/v1/tx.amino.ts +74 -0
  190. package/types/cosmos/group/v1/tx.registry.ts +269 -0
  191. package/types/cosmos/group/v1/tx.rpc.msg.ts +125 -0
  192. package/types/cosmos/group/v1/tx.ts +3353 -0
  193. package/types/cosmos/group/v1/types.ts +2248 -0
  194. package/types/cosmos/ics23/v1/proofs.ts +2167 -0
  195. package/types/cosmos/lcd.ts +125 -0
  196. package/types/cosmos/mint/module/v1/module.ts +115 -0
  197. package/types/cosmos/mint/v1beta1/genesis.ts +120 -0
  198. package/types/cosmos/mint/v1beta1/mint.ts +313 -0
  199. package/types/cosmos/mint/v1beta1/query.lcd.ts +31 -0
  200. package/types/cosmos/mint/v1beta1/query.rpc.Query.ts +53 -0
  201. package/types/cosmos/mint/v1beta1/query.ts +544 -0
  202. package/types/cosmos/mint/v1beta1/tx.amino.ts +9 -0
  203. package/types/cosmos/mint/v1beta1/tx.registry.ts +35 -0
  204. package/types/cosmos/mint/v1beta1/tx.rpc.msg.ts +24 -0
  205. package/types/cosmos/mint/v1beta1/tx.ts +208 -0
  206. package/types/cosmos/msg/textual/v1/textual.ts +1 -0
  207. package/types/cosmos/msg/v1/msg.ts +1 -0
  208. package/types/cosmos/nft/module/v1/module.ts +77 -0
  209. package/types/cosmos/nft/v1beta1/event.ts +429 -0
  210. package/types/cosmos/nft/v1beta1/genesis.ts +243 -0
  211. package/types/cosmos/nft/v1beta1/nft.ts +389 -0
  212. package/types/cosmos/nft/v1beta1/query.lcd.ts +77 -0
  213. package/types/cosmos/nft/v1beta1/query.rpc.Query.ts +102 -0
  214. package/types/cosmos/nft/v1beta1/query.ts +1513 -0
  215. package/types/cosmos/nft/v1beta1/tx.amino.ts +9 -0
  216. package/types/cosmos/nft/v1beta1/tx.registry.ts +35 -0
  217. package/types/cosmos/nft/v1beta1/tx.rpc.msg.ts +21 -0
  218. package/types/cosmos/nft/v1beta1/tx.ts +232 -0
  219. package/types/cosmos/params/module/v1/module.ts +77 -0
  220. package/types/cosmos/params/v1beta1/params.ts +262 -0
  221. package/types/cosmos/params/v1beta1/query.lcd.ts +35 -0
  222. package/types/cosmos/params/v1beta1/query.rpc.Query.ts +45 -0
  223. package/types/cosmos/params/v1beta1/query.ts +521 -0
  224. package/types/cosmos/protocolpool/module/v1/module.ts +100 -0
  225. package/types/cosmos/protocolpool/v1/genesis.ts +126 -0
  226. package/types/cosmos/protocolpool/v1/query.lcd.ts +37 -0
  227. package/types/cosmos/protocolpool/v1/query.rpc.Query.ts +64 -0
  228. package/types/cosmos/protocolpool/v1/query.ts +761 -0
  229. package/types/cosmos/protocolpool/v1/tx.amino.ts +29 -0
  230. package/types/cosmos/protocolpool/v1/tx.registry.ts +107 -0
  231. package/types/cosmos/protocolpool/v1/tx.rpc.msg.ts +69 -0
  232. package/types/cosmos/protocolpool/v1/tx.ts +1124 -0
  233. package/types/cosmos/protocolpool/v1/types.ts +268 -0
  234. package/types/cosmos/query/v1/query.ts +1 -0
  235. package/types/cosmos/reflection/v1/reflection.ts +178 -0
  236. package/types/cosmos/rpc.query.ts +90 -0
  237. package/types/cosmos/rpc.tx.ts +71 -0
  238. package/types/cosmos/slashing/module/v1/module.ts +100 -0
  239. package/types/cosmos/slashing/v1beta1/genesis.ts +511 -0
  240. package/types/cosmos/slashing/v1beta1/query.lcd.ts +40 -0
  241. package/types/cosmos/slashing/v1beta1/query.rpc.Query.ts +55 -0
  242. package/types/cosmos/slashing/v1beta1/query.ts +606 -0
  243. package/types/cosmos/slashing/v1beta1/slashing.ts +371 -0
  244. package/types/cosmos/slashing/v1beta1/tx.amino.ts +14 -0
  245. package/types/cosmos/slashing/v1beta1/tx.registry.ts +53 -0
  246. package/types/cosmos/slashing/v1beta1/tx.rpc.msg.ts +36 -0
  247. package/types/cosmos/slashing/v1beta1/tx.ts +377 -0
  248. package/types/cosmos/staking/module/v1/module.ts +165 -0
  249. package/types/cosmos/staking/v1beta1/authz.ts +321 -0
  250. package/types/cosmos/staking/v1beta1/genesis.ts +370 -0
  251. package/types/cosmos/staking/v1beta1/query.lcd.ts +174 -0
  252. package/types/cosmos/staking/v1beta1/query.rpc.Query.ts +217 -0
  253. package/types/cosmos/staking/v1beta1/query.ts +3187 -0
  254. package/types/cosmos/staking/v1beta1/staking.ts +3193 -0
  255. package/types/cosmos/staking/v1beta1/tx.amino.ts +39 -0
  256. package/types/cosmos/staking/v1beta1/tx.registry.ts +143 -0
  257. package/types/cosmos/staking/v1beta1/tx.rpc.msg.ts +84 -0
  258. package/types/cosmos/staking/v1beta1/tx.ts +1642 -0
  259. package/types/cosmos/store/internal/kv/v1beta1/kv.ts +208 -0
  260. package/types/cosmos/store/snapshots/v1/snapshot.ts +840 -0
  261. package/types/cosmos/store/streaming/abci/grpc.ts +393 -0
  262. package/types/cosmos/store/v1beta1/commit_info.ts +369 -0
  263. package/types/cosmos/store/v1beta1/listening.ts +296 -0
  264. package/types/cosmos/tx/config/v1/config.ts +127 -0
  265. package/types/cosmos/tx/signing/v1beta1/signing.ts +713 -0
  266. package/types/cosmos/tx/v1beta1/service.lcd.ts +59 -0
  267. package/types/cosmos/tx/v1beta1/service.rpc.Service.ts +119 -0
  268. package/types/cosmos/tx/v1beta1/service.ts +2319 -0
  269. package/types/cosmos/tx/v1beta1/tx.ts +2168 -0
  270. package/types/cosmos/upgrade/module/v1/module.ts +100 -0
  271. package/types/cosmos/upgrade/v1beta1/query.lcd.ts +54 -0
  272. package/types/cosmos/upgrade/v1beta1/query.rpc.Query.ts +82 -0
  273. package/types/cosmos/upgrade/v1beta1/query.ts +1004 -0
  274. package/types/cosmos/upgrade/v1beta1/tx.amino.ts +14 -0
  275. package/types/cosmos/upgrade/v1beta1/tx.registry.ts +53 -0
  276. package/types/cosmos/upgrade/v1beta1/tx.rpc.msg.ts +32 -0
  277. package/types/cosmos/upgrade/v1beta1/tx.ts +368 -0
  278. package/types/cosmos/upgrade/v1beta1/upgrade.ts +623 -0
  279. package/types/cosmos/vesting/module/v1/module.ts +77 -0
  280. package/types/cosmos/vesting/v1beta1/tx.amino.ts +19 -0
  281. package/types/cosmos/vesting/v1beta1/tx.registry.ts +71 -0
  282. package/types/cosmos/vesting/v1beta1/tx.rpc.msg.ts +46 -0
  283. package/types/cosmos/vesting/v1beta1/tx.ts +688 -0
  284. package/types/cosmos/vesting/v1beta1/vesting.ts +751 -0
  285. package/types/cosmos_proto/bundle.ts +5 -0
  286. package/types/cosmos_proto/cosmos.ts +355 -0
  287. package/types/cosmwasm/bundle.ts +39 -0
  288. package/types/cosmwasm/client.ts +48 -0
  289. package/types/cosmwasm/lcd.ts +132 -0
  290. package/types/cosmwasm/rpc.query.ts +95 -0
  291. package/types/cosmwasm/rpc.tx.ts +76 -0
  292. package/types/cosmwasm/wasm/v1/authz.ts +1409 -0
  293. package/types/cosmwasm/wasm/v1/genesis.ts +544 -0
  294. package/types/cosmwasm/wasm/v1/ibc.ts +437 -0
  295. package/types/cosmwasm/wasm/v1/proposal_legacy.ts +2711 -0
  296. package/types/cosmwasm/wasm/v1/query.lcd.ts +154 -0
  297. package/types/cosmwasm/wasm/v1/query.rpc.Query.ts +181 -0
  298. package/types/cosmwasm/wasm/v1/query.ts +3339 -0
  299. package/types/cosmwasm/wasm/v1/tx.amino.ts +89 -0
  300. package/types/cosmwasm/wasm/v1/tx.registry.ts +323 -0
  301. package/types/cosmwasm/wasm/v1/tx.rpc.msg.ts +197 -0
  302. package/types/cosmwasm/wasm/v1/tx.ts +4403 -0
  303. package/types/cosmwasm/wasm/v1/types.ts +1193 -0
  304. package/types/gogoproto/bundle.ts +5 -0
  305. package/types/gogoproto/gogo.ts +1 -0
  306. package/types/google/api/annotations.ts +1 -0
  307. package/types/google/api/apikeys/v2/apikeys.ts +1245 -0
  308. package/types/google/api/apikeys/v2/resources.ts +1268 -0
  309. package/types/google/api/auth.ts +1175 -0
  310. package/types/google/api/backend.ts +691 -0
  311. package/types/google/api/billing.ts +333 -0
  312. package/types/google/api/client.ts +3100 -0
  313. package/types/google/api/cloudquotas/v1/cloudquotas.ts +1196 -0
  314. package/types/google/api/cloudquotas/v1/resources.ts +2065 -0
  315. package/types/google/api/cloudquotas/v1beta/cloudquotas.ts +1196 -0
  316. package/types/google/api/cloudquotas/v1beta/quota_adjuster_settings.ts +509 -0
  317. package/types/google/api/cloudquotas/v1beta/resources.ts +2069 -0
  318. package/types/google/api/config_change.ts +385 -0
  319. package/types/google/api/consumer.ts +362 -0
  320. package/types/google/api/context.ts +418 -0
  321. package/types/google/api/control.ts +141 -0
  322. package/types/google/api/distribution.ts +1253 -0
  323. package/types/google/api/documentation.ts +738 -0
  324. package/types/google/api/endpoint.ts +245 -0
  325. package/types/google/api/error_reason.ts +816 -0
  326. package/types/google/api/expr/conformance/v1alpha1/conformance_service.ts +1293 -0
  327. package/types/google/api/expr/v1alpha1/checked.ts +2259 -0
  328. package/types/google/api/expr/v1alpha1/eval.ts +675 -0
  329. package/types/google/api/expr/v1alpha1/explain.ts +257 -0
  330. package/types/google/api/expr/v1alpha1/syntax.ts +2983 -0
  331. package/types/google/api/expr/v1alpha1/value.ts +771 -0
  332. package/types/google/api/expr/v1beta1/decl.ts +563 -0
  333. package/types/google/api/expr/v1beta1/eval.ts +758 -0
  334. package/types/google/api/expr/v1beta1/expr.ts +1750 -0
  335. package/types/google/api/expr/v1beta1/source.ts +446 -0
  336. package/types/google/api/expr/v1beta1/value.ts +771 -0
  337. package/types/google/api/field_behavior.ts +136 -0
  338. package/types/google/api/field_info.ts +319 -0
  339. package/types/google/api/http.ts +1362 -0
  340. package/types/google/api/httpbody.ts +270 -0
  341. package/types/google/api/label.ts +174 -0
  342. package/types/google/api/launch_stage.ts +112 -0
  343. package/types/google/api/log.ts +201 -0
  344. package/types/google/api/logging.ts +355 -0
  345. package/types/google/api/metric.ts +1174 -0
  346. package/types/google/api/monitored_resource.ts +841 -0
  347. package/types/google/api/monitoring.ts +430 -0
  348. package/types/google/api/policy.ts +314 -0
  349. package/types/google/api/quota.ts +1040 -0
  350. package/types/google/api/resource.ts +769 -0
  351. package/types/google/api/routing.ts +1405 -0
  352. package/types/google/api/service.ts +790 -0
  353. package/types/google/api/servicecontrol/v1/check_error.ts +366 -0
  354. package/types/google/api/servicecontrol/v1/distribution.ts +773 -0
  355. package/types/google/api/servicecontrol/v1/http_request.ts +427 -0
  356. package/types/google/api/servicecontrol/v1/log_entry.ts +804 -0
  357. package/types/google/api/servicecontrol/v1/metric_value.ts +499 -0
  358. package/types/google/api/servicecontrol/v1/operation.ts +544 -0
  359. package/types/google/api/servicecontrol/v1/quota_controller.ts +1041 -0
  360. package/types/google/api/servicecontrol/v1/service_controller.ts +1164 -0
  361. package/types/google/api/servicecontrol/v2/service_controller.ts +949 -0
  362. package/types/google/api/servicemanagement/v1/resources.ts +1888 -0
  363. package/types/google/api/servicemanagement/v1/servicemanager.ts +2444 -0
  364. package/types/google/api/serviceusage/v1/resources.ts +629 -0
  365. package/types/google/api/serviceusage/v1/serviceusage.ts +1530 -0
  366. package/types/google/api/serviceusage/v1beta1/resources.ts +2972 -0
  367. package/types/google/api/serviceusage/v1beta1/serviceusage.ts +4567 -0
  368. package/types/google/api/source_info.ts +97 -0
  369. package/types/google/api/system_parameter.ts +461 -0
  370. package/types/google/api/usage.ts +404 -0
  371. package/types/google/api/visibility.ts +328 -0
  372. package/types/google/bundle.ts +115 -0
  373. package/types/google/logging/type/log_severity.ts +104 -0
  374. package/types/google/longrunning/operations.ts +1153 -0
  375. package/types/google/protobuf/any.ts +424 -0
  376. package/types/google/protobuf/api.ts +942 -0
  377. package/types/google/protobuf/descriptor.ts +7801 -0
  378. package/types/google/protobuf/duration.ts +284 -0
  379. package/types/google/protobuf/empty.ts +93 -0
  380. package/types/google/protobuf/field_mask.ts +694 -0
  381. package/types/google/protobuf/source_context.ts +105 -0
  382. package/types/google/protobuf/struct.ts +584 -0
  383. package/types/google/protobuf/timestamp.ts +373 -0
  384. package/types/google/protobuf/type.ts +1279 -0
  385. package/types/google/protobuf/wrappers.ts +1002 -0
  386. package/types/google/rpc/code.ts +286 -0
  387. package/types/google/rpc/context/attribute_context.ts +2517 -0
  388. package/types/google/rpc/context/audit_context.ts +188 -0
  389. package/types/google/rpc/error_details.ts +2467 -0
  390. package/types/google/rpc/http.ts +424 -0
  391. package/types/google/rpc/status.ts +173 -0
  392. package/types/helpers.ts +259 -0
  393. package/types/ibc/applications/interchain_accounts/controller/v1/controller.ts +107 -0
  394. package/types/ibc/applications/interchain_accounts/controller/v1/query.lcd.ts +25 -0
  395. package/types/ibc/applications/interchain_accounts/controller/v1/query.rpc.Query.ts +42 -0
  396. package/types/ibc/applications/interchain_accounts/controller/v1/query.ts +379 -0
  397. package/types/ibc/applications/interchain_accounts/controller/v1/tx.amino.ts +19 -0
  398. package/types/ibc/applications/interchain_accounts/controller/v1/tx.registry.ts +71 -0
  399. package/types/ibc/applications/interchain_accounts/controller/v1/tx.rpc.msg.ts +37 -0
  400. package/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +692 -0
  401. package/types/ibc/applications/interchain_accounts/genesis/v1/genesis.ts +675 -0
  402. package/types/ibc/applications/interchain_accounts/host/v1/host.ts +261 -0
  403. package/types/ibc/applications/interchain_accounts/host/v1/query.lcd.ts +19 -0
  404. package/types/ibc/applications/interchain_accounts/host/v1/query.rpc.Query.ts +31 -0
  405. package/types/ibc/applications/interchain_accounts/host/v1/query.ts +176 -0
  406. package/types/ibc/applications/interchain_accounts/host/v1/tx.amino.ts +14 -0
  407. package/types/ibc/applications/interchain_accounts/host/v1/tx.registry.ts +53 -0
  408. package/types/ibc/applications/interchain_accounts/host/v1/tx.rpc.msg.ts +29 -0
  409. package/types/ibc/applications/interchain_accounts/host/v1/tx.ts +440 -0
  410. package/types/ibc/applications/interchain_accounts/v1/account.ts +115 -0
  411. package/types/ibc/applications/interchain_accounts/v1/metadata.ts +206 -0
  412. package/types/ibc/applications/interchain_accounts/v1/packet.ts +262 -0
  413. package/types/ibc/applications/transfer/v1/authz.ts +297 -0
  414. package/types/ibc/applications/transfer/v1/denomtrace.ts +133 -0
  415. package/types/ibc/applications/transfer/v1/genesis.ts +156 -0
  416. package/types/ibc/applications/transfer/v1/packet.ts +186 -0
  417. package/types/ibc/applications/transfer/v1/query.lcd.ts +76 -0
  418. package/types/ibc/applications/transfer/v1/query.rpc.Query.ts +88 -0
  419. package/types/ibc/applications/transfer/v1/query.ts +1233 -0
  420. package/types/ibc/applications/transfer/v1/token.ts +347 -0
  421. package/types/ibc/applications/transfer/v1/transfer.ts +140 -0
  422. package/types/ibc/applications/transfer/v1/tx.amino.ts +14 -0
  423. package/types/ibc/applications/transfer/v1/tx.registry.ts +53 -0
  424. package/types/ibc/applications/transfer/v1/tx.rpc.msg.ts +29 -0
  425. package/types/ibc/applications/transfer/v1/tx.ts +579 -0
  426. package/types/ibc/bundle.ts +265 -0
  427. package/types/ibc/client.ts +72 -0
  428. package/types/ibc/core/channel/v1/channel.ts +1455 -0
  429. package/types/ibc/core/channel/v1/genesis.ts +351 -0
  430. package/types/ibc/core/channel/v1/query.lcd.ts +135 -0
  431. package/types/ibc/core/channel/v1/query.rpc.Query.ts +200 -0
  432. package/types/ibc/core/channel/v1/query.ts +3943 -0
  433. package/types/ibc/core/channel/v1/tx.amino.ts +54 -0
  434. package/types/ibc/core/channel/v1/tx.registry.ts +197 -0
  435. package/types/ibc/core/channel/v1/tx.rpc.msg.ts +96 -0
  436. package/types/ibc/core/channel/v1/tx.ts +2558 -0
  437. package/types/ibc/core/channel/v2/genesis.ts +433 -0
  438. package/types/ibc/core/channel/v2/packet.ts +640 -0
  439. package/types/ibc/core/channel/v2/query.lcd.ts +77 -0
  440. package/types/ibc/core/channel/v2/query.rpc.Query.ts +108 -0
  441. package/types/ibc/core/channel/v2/query.ts +2075 -0
  442. package/types/ibc/core/channel/v2/tx.amino.ts +24 -0
  443. package/types/ibc/core/channel/v2/tx.registry.ts +89 -0
  444. package/types/ibc/core/channel/v2/tx.rpc.msg.ts +45 -0
  445. package/types/ibc/core/channel/v2/tx.ts +1003 -0
  446. package/types/ibc/core/client/v1/client.ts +636 -0
  447. package/types/ibc/core/client/v1/genesis.ts +448 -0
  448. package/types/ibc/core/client/v1/query.lcd.ts +102 -0
  449. package/types/ibc/core/client/v1/query.rpc.Query.ts +149 -0
  450. package/types/ibc/core/client/v1/query.ts +2588 -0
  451. package/types/ibc/core/client/v1/tx.amino.ts +44 -0
  452. package/types/ibc/core/client/v1/tx.registry.ts +161 -0
  453. package/types/ibc/core/client/v1/tx.rpc.msg.ts +77 -0
  454. package/types/ibc/core/client/v1/tx.ts +1796 -0
  455. package/types/ibc/core/client/v2/config.ts +115 -0
  456. package/types/ibc/core/client/v2/counterparty.ts +122 -0
  457. package/types/ibc/core/client/v2/genesis.ts +220 -0
  458. package/types/ibc/core/client/v2/query.lcd.ts +25 -0
  459. package/types/ibc/core/client/v2/query.rpc.Query.ts +42 -0
  460. package/types/ibc/core/client/v2/query.ts +402 -0
  461. package/types/ibc/core/client/v2/tx.amino.ts +14 -0
  462. package/types/ibc/core/client/v2/tx.registry.ts +53 -0
  463. package/types/ibc/core/client/v2/tx.rpc.msg.ts +29 -0
  464. package/types/ibc/core/client/v2/tx.ts +453 -0
  465. package/types/ibc/core/commitment/v1/commitment.ts +321 -0
  466. package/types/ibc/core/commitment/v2/commitment.ts +193 -0
  467. package/types/ibc/core/connection/v1/connection.ts +1056 -0
  468. package/types/ibc/core/connection/v1/genesis.ts +150 -0
  469. package/types/ibc/core/connection/v1/query.lcd.ts +61 -0
  470. package/types/ibc/core/connection/v1/query.rpc.Query.ts +97 -0
  471. package/types/ibc/core/connection/v1/query.ts +1472 -0
  472. package/types/ibc/core/connection/v1/tx.amino.ts +29 -0
  473. package/types/ibc/core/connection/v1/tx.registry.ts +107 -0
  474. package/types/ibc/core/connection/v1/tx.rpc.msg.ts +59 -0
  475. package/types/ibc/core/connection/v1/tx.ts +1456 -0
  476. package/types/ibc/core/types/v1/genesis.ts +191 -0
  477. package/types/ibc/lcd.ts +176 -0
  478. package/types/ibc/lightclients/solomachine/v2/solomachine.ts +2161 -0
  479. package/types/ibc/lightclients/solomachine/v3/solomachine.ts +1114 -0
  480. package/types/ibc/lightclients/tendermint/v1/tendermint.ts +891 -0
  481. package/types/ibc/lightclients/wasm/v1/genesis.ts +201 -0
  482. package/types/ibc/lightclients/wasm/v1/query.lcd.ts +34 -0
  483. package/types/ibc/lightclients/wasm/v1/query.rpc.Query.ts +44 -0
  484. package/types/ibc/lightclients/wasm/v1/query.ts +413 -0
  485. package/types/ibc/lightclients/wasm/v1/tx.amino.ts +19 -0
  486. package/types/ibc/lightclients/wasm/v1/tx.registry.ts +71 -0
  487. package/types/ibc/lightclients/wasm/v1/tx.rpc.msg.ts +37 -0
  488. package/types/ibc/lightclients/wasm/v1/tx.ts +640 -0
  489. package/types/ibc/lightclients/wasm/v1/wasm.ts +444 -0
  490. package/types/ibc/rpc.query.ts +123 -0
  491. package/types/ibc/rpc.tx.ts +104 -0
  492. package/types/index.ts +25 -0
  493. package/types/tendermint/abci/types.ts +6565 -0
  494. package/types/tendermint/bundle.ts +33 -0
  495. package/types/tendermint/crypto/keys.ts +106 -0
  496. package/types/tendermint/crypto/proof.ts +576 -0
  497. package/types/tendermint/p2p/types.ts +523 -0
  498. package/types/tendermint/types/block.ts +134 -0
  499. package/types/tendermint/types/evidence.ts +491 -0
  500. package/types/tendermint/types/params.ts +839 -0
  501. package/types/tendermint/types/types.ts +2266 -0
  502. package/types/tendermint/types/validator.ts +399 -0
  503. package/types/tendermint/version/types.ts +228 -0
  504. package/types/utf8.ts +149 -0
  505. package/types/varint.ts +489 -0
  506. package/types/xion/bundle.ts +117 -0
  507. package/types/xion/client.ts +57 -0
  508. package/types/xion/feeabs/v1beta1/epoch.ts +386 -0
  509. package/types/xion/feeabs/v1beta1/genesis.ts +136 -0
  510. package/types/xion/feeabs/v1beta1/osmosisibc.ts +868 -0
  511. package/types/xion/feeabs/v1beta1/params.ts +189 -0
  512. package/types/xion/feeabs/v1beta1/proposal.ts +593 -0
  513. package/types/xion/feeabs/v1beta1/query.lcd.ts +37 -0
  514. package/types/xion/feeabs/v1beta1/query.rpc.Query.ts +64 -0
  515. package/types/xion/feeabs/v1beta1/query.ts +732 -0
  516. package/types/xion/feeabs/v1beta1/tx.amino.ts +39 -0
  517. package/types/xion/feeabs/v1beta1/tx.registry.ts +143 -0
  518. package/types/xion/feeabs/v1beta1/tx.rpc.msg.ts +72 -0
  519. package/types/xion/feeabs/v1beta1/tx.ts +1261 -0
  520. package/types/xion/globalfee/v1/genesis.ts +249 -0
  521. package/types/xion/globalfee/v1/query.lcd.ts +19 -0
  522. package/types/xion/globalfee/v1/query.rpc.Query.ts +31 -0
  523. package/types/xion/globalfee/v1/query.ts +178 -0
  524. package/types/xion/jwk/v1/audience.ts +224 -0
  525. package/types/xion/jwk/v1/genesis.ts +117 -0
  526. package/types/xion/jwk/v1/params.ts +113 -0
  527. package/types/xion/jwk/v1/query.lcd.ts +52 -0
  528. package/types/xion/jwk/v1/query.rpc.Query.ts +77 -0
  529. package/types/xion/jwk/v1/query.ts +1697 -0
  530. package/types/xion/jwk/v1/tx.amino.ts +29 -0
  531. package/types/xion/jwk/v1/tx.registry.ts +107 -0
  532. package/types/xion/jwk/v1/tx.rpc.msg.ts +53 -0
  533. package/types/xion/jwk/v1/tx.ts +1040 -0
  534. package/types/xion/lcd.ts +147 -0
  535. package/types/xion/mint/v1/event.ts +216 -0
  536. package/types/xion/mint/v1/genesis.ts +114 -0
  537. package/types/xion/mint/v1/mint.ts +307 -0
  538. package/types/xion/mint/v1/query.lcd.ts +31 -0
  539. package/types/xion/mint/v1/query.rpc.Query.ts +53 -0
  540. package/types/xion/mint/v1/query.ts +508 -0
  541. package/types/xion/mint/v1/tx.amino.ts +9 -0
  542. package/types/xion/mint/v1/tx.registry.ts +35 -0
  543. package/types/xion/mint/v1/tx.rpc.msg.ts +26 -0
  544. package/types/xion/mint/v1/tx.ts +222 -0
  545. package/types/xion/rpc.query.ts +105 -0
  546. package/types/xion/rpc.tx.ts +83 -0
  547. package/types/xion/v1/feegrant.ts +457 -0
  548. package/types/xion/v1/genesis.ts +116 -0
  549. package/types/xion/v1/query.rpc.Query.ts +64 -0
  550. package/types/xion/v1/query.ts +862 -0
  551. package/types/xion/v1/tx.amino.ts +24 -0
  552. package/types/xion/v1/tx.registry.ts +89 -0
  553. package/types/xion/v1/tx.rpc.msg.ts +57 -0
  554. package/types/xion/v1/tx.ts +793 -0
@@ -0,0 +1,1041 @@
1
+ //@ts-nocheck
2
+ import { MetricValueSet, MetricValueSetAmino, MetricValueSetSDKType } from "./metric_value";
3
+ import { Status, StatusAmino, StatusSDKType } from "../../../rpc/status";
4
+ import { BinaryReader, BinaryWriter } from "../../../../binary";
5
+ /** Supported quota modes. */
6
+ export enum QuotaOperation_QuotaMode {
7
+ /** UNSPECIFIED - Guard against implicit default. Must not be used. */
8
+ UNSPECIFIED = 0,
9
+ /**
10
+ * NORMAL - For AllocateQuota request, allocates quota for the amount specified in
11
+ * the service configuration or specified using the quota metrics. If the
12
+ * amount is higher than the available quota, allocation error will be
13
+ * returned and no quota will be allocated.
14
+ * If multiple quotas are part of the request, and one fails, none of the
15
+ * quotas are allocated or released.
16
+ */
17
+ NORMAL = 1,
18
+ /**
19
+ * BEST_EFFORT - The operation allocates quota for the amount specified in the service
20
+ * configuration or specified using the quota metrics. If the amount is
21
+ * higher than the available quota, request does not fail but all available
22
+ * quota will be allocated.
23
+ * For rate quota, BEST_EFFORT will continue to deduct from other groups
24
+ * even if one does not have enough quota. For allocation, it will find the
25
+ * minimum available amount across all groups and deduct that amount from
26
+ * all the affected groups.
27
+ */
28
+ BEST_EFFORT = 2,
29
+ /**
30
+ * CHECK_ONLY - For AllocateQuota request, only checks if there is enough quota
31
+ * available and does not change the available quota. No lock is placed on
32
+ * the available quota either.
33
+ */
34
+ CHECK_ONLY = 3,
35
+ /**
36
+ * QUERY_ONLY - Unimplemented. When used in AllocateQuotaRequest, this returns the
37
+ * effective quota limit(s) in the response, and no quota check will be
38
+ * performed. Not supported for other requests, and even for
39
+ * AllocateQuotaRequest, this is currently supported only for allowlisted
40
+ * services.
41
+ */
42
+ QUERY_ONLY = 4,
43
+ /**
44
+ * ADJUST_ONLY - The operation allocates quota for the amount specified in the service
45
+ * configuration or specified using the quota metrics. If the requested
46
+ * amount is higher than the available quota, request does not fail and
47
+ * remaining quota would become negative (going over the limit).
48
+ * Not supported for Rate Quota.
49
+ */
50
+ ADJUST_ONLY = 5,
51
+ UNRECOGNIZED = -1,
52
+ }
53
+ export const QuotaOperation_QuotaModeSDKType = QuotaOperation_QuotaMode;
54
+ export const QuotaOperation_QuotaModeAmino = QuotaOperation_QuotaMode;
55
+ export function quotaOperation_QuotaModeFromJSON(object: any): QuotaOperation_QuotaMode {
56
+ switch (object) {
57
+ case 0:
58
+ case "UNSPECIFIED":
59
+ return QuotaOperation_QuotaMode.UNSPECIFIED;
60
+ case 1:
61
+ case "NORMAL":
62
+ return QuotaOperation_QuotaMode.NORMAL;
63
+ case 2:
64
+ case "BEST_EFFORT":
65
+ return QuotaOperation_QuotaMode.BEST_EFFORT;
66
+ case 3:
67
+ case "CHECK_ONLY":
68
+ return QuotaOperation_QuotaMode.CHECK_ONLY;
69
+ case 4:
70
+ case "QUERY_ONLY":
71
+ return QuotaOperation_QuotaMode.QUERY_ONLY;
72
+ case 5:
73
+ case "ADJUST_ONLY":
74
+ return QuotaOperation_QuotaMode.ADJUST_ONLY;
75
+ case -1:
76
+ case "UNRECOGNIZED":
77
+ default:
78
+ return QuotaOperation_QuotaMode.UNRECOGNIZED;
79
+ }
80
+ }
81
+ export function quotaOperation_QuotaModeToJSON(object: QuotaOperation_QuotaMode): string {
82
+ switch (object) {
83
+ case QuotaOperation_QuotaMode.UNSPECIFIED:
84
+ return "UNSPECIFIED";
85
+ case QuotaOperation_QuotaMode.NORMAL:
86
+ return "NORMAL";
87
+ case QuotaOperation_QuotaMode.BEST_EFFORT:
88
+ return "BEST_EFFORT";
89
+ case QuotaOperation_QuotaMode.CHECK_ONLY:
90
+ return "CHECK_ONLY";
91
+ case QuotaOperation_QuotaMode.QUERY_ONLY:
92
+ return "QUERY_ONLY";
93
+ case QuotaOperation_QuotaMode.ADJUST_ONLY:
94
+ return "ADJUST_ONLY";
95
+ case QuotaOperation_QuotaMode.UNRECOGNIZED:
96
+ default:
97
+ return "UNRECOGNIZED";
98
+ }
99
+ }
100
+ /**
101
+ * Error codes related to project config validations are deprecated since the
102
+ * quota controller methods do not perform these validations. Instead services
103
+ * have to call the Check method, without quota_properties field, to perform
104
+ * these validations before calling the quota controller methods. These
105
+ * methods check only for project deletion to be wipe out compliant.
106
+ */
107
+ export enum QuotaError_Code {
108
+ /** UNSPECIFIED - This is never used. */
109
+ UNSPECIFIED = 0,
110
+ /**
111
+ * RESOURCE_EXHAUSTED - Quota allocation failed.
112
+ * Same as [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED].
113
+ */
114
+ RESOURCE_EXHAUSTED = 8,
115
+ /**
116
+ * BILLING_NOT_ACTIVE - Consumer cannot access the service because the service requires active
117
+ * billing.
118
+ */
119
+ BILLING_NOT_ACTIVE = 107,
120
+ /** PROJECT_DELETED - Consumer's project has been marked as deleted (soft deletion). */
121
+ PROJECT_DELETED = 108,
122
+ /** API_KEY_INVALID - Specified API key is invalid. */
123
+ API_KEY_INVALID = 105,
124
+ /** API_KEY_EXPIRED - Specified API Key has expired. */
125
+ API_KEY_EXPIRED = 112,
126
+ UNRECOGNIZED = -1,
127
+ }
128
+ export const QuotaError_CodeSDKType = QuotaError_Code;
129
+ export const QuotaError_CodeAmino = QuotaError_Code;
130
+ export function quotaError_CodeFromJSON(object: any): QuotaError_Code {
131
+ switch (object) {
132
+ case 0:
133
+ case "UNSPECIFIED":
134
+ return QuotaError_Code.UNSPECIFIED;
135
+ case 8:
136
+ case "RESOURCE_EXHAUSTED":
137
+ return QuotaError_Code.RESOURCE_EXHAUSTED;
138
+ case 107:
139
+ case "BILLING_NOT_ACTIVE":
140
+ return QuotaError_Code.BILLING_NOT_ACTIVE;
141
+ case 108:
142
+ case "PROJECT_DELETED":
143
+ return QuotaError_Code.PROJECT_DELETED;
144
+ case 105:
145
+ case "API_KEY_INVALID":
146
+ return QuotaError_Code.API_KEY_INVALID;
147
+ case 112:
148
+ case "API_KEY_EXPIRED":
149
+ return QuotaError_Code.API_KEY_EXPIRED;
150
+ case -1:
151
+ case "UNRECOGNIZED":
152
+ default:
153
+ return QuotaError_Code.UNRECOGNIZED;
154
+ }
155
+ }
156
+ export function quotaError_CodeToJSON(object: QuotaError_Code): string {
157
+ switch (object) {
158
+ case QuotaError_Code.UNSPECIFIED:
159
+ return "UNSPECIFIED";
160
+ case QuotaError_Code.RESOURCE_EXHAUSTED:
161
+ return "RESOURCE_EXHAUSTED";
162
+ case QuotaError_Code.BILLING_NOT_ACTIVE:
163
+ return "BILLING_NOT_ACTIVE";
164
+ case QuotaError_Code.PROJECT_DELETED:
165
+ return "PROJECT_DELETED";
166
+ case QuotaError_Code.API_KEY_INVALID:
167
+ return "API_KEY_INVALID";
168
+ case QuotaError_Code.API_KEY_EXPIRED:
169
+ return "API_KEY_EXPIRED";
170
+ case QuotaError_Code.UNRECOGNIZED:
171
+ default:
172
+ return "UNRECOGNIZED";
173
+ }
174
+ }
175
+ /** Request message for the AllocateQuota method. */
176
+ export interface AllocateQuotaRequest {
177
+ /**
178
+ * Name of the service as specified in the service configuration. For example,
179
+ * `"pubsub.googleapis.com"`.
180
+ *
181
+ * See [google.api.Service][google.api.Service] for the definition of a service name.
182
+ */
183
+ serviceName: string;
184
+ /** Operation that describes the quota allocation. */
185
+ allocateOperation?: QuotaOperation;
186
+ /**
187
+ * Specifies which version of service configuration should be used to process
188
+ * the request. If unspecified or no matching version can be found, the latest
189
+ * one will be used.
190
+ */
191
+ serviceConfigId: string;
192
+ }
193
+ export interface AllocateQuotaRequestProtoMsg {
194
+ typeUrl: "/google.api.servicecontrol.v1.AllocateQuotaRequest";
195
+ value: Uint8Array;
196
+ }
197
+ /**
198
+ * Request message for the AllocateQuota method.
199
+ * @name AllocateQuotaRequestAmino
200
+ * @package google.api.servicecontrol.v1
201
+ * @see proto type: google.api.servicecontrol.v1.AllocateQuotaRequest
202
+ */
203
+ export interface AllocateQuotaRequestAmino {
204
+ /**
205
+ * Name of the service as specified in the service configuration. For example,
206
+ * `"pubsub.googleapis.com"`.
207
+ *
208
+ * See [google.api.Service][google.api.Service] for the definition of a service name.
209
+ */
210
+ service_name?: string;
211
+ /**
212
+ * Operation that describes the quota allocation.
213
+ */
214
+ allocate_operation?: QuotaOperationAmino;
215
+ /**
216
+ * Specifies which version of service configuration should be used to process
217
+ * the request. If unspecified or no matching version can be found, the latest
218
+ * one will be used.
219
+ */
220
+ service_config_id?: string;
221
+ }
222
+ export interface AllocateQuotaRequestAminoMsg {
223
+ type: "/google.api.servicecontrol.v1.AllocateQuotaRequest";
224
+ value: AllocateQuotaRequestAmino;
225
+ }
226
+ /** Request message for the AllocateQuota method. */
227
+ export interface AllocateQuotaRequestSDKType {
228
+ service_name: string;
229
+ allocate_operation?: QuotaOperationSDKType;
230
+ service_config_id: string;
231
+ }
232
+ export interface QuotaOperation_LabelsEntry {
233
+ key: string;
234
+ value: string;
235
+ }
236
+ export interface QuotaOperation_LabelsEntryProtoMsg {
237
+ typeUrl: string;
238
+ value: Uint8Array;
239
+ }
240
+ /**
241
+ * @name QuotaOperation_LabelsEntryAmino
242
+ * @package google.api.servicecontrol.v1
243
+ * @see proto type: google.api.servicecontrol.v1.QuotaOperation_LabelsEntry
244
+ */
245
+ export interface QuotaOperation_LabelsEntryAmino {
246
+ key?: string;
247
+ value?: string;
248
+ }
249
+ export interface QuotaOperation_LabelsEntryAminoMsg {
250
+ type: string;
251
+ value: QuotaOperation_LabelsEntryAmino;
252
+ }
253
+ export interface QuotaOperation_LabelsEntrySDKType {
254
+ key: string;
255
+ value: string;
256
+ }
257
+ /** Represents information regarding a quota operation. */
258
+ export interface QuotaOperation {
259
+ /**
260
+ * Identity of the operation. This is expected to be unique within the scope
261
+ * of the service that generated the operation, and guarantees idempotency in
262
+ * case of retries.
263
+ *
264
+ * In order to ensure best performance and latency in the Quota backends,
265
+ * operation_ids are optimally associated with time, so that related
266
+ * operations can be accessed fast in storage. For this reason, the
267
+ * recommended token for services that intend to operate at a high QPS is
268
+ * Unix time in nanos + UUID
269
+ */
270
+ operationId: string;
271
+ /**
272
+ * Fully qualified name of the API method for which this quota operation is
273
+ * requested. This name is used for matching quota rules or metric rules and
274
+ * billing status rules defined in service configuration.
275
+ *
276
+ * This field should not be set if any of the following is true:
277
+ * (1) the quota operation is performed on non-API resources.
278
+ * (2) quota_metrics is set because the caller is doing quota override.
279
+ *
280
+ *
281
+ * Example of an RPC method name:
282
+ * google.example.library.v1.LibraryService.CreateShelf
283
+ */
284
+ methodName: string;
285
+ /**
286
+ * Identity of the consumer for whom this quota operation is being performed.
287
+ *
288
+ * This can be in one of the following formats:
289
+ * project:<project_id>,
290
+ * project_number:<project_number>,
291
+ * api_key:<api_key>.
292
+ */
293
+ consumerId: string;
294
+ /** Labels describing the operation. */
295
+ labels: {
296
+ [key: string]: string;
297
+ };
298
+ /**
299
+ * Represents information about this operation. Each MetricValueSet
300
+ * corresponds to a metric defined in the service configuration.
301
+ * The data type used in the MetricValueSet must agree with
302
+ * the data type specified in the metric definition.
303
+ *
304
+ * Within a single operation, it is not allowed to have more than one
305
+ * MetricValue instances that have the same metric names and identical
306
+ * label value combinations. If a request has such duplicated MetricValue
307
+ * instances, the entire request is rejected with
308
+ * an invalid argument error.
309
+ *
310
+ * This field is mutually exclusive with method_name.
311
+ */
312
+ quotaMetrics: MetricValueSet[];
313
+ /** Quota mode for this operation. */
314
+ quotaMode: QuotaOperation_QuotaMode;
315
+ }
316
+ export interface QuotaOperationProtoMsg {
317
+ typeUrl: "/google.api.servicecontrol.v1.QuotaOperation";
318
+ value: Uint8Array;
319
+ }
320
+ /**
321
+ * Represents information regarding a quota operation.
322
+ * @name QuotaOperationAmino
323
+ * @package google.api.servicecontrol.v1
324
+ * @see proto type: google.api.servicecontrol.v1.QuotaOperation
325
+ */
326
+ export interface QuotaOperationAmino {
327
+ /**
328
+ * Identity of the operation. This is expected to be unique within the scope
329
+ * of the service that generated the operation, and guarantees idempotency in
330
+ * case of retries.
331
+ *
332
+ * In order to ensure best performance and latency in the Quota backends,
333
+ * operation_ids are optimally associated with time, so that related
334
+ * operations can be accessed fast in storage. For this reason, the
335
+ * recommended token for services that intend to operate at a high QPS is
336
+ * Unix time in nanos + UUID
337
+ */
338
+ operation_id?: string;
339
+ /**
340
+ * Fully qualified name of the API method for which this quota operation is
341
+ * requested. This name is used for matching quota rules or metric rules and
342
+ * billing status rules defined in service configuration.
343
+ *
344
+ * This field should not be set if any of the following is true:
345
+ * (1) the quota operation is performed on non-API resources.
346
+ * (2) quota_metrics is set because the caller is doing quota override.
347
+ *
348
+ *
349
+ * Example of an RPC method name:
350
+ * google.example.library.v1.LibraryService.CreateShelf
351
+ */
352
+ method_name?: string;
353
+ /**
354
+ * Identity of the consumer for whom this quota operation is being performed.
355
+ *
356
+ * This can be in one of the following formats:
357
+ * project:<project_id>,
358
+ * project_number:<project_number>,
359
+ * api_key:<api_key>.
360
+ */
361
+ consumer_id?: string;
362
+ /**
363
+ * Labels describing the operation.
364
+ */
365
+ labels?: {
366
+ [key: string]: string;
367
+ };
368
+ /**
369
+ * Represents information about this operation. Each MetricValueSet
370
+ * corresponds to a metric defined in the service configuration.
371
+ * The data type used in the MetricValueSet must agree with
372
+ * the data type specified in the metric definition.
373
+ *
374
+ * Within a single operation, it is not allowed to have more than one
375
+ * MetricValue instances that have the same metric names and identical
376
+ * label value combinations. If a request has such duplicated MetricValue
377
+ * instances, the entire request is rejected with
378
+ * an invalid argument error.
379
+ *
380
+ * This field is mutually exclusive with method_name.
381
+ */
382
+ quota_metrics?: MetricValueSetAmino[];
383
+ /**
384
+ * Quota mode for this operation.
385
+ */
386
+ quota_mode?: QuotaOperation_QuotaMode;
387
+ }
388
+ export interface QuotaOperationAminoMsg {
389
+ type: "/google.api.servicecontrol.v1.QuotaOperation";
390
+ value: QuotaOperationAmino;
391
+ }
392
+ /** Represents information regarding a quota operation. */
393
+ export interface QuotaOperationSDKType {
394
+ operation_id: string;
395
+ method_name: string;
396
+ consumer_id: string;
397
+ labels: {
398
+ [key: string]: string;
399
+ };
400
+ quota_metrics: MetricValueSetSDKType[];
401
+ quota_mode: QuotaOperation_QuotaMode;
402
+ }
403
+ /** Response message for the AllocateQuota method. */
404
+ export interface AllocateQuotaResponse {
405
+ /**
406
+ * The same operation_id value used in the AllocateQuotaRequest. Used for
407
+ * logging and diagnostics purposes.
408
+ */
409
+ operationId: string;
410
+ /** Indicates the decision of the allocate. */
411
+ allocateErrors: QuotaError[];
412
+ /**
413
+ * Quota metrics to indicate the result of allocation. Depending on the
414
+ * request, one or more of the following metrics will be included:
415
+ *
416
+ * 1. Per quota group or per quota metric incremental usage will be specified
417
+ * using the following delta metric :
418
+ * "serviceruntime.googleapis.com/api/consumer/quota_used_count"
419
+ *
420
+ * 2. The quota limit reached condition will be specified using the following
421
+ * boolean metric :
422
+ * "serviceruntime.googleapis.com/quota/exceeded"
423
+ */
424
+ quotaMetrics: MetricValueSet[];
425
+ /** ID of the actual config used to process the request. */
426
+ serviceConfigId: string;
427
+ }
428
+ export interface AllocateQuotaResponseProtoMsg {
429
+ typeUrl: "/google.api.servicecontrol.v1.AllocateQuotaResponse";
430
+ value: Uint8Array;
431
+ }
432
+ /**
433
+ * Response message for the AllocateQuota method.
434
+ * @name AllocateQuotaResponseAmino
435
+ * @package google.api.servicecontrol.v1
436
+ * @see proto type: google.api.servicecontrol.v1.AllocateQuotaResponse
437
+ */
438
+ export interface AllocateQuotaResponseAmino {
439
+ /**
440
+ * The same operation_id value used in the AllocateQuotaRequest. Used for
441
+ * logging and diagnostics purposes.
442
+ */
443
+ operation_id?: string;
444
+ /**
445
+ * Indicates the decision of the allocate.
446
+ */
447
+ allocate_errors?: QuotaErrorAmino[];
448
+ /**
449
+ * Quota metrics to indicate the result of allocation. Depending on the
450
+ * request, one or more of the following metrics will be included:
451
+ *
452
+ * 1. Per quota group or per quota metric incremental usage will be specified
453
+ * using the following delta metric :
454
+ * "serviceruntime.googleapis.com/api/consumer/quota_used_count"
455
+ *
456
+ * 2. The quota limit reached condition will be specified using the following
457
+ * boolean metric :
458
+ * "serviceruntime.googleapis.com/quota/exceeded"
459
+ */
460
+ quota_metrics?: MetricValueSetAmino[];
461
+ /**
462
+ * ID of the actual config used to process the request.
463
+ */
464
+ service_config_id?: string;
465
+ }
466
+ export interface AllocateQuotaResponseAminoMsg {
467
+ type: "/google.api.servicecontrol.v1.AllocateQuotaResponse";
468
+ value: AllocateQuotaResponseAmino;
469
+ }
470
+ /** Response message for the AllocateQuota method. */
471
+ export interface AllocateQuotaResponseSDKType {
472
+ operation_id: string;
473
+ allocate_errors: QuotaErrorSDKType[];
474
+ quota_metrics: MetricValueSetSDKType[];
475
+ service_config_id: string;
476
+ }
477
+ /** Represents error information for [QuotaOperation][google.api.servicecontrol.v1.QuotaOperation]. */
478
+ export interface QuotaError {
479
+ /** Error code. */
480
+ code: QuotaError_Code;
481
+ /**
482
+ * Subject to whom this error applies. See the specific enum for more details
483
+ * on this field. For example, "clientip:<ip address of client>" or
484
+ * "project:<Google developer project id>".
485
+ */
486
+ subject: string;
487
+ /** Free-form text that provides details on the cause of the error. */
488
+ description: string;
489
+ /**
490
+ * Contains additional information about the quota error.
491
+ * If available, `status.code` will be non zero.
492
+ */
493
+ status?: Status;
494
+ }
495
+ export interface QuotaErrorProtoMsg {
496
+ typeUrl: "/google.api.servicecontrol.v1.QuotaError";
497
+ value: Uint8Array;
498
+ }
499
+ /**
500
+ * Represents error information for [QuotaOperation][google.api.servicecontrol.v1.QuotaOperation].
501
+ * @name QuotaErrorAmino
502
+ * @package google.api.servicecontrol.v1
503
+ * @see proto type: google.api.servicecontrol.v1.QuotaError
504
+ */
505
+ export interface QuotaErrorAmino {
506
+ /**
507
+ * Error code.
508
+ */
509
+ code?: QuotaError_Code;
510
+ /**
511
+ * Subject to whom this error applies. See the specific enum for more details
512
+ * on this field. For example, "clientip:<ip address of client>" or
513
+ * "project:<Google developer project id>".
514
+ */
515
+ subject?: string;
516
+ /**
517
+ * Free-form text that provides details on the cause of the error.
518
+ */
519
+ description?: string;
520
+ /**
521
+ * Contains additional information about the quota error.
522
+ * If available, `status.code` will be non zero.
523
+ */
524
+ status?: StatusAmino;
525
+ }
526
+ export interface QuotaErrorAminoMsg {
527
+ type: "/google.api.servicecontrol.v1.QuotaError";
528
+ value: QuotaErrorAmino;
529
+ }
530
+ /** Represents error information for [QuotaOperation][google.api.servicecontrol.v1.QuotaOperation]. */
531
+ export interface QuotaErrorSDKType {
532
+ code: QuotaError_Code;
533
+ subject: string;
534
+ description: string;
535
+ status?: StatusSDKType;
536
+ }
537
+ function createBaseAllocateQuotaRequest(): AllocateQuotaRequest {
538
+ return {
539
+ serviceName: "",
540
+ allocateOperation: undefined,
541
+ serviceConfigId: ""
542
+ };
543
+ }
544
+ export const AllocateQuotaRequest = {
545
+ typeUrl: "/google.api.servicecontrol.v1.AllocateQuotaRequest",
546
+ encode(message: AllocateQuotaRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
547
+ if (message.serviceName !== "") {
548
+ writer.uint32(10).string(message.serviceName);
549
+ }
550
+ if (message.allocateOperation !== undefined) {
551
+ QuotaOperation.encode(message.allocateOperation, writer.uint32(18).fork()).ldelim();
552
+ }
553
+ if (message.serviceConfigId !== "") {
554
+ writer.uint32(34).string(message.serviceConfigId);
555
+ }
556
+ return writer;
557
+ },
558
+ decode(input: BinaryReader | Uint8Array, length?: number): AllocateQuotaRequest {
559
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
560
+ let end = length === undefined ? reader.len : reader.pos + length;
561
+ const message = createBaseAllocateQuotaRequest();
562
+ while (reader.pos < end) {
563
+ const tag = reader.uint32();
564
+ switch (tag >>> 3) {
565
+ case 1:
566
+ message.serviceName = reader.string();
567
+ break;
568
+ case 2:
569
+ message.allocateOperation = QuotaOperation.decode(reader, reader.uint32());
570
+ break;
571
+ case 4:
572
+ message.serviceConfigId = reader.string();
573
+ break;
574
+ default:
575
+ reader.skipType(tag & 7);
576
+ break;
577
+ }
578
+ }
579
+ return message;
580
+ },
581
+ fromPartial(object: Partial<AllocateQuotaRequest>): AllocateQuotaRequest {
582
+ const message = createBaseAllocateQuotaRequest();
583
+ message.serviceName = object.serviceName ?? "";
584
+ message.allocateOperation = object.allocateOperation !== undefined && object.allocateOperation !== null ? QuotaOperation.fromPartial(object.allocateOperation) : undefined;
585
+ message.serviceConfigId = object.serviceConfigId ?? "";
586
+ return message;
587
+ },
588
+ fromAmino(object: AllocateQuotaRequestAmino): AllocateQuotaRequest {
589
+ const message = createBaseAllocateQuotaRequest();
590
+ if (object.service_name !== undefined && object.service_name !== null) {
591
+ message.serviceName = object.service_name;
592
+ }
593
+ if (object.allocate_operation !== undefined && object.allocate_operation !== null) {
594
+ message.allocateOperation = QuotaOperation.fromAmino(object.allocate_operation);
595
+ }
596
+ if (object.service_config_id !== undefined && object.service_config_id !== null) {
597
+ message.serviceConfigId = object.service_config_id;
598
+ }
599
+ return message;
600
+ },
601
+ toAmino(message: AllocateQuotaRequest): AllocateQuotaRequestAmino {
602
+ const obj: any = {};
603
+ obj.service_name = message.serviceName === "" ? undefined : message.serviceName;
604
+ obj.allocate_operation = message.allocateOperation ? QuotaOperation.toAmino(message.allocateOperation) : undefined;
605
+ obj.service_config_id = message.serviceConfigId === "" ? undefined : message.serviceConfigId;
606
+ return obj;
607
+ },
608
+ fromAminoMsg(object: AllocateQuotaRequestAminoMsg): AllocateQuotaRequest {
609
+ return AllocateQuotaRequest.fromAmino(object.value);
610
+ },
611
+ fromProtoMsg(message: AllocateQuotaRequestProtoMsg): AllocateQuotaRequest {
612
+ return AllocateQuotaRequest.decode(message.value);
613
+ },
614
+ toProto(message: AllocateQuotaRequest): Uint8Array {
615
+ return AllocateQuotaRequest.encode(message).finish();
616
+ },
617
+ toProtoMsg(message: AllocateQuotaRequest): AllocateQuotaRequestProtoMsg {
618
+ return {
619
+ typeUrl: "/google.api.servicecontrol.v1.AllocateQuotaRequest",
620
+ value: AllocateQuotaRequest.encode(message).finish()
621
+ };
622
+ }
623
+ };
624
+ function createBaseQuotaOperation_LabelsEntry(): QuotaOperation_LabelsEntry {
625
+ return {
626
+ key: "",
627
+ value: ""
628
+ };
629
+ }
630
+ export const QuotaOperation_LabelsEntry = {
631
+ encode(message: QuotaOperation_LabelsEntry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
632
+ if (message.key !== "") {
633
+ writer.uint32(10).string(message.key);
634
+ }
635
+ if (message.value !== "") {
636
+ writer.uint32(18).string(message.value);
637
+ }
638
+ return writer;
639
+ },
640
+ decode(input: BinaryReader | Uint8Array, length?: number): QuotaOperation_LabelsEntry {
641
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
642
+ let end = length === undefined ? reader.len : reader.pos + length;
643
+ const message = createBaseQuotaOperation_LabelsEntry();
644
+ while (reader.pos < end) {
645
+ const tag = reader.uint32();
646
+ switch (tag >>> 3) {
647
+ case 1:
648
+ message.key = reader.string();
649
+ break;
650
+ case 2:
651
+ message.value = reader.string();
652
+ break;
653
+ default:
654
+ reader.skipType(tag & 7);
655
+ break;
656
+ }
657
+ }
658
+ return message;
659
+ },
660
+ fromPartial(object: Partial<QuotaOperation_LabelsEntry>): QuotaOperation_LabelsEntry {
661
+ const message = createBaseQuotaOperation_LabelsEntry();
662
+ message.key = object.key ?? "";
663
+ message.value = object.value ?? "";
664
+ return message;
665
+ },
666
+ fromAmino(object: QuotaOperation_LabelsEntryAmino): QuotaOperation_LabelsEntry {
667
+ const message = createBaseQuotaOperation_LabelsEntry();
668
+ if (object.key !== undefined && object.key !== null) {
669
+ message.key = object.key;
670
+ }
671
+ if (object.value !== undefined && object.value !== null) {
672
+ message.value = object.value;
673
+ }
674
+ return message;
675
+ },
676
+ toAmino(message: QuotaOperation_LabelsEntry): QuotaOperation_LabelsEntryAmino {
677
+ const obj: any = {};
678
+ obj.key = message.key === "" ? undefined : message.key;
679
+ obj.value = message.value === "" ? undefined : message.value;
680
+ return obj;
681
+ },
682
+ fromAminoMsg(object: QuotaOperation_LabelsEntryAminoMsg): QuotaOperation_LabelsEntry {
683
+ return QuotaOperation_LabelsEntry.fromAmino(object.value);
684
+ },
685
+ fromProtoMsg(message: QuotaOperation_LabelsEntryProtoMsg): QuotaOperation_LabelsEntry {
686
+ return QuotaOperation_LabelsEntry.decode(message.value);
687
+ },
688
+ toProto(message: QuotaOperation_LabelsEntry): Uint8Array {
689
+ return QuotaOperation_LabelsEntry.encode(message).finish();
690
+ }
691
+ };
692
+ function createBaseQuotaOperation(): QuotaOperation {
693
+ return {
694
+ operationId: "",
695
+ methodName: "",
696
+ consumerId: "",
697
+ labels: {},
698
+ quotaMetrics: [],
699
+ quotaMode: 0
700
+ };
701
+ }
702
+ export const QuotaOperation = {
703
+ typeUrl: "/google.api.servicecontrol.v1.QuotaOperation",
704
+ encode(message: QuotaOperation, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
705
+ if (message.operationId !== "") {
706
+ writer.uint32(10).string(message.operationId);
707
+ }
708
+ if (message.methodName !== "") {
709
+ writer.uint32(18).string(message.methodName);
710
+ }
711
+ if (message.consumerId !== "") {
712
+ writer.uint32(26).string(message.consumerId);
713
+ }
714
+ Object.entries(message.labels).forEach(([key, value]) => {
715
+ QuotaOperation_LabelsEntry.encode({
716
+ key: key as any,
717
+ value
718
+ }, writer.uint32(34).fork()).ldelim();
719
+ });
720
+ for (const v of message.quotaMetrics) {
721
+ MetricValueSet.encode(v!, writer.uint32(42).fork()).ldelim();
722
+ }
723
+ if (message.quotaMode !== 0) {
724
+ writer.uint32(48).int32(message.quotaMode);
725
+ }
726
+ return writer;
727
+ },
728
+ decode(input: BinaryReader | Uint8Array, length?: number): QuotaOperation {
729
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
730
+ let end = length === undefined ? reader.len : reader.pos + length;
731
+ const message = createBaseQuotaOperation();
732
+ while (reader.pos < end) {
733
+ const tag = reader.uint32();
734
+ switch (tag >>> 3) {
735
+ case 1:
736
+ message.operationId = reader.string();
737
+ break;
738
+ case 2:
739
+ message.methodName = reader.string();
740
+ break;
741
+ case 3:
742
+ message.consumerId = reader.string();
743
+ break;
744
+ case 4:
745
+ const entry4 = QuotaOperation_LabelsEntry.decode(reader, reader.uint32());
746
+ if (entry4.value !== undefined) {
747
+ message.labels[entry4.key] = entry4.value;
748
+ }
749
+ break;
750
+ case 5:
751
+ message.quotaMetrics.push(MetricValueSet.decode(reader, reader.uint32()));
752
+ break;
753
+ case 6:
754
+ message.quotaMode = reader.int32() as any;
755
+ break;
756
+ default:
757
+ reader.skipType(tag & 7);
758
+ break;
759
+ }
760
+ }
761
+ return message;
762
+ },
763
+ fromPartial(object: Partial<QuotaOperation>): QuotaOperation {
764
+ const message = createBaseQuotaOperation();
765
+ message.operationId = object.operationId ?? "";
766
+ message.methodName = object.methodName ?? "";
767
+ message.consumerId = object.consumerId ?? "";
768
+ message.labels = Object.entries(object.labels ?? {}).reduce<{
769
+ [key: string]: string;
770
+ }>((acc, [key, value]) => {
771
+ if (value !== undefined) {
772
+ acc[key] = String(value);
773
+ }
774
+ return acc;
775
+ }, {});
776
+ message.quotaMetrics = object.quotaMetrics?.map(e => MetricValueSet.fromPartial(e)) || [];
777
+ message.quotaMode = object.quotaMode ?? 0;
778
+ return message;
779
+ },
780
+ fromAmino(object: QuotaOperationAmino): QuotaOperation {
781
+ const message = createBaseQuotaOperation();
782
+ if (object.operation_id !== undefined && object.operation_id !== null) {
783
+ message.operationId = object.operation_id;
784
+ }
785
+ if (object.method_name !== undefined && object.method_name !== null) {
786
+ message.methodName = object.method_name;
787
+ }
788
+ if (object.consumer_id !== undefined && object.consumer_id !== null) {
789
+ message.consumerId = object.consumer_id;
790
+ }
791
+ message.labels = Object.entries(object.labels ?? {}).reduce<{
792
+ [key: string]: string;
793
+ }>((acc, [key, value]) => {
794
+ if (value !== undefined) {
795
+ acc[key] = String(value);
796
+ }
797
+ return acc;
798
+ }, {});
799
+ message.quotaMetrics = object.quota_metrics?.map(e => MetricValueSet.fromAmino(e)) || [];
800
+ if (object.quota_mode !== undefined && object.quota_mode !== null) {
801
+ message.quotaMode = object.quota_mode;
802
+ }
803
+ return message;
804
+ },
805
+ toAmino(message: QuotaOperation): QuotaOperationAmino {
806
+ const obj: any = {};
807
+ obj.operation_id = message.operationId === "" ? undefined : message.operationId;
808
+ obj.method_name = message.methodName === "" ? undefined : message.methodName;
809
+ obj.consumer_id = message.consumerId === "" ? undefined : message.consumerId;
810
+ obj.labels = {};
811
+ if (message.labels) {
812
+ Object.entries(message.labels).forEach(([k, v]) => {
813
+ obj.labels[k] = v;
814
+ });
815
+ }
816
+ if (message.quotaMetrics) {
817
+ obj.quota_metrics = message.quotaMetrics.map(e => e ? MetricValueSet.toAmino(e) : undefined);
818
+ } else {
819
+ obj.quota_metrics = message.quotaMetrics;
820
+ }
821
+ obj.quota_mode = message.quotaMode === 0 ? undefined : message.quotaMode;
822
+ return obj;
823
+ },
824
+ fromAminoMsg(object: QuotaOperationAminoMsg): QuotaOperation {
825
+ return QuotaOperation.fromAmino(object.value);
826
+ },
827
+ fromProtoMsg(message: QuotaOperationProtoMsg): QuotaOperation {
828
+ return QuotaOperation.decode(message.value);
829
+ },
830
+ toProto(message: QuotaOperation): Uint8Array {
831
+ return QuotaOperation.encode(message).finish();
832
+ },
833
+ toProtoMsg(message: QuotaOperation): QuotaOperationProtoMsg {
834
+ return {
835
+ typeUrl: "/google.api.servicecontrol.v1.QuotaOperation",
836
+ value: QuotaOperation.encode(message).finish()
837
+ };
838
+ }
839
+ };
840
+ function createBaseAllocateQuotaResponse(): AllocateQuotaResponse {
841
+ return {
842
+ operationId: "",
843
+ allocateErrors: [],
844
+ quotaMetrics: [],
845
+ serviceConfigId: ""
846
+ };
847
+ }
848
+ export const AllocateQuotaResponse = {
849
+ typeUrl: "/google.api.servicecontrol.v1.AllocateQuotaResponse",
850
+ encode(message: AllocateQuotaResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
851
+ if (message.operationId !== "") {
852
+ writer.uint32(10).string(message.operationId);
853
+ }
854
+ for (const v of message.allocateErrors) {
855
+ QuotaError.encode(v!, writer.uint32(18).fork()).ldelim();
856
+ }
857
+ for (const v of message.quotaMetrics) {
858
+ MetricValueSet.encode(v!, writer.uint32(26).fork()).ldelim();
859
+ }
860
+ if (message.serviceConfigId !== "") {
861
+ writer.uint32(34).string(message.serviceConfigId);
862
+ }
863
+ return writer;
864
+ },
865
+ decode(input: BinaryReader | Uint8Array, length?: number): AllocateQuotaResponse {
866
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
867
+ let end = length === undefined ? reader.len : reader.pos + length;
868
+ const message = createBaseAllocateQuotaResponse();
869
+ while (reader.pos < end) {
870
+ const tag = reader.uint32();
871
+ switch (tag >>> 3) {
872
+ case 1:
873
+ message.operationId = reader.string();
874
+ break;
875
+ case 2:
876
+ message.allocateErrors.push(QuotaError.decode(reader, reader.uint32()));
877
+ break;
878
+ case 3:
879
+ message.quotaMetrics.push(MetricValueSet.decode(reader, reader.uint32()));
880
+ break;
881
+ case 4:
882
+ message.serviceConfigId = reader.string();
883
+ break;
884
+ default:
885
+ reader.skipType(tag & 7);
886
+ break;
887
+ }
888
+ }
889
+ return message;
890
+ },
891
+ fromPartial(object: Partial<AllocateQuotaResponse>): AllocateQuotaResponse {
892
+ const message = createBaseAllocateQuotaResponse();
893
+ message.operationId = object.operationId ?? "";
894
+ message.allocateErrors = object.allocateErrors?.map(e => QuotaError.fromPartial(e)) || [];
895
+ message.quotaMetrics = object.quotaMetrics?.map(e => MetricValueSet.fromPartial(e)) || [];
896
+ message.serviceConfigId = object.serviceConfigId ?? "";
897
+ return message;
898
+ },
899
+ fromAmino(object: AllocateQuotaResponseAmino): AllocateQuotaResponse {
900
+ const message = createBaseAllocateQuotaResponse();
901
+ if (object.operation_id !== undefined && object.operation_id !== null) {
902
+ message.operationId = object.operation_id;
903
+ }
904
+ message.allocateErrors = object.allocate_errors?.map(e => QuotaError.fromAmino(e)) || [];
905
+ message.quotaMetrics = object.quota_metrics?.map(e => MetricValueSet.fromAmino(e)) || [];
906
+ if (object.service_config_id !== undefined && object.service_config_id !== null) {
907
+ message.serviceConfigId = object.service_config_id;
908
+ }
909
+ return message;
910
+ },
911
+ toAmino(message: AllocateQuotaResponse): AllocateQuotaResponseAmino {
912
+ const obj: any = {};
913
+ obj.operation_id = message.operationId === "" ? undefined : message.operationId;
914
+ if (message.allocateErrors) {
915
+ obj.allocate_errors = message.allocateErrors.map(e => e ? QuotaError.toAmino(e) : undefined);
916
+ } else {
917
+ obj.allocate_errors = message.allocateErrors;
918
+ }
919
+ if (message.quotaMetrics) {
920
+ obj.quota_metrics = message.quotaMetrics.map(e => e ? MetricValueSet.toAmino(e) : undefined);
921
+ } else {
922
+ obj.quota_metrics = message.quotaMetrics;
923
+ }
924
+ obj.service_config_id = message.serviceConfigId === "" ? undefined : message.serviceConfigId;
925
+ return obj;
926
+ },
927
+ fromAminoMsg(object: AllocateQuotaResponseAminoMsg): AllocateQuotaResponse {
928
+ return AllocateQuotaResponse.fromAmino(object.value);
929
+ },
930
+ fromProtoMsg(message: AllocateQuotaResponseProtoMsg): AllocateQuotaResponse {
931
+ return AllocateQuotaResponse.decode(message.value);
932
+ },
933
+ toProto(message: AllocateQuotaResponse): Uint8Array {
934
+ return AllocateQuotaResponse.encode(message).finish();
935
+ },
936
+ toProtoMsg(message: AllocateQuotaResponse): AllocateQuotaResponseProtoMsg {
937
+ return {
938
+ typeUrl: "/google.api.servicecontrol.v1.AllocateQuotaResponse",
939
+ value: AllocateQuotaResponse.encode(message).finish()
940
+ };
941
+ }
942
+ };
943
+ function createBaseQuotaError(): QuotaError {
944
+ return {
945
+ code: 0,
946
+ subject: "",
947
+ description: "",
948
+ status: undefined
949
+ };
950
+ }
951
+ export const QuotaError = {
952
+ typeUrl: "/google.api.servicecontrol.v1.QuotaError",
953
+ encode(message: QuotaError, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
954
+ if (message.code !== 0) {
955
+ writer.uint32(8).int32(message.code);
956
+ }
957
+ if (message.subject !== "") {
958
+ writer.uint32(18).string(message.subject);
959
+ }
960
+ if (message.description !== "") {
961
+ writer.uint32(26).string(message.description);
962
+ }
963
+ if (message.status !== undefined) {
964
+ Status.encode(message.status, writer.uint32(34).fork()).ldelim();
965
+ }
966
+ return writer;
967
+ },
968
+ decode(input: BinaryReader | Uint8Array, length?: number): QuotaError {
969
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
970
+ let end = length === undefined ? reader.len : reader.pos + length;
971
+ const message = createBaseQuotaError();
972
+ while (reader.pos < end) {
973
+ const tag = reader.uint32();
974
+ switch (tag >>> 3) {
975
+ case 1:
976
+ message.code = reader.int32() as any;
977
+ break;
978
+ case 2:
979
+ message.subject = reader.string();
980
+ break;
981
+ case 3:
982
+ message.description = reader.string();
983
+ break;
984
+ case 4:
985
+ message.status = Status.decode(reader, reader.uint32());
986
+ break;
987
+ default:
988
+ reader.skipType(tag & 7);
989
+ break;
990
+ }
991
+ }
992
+ return message;
993
+ },
994
+ fromPartial(object: Partial<QuotaError>): QuotaError {
995
+ const message = createBaseQuotaError();
996
+ message.code = object.code ?? 0;
997
+ message.subject = object.subject ?? "";
998
+ message.description = object.description ?? "";
999
+ message.status = object.status !== undefined && object.status !== null ? Status.fromPartial(object.status) : undefined;
1000
+ return message;
1001
+ },
1002
+ fromAmino(object: QuotaErrorAmino): QuotaError {
1003
+ const message = createBaseQuotaError();
1004
+ if (object.code !== undefined && object.code !== null) {
1005
+ message.code = object.code;
1006
+ }
1007
+ if (object.subject !== undefined && object.subject !== null) {
1008
+ message.subject = object.subject;
1009
+ }
1010
+ if (object.description !== undefined && object.description !== null) {
1011
+ message.description = object.description;
1012
+ }
1013
+ if (object.status !== undefined && object.status !== null) {
1014
+ message.status = Status.fromAmino(object.status);
1015
+ }
1016
+ return message;
1017
+ },
1018
+ toAmino(message: QuotaError): QuotaErrorAmino {
1019
+ const obj: any = {};
1020
+ obj.code = message.code === 0 ? undefined : message.code;
1021
+ obj.subject = message.subject === "" ? undefined : message.subject;
1022
+ obj.description = message.description === "" ? undefined : message.description;
1023
+ obj.status = message.status ? Status.toAmino(message.status) : undefined;
1024
+ return obj;
1025
+ },
1026
+ fromAminoMsg(object: QuotaErrorAminoMsg): QuotaError {
1027
+ return QuotaError.fromAmino(object.value);
1028
+ },
1029
+ fromProtoMsg(message: QuotaErrorProtoMsg): QuotaError {
1030
+ return QuotaError.decode(message.value);
1031
+ },
1032
+ toProto(message: QuotaError): Uint8Array {
1033
+ return QuotaError.encode(message).finish();
1034
+ },
1035
+ toProtoMsg(message: QuotaError): QuotaErrorProtoMsg {
1036
+ return {
1037
+ typeUrl: "/google.api.servicecontrol.v1.QuotaError",
1038
+ value: QuotaError.encode(message).finish()
1039
+ };
1040
+ }
1041
+ };