From bdc976046a85e63fd22ad142e4f98f319d3cbd2b Mon Sep 17 00:00:00 2001 From: Renar Narubin Date: Wed, 29 Nov 2023 18:35:35 -0800 Subject: [PATCH 1/3] Separate services from connectors Previously the library attempted to abstract over different HTTP(s) connectors by passing them as generics through various types. Although this allows certain flexibility (e.g. choosing openssl vs rustls), it was probably the wrong abstraction layer in the first place. This change moves most of the genericism to the grpc-service layer for grpc services (bigtable and pubsub). The library's "common" path via builders will provide a sensible default implementation, but it will now be possible to substitute the entire tower::service stack provided to the grpc API. This is more flexible than the prior connector abstraction, but also harder to use (you basically have to build everything yourself). This feels like the right balance between a batteries-included default and a build-your-own option. Along the way I've also made some updates to non-exhaustivity in generated code, to help ease future changes without breaking semver. This is unfortunately less ergonomic, but not _too_ bad. Future changes may include some builder pattern to make protobuf construction easier. The GCS API is still largely the same, however it is still not in an ideal place. Future changes may bring it more towards service abstraction. Finally, this change includes updates to tonic and prost, bringing them up to the latest versions. Supersedes #30 Fixes #35 --- Cargo.lock | 1167 ++++++++------------- Cargo.toml | 32 +- examples/bigtable.rs | 10 + examples/pubsub_stream.rs | 62 +- generators/Cargo.toml | 4 +- generators/src/grpc.rs | 23 +- src/auth/grpc.rs | 27 +- src/auth/mod.rs | 4 + src/bigtable/admin.rs | 126 ++- src/bigtable/client_builder.rs | 39 +- src/bigtable/mod.rs | 78 +- src/builder.rs | 214 +--- src/generated/google.api.rs | 76 +- src/generated/google.bigtable.admin.v2.rs | 450 +++++--- src/generated/google.bigtable.v2.rs | 151 ++- src/generated/google.iam.v1.rs | 21 +- src/generated/google.longrunning.rs | 21 +- src/generated/google.pubsub.v1.rs | 288 ++++- src/generated/google.r#type.rs | 32 + src/generated/google.rpc.rs | 7 +- src/grpc/mod.rs | 9 + src/lib.rs | 10 +- src/pubsub/client_builder.rs | 44 +- src/pubsub/emulator.rs | 1 + src/pubsub/mod.rs | 129 ++- src/pubsub/publish_sink.rs | 82 +- src/pubsub/streaming_subscription.rs | 61 +- src/storage.rs | 28 +- tests/bigtable_client.rs | 13 +- tests/pubsub_client.rs | 275 ++--- 30 files changed, 1904 insertions(+), 1580 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d133b94..13b712f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,36 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -31,9 +52,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.70" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "approx" @@ -46,9 +67,9 @@ dependencies = [ [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", "event-listener", @@ -74,18 +95,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.39", ] [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.39", ] [[package]] @@ -107,9 +128,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.16" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "113713495a32dd0ab52baf5c10044725aa3aec00b31beda84218e469029b72a3" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", @@ -150,6 +171,21 @@ dependencies = [ "tower-service", ] +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.13.1" @@ -158,9 +194,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "bitflags" @@ -170,21 +206,24 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -194,18 +233,17 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "serde", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets", ] [[package]] @@ -223,21 +261,11 @@ dependencies = [ "vec_map", ] -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" dependencies = [ "crossbeam-utils", ] @@ -266,64 +294,21 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] [[package]] -name = "ct-logs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" -dependencies = [ - "sct 0.6.1", -] - -[[package]] -name = "cxx" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 2.0.15", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.94" +name = "deranged" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", + "powerfmt", + "serde", ] [[package]] @@ -341,9 +326,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "env_logger" @@ -355,6 +340,12 @@ dependencies = [ "regex", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "event-listener" version = "2.5.3" @@ -367,26 +358,11 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -399,9 +375,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -414,9 +390,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -424,15 +400,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -441,38 +417,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.39", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -488,20 +464,26 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + [[package]] name = "h2" -version = "0.3.18" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", @@ -509,7 +491,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -522,6 +504,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "heck" version = "0.3.3" @@ -542,18 +530,15 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -579,9 +564,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -601,9 +586,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -616,61 +601,27 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.10", "tokio", "tower-service", "tracing", "want", ] -[[package]] -name = "hyper-openssl" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ee5d7a8f718585d1c3c61dfde28ef5b0bb14734b4db13f5ada856cdc6c612b" -dependencies = [ - "http", - "hyper", - "linked_hash_set", - "once_cell", - "openssl", - "openssl-sys", - "parking_lot", - "tokio", - "tokio-openssl", - "tower-layer", -] - [[package]] name = "hyper-rustls" -version = "0.22.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ - "ct-logs", "futures-util", - "hyper", - "log", - "rustls 0.19.1", - "rustls-native-certs 0.5.0", - "tokio", - "tokio-rustls 0.22.0", - "webpki", -] - -[[package]] -name = "hyper-rustls" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7" -dependencies = [ "http", "hyper", "log", - "rustls 0.21.0", - "rustls-native-certs 0.6.2", + "rustls", + "rustls-native-certs", "tokio", - "tokio-rustls 0.24.0", + "tokio-rustls", ] [[package]] @@ -687,33 +638,32 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] name = "idna" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -726,7 +676,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", ] [[package]] @@ -738,17 +698,26 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -761,52 +730,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.141" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" - -[[package]] -name = "link-cplusplus" -version = "1.0.8" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] - -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - -[[package]] -name = "linked_hash_set" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" -dependencies = [ - "linked-hash-map", -] - -[[package]] -name = "lock_api" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" -dependencies = [ - "autocfg", - "scopeguard", -] +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "matchers" @@ -814,20 +746,20 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] name = "matchit" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "mime" @@ -835,16 +767,24 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + [[package]] name = "mio" -version = "0.8.6" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", - "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "wasi", + "windows-sys", ] [[package]] @@ -857,32 +797,22 @@ dependencies = [ "winapi", ] -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.3", "libc", ] @@ -896,36 +826,19 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" - -[[package]] -name = "openssl" -version = "0.10.50" +name = "object" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e30d8bc91859781f0a943411186324d580f2bbeb71b452fe91ae344806af3f1" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", + "memchr", ] [[package]] -name = "openssl-macros" -version = "0.1.1" +name = "once_cell" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl-probe" @@ -933,84 +846,49 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-sys" -version = "0.9.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d3d193fb1488ad46ffe3aaabc912cc931d02ee8518fe2959aea8ef52718b0c0" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "overload" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-sys 0.45.0", -] - [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1019,10 +897,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "pkg-config" -version = "0.3.26" +name = "powerfmt" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" @@ -1056,18 +934,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] [[package]] name = "prost" -version = "0.11.9" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ "bytes", "prost-derive", @@ -1075,22 +953,22 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.11.9" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", - "itertools", + "itertools 0.11.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] name = "prost-types" -version = "0.11.9" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" dependencies = [ "prost", ] @@ -1119,9 +997,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1193,24 +1071,16 @@ dependencies = [ "rand_core 0.3.1", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags", -] - [[package]] name = "regex" -version = "1.7.3" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -1219,7 +1089,18 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "regex-syntax", + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", ] [[package]] @@ -1228,6 +1109,12 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + [[package]] name = "remove_dir_all" version = "0.5.3" @@ -1239,19 +1126,24 @@ dependencies = [ [[package]] name = "ring" -version = "0.16.20" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" dependencies = [ "cc", + "getrandom", "libc", - "once_cell", "spin", "untrusted", - "web-sys", - "winapi", + "windows-sys", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc_version" version = "0.4.0" @@ -1263,46 +1155,21 @@ dependencies = [ [[package]] name = "rustls" -version = "0.19.1" +version = "0.21.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.1", - "log", - "ring", - "sct 0.6.1", - "webpki", -] - -[[package]] -name = "rustls" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07180898a28ed6a7f7ba2311594308f595e3dd2e3c3812fa0a80a47b45f17e5d" +checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" dependencies = [ "log", "ring", "rustls-webpki", - "sct 0.7.0", + "sct", ] [[package]] name = "rustls-native-certs" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" -dependencies = [ - "openssl-probe", - "rustls 0.19.1", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-native-certs" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -1312,18 +1179,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.0", + "base64 0.21.5", ] [[package]] name = "rustls-webpki" -version = "0.100.1" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ "ring", "untrusted", @@ -1331,52 +1198,30 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "schannel" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" -dependencies = [ - "windows-sys 0.42.0", -] - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" - -[[package]] -name = "sct" -version = "0.6.1" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "ring", - "untrusted", + "windows-sys", ] [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ "ring", "untrusted", @@ -1390,9 +1235,9 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "security-framework" -version = "2.8.2" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags", "core-foundation", @@ -1403,9 +1248,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.8.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -1413,35 +1258,35 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.160" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.160" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.39", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -1462,9 +1307,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -1480,34 +1325,44 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", ] +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys", +] + [[package]] name = "spin" -version = "0.5.2" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "strsim" @@ -1552,9 +1407,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.15" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -1595,15 +1450,6 @@ dependencies = [ "remove_dir_all", ] -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", -] - [[package]] name = "textwrap" version = "0.11.0" @@ -1615,22 +1461,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.39", ] [[package]] @@ -1645,23 +1491,14 @@ dependencies = [ [[package]] name = "time" -version = "0.1.45" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "time" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ + "deranged", "libc", "num_threads", + "powerfmt", "serde", "time-core", "time-macros", @@ -1669,15 +1506,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.8" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -1699,20 +1536,20 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.27.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", "num_cpus", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.5", "tokio-macros", - "windows-sys 0.45.0", + "windows-sys", ] [[package]] @@ -1727,53 +1564,30 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", -] - -[[package]] -name = "tokio-openssl" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08f9ffb7809f1b20c1b398d92acf4cc719874b3b2b2d9ea2f09b4a80350878a" -dependencies = [ - "futures-util", - "openssl", - "openssl-sys", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" -dependencies = [ - "rustls 0.19.1", - "tokio", - "webpki", + "syn 2.0.39", ] [[package]] name = "tokio-rustls" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.0", + "rustls", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -1782,9 +1596,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.7" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -1796,16 +1610,15 @@ dependencies = [ [[package]] name = "tonic" -version = "0.9.2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" +checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" dependencies = [ + "async-stream", "async-trait", "axum", - "base64 0.21.0", + "base64 0.21.5", "bytes", - "futures-core", - "futures-util", "h2", "http", "http-body", @@ -1814,12 +1627,17 @@ dependencies = [ "percent-encoding", "pin-project", "prost", + "rustls", + "rustls-native-certs", + "rustls-pemfile", "tokio", + "tokio-rustls", "tokio-stream", "tower", "tower-layer", "tower-service", "tracing", + "webpki-roots", ] [[package]] @@ -1830,7 +1648,7 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", - "indexmap", + "indexmap 1.9.3", "pin-project", "pin-project-lite", "rand 0.8.5", @@ -1856,11 +1674,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1869,20 +1686,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -1890,20 +1707,31 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] [[package]] name = "tracing-subscriber" -version = "0.3.16" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", @@ -1914,19 +1742,18 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log", + "tracing-log 0.2.0", ] [[package]] name = "tracing-tree" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758e983ab7c54fee18403994507e7f212b9005e957ce7984996fac8d11facedb" +checksum = "2ec6adcab41b1391b08a308cc6302b79f8095d1673f6947c2dc65ffb028b0b2d" dependencies = [ - "atty", "nu-ansi-term", "tracing-core", - "tracing-log", + "tracing-log 0.1.4", "tracing-subscriber", ] @@ -1944,9 +1771,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -1965,21 +1792,21 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "untrusted" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -1988,9 +1815,9 @@ dependencies = [ [[package]] name = "uuid" -version = "0.8.2" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" dependencies = [ "getrandom", ] @@ -2001,12 +1828,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "vec_map" version = "0.8.2" @@ -2021,20 +1842,13 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2043,9 +1857,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2053,24 +1867,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2078,42 +1892,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] -name = "web-sys" -version = "0.3.61" +name = "webpki-roots" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "winapi" @@ -2131,15 +1931,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -2147,155 +1938,83 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets", ] [[package]] name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "ya-gcp" -version = "0.10.0" +version = "0.11.0" dependencies = [ "approx", "async-channel", @@ -2306,8 +2025,7 @@ dependencies = [ "http", "humantime-serde", "hyper", - "hyper-openssl", - "hyper-rustls 0.22.1", + "hyper-rustls", "paste", "pin-project", "prost", @@ -2315,6 +2033,8 @@ dependencies = [ "quickcheck", "quickcheck_macros", "rand 0.8.5", + "rustls", + "rustls-native-certs", "serde", "serde_json", "structopt", @@ -2328,14 +2048,15 @@ dependencies = [ "tracing-subscriber", "tracing-tree", "uuid", + "webpki-roots", "yup-oauth2", ] [[package]] name = "yup-oauth2" -version = "8.2.0" +version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6135ad28f1957d676384074df0ad1dd920966834bddd973da86119378b4964d7" +checksum = "364ca376b5c04d9b2be9693054e3e0d2d146b363819d0f9a10c6ee66e4c8406b" dependencies = [ "anyhow", "async-trait", @@ -2343,16 +2064,16 @@ dependencies = [ "futures", "http", "hyper", - "hyper-rustls 0.24.0", - "itertools", + "hyper-rustls", + "itertools 0.10.5", "log", "percent-encoding", - "rustls 0.21.0", + "rustls", "rustls-pemfile", "seahash", "serde", "serde_json", - "time 0.3.20", + "time", "tokio", "tower-service", "url", diff --git a/Cargo.toml b/Cargo.toml index 894ed3d..8e30f0c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ya-gcp" -version = "0.10.0" +version = "0.11.0" authors = ["Renar Narubin "] edition = "2021" description = "APIs for using Google Cloud Platform services" @@ -30,10 +30,10 @@ path = "examples/bigtable.rs" required-features = ["bigtable"] [features] -default = ["rustls"] +default = ["rustls-native-certs"] -rustls = ["hyper-rustls"] -openssl = ["hyper-openssl"] # TODO maybe should be native-tls instead? +rustls-native-certs = ["dep:rustls-native-certs", "tonic?/tls-roots"] +webpki-roots = ["dep:webpki-roots", "tonic?/tls-webpki-roots"] # an internal feature used by services running grpc grpc = ["tonic", "prost", "prost-types", "tower", "derive_more"] @@ -51,27 +51,29 @@ futures = "0.3" http = "0.2" humantime-serde = "1" hyper = "0.14" +hyper-rustls = "0.24.2" paste = "1" rand = "0.8" +rustls = "0.21.8" serde = { version = "1", features = ["derive"] } thiserror = "1" tokio = { version = "1", features = ["time"] } -tracing = "0.1" -yup-oauth2 = "8.1" +tracing = "0.1.37" +yup-oauth2 = "8.3.0" async-stream = { version = "0.3", optional = true } async-channel = { version = "1", optional = true } derive_more = { version = "0.99", optional = true } -hyper-openssl = { version = "0.9", optional = true } -hyper-rustls = { version = "0.22", features = ["rustls-native-certs"], optional = true } pin-project = { version = "1.0.11", optional = true } -prost = { version = "0.11", optional = true } -prost-types = { version = "0.11", optional = true } +prost = { version = "0.12.3", optional = true } +prost-types = { version = "0.12.3", optional = true } +rustls-native-certs = { version = "0.6.3", optional = true } tame-gcs = { version = "0.10.0", optional = true } tempdir = { version = "0.3", optional = true } -tonic = { version = "0.9", optional = true } +tonic = { version = "0.10.2", optional = true } tower = { version = "0.4", features = ["make"], optional = true } -uuid = { version = "0.8.1", features = ["v4"], optional = true } +uuid = { version = "1.6", features = ["v4"], optional = true } +webpki-roots = { version = "0.25.3", optional = true } [dev-dependencies] approx = "0.5" @@ -84,12 +86,6 @@ tokio = { version = "1.4.0", features = ["rt-multi-thread", "time", "test-util"] tracing-subscriber = { version = "0.3", features = ["env-filter"] } tracing-tree = "0.2" -[package.metadata.cargo-udeps.ignore] -# hyper-openssl is only used (and thus detected) if the feature "openssl" is -# enabled _and_ "rustls" is disabled. CI builds with --all-features, so udeps -# fails unless we ignore the package explicitly -normal = ["hyper-openssl"] - [package.metadata.docs.rs] rustdoc-args = ["--cfg", "docsrs"] all-features = true diff --git a/examples/bigtable.rs b/examples/bigtable.rs index 6f2ae8a..06f3f5a 100644 --- a/examples/bigtable.rs +++ b/examples/bigtable.rs @@ -32,6 +32,8 @@ async fn main() -> Result<(), Box> { AuthFlow::NoAuth }; + println!("Creating clients"); + let config = ClientBuilderConfig::new().auth_flow(auth); let builder = ClientBuilder::new(config).await?; @@ -51,6 +53,8 @@ async fn main() -> Result<(), Box> { ) .await?; + println!("Creating table `{}`", &args.table_name); + match admin .create_table( &args.table_name, @@ -69,13 +73,18 @@ async fn main() -> Result<(), Box> { } } + println!("Reading tables"); + let tables: Vec<_> = admin.list_tables().await?.collect().await; + println!("got tables {:?}", tables); let mut client = builder .build_bigtable_client(bigtable_config, &args.project_name, &args.instance_name) .await?; + println!("setting data"); + client .set_row_data( &args.table_name, @@ -84,6 +93,7 @@ async fn main() -> Result<(), Box> { [("col1", "value"), ("col2", "value")], ) .await?; + println!("set data done"); println!( "all data: {:?}", diff --git a/examples/pubsub_stream.rs b/examples/pubsub_stream.rs index a95fcae..751415b 100644 --- a/examples/pubsub_stream.rs +++ b/examples/pubsub_stream.rs @@ -58,31 +58,38 @@ async fn main() -> Result<(), Box> { println!("Creating topic {}", &topic_name); publisher - .create_topic(pubsub::api::Topic { - name: topic_name.clone().into(), - ..pubsub::api::Topic::default() + .raw_api_mut() + .create_topic({ + let mut t = pubsub::api::Topic::default(); + t.name = topic_name.clone().into(); + t }) .await?; println!("Creating subscription {}", &subscription_name); subscriber - .create_subscription(pubsub::api::Subscription { - name: subscription_name.clone().into(), - topic: topic_name.clone().into(), - ..pubsub::api::Subscription::default() + .raw_api_mut() + .create_subscription({ + let mut s = pubsub::api::Subscription::default(); + s.name = subscription_name.clone().into(); + s.topic = topic_name.clone().into(); + s }) .await?; println!("Publishing messages to topic"); - futures::stream::iter(0u32..100) - .map(|i| pubsub::api::PubsubMessage { - data: format!("message-{}", i).into(), - ..pubsub::api::PubsubMessage::default() + futures::stream::iter(0u32..15) + .map(|i| { + let mut m = pubsub::api::PubsubMessage::default(); + let payload = format!("message-{:02}", i); + println!("Sending `{payload}`"); + m.data = payload.into(); + m }) .map(Ok) - .forward(publisher.publish_topic_sink(topic_name.clone())) + .forward(publisher.publish_topic_sink(topic_name.clone(), pubsub::PublishConfig::default())) .await?; println!("Reading back published messages"); @@ -93,32 +100,49 @@ async fn main() -> Result<(), Box> { ); futures::pin_mut!(read_stream); - for i in 0u32..100 { + let mut messages = Vec::new(); + for _ in 0u32..15 { let (ack_token, message) = read_stream .next() .await .ok_or("unexpected end of stream")??; - ack_token.ack().await?; + let payload = std::str::from_utf8(&message.data[..]).unwrap(); + println!("Received `{payload}`"); + messages.push(payload.to_owned()); - assert_eq!(message.data, format!("message-{}", i)); + ack_token.ack().await?; } + messages.sort(); + assert_eq!( + messages, + (0..15) + .map(|i| format!("message-{:02}", i)) + .collect::>() + ); + println!("All messages matched!"); println!("Deleting subscription {}", &subscription_name); subscriber - .delete_subscription(pubsub::api::DeleteSubscriptionRequest { - subscription: subscription_name.into(), + .raw_api_mut() + .delete_subscription({ + let mut d = pubsub::api::DeleteSubscriptionRequest::default(); + d.subscription = subscription_name.into(); + d }) .await?; println!("Deleting topic {}", &topic_name); publisher - .delete_topic(pubsub::api::DeleteTopicRequest { - topic: topic_name.into(), + .raw_api_mut() + .delete_topic({ + let mut d = pubsub::api::DeleteTopicRequest::default(); + d.topic = topic_name.into(); + d }) .await?; diff --git a/generators/Cargo.toml b/generators/Cargo.toml index 782e5d0..c0cb939 100644 --- a/generators/Cargo.toml +++ b/generators/Cargo.toml @@ -16,12 +16,12 @@ harness = false [dependencies] anyhow = "1" flate2 = "1" -prost-build = { version = "0.11", features = ["format"] } +prost-build = { version = "0.12.3", features = ["format"] } reqwest = { version = "0.11", features = ["blocking"] } structopt = "0.3" tar = "0.4" tempfile = "3" -tonic-build = "0.9" +tonic-build = "0.10" [dev-dependencies] criterion = { version = "0.3", features = ["html_reports"] } diff --git a/generators/src/grpc.rs b/generators/src/grpc.rs index 4f74346..a6bc095 100644 --- a/generators/src/grpc.rs +++ b/generators/src/grpc.rs @@ -44,21 +44,36 @@ fn main() -> Result<(), Error> { // the wire prost_config.bytes(&["."]); - // The bigtable docs have doc comments that trigger test failures. - // (TODO: in newer versions of prost-build, the `format` option might be enough for this) - prost_config.disable_comments(&[ + // Some docs have doc comments that trigger test failures because they're not actually rust. + // Maybe future codegen will be better? + // Try to keep some docs by pretending the fields don't exist during doctests + for ignored_field in [ "bigtable.v2.RowFilter.Interleave.filters", + "bigtable.v2.ReadRowsRequest.reversed", + ] { + prost_config.field_attribute(ignored_field, "#[cfg(not(doctest))]"); + } + + // Other types can't be pretended away because typechecks will fail. just disable the comments + prost_config.disable_comments(&[ "bigtable.v2.RowFilter.sink", "iam.v1.Policy", "iam.v1.AuditConfig", "iam.v1.AuditLogConfig", - "type.Expr", ]); // the attributes map tend to have a small number of string keys, which are faster to access // using a btree than a hashmap. See the crate's benchmarks prost_config.btree_map(&["PubsubMessage.attributes"]); + // Declare all the generated structs and enums as non_exhaustive. + // + // This helps to reconcile two distinct semver conventions: + // 1. in protobuf, adding fields is a semver minor change + // 2. in prost codegen, structs are composed of all-pub fields, therefore adding a new field is + // a semver *major* change + prost_config.type_attribute(".", "#[non_exhaustive]"); + tonic_build::configure() .build_client(true) .build_server(false) diff --git a/src/auth/grpc.rs b/src/auth/grpc.rs index dcfbe26..1613b03 100644 --- a/src/auth/grpc.rs +++ b/src/auth/grpc.rs @@ -1,5 +1,6 @@ //! Authorization support for gRPC requests +use crate::auth::Auth; use futures::future::BoxFuture; use std::{ sync::Arc, @@ -45,15 +46,15 @@ use tonic::client::GrpcService; /// # }; /// ``` #[derive(Clone)] -pub struct AuthGrpcService { +pub struct AuthGrpcService { inner: Service, - auth: Option>, - scopes: Arc>, + auth: Option, + scopes: Arc<[String]>, } -impl AuthGrpcService { +impl AuthGrpcService { /// Wrap the given service to add authorization headers to each request - pub fn new(service: Service, auth: Option>, scopes: Vec) -> Self + pub fn new(service: Service, auth: Option, scopes: Vec) -> Self where // Generic bounds included on the constructor because having them only on the trait impl // doesn't produce good compiler diagnostics @@ -63,7 +64,7 @@ impl AuthGrpcService { Self { inner: service, auth, - scopes: Arc::new(scopes), + scopes: Arc::from(scopes), } } } @@ -93,20 +94,11 @@ where Grpc(ServiceErr), } -impl GrpcService for AuthGrpcService +impl GrpcService for AuthGrpcService where Service: GrpcService + Clone + Send + 'static, Service::Error: std::error::Error + Send + Sync + 'static, Service::Future: Send, - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, ReqBody: Send + 'static, { type Error = AuthGrpcError; @@ -290,8 +282,7 @@ mod test { } } - let mut auth_service = - AuthGrpcService::<_, crate::DefaultConnector>::new(OkService, None, vec![]); + let mut auth_service = AuthGrpcService::<_>::new(OkService, None, vec![]); let result = auth_service.call(http::request::Request::new(())).await; diff --git a/src/auth/mod.rs b/src/auth/mod.rs index e0aa1d0..5828279 100644 --- a/src/auth/mod.rs +++ b/src/auth/mod.rs @@ -3,6 +3,10 @@ #[cfg(feature = "grpc")] pub mod grpc; +pub(crate) type Auth = yup_oauth2::authenticator::Authenticator< + hyper_rustls::HttpsConnector, +>; + /// Add the given authorization token to the given HTTP request /// /// Returns an error if the token cannot form a valid HTTP header value. diff --git a/src/bigtable/admin.rs b/src/bigtable/admin.rs index cba220d..11032bf 100644 --- a/src/bigtable/admin.rs +++ b/src/bigtable/admin.rs @@ -1,12 +1,11 @@ //! An API for administering bigtable. +use super::api::bigtable::admin; use crate::{ - auth::grpc::{self, AuthGrpcService}, builder, + grpc::{Body, BoxBody, Bytes, DefaultGrpcImpl, GrpcService, StdError}, }; -use super::api::bigtable::admin; - pub use admin::v2::Table; use futures::Stream; @@ -17,7 +16,6 @@ const BIGTABLE_ADMIN_SCOPE: &'static str = "https://www.googleapis.com/auth/bigt config_default! { /// Configuration for the bigtable admin client #[derive(Debug, Clone, Eq, PartialEq, Hash, serde::Deserialize)] - #[non_exhaustive] pub struct BigtableTableAdminConfig { /// Endpoint to connect to bigtable over. @default("https://bigtableadmin.googleapis.com".into(), "BigtableTableAdminConfig::default_endpoint") @@ -29,10 +27,8 @@ config_default! { /// [`build_bigtable_client`](crate::builder::ClientBuilder::build_bigtable_client) /// function. #[derive(Clone)] -pub struct BigtableTableAdminClient { - pub(crate) inner: admin::v2::bigtable_table_admin_client::BigtableTableAdminClient< - AuthGrpcService, - >, +pub struct BigtableTableAdminClient { + pub(crate) inner: admin::v2::bigtable_table_admin_client::BigtableTableAdminClient, // A string of the form projects/{project}/instances/{instance} pub(crate) table_prefix: String, } @@ -73,30 +69,53 @@ impl From for admin::v2::GcRule { } } -impl BigtableTableAdminClient +impl BigtableTableAdminClient { + /// Manually construct a new client. + /// + /// There are limited circumstances in which this is useful; consider instead using the builder + /// function [crate::builder::ClientBuilder::build_bigtable_admin_client] + pub fn from_raw_api( + client: admin::v2::bigtable_table_admin_client::BigtableTableAdminClient, + project: &str, + instance_name: &str, + ) -> Self { + BigtableTableAdminClient { + inner: client, + table_prefix: format!("projects/{}/instances/{}", project, instance_name), + } + } + + /// Access the underlying grpc api + pub fn raw_api(&self) -> &admin::v2::bigtable_table_admin_client::BigtableTableAdminClient { + &self.inner + } + + /// Mutably access the underlying grpc api + pub fn raw_api_mut( + &mut self, + ) -> &mut admin::v2::bigtable_table_admin_client::BigtableTableAdminClient { + &mut self.inner + } +} + +impl BigtableTableAdminClient where - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, + S: GrpcService, + S::Error: Into, + S::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, { /// Create a new table. pub async fn create_table( &mut self, - table_name: &str, + table_name: impl Into, column_families: Fams, ) -> Result where Fams: IntoIterator, { - let table_id = table_name.to_owned(); + let table_id = table_name.into(); let table = Table { - name: format!("{}/tables/{}", self.table_prefix, table_name), column_families: column_families .into_iter() .map(|(name, rule)| { @@ -121,19 +140,32 @@ where Ok(response.into_inner()) } - /// List all tables. + /// List all tables belonging to this project and instance. pub async fn list_tables( &mut self, - ) -> Result>, tonic::Status> { - let req = admin::v2::ListTablesRequest { - parent: self.table_prefix.clone(), - ..Default::default() - }; - let response = self.inner.list_tables(req).await?; - // TODO: if the response was paged, make a follow-up request. - Ok(futures::stream::iter( - response.into_inner().tables.into_iter().map(|x| Ok(x)), - )) + ) -> Result> + '_, tonic::Status> { + Ok(async_stream::stream! { + let mut page_token = String::new(); + loop { + let req = admin::v2::ListTablesRequest { + parent: self.table_prefix.clone(), + page_token, + ..Default::default() + }; + let response = self.inner.list_tables(req).await?.into_inner(); + + for table in response.tables.into_iter() { + yield Ok(table); + } + + if response.next_page_token.is_empty() { + break; + } else { + page_token = response.next_page_token; + continue; + } + } + }) } } @@ -142,41 +174,27 @@ where #[error(transparent)] pub struct BuildError(#[from] tonic::transport::Error); -impl builder::ClientBuilder -where - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, - Box: From, -{ +impl builder::ClientBuilder { /// Create a client for administering bigtable tables. pub async fn build_bigtable_admin_client( &self, config: BigtableTableAdminConfig, project: &str, instance_name: &str, - ) -> Result, BuildError> { + ) -> Result, BuildError> { let scopes = vec![BIGTABLE_ADMIN_SCOPE.to_owned()]; let endpoint = tonic::transport::Endpoint::new(config.endpoint)?; - let connection = endpoint - .connect_with_connector(self.connector.clone()) - .await?; - let table_prefix = format!("projects/{}/instances/{}", project, instance_name); + let connection = endpoint.connect().await?; let inner = admin::v2::bigtable_table_admin_client::BigtableTableAdminClient::new( - grpc::AuthGrpcService::new(connection, self.auth.clone(), scopes), + DefaultGrpcImpl::new(connection, self.auth.clone(), scopes), ); - Ok(BigtableTableAdminClient { + Ok(BigtableTableAdminClient::from_raw_api( inner, - table_prefix, - }) + project, + instance_name, + )) } } diff --git a/src/bigtable/client_builder.rs b/src/bigtable/client_builder.rs index 9bd497b..30993fd 100644 --- a/src/bigtable/client_builder.rs +++ b/src/bigtable/client_builder.rs @@ -1,8 +1,6 @@ use crate::{ - auth::grpc, bigtable::{api, BigtableClient}, - builder, - retry_policy::{exponential_backoff, ExponentialBackoff}, + builder, grpc, }; const BIGTABLE_DATA_SCOPE: &'static str = "https://www.googleapis.com/auth/bigtable.data"; @@ -17,7 +15,6 @@ const MAX_MESSAGE_SIZE: usize = usize::MAX; config_default! { /// Configuration for connecting to bigtable #[derive(Debug, Clone, Eq, PartialEq, Hash, serde::Deserialize)] - #[non_exhaustive] pub struct BigtableConfig { /// Endpoint to connect to bigtable over. @default("https://bigtable.googleapis.com".into(), "BigtableConfig::default_endpoint") @@ -44,48 +41,24 @@ impl BigtableConfig { #[error(transparent)] pub struct BuildError(#[from] tonic::transport::Error); -use super::BigtableRetryCheck; - -impl builder::ClientBuilder -where - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, - Box: From, -{ +impl builder::ClientBuilder { /// Create a client for connecting to bigtable pub async fn build_bigtable_client( &self, config: BigtableConfig, project: &str, instance_name: &str, - ) -> Result, BuildError> { + ) -> Result, BuildError> { let scopes = config.auth_scopes(); let endpoint = tonic::transport::Endpoint::new(config.endpoint)?; - let connection = endpoint - .connect_with_connector(self.connector.clone()) - .await?; - let table_prefix = format!("projects/{}/instances/{}/tables/", project, instance_name); + let connection = endpoint.connect().await?; let inner = api::bigtable::v2::bigtable_client::BigtableClient::new( - grpc::AuthGrpcService::new(connection, self.auth.clone(), scopes), + grpc::DefaultGrpcImpl::new(connection, self.auth.clone(), scopes), ) .max_decoding_message_size(MAX_MESSAGE_SIZE); - Ok(BigtableClient { - inner, - table_prefix, - retry: ExponentialBackoff::new( - BigtableRetryCheck::default(), - exponential_backoff::Config::default(), - ), - }) + Ok(BigtableClient::from_raw_api(inner, project, instance_name)) } } diff --git a/src/bigtable/mod.rs b/src/bigtable/mod.rs index 2ae2510..cdf1540 100644 --- a/src/bigtable/mod.rs +++ b/src/bigtable/mod.rs @@ -5,13 +5,14 @@ //! allows for creating and listing tables. use futures::prelude::*; -use hyper::body::Bytes; -use prost::bytes::BytesMut; +use prost::bytes::{Bytes, BytesMut}; use std::ops::{Bound, RangeBounds}; use crate::{ - auth::grpc::AuthGrpcService, - retry_policy::{ExponentialBackoff, RetryOperation, RetryPolicy, RetryPredicate}, + grpc::{Body, BoxBody, DefaultGrpcImpl, GrpcService, StdError}, + retry_policy::{ + exponential_backoff, ExponentialBackoff, RetryOperation, RetryPolicy, RetryPredicate, + }, }; pub use http::Uri; @@ -367,28 +368,63 @@ impl From for ReadRowsError { /// [`build_bigtable_client`](crate::builder::ClientBuilder::build_bigtable_client) /// function. #[derive(Clone)] -pub struct BigtableClient< - C = crate::DefaultConnector, - Retry = ExponentialBackoff, -> { - inner: api::bigtable::v2::bigtable_client::BigtableClient< - AuthGrpcService, - >, +pub struct BigtableClient> { + inner: api::bigtable::v2::bigtable_client::BigtableClient, retry: Retry, table_prefix: String, } -impl BigtableClient +impl BigtableClient { + /// Manually construct a new client. + /// + /// There are limited circumstances in which this is useful; consider instead using the builder + /// function [crate::builder::ClientBuilder::build_bigtable_client] + pub fn from_raw_api( + client: api::bigtable::v2::bigtable_client::BigtableClient, + project: &str, + instance_name: &str, + ) -> Self { + BigtableClient { + inner: client, + retry: ExponentialBackoff::new( + BigtableRetryCheck::default(), + exponential_backoff::Config::default(), + ), + table_prefix: format!("projects/{}/instances/{}/tables/", project, instance_name), + } + } +} + +impl BigtableClient { + /// Set the retry policy for failed operations encountered by this client + pub fn with_retry_policy(self, retry_policy: Retry) -> BigtableClient + where + Retry: RetryPolicy<(), tonic::Status> + 'static, + { + BigtableClient { + inner: self.inner, + retry: retry_policy, + table_prefix: self.table_prefix, + } + } + + /// Access the underlying grpc api + pub fn raw_api(&self) -> &api::bigtable::v2::bigtable_client::BigtableClient { + &self.inner + } + + /// Mutably access the underlying grpc api + pub fn raw_api_mut(&mut self) -> &mut api::bigtable::v2::bigtable_client::BigtableClient { + &mut self.inner + } +} + +impl BigtableClient where - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, + S: GrpcService, + S::Error: Into, + S::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, Retry: RetryPolicy<(), tonic::Status> + 'static, Retry::RetryOp: Send + 'static, >::Sleep: Send + 'static, diff --git a/src/builder.rs b/src/builder.rs index 7f2d71d..bf2764c 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -2,12 +2,9 @@ //! //! See [`ClientBuilder`], which is used to instantiate the various GCP service clients. +use crate::auth::Auth; use std::path::PathBuf; -use hyper::client::Client; - -use crate::Auth; - const SERVICE_ACCOUNT_ENV_VAR: &str = "GOOGLE_APPLICATION_CREDENTIALS"; /// Configuration for loading service account credentials from file @@ -69,7 +66,6 @@ impl Default for AuthFlow { config_default! { /// Configuration for creating a [`ClientBuilder`] #[derive(Debug, Clone, serde::Deserialize)] - #[non_exhaustive] pub struct ClientBuilderConfig { /// How authentication credentials should be loaded @default(AuthFlow::ServiceAccount(ServiceAccountAuth::EnvVar), "ClientBuilderConfig::default_auth_flow") @@ -105,98 +101,61 @@ pub enum CreateBuilderError { Connector(#[source] Box), } -// Set a default connector if a connector feature is enabled. -// -// This is default is then used as a default type for the generic parameter on types throughout -// this crate. Using this default is more ergonomic than specifying a generic type everywhere, -// which suits this crate's goal of ease-of-use -cfg_if::cfg_if! { - // the order of the checked features has potentially user-facing consequences: "rustls" is - // currently enabled in default features, so "openssl" should be checked in this if-chain - // before it, so that `features = ["openssl"]` will do the less surprising thing (use openssl) - // despite having rustls and openssl both enabled. This allows a user to forget - // `default-features = false` with hopefully fewer unexpected consequences - - if #[cfg(feature="openssl")] { - /// The default connector used for clients, based on the crate's enabled features - pub type DefaultConnector = - hyper_openssl::HttpsConnector; - - impl ClientBuilder { - /// Create a new client builder using the default HTTPS connector based on the crate's - /// enabled features - #[cfg_attr(docsrs, doc(cfg(any(feature="rustls", feature="openssl"))))] - pub async fn new(config: ClientBuilderConfig) -> Result { - let connector = hyper_openssl::HttpsConnector::new() - .map_err(|e| CreateBuilderError::Connector(e.into()))?; - - Self::with_connector(config, connector).await - } - } - } - else if #[cfg(feature="rustls")] { - /// The default connector used for clients, based on the crate's enabled features - pub type DefaultConnector = - hyper_rustls::HttpsConnector; - - impl ClientBuilder { - /// Create a new client builder using the default HTTPS connector based on the crate's - /// enabled features - #[cfg_attr(docsrs, doc(cfg(any(feature="rustls", feature="openssl"))))] - pub async fn new(config: ClientBuilderConfig) -> Result { - let connector = hyper_rustls::HttpsConnector::with_native_roots(); - - Self::with_connector(config, connector).await - } - } - } - else { - // If no connector features are enabled, the default connector can be any type. The type - // may show up in errors if a user forgets to specify the generic, however, so it's useful - // to have the type's name document the user's issue +type Client = hyper::client::Client>; - #[doc(hidden)] - pub struct NoConnectorFeaturesEnabled; +pub(crate) fn https_connector() -> hyper_rustls::HttpsConnector { + #[allow(unused_mut)] + let mut roots = rustls::RootCertStore::empty(); - /// The default connector used for clients, based on the crate's enabled features - pub type DefaultConnector = NoConnectorFeaturesEnabled; - } + #[cfg(feature = "rustls-native-certs")] + roots.add_parsable_certificates( + &rustls_native_certs::load_native_certs().expect("could not load native certs"), + ); + + #[cfg(feature = "webpki-roots")] + roots.add_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.iter().map(|ta| { + rustls::OwnedTrustAnchor::from_subject_spki_name_constraints( + ta.subject, + ta.spki, + ta.name_constraints, + ) + })); + + let tls_config = rustls::client::ClientConfig::builder() + .with_safe_defaults() + .with_root_certificates(roots) + .with_no_client_auth(); + + hyper_rustls::HttpsConnectorBuilder::new() + .with_tls_config(tls_config) + .https_or_http() + .enable_all_versions() + .build() } /// A builder used to create all the clients for interacting with GCP services. /// /// Note that the builder is not consumed when creating clients, and many clients can be built /// using the same builder. This may allow some resource re-use across the clients -pub struct ClientBuilder { - // not all features use all the fields. Suppress the unused warning for simplicity - #[allow(unused)] - pub(crate) connector: Connector, - #[allow(unused)] - pub(crate) auth: Option>, +pub struct ClientBuilder { #[allow(unused)] - pub(crate) client: Client, + pub(crate) auth: Option, } -impl ClientBuilder { - /// Create a new client builder using the given connector - pub async fn with_connector( +impl ClientBuilder { + /// Create a new client builder using default HTTPS settings + #[cfg(any(feature = "rustls-native-certs", feature = "webpki-roots"))] + pub async fn new(config: ClientBuilderConfig) -> Result { + Self::with_auth_connector(config, https_connector).await + } + + /// Create a new client builder using the given connector for authentication requests + pub async fn with_auth_connector( config: ClientBuilderConfig, - connector: C, - ) -> Result - where - C: hyper::service::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, - { + connector_fn: impl FnOnce() -> hyper_rustls::HttpsConnector, + ) -> Result { use AuthFlow::{NoAuth, ServiceAccount, ServiceAccountImpersonation, UserAccount}; - - let client = hyper::client::Client::builder().build(connector.clone()); + let make_client = move || hyper::client::Client::builder().build(connector_fn()); let auth = match config.auth_flow { NoAuth => None, @@ -210,67 +169,28 @@ impl ClientBuilder { ), ServiceAccountAuth::ApplicationDefault => None, }, - client.clone(), + make_client(), ) .await?, ), ServiceAccountImpersonation { user, email } => Some( - create_service_impersonation_auth(user.into_os_string(), email, client.clone()) + create_service_impersonation_auth(user.into_os_string(), email, make_client()) .await?, ), UserAccount(path) => { - Some(create_user_auth(path.into_os_string(), client.clone()).await?) + Some(create_user_auth(path.into_os_string(), make_client()).await?) } }; - Ok(Self { - connector, - client, - auth, - }) - } - - /// Create a new client builder with the given connector and auth builder. - pub async fn with_connector_and_auth_builder( - connector: C, - auth_builder: impl FnOnce(Client) -> F, - ) -> Result - where - C: crate::Connect + Clone + Send + Sync + 'static, - F: futures::Future>>, - { - let client = hyper::client::Client::builder().build(connector.clone()); - - let auth = Some( - auth_builder(client.clone()) - .await - .map_err(CreateBuilderError::Authenticator)?, - ); - - Ok(Self { - connector, - client, - auth, - }) + Ok(Self { auth }) } } /// Convenience method to create an Authorization for the oauth ServiceFlow. -async fn create_service_auth( +async fn create_service_auth( service_account_key_path: Option>, - client: Client, -) -> Result, CreateBuilderError> -where - C: hyper::service::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, -{ + client: Client, +) -> Result { match service_account_key_path { Some(service_account_key_path) => { let service_account_key = @@ -310,21 +230,10 @@ where } } -async fn create_user_auth( +async fn create_user_auth( user_secrets_path: impl AsRef, - client: Client, -) -> Result, CreateBuilderError> -where - C: hyper::service::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, -{ + client: Client, +) -> Result { let user_secret = yup_oauth2::read_authorized_user_secret(user_secrets_path.as_ref()) .await .map_err(|e| { @@ -337,22 +246,11 @@ where .map_err(CreateBuilderError::Authenticator) } -async fn create_service_impersonation_auth( +async fn create_service_impersonation_auth( user_secrets_path: impl AsRef, email: String, - client: Client, -) -> Result, CreateBuilderError> -where - C: hyper::service::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, -{ + client: Client, +) -> Result { let user_secret = yup_oauth2::read_authorized_user_secret(user_secrets_path.as_ref()) .await .map_err(|e| { diff --git a/src/generated/google.api.rs b/src/generated/google.api.rs index 42caf16..84e317c 100644 --- a/src/generated/google.api.rs +++ b/src/generated/google.api.rs @@ -1,6 +1,7 @@ /// Defines the HTTP configuration for an API service. It contains a list of -/// \[HttpRule][google.api.HttpRule\], each specifying the mapping of an RPC method +/// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method /// to one or more HTTP REST API methods. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Http { @@ -26,7 +27,7 @@ pub struct Http { /// APIs](), /// [Cloud Endpoints](), [gRPC /// Gateway](), -/// and \[Envoy\]() proxy support this feature +/// and [Envoy]() proxy support this feature /// and use it for large scale production services. /// /// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies @@ -187,26 +188,26 @@ pub struct Http { /// 1. Leaf request fields (recursive expansion nested messages in the request /// message) are classified into three categories: /// - Fields referred by the path template. They are passed via the URL path. -/// - Fields referred by the \[HttpRule.body][google.api.HttpRule.body\]. They +/// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They /// are passed via the HTTP /// request body. /// - All other fields are passed via the URL query parameters, and the /// parameter name is the field path in the request message. A repeated /// field can be represented as multiple query parameters under the same /// name. -/// 2. If \[HttpRule.body][google.api.HttpRule.body\] is "*", there is no URL +/// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL /// query parameter, all fields /// are passed via URL path and HTTP request body. -/// 3. If \[HttpRule.body][google.api.HttpRule.body\] is omitted, there is no HTTP +/// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP /// request body, all /// fields are passed via URL path and URL query parameters. /// /// ### Path template syntax /// -/// Template = "/" Segments [ Verb ] ; +/// Template = "/" Segments \[ Verb \] ; /// Segments = Segment { "/" Segment } ; /// Segment = "*" | "**" | LITERAL | Variable ; -/// Variable = "{" FieldPath [ "=" Segments ] "}" ; +/// Variable = "{" FieldPath \[ "=" Segments \] "}" ; /// FieldPath = IDENT { "." IDENT } ; /// Verb = ":" LITERAL ; /// @@ -290,12 +291,13 @@ pub struct Http { /// If an API needs to use a JSON array for request or response body, it can map /// the request or response body to a repeated field. However, some gRPC /// Transcoding implementations may not support this feature. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HttpRule { /// Selects a method to which this rule applies. /// - /// Refer to \[selector][google.api.DocumentationRule.selector\] for syntax + /// Refer to [selector][google.api.DocumentationRule.selector] for syntax /// details. #[prost(string, tag = "1")] pub selector: ::prost::alloc::string::String, @@ -331,6 +333,7 @@ pub mod http_rule { /// Determines the URL pattern is matched by this rules. This pattern can be /// used with any of the {get|put|post|delete|patch} methods. A custom method /// can be defined using the 'custom' field. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Pattern { @@ -359,6 +362,7 @@ pub mod http_rule { } } /// A custom pattern is used for defining custom HTTP verb. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CustomHttpPattern { @@ -371,6 +375,7 @@ pub struct CustomHttpPattern { } /// The launch stage as defined by [Google Cloud Platform /// Launch Stages](). +#[non_exhaustive] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum LaunchStage { @@ -445,6 +450,7 @@ impl LaunchStage { } } /// Required information for every language. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommonLanguageSettings { @@ -458,6 +464,7 @@ pub struct CommonLanguageSettings { pub destinations: ::prost::alloc::vec::Vec, } /// Details about how and where to publish client libraries. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClientLibrarySettings { @@ -501,6 +508,7 @@ pub struct ClientLibrarySettings { /// This message configures the settings for publishing [Google Cloud Client /// libraries]() /// generated from the service config. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Publishing { @@ -508,7 +516,7 @@ pub struct Publishing { /// long-running operation pattern. #[prost(message, repeated, tag = "2")] pub method_settings: ::prost::alloc::vec::Vec, - /// Link to a place that API users can report issues. Example: + /// Link to a *public* URI where users can report issues. Example: /// #[prost(string, tag = "101")] pub new_issue_uri: ::prost::alloc::string::String, @@ -546,6 +554,7 @@ pub struct Publishing { pub proto_reference_documentation_uri: ::prost::alloc::string::String, } /// Settings for Java client libraries. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct JavaSettings { @@ -586,6 +595,7 @@ pub struct JavaSettings { pub common: ::core::option::Option, } /// Settings for C++ client libraries. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CppSettings { @@ -594,6 +604,7 @@ pub struct CppSettings { pub common: ::core::option::Option, } /// Settings for Php client libraries. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PhpSettings { @@ -602,6 +613,7 @@ pub struct PhpSettings { pub common: ::core::option::Option, } /// Settings for Python client libraries. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PythonSettings { @@ -610,6 +622,7 @@ pub struct PythonSettings { pub common: ::core::option::Option, } /// Settings for Node client libraries. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct NodeSettings { @@ -618,6 +631,7 @@ pub struct NodeSettings { pub common: ::core::option::Option, } /// Settings for Dotnet client libraries. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DotnetSettings { @@ -664,6 +678,7 @@ pub struct DotnetSettings { pub handwritten_signatures: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// Settings for Ruby client libraries. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RubySettings { @@ -672,6 +687,7 @@ pub struct RubySettings { pub common: ::core::option::Option, } /// Settings for Go client libraries. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GoSettings { @@ -680,6 +696,7 @@ pub struct GoSettings { pub common: ::core::option::Option, } /// Describes the generator configuration for a method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MethodSettings { @@ -713,7 +730,8 @@ pub mod method_settings { /// long-running operation pattern. /// All default values below are from those used in the client library /// generators (e.g. - /// \[Java\]()). + /// [Java]()). + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LongRunning { @@ -738,6 +756,7 @@ pub mod method_settings { } /// The organization for which the client libraries are being published. /// Affects the url where generated docs are published, etc. +#[non_exhaustive] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ClientLibraryOrganization { @@ -751,6 +770,12 @@ pub enum ClientLibraryOrganization { Photos = 3, /// Street View Org. StreetView = 4, + /// Shopping Org. + Shopping = 5, + /// Geo Org. + Geo = 6, + /// Generative AI - + GenerativeAi = 7, } impl ClientLibraryOrganization { /// String value of the enum field names used in the ProtoBuf definition. @@ -766,6 +791,9 @@ impl ClientLibraryOrganization { ClientLibraryOrganization::Ads => "ADS", ClientLibraryOrganization::Photos => "PHOTOS", ClientLibraryOrganization::StreetView => "STREET_VIEW", + ClientLibraryOrganization::Shopping => "SHOPPING", + ClientLibraryOrganization::Geo => "GEO", + ClientLibraryOrganization::GenerativeAi => "GENERATIVE_AI", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -776,11 +804,15 @@ impl ClientLibraryOrganization { "ADS" => Some(Self::Ads), "PHOTOS" => Some(Self::Photos), "STREET_VIEW" => Some(Self::StreetView), + "SHOPPING" => Some(Self::Shopping), + "GEO" => Some(Self::Geo), + "GENERATIVE_AI" => Some(Self::GenerativeAi), _ => None, } } } /// To where should client libraries be published? +#[non_exhaustive] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ClientLibraryDestination { @@ -823,6 +855,7 @@ impl ClientLibraryDestination { /// denotes the behavior and may affect how API tooling handles the field. /// /// Note: This enum **may** receive new values in the future. +#[non_exhaustive] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum FieldBehavior { @@ -859,6 +892,19 @@ pub enum FieldBehavior { /// a non-empty value will be returned. The user will not be aware of what /// non-empty value to expect. NonEmptyDefault = 7, + /// Denotes that the field in a resource (a message annotated with + /// google.api.resource) is used in the resource name to uniquely identify the + /// resource. For AIP-compliant APIs, this should only be applied to the + /// `name` field on the resource. + /// + /// This behavior should not be applied to references to other resources within + /// the message. + /// + /// The identifier field of resources often have different field behavior + /// depending on the request it is embedded in (e.g. for Create methods name + /// is optional and unused, while for Update methods it is required). Instead + /// of method-specific annotations, only `IDENTIFIER` is required. + Identifier = 8, } impl FieldBehavior { /// String value of the enum field names used in the ProtoBuf definition. @@ -875,6 +921,7 @@ impl FieldBehavior { FieldBehavior::Immutable => "IMMUTABLE", FieldBehavior::UnorderedList => "UNORDERED_LIST", FieldBehavior::NonEmptyDefault => "NON_EMPTY_DEFAULT", + FieldBehavior::Identifier => "IDENTIFIER", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -888,6 +935,7 @@ impl FieldBehavior { "IMMUTABLE" => Some(Self::Immutable), "UNORDERED_LIST" => Some(Self::UnorderedList), "NON_EMPTY_DEFAULT" => Some(Self::NonEmptyDefault), + "IDENTIFIER" => Some(Self::Identifier), _ => None, } } @@ -939,6 +987,7 @@ impl FieldBehavior { /// pattern: "folders/{folder}/logs/{log}" /// pattern: "organizations/{organization}/logs/{log}" /// pattern: "billingAccounts/{billing_account}/logs/{log}" +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResourceDescriptor { @@ -949,7 +998,7 @@ pub struct ResourceDescriptor { /// Example: `storage.googleapis.com/Bucket` /// /// The value of the resource_type_kind must follow the regular expression - /// /\[A-Za-z][a-zA-Z0-9\]+/. It should start with an upper case character and + /// /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and /// should use PascalCase (UpperCamelCase). The maximum number of /// characters allowed for the `resource_type_kind` is 100. #[prost(string, tag = "1")] @@ -1021,6 +1070,7 @@ pub struct ResourceDescriptor { pub mod resource_descriptor { /// A description of the historical or future-looking state of the /// resource pattern. + #[non_exhaustive] #[derive( Clone, Copy, @@ -1067,6 +1117,7 @@ pub mod resource_descriptor { } } /// A flag representing a specific style that a resource claims to conform to. + #[non_exhaustive] #[derive( Clone, Copy, @@ -1115,6 +1166,7 @@ pub mod resource_descriptor { } /// Defines a proto annotation that describes a string field that refers to /// an API resource. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResourceReference { @@ -1513,6 +1565,7 @@ pub struct ResourceReference { /// /// x-goog-request-params: /// table_location=instances/instance_bar&routing_id=prof_qux +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoutingRule { @@ -1526,6 +1579,7 @@ pub struct RoutingRule { pub routing_parameters: ::prost::alloc::vec::Vec, } /// A projection from an input message to the GRPC or REST header. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoutingParameter { diff --git a/src/generated/google.bigtable.admin.v2.rs b/src/generated/google.bigtable.admin.v2.rs index 494d090..6c0a186 100644 --- a/src/generated/google.bigtable.admin.v2.rs +++ b/src/generated/google.bigtable.admin.v2.rs @@ -1,5 +1,6 @@ /// Encapsulates progress related information for a Cloud Bigtable long /// running operation. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OperationProgress { @@ -16,6 +17,7 @@ pub struct OperationProgress { pub end_time: ::core::option::Option<::prost_types::Timestamp>, } /// Storage media types for persisting Bigtable data. +#[non_exhaustive] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum StorageType { @@ -49,6 +51,7 @@ impl StorageType { } } /// Information about a table restore. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RestoreInfo { @@ -62,6 +65,7 @@ pub struct RestoreInfo { /// Nested message and enum types in `RestoreInfo`. pub mod restore_info { /// Information about the source used to restore the table. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum SourceInfo { @@ -71,13 +75,27 @@ pub mod restore_info { BackupInfo(super::BackupInfo), } } +/// Change stream configuration. +#[non_exhaustive] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ChangeStreamConfig { + /// How long the change stream should be retained. Change stream data older + /// than the retention period will not be returned when reading the change + /// stream from the table. + /// Values must be at least 1 day and at most 7 days, and will be truncated to + /// microsecond granularity. + #[prost(message, optional, tag = "1")] + pub retention_period: ::core::option::Option<::prost_types::Duration>, +} /// A collection of user data indexed by row, column, and timestamp. /// Each table is served using the resources of its parent cluster. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Table { /// The unique name of the table. Values are of the form - /// `projects/{project}/instances/{instance}/tables/\[_a-zA-Z0-9][-_.a-zA-Z0-9\]*`. + /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. /// Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, @@ -92,27 +110,34 @@ pub struct Table { table::ClusterState, >, /// The column families configured for this table, mapped by column family ID. - /// Views: `SCHEMA_VIEW`, `FULL` + /// Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL` #[prost(map = "string, message", tag = "3")] pub column_families: ::std::collections::HashMap< ::prost::alloc::string::String, ColumnFamily, >, - /// Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored in this - /// table. Timestamps not matching the granularity will be rejected. - /// If unspecified at creation time, the value will be set to `MILLIS`. - /// Views: `SCHEMA_VIEW`, `FULL`. + /// Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored + /// in this table. Timestamps not matching the granularity will be rejected. If + /// unspecified at creation time, the value will be set to `MILLIS`. Views: + /// `SCHEMA_VIEW`, `FULL`. #[prost(enumeration = "table::TimestampGranularity", tag = "4")] pub granularity: i32, - /// Output only. If this table was restored from another data source (e.g. a backup), this - /// field will be populated with information about the restore. + /// Output only. If this table was restored from another data source (e.g. a + /// backup), this field will be populated with information about the restore. #[prost(message, optional, tag = "6")] pub restore_info: ::core::option::Option, + /// If specified, enable the change stream on this table. + /// Otherwise, the change stream is disabled and the change stream is not + /// retained. + #[prost(message, optional, tag = "8")] + pub change_stream_config: ::core::option::Option, /// Set to true to make the table protected against data loss. i.e. deleting /// the following resources through Admin APIs are prohibited: - /// - The table. - /// - The column families in the table. - /// - The instance containing the table. + /// + /// * The table. + /// * The column families in the table. + /// * The instance containing the table. + /// /// Note one can still delete the data stored in the table through Data APIs. #[prost(bool, tag = "9")] pub deletion_protection: bool, @@ -120,6 +145,7 @@ pub struct Table { /// Nested message and enum types in `Table`. pub mod table { /// The state of a table's data in a particular cluster. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClusterState { @@ -137,6 +163,7 @@ pub mod table { /// Nested message and enum types in `ClusterState`. pub mod cluster_state { /// Table replication states. + #[non_exhaustive] #[derive( Clone, Copy, @@ -202,6 +229,7 @@ pub mod table { } /// Possible timestamp granularities to use when keeping multiple versions /// of data in a table. + #[non_exhaustive] #[derive( Clone, Copy, @@ -242,6 +270,7 @@ pub mod table { } } /// Defines a view over a table's fields. + #[non_exhaustive] #[derive( Clone, Copy, @@ -299,6 +328,7 @@ pub mod table { } } /// A set of columns within a table which share a common configuration. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ColumnFamily { @@ -312,6 +342,7 @@ pub struct ColumnFamily { pub gc_rule: ::core::option::Option, } /// Rule for determining which cells to delete during garbage collection. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GcRule { @@ -322,6 +353,7 @@ pub struct GcRule { /// Nested message and enum types in `GcRule`. pub mod gc_rule { /// A GcRule which deletes cells matching all of the given rules. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Intersection { @@ -330,6 +362,7 @@ pub mod gc_rule { pub rules: ::prost::alloc::vec::Vec, } /// A GcRule which deletes cells matching any of the given rules. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Union { @@ -338,6 +371,7 @@ pub mod gc_rule { pub rules: ::prost::alloc::vec::Vec, } /// Garbage collection rules. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Rule { @@ -361,24 +395,27 @@ pub mod gc_rule { /// If this resource is protected with customer managed encryption, the in-use /// Cloud Key Management Service (Cloud KMS) key version is specified along with /// its status. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EncryptionInfo { /// Output only. The type of encryption used to protect this resource. #[prost(enumeration = "encryption_info::EncryptionType", tag = "3")] pub encryption_type: i32, - /// Output only. The status of encrypt/decrypt calls on underlying data for this resource. - /// Regardless of status, the existing data is always encrypted at rest. + /// Output only. The status of encrypt/decrypt calls on underlying data for + /// this resource. Regardless of status, the existing data is always encrypted + /// at rest. #[prost(message, optional, tag = "4")] pub encryption_status: ::core::option::Option, - /// Output only. The version of the Cloud KMS key specified in the parent cluster that is - /// in use for the data underlying this table. + /// Output only. The version of the Cloud KMS key specified in the parent + /// cluster that is in use for the data underlying this table. #[prost(string, tag = "2")] pub kms_key_version: ::prost::alloc::string::String, } /// Nested message and enum types in `EncryptionInfo`. pub mod encryption_info { /// Possible encryption types for a resource. + #[non_exhaustive] #[derive( Clone, Copy, @@ -439,10 +476,11 @@ pub mod encryption_info { /// feature is not currently available to most Cloud Bigtable customers. This /// feature might be changed in backward-incompatible ways and is not recommended /// for production use. It is not subject to any SLA or deprecation policy. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Snapshot { - /// Output only. The unique name of the snapshot. + /// The unique name of the snapshot. /// Values are of the form /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. #[prost(string, tag = "1")] @@ -459,21 +497,22 @@ pub struct Snapshot { /// Output only. The time when the snapshot is created. #[prost(message, optional, tag = "4")] pub create_time: ::core::option::Option<::prost_types::Timestamp>, - /// Output only. The time when the snapshot will be deleted. The maximum amount - /// of time a snapshot can stay active is 365 days. If 'ttl' is not specified, + /// The time when the snapshot will be deleted. The maximum amount of time a + /// snapshot can stay active is 365 days. If 'ttl' is not specified, /// the default maximum of 365 days will be used. #[prost(message, optional, tag = "5")] pub delete_time: ::core::option::Option<::prost_types::Timestamp>, /// Output only. The current state of the snapshot. #[prost(enumeration = "snapshot::State", tag = "6")] pub state: i32, - /// Output only. Description of the snapshot. + /// Description of the snapshot. #[prost(string, tag = "7")] pub description: ::prost::alloc::string::String, } /// Nested message and enum types in `Snapshot`. pub mod snapshot { /// Possible states of a snapshot. + #[non_exhaustive] #[derive( Clone, Copy, @@ -520,13 +559,14 @@ pub mod snapshot { } } /// A backup of a Cloud Bigtable table. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Backup { /// A globally unique identifier for the backup which cannot be /// changed. Values are of the form /// `projects/{project}/instances/{instance}/clusters/{cluster}/ - /// backups/\[_a-zA-Z0-9][-_.a-zA-Z0-9\]*` + /// backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` /// The final segment of the name must be between 1 and 50 characters /// in length. /// @@ -535,13 +575,18 @@ pub struct Backup { /// `projects/{project}/instances/{instance}/clusters/{cluster}`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, - /// Required. Immutable. Name of the table from which this backup was created. This needs - /// to be in the same instance as the backup. Values are of the form + /// Required. Immutable. Name of the table from which this backup was created. + /// This needs to be in the same instance as the backup. Values are of the form /// `projects/{project}/instances/{instance}/tables/{source_table}`. #[prost(string, tag = "2")] pub source_table: ::prost::alloc::string::String, + /// Output only. Name of the backup from which this backup was copied. If a + /// backup is not created by copying a backup, this field will be empty. Values + /// are of the form: projects//instances//backups/. + #[prost(string, tag = "10")] + pub source_backup: ::prost::alloc::string::String, /// Required. The expiration time of the backup, with microseconds - /// granularity that must be at least 6 hours and at most 30 days + /// granularity that must be at least 6 hours and at most 90 days /// from the time the request is received. Once the `expire_time` /// has passed, Cloud Bigtable will delete the backup and free the /// resources used by the backup. @@ -549,8 +594,9 @@ pub struct Backup { pub expire_time: ::core::option::Option<::prost_types::Timestamp>, /// Output only. `start_time` is the time that the backup was started /// (i.e. approximately the time the - /// \[CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup\] request is received). The - /// row data in this backup will be no older than this timestamp. + /// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] + /// request is received). The row data in this backup will be no older than + /// this timestamp. #[prost(message, optional, tag = "4")] pub start_time: ::core::option::Option<::prost_types::Timestamp>, /// Output only. `end_time` is the time that the backup was finished. The row @@ -570,6 +616,7 @@ pub struct Backup { /// Nested message and enum types in `Backup`. pub mod backup { /// Indicates the current state of the backup. + #[non_exhaustive] #[derive( Clone, Copy, @@ -615,6 +662,7 @@ pub mod backup { } } /// Information about a backup. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BackupInfo { @@ -632,8 +680,14 @@ pub struct BackupInfo { /// Output only. Name of the table the backup was created from. #[prost(string, tag = "4")] pub source_table: ::prost::alloc::string::String, + /// Output only. Name of the backup from which this backup was copied. If a + /// backup is not created by copying a backup, this field will be empty. Values + /// are of the form: projects//instances//backups/. + #[prost(string, tag = "10")] + pub source_backup: ::prost::alloc::string::String, } /// Indicates the type of the restore source. +#[non_exhaustive] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum RestoreSourceType { @@ -663,13 +717,13 @@ impl RestoreSourceType { } } /// The request for -/// \[RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable\]. +/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RestoreTableRequest { /// Required. The name of the instance in which to create the restored - /// table. This instance must be in the same project as the source backup. - /// Values are of the form `projects//instances/`. + /// table. Values are of the form `projects//instances/`. #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, /// Required. The id of the table to create and restore to. This @@ -685,6 +739,7 @@ pub struct RestoreTableRequest { /// Nested message and enum types in `RestoreTableRequest`. pub mod restore_table_request { /// Required. The source from which to restore. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Source { @@ -695,7 +750,8 @@ pub mod restore_table_request { } } /// Metadata type for the long-running operation returned by -/// \[RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable\]. +/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RestoreTableMetadata { @@ -708,27 +764,31 @@ pub struct RestoreTableMetadata { /// If exists, the name of the long-running operation that will be used to /// track the post-restore optimization process to optimize the performance of /// the restored table. The metadata type of the long-running operation is - /// \[OptimizeRestoreTableMetadata][\]. The response type is - /// \[Empty][google.protobuf.Empty\]. This long-running operation may be + /// [OptimizeRestoreTableMetadata][]. The response type is + /// [Empty][google.protobuf.Empty]. This long-running operation may be /// automatically created by the system if applicable after the /// RestoreTable long-running operation completes successfully. This operation /// may not be created if the table is already optimized or the restore was /// not successful. #[prost(string, tag = "4")] pub optimize_table_operation_name: ::prost::alloc::string::String, - /// The progress of the \[RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable\] + /// The progress of the + /// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] /// operation. #[prost(message, optional, tag = "5")] pub progress: ::core::option::Option, /// Information about the source used to restore the table, as specified by - /// `source` in \[RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest\]. + /// `source` in + /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest]. #[prost(oneof = "restore_table_metadata::SourceInfo", tags = "3")] pub source_info: ::core::option::Option, } /// Nested message and enum types in `RestoreTableMetadata`. pub mod restore_table_metadata { /// Information about the source used to restore the table, as specified by - /// `source` in \[RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest\]. + /// `source` in + /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest]. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum SourceInfo { @@ -740,6 +800,7 @@ pub mod restore_table_metadata { /// of optimizations performed on a newly restored table. This long-running /// operation is automatically created by the system after the successful /// completion of a table restore, and cannot be cancelled. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OptimizeRestoredTableMetadata { @@ -751,7 +812,8 @@ pub struct OptimizeRestoredTableMetadata { pub progress: ::core::option::Option, } /// Request message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable] +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateTableRequest { @@ -759,8 +821,8 @@ pub struct CreateTableRequest { /// Values are of the form `projects/{project}/instances/{instance}`. #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, - /// Required. The name by which the new table should be referred to within the parent - /// instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + /// Required. The name by which the new table should be referred to within the + /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. /// Maximum 50 characters. #[prost(string, tag = "2")] pub table_id: ::prost::alloc::string::String, @@ -776,7 +838,7 @@ pub struct CreateTableRequest { /// /// * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` /// `"other", "zz"]` - /// * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` + /// * initial_split_keys := `\["apple", "customer_1", "customer_2", "other"\]` /// * Key assignment: /// - Tablet 1 `[, apple) => {"a"}.` /// - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` @@ -789,6 +851,7 @@ pub struct CreateTableRequest { /// Nested message and enum types in `CreateTableRequest`. pub mod create_table_request { /// An initial split point for a newly created table. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Split { @@ -798,12 +861,13 @@ pub mod create_table_request { } } /// Request message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot] /// /// Note: This is a private alpha release of Cloud Bigtable snapshots. This /// feature is not currently available to most Cloud Bigtable customers. This /// feature might be changed in backward-incompatible ways and is not recommended /// for production use. It is not subject to any SLA or deprecation policy. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateTableFromSnapshotRequest { @@ -811,19 +875,20 @@ pub struct CreateTableFromSnapshotRequest { /// Values are of the form `projects/{project}/instances/{instance}`. #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, - /// Required. The name by which the new table should be referred to within the parent - /// instance, e.g., `foobar` rather than `{parent}/tables/foobar`. + /// Required. The name by which the new table should be referred to within the + /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. #[prost(string, tag = "2")] pub table_id: ::prost::alloc::string::String, - /// Required. The unique name of the snapshot from which to restore the table. The - /// snapshot and the table must be in the same instance. - /// Values are of the form + /// Required. The unique name of the snapshot from which to restore the table. + /// The snapshot and the table must be in the same instance. Values are of the + /// form /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. #[prost(string, tag = "3")] pub source_snapshot: ::prost::alloc::string::String, } /// Request message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange] +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DropRowRangeRequest { @@ -839,6 +904,7 @@ pub struct DropRowRangeRequest { /// Nested message and enum types in `DropRowRangeRequest`. pub mod drop_row_range_request { /// Delete all rows or by prefix. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Target { @@ -852,16 +918,17 @@ pub mod drop_row_range_request { } } /// Request message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables] +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListTablesRequest { - /// Required. The unique name of the instance for which tables should be listed. - /// Values are of the form `projects/{project}/instances/{instance}`. + /// Required. The unique name of the instance for which tables should be + /// listed. Values are of the form `projects/{project}/instances/{instance}`. #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, /// The view to be applied to the returned tables' fields. - /// Only NAME_ONLY view (default) and REPLICATION_VIEW are supported. + /// NAME_ONLY view (default) and REPLICATION_VIEW are supported. #[prost(enumeration = "table::View", tag = "2")] pub view: i32, /// Maximum number of results per page. @@ -880,7 +947,8 @@ pub struct ListTablesRequest { pub page_token: ::prost::alloc::string::String, } /// Response message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables] +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListTablesResponse { @@ -894,7 +962,8 @@ pub struct ListTablesResponse { pub next_page_token: ::prost::alloc::string::String, } /// Request message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable] +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTableRequest { @@ -909,7 +978,8 @@ pub struct GetTableRequest { pub view: i32, } /// The request for -/// \[UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable\]. +/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateTableRequest { @@ -918,18 +988,23 @@ pub struct UpdateTableRequest { #[prost(message, optional, tag = "1")] pub table: ::core::option::Option, /// Required. The list of fields to update. - /// A mask specifying which fields (e.g. `deletion_protection`) in the `table` + /// A mask specifying which fields (e.g. `change_stream_config`) in the `table` /// field should be updated. This mask is relative to the `table` field, not to /// the request message. The wildcard (*) path is currently not supported. - /// Currently UpdateTable is only supported for the following field: - /// * `deletion_protection` + /// Currently UpdateTable is only supported for the following fields: + /// + /// * `change_stream_config` + /// * `change_stream_config.retention_period` + /// * `deletion_protection` + /// /// If `column_families` is set in `update_mask`, it will return an /// UNIMPLEMENTED error. #[prost(message, optional, tag = "2")] pub update_mask: ::core::option::Option<::prost_types::FieldMask>, } /// Metadata type for the operation returned by -/// \[UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable\]. +/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateTableMetadata { @@ -944,7 +1019,8 @@ pub struct UpdateTableMetadata { pub end_time: ::core::option::Option<::prost_types::Timestamp>, } /// Request message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable] +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteTableRequest { @@ -955,7 +1031,8 @@ pub struct DeleteTableRequest { pub name: ::prost::alloc::string::String, } /// Request message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable] +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UndeleteTableRequest { @@ -966,7 +1043,8 @@ pub struct UndeleteTableRequest { pub name: ::prost::alloc::string::String, } /// Metadata type for the operation returned by -/// \[google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable\]. +/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UndeleteTableMetadata { @@ -981,7 +1059,8 @@ pub struct UndeleteTableMetadata { pub end_time: ::core::option::Option<::prost_types::Timestamp>, } /// Request message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies] +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModifyColumnFamiliesRequest { @@ -990,10 +1069,10 @@ pub struct ModifyColumnFamiliesRequest { /// `projects/{project}/instances/{instance}/tables/{table}`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, - /// Required. Modifications to be atomically applied to the specified table's families. - /// Entries are applied in order, meaning that earlier modifications can be - /// masked by later ones (in the case of repeated updates to the same family, - /// for example). + /// Required. Modifications to be atomically applied to the specified table's + /// families. Entries are applied in order, meaning that earlier modifications + /// can be masked by later ones (in the case of repeated updates to the same + /// family, for example). #[prost(message, repeated, tag = "2")] pub modifications: ::prost::alloc::vec::Vec< modify_column_families_request::Modification, @@ -1002,6 +1081,7 @@ pub struct ModifyColumnFamiliesRequest { /// Nested message and enum types in `ModifyColumnFamiliesRequest`. pub mod modify_column_families_request { /// A create, update, or delete of a particular column family. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Modification { @@ -1015,6 +1095,7 @@ pub mod modify_column_families_request { /// Nested message and enum types in `Modification`. pub mod modification { /// Column family modifications. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Mod { @@ -1034,18 +1115,20 @@ pub mod modify_column_families_request { } } /// Request message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken] +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenerateConsistencyTokenRequest { - /// Required. The unique name of the Table for which to create a consistency token. - /// Values are of the form + /// Required. The unique name of the Table for which to create a consistency + /// token. Values are of the form /// `projects/{project}/instances/{instance}/tables/{table}`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } /// Response message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken] +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenerateConsistencyTokenResponse { @@ -1054,12 +1137,13 @@ pub struct GenerateConsistencyTokenResponse { pub consistency_token: ::prost::alloc::string::String, } /// Request message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency] +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CheckConsistencyRequest { - /// Required. The unique name of the Table for which to check replication consistency. - /// Values are of the form + /// Required. The unique name of the Table for which to check replication + /// consistency. Values are of the form /// `projects/{project}/instances/{instance}/tables/{table}`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, @@ -1068,7 +1152,8 @@ pub struct CheckConsistencyRequest { pub consistency_token: ::prost::alloc::string::String, } /// Response message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency] +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CheckConsistencyResponse { @@ -1078,12 +1163,13 @@ pub struct CheckConsistencyResponse { pub consistent: bool, } /// Request message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable] /// /// Note: This is a private alpha release of Cloud Bigtable snapshots. This /// feature is not currently available to most Cloud Bigtable customers. This /// feature might be changed in backward-incompatible ways and is not recommended /// for production use. It is not subject to any SLA or deprecation policy. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotTableRequest { @@ -1097,9 +1183,9 @@ pub struct SnapshotTableRequest { /// `projects/{project}/instances/{instance}/clusters/{cluster}`. #[prost(string, tag = "2")] pub cluster: ::prost::alloc::string::String, - /// Required. The ID by which the new snapshot should be referred to within the parent - /// cluster, e.g., `mysnapshot` of the form: `\[_a-zA-Z0-9][-_.a-zA-Z0-9\]*` - /// rather than + /// Required. The ID by which the new snapshot should be referred to within the + /// parent cluster, e.g., `mysnapshot` of the form: + /// `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. #[prost(string, tag = "3")] pub snapshot_id: ::prost::alloc::string::String, @@ -1114,12 +1200,13 @@ pub struct SnapshotTableRequest { pub description: ::prost::alloc::string::String, } /// Request message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot] /// /// Note: This is a private alpha release of Cloud Bigtable snapshots. This /// feature is not currently available to most Cloud Bigtable customers. This /// feature might be changed in backward-incompatible ways and is not recommended /// for production use. It is not subject to any SLA or deprecation policy. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSnapshotRequest { @@ -1130,17 +1217,18 @@ pub struct GetSnapshotRequest { pub name: ::prost::alloc::string::String, } /// Request message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots] /// /// Note: This is a private alpha release of Cloud Bigtable snapshots. This /// feature is not currently available to most Cloud Bigtable customers. This /// feature might be changed in backward-incompatible ways and is not recommended /// for production use. It is not subject to any SLA or deprecation policy. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSnapshotsRequest { - /// Required. The unique name of the cluster for which snapshots should be listed. - /// Values are of the form + /// Required. The unique name of the cluster for which snapshots should be + /// listed. Values are of the form /// `projects/{project}/instances/{instance}/clusters/{cluster}`. /// Use `{cluster} = '-'` to list snapshots for all clusters in an instance, /// e.g., `projects/{project}/instances/{instance}/clusters/-`. @@ -1155,12 +1243,13 @@ pub struct ListSnapshotsRequest { pub page_token: ::prost::alloc::string::String, } /// Response message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots] /// /// Note: This is a private alpha release of Cloud Bigtable snapshots. This /// feature is not currently available to most Cloud Bigtable customers. This /// feature might be changed in backward-incompatible ways and is not recommended /// for production use. It is not subject to any SLA or deprecation policy. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSnapshotsResponse { @@ -1174,12 +1263,13 @@ pub struct ListSnapshotsResponse { pub next_page_token: ::prost::alloc::string::String, } /// Request message for -/// \[google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot\] +/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot] /// /// Note: This is a private alpha release of Cloud Bigtable snapshots. This /// feature is not currently available to most Cloud Bigtable customers. This /// feature might be changed in backward-incompatible ways and is not recommended /// for production use. It is not subject to any SLA or deprecation policy. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSnapshotRequest { @@ -1195,6 +1285,7 @@ pub struct DeleteSnapshotRequest { /// feature is not currently available to most Cloud Bigtable customers. This /// feature might be changed in backward-incompatible ways and is not recommended /// for production use. It is not subject to any SLA or deprecation policy. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotTableMetadata { @@ -1214,6 +1305,7 @@ pub struct SnapshotTableMetadata { /// feature is not currently available to most Cloud Bigtable customers. This /// feature might be changed in backward-incompatible ways and is not recommended /// for production use. It is not subject to any SLA or deprecation policy. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateTableFromSnapshotMetadata { @@ -1228,7 +1320,9 @@ pub struct CreateTableFromSnapshotMetadata { #[prost(message, optional, tag = "3")] pub finish_time: ::core::option::Option<::prost_types::Timestamp>, } -/// The request for \[CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup\]. +/// The request for +/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateBackupRequest { @@ -1242,7 +1336,7 @@ pub struct CreateBackupRequest { /// the full backup name, of the form: /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. /// This string must be between 1 and 50 characters in length and match the - /// regex \[_a-zA-Z0-9][-_.a-zA-Z0-9\]*. + /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. #[prost(string, tag = "2")] pub backup_id: ::prost::alloc::string::String, /// Required. The backup to create. @@ -1250,7 +1344,8 @@ pub struct CreateBackupRequest { pub backup: ::core::option::Option, } /// Metadata type for the operation returned by -/// \[CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup\]. +/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateBackupMetadata { @@ -1267,13 +1362,16 @@ pub struct CreateBackupMetadata { #[prost(message, optional, tag = "4")] pub end_time: ::core::option::Option<::prost_types::Timestamp>, } -/// The request for \[UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup\]. +/// The request for +/// [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateBackupRequest { /// Required. The backup to update. `backup.name`, and the fields to be updated /// as specified by `update_mask` are required. Other fields are ignored. /// Update is only supported for the following fields: + /// /// * `backup.expire_time`. #[prost(message, optional, tag = "1")] pub backup: ::core::option::Option, @@ -1285,7 +1383,9 @@ pub struct UpdateBackupRequest { #[prost(message, optional, tag = "2")] pub update_mask: ::core::option::Option<::prost_types::FieldMask>, } -/// The request for \[GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup\]. +/// The request for +/// [GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBackupRequest { @@ -1295,7 +1395,9 @@ pub struct GetBackupRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } -/// The request for \[DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup\]. +/// The request for +/// [DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteBackupRequest { @@ -1305,7 +1407,9 @@ pub struct DeleteBackupRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } -/// The request for \[ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups\]. +/// The request for +/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListBackupsRequest { @@ -1323,13 +1427,14 @@ pub struct ListBackupsRequest { /// roughly synonymous with equality. Filter rules are case insensitive. /// /// The fields eligible for filtering are: - /// * `name` - /// * `source_table` - /// * `state` - /// * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - /// * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - /// * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - /// * `size_bytes` + /// + /// * `name` + /// * `source_table` + /// * `state` + /// * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + /// * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + /// * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + /// * `size_bytes` /// /// To filter on multiple expressions, provide each separate expression within /// parentheses. By default, each expression is an AND expression. However, @@ -1337,30 +1442,32 @@ pub struct ListBackupsRequest { /// /// Some examples of using filters are: /// - /// * `name:"exact"` --> The backup's name is the string "exact". - /// * `name:howl` --> The backup's name contains the string "howl". - /// * `source_table:prod` - /// --> The source_table's name contains the string "prod". - /// * `state:CREATING` --> The backup is pending creation. - /// * `state:READY` --> The backup is fully created and ready for use. - /// * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` - /// --> The backup name contains the string "howl" and start_time - /// of the backup is before 2018-03-28T14:50:00Z. - /// * `size_bytes > 10000000000` --> The backup's size is greater than 10GB + /// * `name:"exact"` --> The backup's name is the string "exact". + /// * `name:howl` --> The backup's name contains the string "howl". + /// * `source_table:prod` + /// --> The source_table's name contains the string "prod". + /// * `state:CREATING` --> The backup is pending creation. + /// * `state:READY` --> The backup is fully created and ready for use. + /// * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` + /// --> The backup name contains the string "howl" and start_time + /// of the backup is before 2018-03-28T14:50:00Z. + /// * `size_bytes > 10000000000` --> The backup's size is greater than 10GB #[prost(string, tag = "2")] pub filter: ::prost::alloc::string::String, /// An expression for specifying the sort order of the results of the request. - /// The string value should specify one or more fields in \[Backup][google.bigtable.admin.v2.Backup\]. The full - /// syntax is described at + /// The string value should specify one or more fields in + /// [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at + /// /// /// Fields supported are: - /// * name - /// * source_table - /// * expire_time - /// * start_time - /// * end_time - /// * size_bytes - /// * state + /// + /// * name + /// * source_table + /// * expire_time + /// * start_time + /// * end_time + /// * size_bytes + /// * state /// /// For example, "start_time". The default sorting order is ascending. /// To specify descending order for the field, a suffix " desc" should @@ -1376,13 +1483,16 @@ pub struct ListBackupsRequest { #[prost(int32, tag = "4")] pub page_size: i32, /// If non-empty, `page_token` should contain a - /// \[next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token\] from a - /// previous \[ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse\] to the same `parent` and with the same - /// `filter`. + /// [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] + /// from a previous + /// [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the + /// same `parent` and with the same `filter`. #[prost(string, tag = "5")] pub page_token: ::prost::alloc::string::String, } -/// The response for \[ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups\]. +/// The response for +/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListBackupsResponse { @@ -1390,11 +1500,67 @@ pub struct ListBackupsResponse { #[prost(message, repeated, tag = "1")] pub backups: ::prost::alloc::vec::Vec, /// `next_page_token` can be sent in a subsequent - /// \[ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups\] call to fetch more - /// of the matching backups. + /// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call + /// to fetch more of the matching backups. #[prost(string, tag = "2")] pub next_page_token: ::prost::alloc::string::String, } +/// The request for +/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]. +#[non_exhaustive] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CopyBackupRequest { + /// Required. The name of the destination cluster that will contain the backup + /// copy. The cluster must already exists. Values are of the form: + /// `projects/{project}/instances/{instance}/clusters/{cluster}`. + #[prost(string, tag = "1")] + pub parent: ::prost::alloc::string::String, + /// Required. The id of the new backup. The `backup_id` along with `parent` + /// are combined as {parent}/backups/{backup_id} to create the full backup + /// name, of the form: + /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + /// This string must be between 1 and 50 characters in length and match the + /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. + #[prost(string, tag = "2")] + pub backup_id: ::prost::alloc::string::String, + /// Required. The source backup to be copied from. + /// The source backup needs to be in READY state for it to be copied. + /// Copying a copied backup is not allowed. + /// Once CopyBackup is in progress, the source backup cannot be deleted or + /// cleaned up on expiration until CopyBackup is finished. + /// Values are of the form: + /// `projects//instances//clusters//backups/`. + #[prost(string, tag = "3")] + pub source_backup: ::prost::alloc::string::String, + /// Required. Required. The expiration time of the copied backup with + /// microsecond granularity that must be at least 6 hours and at most 30 days + /// from the time the request is received. Once the `expire_time` has + /// passed, Cloud Bigtable will delete the backup and free the resources used + /// by the backup. + #[prost(message, optional, tag = "4")] + pub expire_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Metadata type for the google.longrunning.Operation returned by +/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]. +#[non_exhaustive] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CopyBackupMetadata { + /// The name of the backup being created through the copy operation. + /// Values are of the form + /// `projects//instances//clusters//backups/`. + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + /// Information about the source backup that is being copied from. + #[prost(message, optional, tag = "2")] + pub source_backup_info: ::core::option::Option, + /// The progress of the + /// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] + /// operation. + #[prost(message, optional, tag = "3")] + pub progress: ::core::option::Option, +} /// Generated client implementations. pub mod bigtable_table_admin_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] @@ -1979,8 +2145,8 @@ pub mod bigtable_table_admin_client { /// [metadata][google.longrunning.Operation.metadata] field type is /// [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The /// [response][google.longrunning.Operation.response] field type is - /// [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the returned operation will stop the - /// creation and delete the backup. + /// [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the + /// returned operation will stop the creation and delete the backup. pub async fn create_backup( &mut self, request: impl tonic::IntoRequest, @@ -2127,8 +2293,7 @@ pub mod bigtable_table_admin_client { ); self.inner.unary(req, path, codec).await } - /// Create a new table by restoring from a completed backup. The new table - /// must be in the same project as the instance containing the backup. The + /// Create a new table by restoring from a completed backup. The /// returned table [long-running operation][google.longrunning.Operation] can /// be used to track the progress of the operation, and to cancel it. The /// [metadata][google.longrunning.Operation.metadata] field type is @@ -2165,6 +2330,38 @@ pub mod bigtable_table_admin_client { ); self.inner.unary(req, path, codec).await } + /// Copy a Cloud Bigtable backup to a new backup in the destination cluster + /// located in the destination instance and project. + pub async fn copy_backup( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.bigtable.admin.v2.BigtableTableAdmin/CopyBackup", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "google.bigtable.admin.v2.BigtableTableAdmin", + "CopyBackup", + ), + ); + self.inner.unary(req, path, codec).await + } /// Gets the access control policy for a Table or Backup resource. /// Returns an empty policy if the resource exists but does not have a policy /// set. @@ -2234,7 +2431,8 @@ pub mod bigtable_table_admin_client { ); self.inner.unary(req, path, codec).await } - /// Returns permissions that the caller has on the specified Table or Backup resource. + /// Returns permissions that the caller has on the specified Table or Backup + /// resource. pub async fn test_iam_permissions( &mut self, request: impl tonic::IntoRequest< diff --git a/src/generated/google.bigtable.v2.rs b/src/generated/google.bigtable.v2.rs index e0e966a..c228efc 100644 --- a/src/generated/google.bigtable.v2.rs +++ b/src/generated/google.bigtable.v2.rs @@ -1,5 +1,6 @@ /// Specifies the complete (requested) contents of a single row of a table. /// Rows which exceed 256MiB in size cannot be read in full. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Row { @@ -15,6 +16,7 @@ pub struct Row { } /// Specifies (some of) the contents of a single row/column family intersection /// of a table. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Family { @@ -32,6 +34,7 @@ pub struct Family { } /// Specifies (some of) the contents of a single row/column intersection of a /// table. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Column { @@ -47,6 +50,7 @@ pub struct Column { pub cells: ::prost::alloc::vec::Vec, } /// Specifies (some of) the contents of a single row/column/timestamp of a table. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Cell { @@ -63,11 +67,12 @@ pub struct Cell { /// length. #[prost(bytes = "bytes", tag = "2")] pub value: ::prost::bytes::Bytes, - /// Labels applied to the cell by a \[RowFilter][google.bigtable.v2.RowFilter\]. + /// Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. #[prost(string, repeated, tag = "3")] pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// Specifies a contiguous range of rows. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RowRange { @@ -84,6 +89,7 @@ pub struct RowRange { pub mod row_range { /// The row key at which to start the range. /// If neither field is set, interpreted as the empty string, inclusive. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum StartKey { @@ -96,6 +102,7 @@ pub mod row_range { } /// The row key at which to end the range. /// If neither field is set, interpreted as the infinite row key, exclusive. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum EndKey { @@ -108,6 +115,7 @@ pub mod row_range { } } /// Specifies a non-contiguous set of rows. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RowSet { @@ -122,6 +130,7 @@ pub struct RowSet { /// The range spans from <column_family>:<start_qualifier> to /// <column_family>:<end_qualifier>, where both bounds can be either /// inclusive or exclusive. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ColumnRange { @@ -141,6 +150,7 @@ pub struct ColumnRange { pub mod column_range { /// The column qualifier at which to start the range (within `column_family`). /// If neither field is set, interpreted as the empty string, inclusive. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum StartQualifier { @@ -153,6 +163,7 @@ pub mod column_range { } /// The column qualifier at which to end the range (within `column_family`). /// If neither field is set, interpreted as the infinite string, exclusive. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum EndQualifier { @@ -165,6 +176,7 @@ pub mod column_range { } } /// Specified a contiguous range of microsecond timestamps. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TimestampRange { @@ -176,6 +188,7 @@ pub struct TimestampRange { pub end_timestamp_micros: i64, } /// Specifies a contiguous range of raw byte values. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValueRange { @@ -192,6 +205,7 @@ pub struct ValueRange { pub mod value_range { /// The value at which to start the range. /// If neither field is set, interpreted as the empty string, inclusive. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum StartValue { @@ -204,6 +218,7 @@ pub mod value_range { } /// The value at which to end the range. /// If neither field is set, interpreted as the infinite string, exclusive. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum EndValue { @@ -248,6 +263,7 @@ pub mod value_range { /// The total serialized size of a RowFilter message must not /// exceed 20480 bytes, and RowFilters may not be nested within each other /// (in Chains or Interleaves) to a depth of more than 20. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RowFilter { @@ -262,6 +278,7 @@ pub struct RowFilter { /// Nested message and enum types in `RowFilter`. pub mod row_filter { /// A RowFilter which sends rows through several RowFilters in sequence. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Chain { @@ -273,10 +290,37 @@ pub mod row_filter { } /// A RowFilter which sends each row to each of several component /// RowFilters and interleaves the results. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Interleave { + /// The elements of "filters" all process a copy of the input row, and the + /// results are pooled, sorted, and combined into a single output row. + /// If multiple cells are produced with the same column and timestamp, + /// they will all appear in the output row in an unspecified mutual order. + /// Consider the following example, with three filters: + /// + /// input row + /// | + /// ----------------------------------------------------- + /// | | | + /// f(0) f(1) f(2) + /// | | | + /// 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + /// 2: foo,blah,11,z far,blah,5,x far,blah,5,x + /// | | | + /// ----------------------------------------------------- + /// | + /// 1: foo,bar,10,z // could have switched with #2 + /// 2: foo,bar,10,x // could have switched with #1 + /// 3: foo,blah,11,z + /// 4: far,bar,7,a + /// 5: far,blah,5,x // identical to #6 + /// 6: far,blah,5,x // identical to #5 + /// + /// All interleaved filters are executed atomically. #[prost(message, repeated, tag = "1")] + #[cfg(not(doctest))] pub filters: ::prost::alloc::vec::Vec, } /// A RowFilter which evaluates one of two possible RowFilters, depending on @@ -286,6 +330,7 @@ pub mod row_filter { /// true and false filters, which may lead to inconsistent or unexpected /// results. Additionally, Condition filters have poor performance, especially /// when filters are set for the false condition. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Condition { @@ -311,6 +356,7 @@ pub mod row_filter { } /// Which of the possible RowFilter types to apply. If none are set, this /// RowFilter returns all cells in the input row. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Filter { @@ -420,6 +466,7 @@ pub mod row_filter { } } /// Specifies a particular change to be made to the contents of a row. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Mutation { @@ -430,6 +477,7 @@ pub struct Mutation { /// Nested message and enum types in `Mutation`. pub mod mutation { /// A Mutation which sets the value of the specified cell. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetCell { @@ -454,6 +502,7 @@ pub mod mutation { } /// A Mutation which deletes cells from the specified column, optionally /// restricting the deletions to a given timestamp range. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteFromColumn { @@ -470,6 +519,7 @@ pub mod mutation { pub time_range: ::core::option::Option, } /// A Mutation which deletes all cells from the specified column family. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteFromFamily { @@ -479,10 +529,12 @@ pub mod mutation { pub family_name: ::prost::alloc::string::String, } /// A Mutation which deletes all cells from the containing row. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteFromRow {} /// Which of the possible Mutation types to apply. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Mutation { @@ -502,6 +554,7 @@ pub mod mutation { } /// Specifies an atomic read/modify/write operation on the latest value of the /// specified column. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadModifyWriteRule { @@ -523,6 +576,7 @@ pub struct ReadModifyWriteRule { pub mod read_modify_write_rule { /// The rule used to determine the column's new latest value from its current /// latest value. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Rule { @@ -541,6 +595,7 @@ pub mod read_modify_write_rule { } /// NOTE: This API is intended to be used by Apache Beam BigtableIO. /// A partition of a change stream. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamPartition { @@ -552,6 +607,7 @@ pub struct StreamPartition { /// NOTE: This API is intended to be used by Apache Beam BigtableIO. /// The information required to continue reading the data from multiple /// `StreamPartitions` from where a previous read left off. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamContinuationTokens { @@ -562,6 +618,7 @@ pub struct StreamContinuationTokens { /// NOTE: This API is intended to be used by Apache Beam BigtableIO. /// The information required to continue reading the data from a /// `StreamPartition` from where a previous read left off. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamContinuationToken { @@ -575,6 +632,7 @@ pub struct StreamContinuationToken { /// ReadIterationStats captures information about the iteration of rows or cells /// over the course of a read, e.g. how many results were scanned in a read /// operation versus the results returned. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadIterationStats { @@ -596,6 +654,7 @@ pub struct ReadIterationStats { /// RequestLatencyStats provides a measurement of the latency of the request as /// it interacts with different systems over its lifetime, e.g. how long the /// request took to execute within a frontend server. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestLatencyStats { @@ -620,6 +679,7 @@ pub struct RequestLatencyStats { pub frontend_server_latency: ::core::option::Option<::prost_types::Duration>, } /// FullReadStatsView captures all known information about a read. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FullReadStatsView { @@ -638,6 +698,7 @@ pub struct FullReadStatsView { /// single request, helpful for evaluating the performance of the sent request. /// Currently, there are the following supported methods: /// * google.bigtable.v2.ReadRows +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestStats { @@ -654,6 +715,7 @@ pub mod request_stats { /// based on the requested view. /// /// See the messages above for additional context. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum StatsView { @@ -664,6 +726,7 @@ pub mod request_stats { } } /// Request message for Bigtable.ReadRows. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadRowsRequest { @@ -672,8 +735,8 @@ pub struct ReadRowsRequest { /// `projects//instances//tables/
`. #[prost(string, tag = "1")] pub table_name: ::prost::alloc::string::String, - /// This value specifies routing for replication. This API only accepts the - /// empty value of app_profile_id. + /// This value specifies routing for replication. If not specified, the + /// "default" application profile will be used. #[prost(string, tag = "5")] pub app_profile_id: ::prost::alloc::string::String, /// The row keys and/or ranges to read sequentially. If not specified, reads @@ -691,13 +754,28 @@ pub struct ReadRowsRequest { /// The view into RequestStats, as described above. #[prost(enumeration = "read_rows_request::RequestStatsView", tag = "6")] pub request_stats_view: i32, + /// Experimental API - Please note that this API is currently experimental + /// and can change in the future. + /// + /// Return rows in lexiographical descending order of the row keys. The row + /// contents will not be affected by this flag. + /// + /// Example result set: + /// + /// [ + /// {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + /// {key: "k1", "f:col1": "v2", "f:col2": "v2"} + /// ] + #[prost(bool, tag = "7")] + #[cfg(not(doctest))] + pub reversed: bool, } /// Nested message and enum types in `ReadRowsRequest`. pub mod read_rows_request { - /// /// The desired view into RequestStats that should be returned in the response. /// /// See also: RequestStats message. + #[non_exhaustive] #[derive( Clone, Copy, @@ -744,6 +822,7 @@ pub mod read_rows_request { } } /// Response message for Bigtable.ReadRows. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadRowsResponse { @@ -771,12 +850,12 @@ pub struct ReadRowsResponse { /// chunks and request_stats filled. /// /// Visually, response messages will stream as follows: - /// ... -> {chunks: \[...\]} -> {chunks: [], request_stats: {...}} + /// ... -> {chunks: \[...\]} -> {chunks: \[\], request_stats: {...}} /// \______________________/ \________________________________/ /// Primary response Trailer of RequestStats info /// /// Or if the read did not return any values: - /// {chunks: [], request_stats: {...}} + /// {chunks: \[\], request_stats: {...}} /// \________________________________/ /// Trailer of RequestStats info #[prost(message, optional, tag = "3")] @@ -786,6 +865,7 @@ pub struct ReadRowsResponse { pub mod read_rows_response { /// Specifies a piece of a row's contents returned as part of the read /// response stream. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CellChunk { @@ -821,7 +901,7 @@ pub mod read_rows_response { #[prost(int64, tag = "4")] pub timestamp_micros: i64, /// Labels applied to the cell by a - /// \[RowFilter][google.bigtable.v2.RowFilter\]. Labels are only set + /// [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set /// on the first CellChunk per cell. #[prost(string, repeated, tag = "5")] pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -845,6 +925,7 @@ pub mod read_rows_response { /// Nested message and enum types in `CellChunk`. pub mod cell_chunk { /// Signals to the client concerning previous CellChunks received. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum RowStatus { @@ -860,6 +941,7 @@ pub mod read_rows_response { } } /// Request message for Bigtable.SampleRowKeys. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SampleRowKeysRequest { @@ -874,6 +956,7 @@ pub struct SampleRowKeysRequest { pub app_profile_id: ::prost::alloc::string::String, } /// Response message for Bigtable.SampleRowKeys. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SampleRowKeysResponse { @@ -894,6 +977,7 @@ pub struct SampleRowKeysResponse { pub offset_bytes: i64, } /// Request message for Bigtable.MutateRow. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MutateRowRequest { @@ -916,10 +1000,12 @@ pub struct MutateRowRequest { pub mutations: ::prost::alloc::vec::Vec, } /// Response message for Bigtable.MutateRow. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MutateRowResponse {} /// Request message for BigtableService.MutateRows. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MutateRowsRequest { @@ -942,6 +1028,7 @@ pub struct MutateRowsRequest { /// Nested message and enum types in `MutateRowsRequest`. pub mod mutate_rows_request { /// A mutation for a given row. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Entry { @@ -956,16 +1043,23 @@ pub mod mutate_rows_request { } } /// Response message for BigtableService.MutateRows. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MutateRowsResponse { /// One or more results for Entries from the batch request. #[prost(message, repeated, tag = "1")] pub entries: ::prost::alloc::vec::Vec, + /// Information about how client should limit the rate (QPS). Primirily used by + /// supported official Cloud Bigtable clients. If unset, the rate limit info is + /// not provided by the server. + #[prost(message, optional, tag = "3")] + pub rate_limit_info: ::core::option::Option, } /// Nested message and enum types in `MutateRowsResponse`. pub mod mutate_rows_response { /// The result of applying a passed mutation in the original request. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Entry { @@ -981,7 +1075,33 @@ pub mod mutate_rows_response { pub status: ::core::option::Option, } } +/// Information about how client should adjust the load to Bigtable. +#[non_exhaustive] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RateLimitInfo { + /// Time that clients should wait before adjusting the target rate again. + /// If clients adjust rate too frequently, the impact of the previous + /// adjustment may not have been taken into account and may + /// over-throttle or under-throttle. If clients adjust rate too slowly, they + /// will not be responsive to load changes on server side, and may + /// over-throttle or under-throttle. + #[prost(message, optional, tag = "1")] + pub period: ::core::option::Option<::prost_types::Duration>, + /// If it has been at least one `period` since the last load adjustment, the + /// client should multiply the current load by this value to get the new target + /// load. For example, if the current load is 100 and `factor` is 0.8, the new + /// target load should be 80. After adjusting, the client should ignore + /// `factor` until another `period` has passed. + /// + /// The client can measure its load using any unit that's comparable over time + /// For example, QPS can be used as long as each request involves a similar + /// amount of work. + #[prost(double, tag = "2")] + pub factor: f64, +} /// Request message for Bigtable.CheckAndMutateRow. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CheckAndMutateRowRequest { @@ -1020,6 +1140,7 @@ pub struct CheckAndMutateRowRequest { pub false_mutations: ::prost::alloc::vec::Vec, } /// Response message for Bigtable.CheckAndMutateRow. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CheckAndMutateRowResponse { @@ -1029,6 +1150,7 @@ pub struct CheckAndMutateRowResponse { pub predicate_matched: bool, } /// Request message for client connection keep-alive and warming. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PingAndWarmRequest { @@ -1043,10 +1165,12 @@ pub struct PingAndWarmRequest { pub app_profile_id: ::prost::alloc::string::String, } /// Response message for Bigtable.PingAndWarm connection keepalive and warming. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PingAndWarmResponse {} /// Request message for Bigtable.ReadModifyWriteRow. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadModifyWriteRowRequest { @@ -1070,6 +1194,7 @@ pub struct ReadModifyWriteRowRequest { pub rules: ::prost::alloc::vec::Vec, } /// Response message for Bigtable.ReadModifyWriteRow. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadModifyWriteRowResponse { @@ -1079,6 +1204,7 @@ pub struct ReadModifyWriteRowResponse { } /// NOTE: This API is intended to be used by Apache Beam BigtableIO. /// Request message for Bigtable.GenerateInitialChangeStreamPartitions. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenerateInitialChangeStreamPartitionsRequest { @@ -1096,6 +1222,7 @@ pub struct GenerateInitialChangeStreamPartitionsRequest { } /// NOTE: This API is intended to be used by Apache Beam BigtableIO. /// Response message for Bigtable.GenerateInitialChangeStreamPartitions. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenerateInitialChangeStreamPartitionsResponse { @@ -1105,6 +1232,7 @@ pub struct GenerateInitialChangeStreamPartitionsResponse { } /// NOTE: This API is intended to be used by Apache Beam BigtableIO. /// Request message for Bigtable.ReadChangeStream. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadChangeStreamRequest { @@ -1138,6 +1266,7 @@ pub struct ReadChangeStreamRequest { /// Nested message and enum types in `ReadChangeStreamRequest`. pub mod read_change_stream_request { /// Options for describing where we want to start reading from the stream. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum StartFrom { @@ -1163,6 +1292,7 @@ pub mod read_change_stream_request { } /// NOTE: This API is intended to be used by Apache Beam BigtableIO. /// Response message for Bigtable.ReadChangeStream. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadChangeStreamResponse { @@ -1173,6 +1303,7 @@ pub struct ReadChangeStreamResponse { /// Nested message and enum types in `ReadChangeStreamResponse`. pub mod read_change_stream_response { /// A partial or complete mutation. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MutationChunk { @@ -1191,6 +1322,7 @@ pub mod read_change_stream_response { /// Information about the chunking of this mutation. /// Only `SetCell` mutations can be chunked, and all chunks for a `SetCell` /// will be delivered contiguously with no other mutation types interleaved. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChunkInfo { @@ -1212,6 +1344,7 @@ pub mod read_change_stream_response { /// the first in a sequence will only have the `type` and `chunks` fields /// populated, with the final message in the sequence also containing `done` /// set to true. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DataChange { @@ -1264,6 +1397,7 @@ pub mod read_change_stream_response { /// Nested message and enum types in `DataChange`. pub mod data_change { /// The type of mutation. + #[non_exhaustive] #[derive( Clone, Copy, @@ -1314,6 +1448,7 @@ pub mod read_change_stream_response { } /// A periodic message with information that can be used to checkpoint /// the state of a stream. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Heartbeat { @@ -1350,6 +1485,7 @@ pub mod read_change_stream_response { /// To read the new partition [A,C), supply the continuation tokens whose /// ranges cover the new partition, for example ContinuationToken[A,B) & /// ContinuationToken[B,C). + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CloseStream { @@ -1369,6 +1505,7 @@ pub mod read_change_stream_response { pub new_partitions: ::prost::alloc::vec::Vec, } /// The data or control message on the stream. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum StreamRecord { diff --git a/src/generated/google.iam.v1.rs b/src/generated/google.iam.v1.rs index fe9c524..c1ab902 100644 --- a/src/generated/google.iam.v1.rs +++ b/src/generated/google.iam.v1.rs @@ -1,4 +1,5 @@ /// Encapsulates settings provided to GetIamPolicy. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetPolicyOptions { @@ -23,6 +24,7 @@ pub struct GetPolicyOptions { #[prost(int32, tag = "1")] pub requested_policy_version: i32, } +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Policy { @@ -84,6 +86,7 @@ pub struct Policy { pub etag: ::prost::bytes::Bytes, } /// Associates `members`, or principals, with a `role`. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Binding { @@ -91,7 +94,7 @@ pub struct Binding { /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`. #[prost(string, tag = "1")] pub role: ::prost::alloc::string::String, - /// Specifies the principals requesting access for a Cloud Platform resource. + /// Specifies the principals requesting access for a Google Cloud resource. /// `members` can have the following values: /// /// * `allUsers`: A special identifier that represents anyone who is @@ -152,6 +155,7 @@ pub struct Binding { #[prost(message, optional, tag = "3")] pub condition: ::core::option::Option, } +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AuditConfig { @@ -164,6 +168,7 @@ pub struct AuditConfig { #[prost(message, repeated, tag = "3")] pub audit_log_configs: ::prost::alloc::vec::Vec, } +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AuditLogConfig { @@ -173,7 +178,7 @@ pub struct AuditLogConfig { /// Specifies the identities that do not cause logging for this type of /// permission. /// Follows the same format of - /// \[Binding.members][google.iam.v1.Binding.members\]. + /// [Binding.members][google.iam.v1.Binding.members]. #[prost(string, repeated, tag = "2")] pub exempted_members: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } @@ -181,6 +186,7 @@ pub struct AuditLogConfig { pub mod audit_log_config { /// The list of valid permission types for which logging can be configured. /// Admin writes are always logged, and are not configurable. + #[non_exhaustive] #[derive( Clone, Copy, @@ -229,6 +235,7 @@ pub mod audit_log_config { } } /// The difference delta between two policies. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PolicyDelta { @@ -241,6 +248,7 @@ pub struct PolicyDelta { } /// One delta entry for Binding. Each individual change (only one member in each /// entry) to a binding will be a separate entry. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BindingDelta { @@ -253,7 +261,7 @@ pub struct BindingDelta { /// Required #[prost(string, tag = "2")] pub role: ::prost::alloc::string::String, - /// A single identity requesting access for a Cloud Platform resource. + /// A single identity requesting access for a Google Cloud resource. /// Follows the same format of Binding.members. /// Required #[prost(string, tag = "3")] @@ -265,6 +273,7 @@ pub struct BindingDelta { /// Nested message and enum types in `BindingDelta`. pub mod binding_delta { /// The type of action performed on a Binding in a policy. + #[non_exhaustive] #[derive( Clone, Copy, @@ -310,6 +319,7 @@ pub mod binding_delta { } /// One delta entry for AuditConfig. Each individual change (only one /// exempted_member in each entry) to a AuditConfig will be a separate entry. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AuditConfigDelta { @@ -337,6 +347,7 @@ pub struct AuditConfigDelta { /// Nested message and enum types in `AuditConfigDelta`. pub mod audit_config_delta { /// The type of action performed on an audit configuration in a policy. + #[non_exhaustive] #[derive( Clone, Copy, @@ -381,6 +392,7 @@ pub mod audit_config_delta { } } /// Request message for `SetIamPolicy` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetIamPolicyRequest { @@ -403,6 +415,7 @@ pub struct SetIamPolicyRequest { pub update_mask: ::core::option::Option<::prost_types::FieldMask>, } /// Request message for `GetIamPolicy` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetIamPolicyRequest { @@ -416,6 +429,7 @@ pub struct GetIamPolicyRequest { pub options: ::core::option::Option, } /// Request message for `TestIamPermissions` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TestIamPermissionsRequest { @@ -431,6 +445,7 @@ pub struct TestIamPermissionsRequest { pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// Response message for `TestIamPermissions` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TestIamPermissionsResponse { diff --git a/src/generated/google.longrunning.rs b/src/generated/google.longrunning.rs index b4552a5..cd10e2a 100644 --- a/src/generated/google.longrunning.rs +++ b/src/generated/google.longrunning.rs @@ -1,5 +1,6 @@ /// This resource represents a long-running operation that is the result of a /// network API call. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Operation { @@ -30,6 +31,7 @@ pub mod operation { /// The operation result, which can be either an `error` or a valid `response`. /// If `done` == `false`, neither `error` nor `response` is set. /// If `done` == `true`, exactly one of `error` or `response` is set. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { @@ -48,7 +50,8 @@ pub mod operation { Response(::prost_types::Any), } } -/// The request message for \[Operations.GetOperation][google.longrunning.Operations.GetOperation\]. +/// The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetOperationRequest { @@ -56,7 +59,8 @@ pub struct GetOperationRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } -/// The request message for \[Operations.ListOperations][google.longrunning.Operations.ListOperations\]. +/// The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListOperationsRequest { @@ -73,7 +77,8 @@ pub struct ListOperationsRequest { #[prost(string, tag = "3")] pub page_token: ::prost::alloc::string::String, } -/// The response message for \[Operations.ListOperations][google.longrunning.Operations.ListOperations\]. +/// The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListOperationsResponse { @@ -84,7 +89,8 @@ pub struct ListOperationsResponse { #[prost(string, tag = "2")] pub next_page_token: ::prost::alloc::string::String, } -/// The request message for \[Operations.CancelOperation][google.longrunning.Operations.CancelOperation\]. +/// The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CancelOperationRequest { @@ -92,7 +98,8 @@ pub struct CancelOperationRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } -/// The request message for \[Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation\]. +/// The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteOperationRequest { @@ -100,7 +107,8 @@ pub struct DeleteOperationRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } -/// The request message for \[Operations.WaitOperation][google.longrunning.Operations.WaitOperation\]. +/// The request message for [Operations.WaitOperation][google.longrunning.Operations.WaitOperation]. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WaitOperationRequest { @@ -124,6 +132,7 @@ pub struct WaitOperationRequest { /// metadata_type: "LongRunningRecognizeMetadata" /// }; /// } +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OperationInfo { diff --git a/src/generated/google.pubsub.v1.rs b/src/generated/google.pubsub.v1.rs index ea32645..109e8f5 100644 --- a/src/generated/google.pubsub.v1.rs +++ b/src/generated/google.pubsub.v1.rs @@ -1,4 +1,5 @@ /// A schema resource. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Schema { @@ -24,6 +25,7 @@ pub struct Schema { /// Nested message and enum types in `Schema`. pub mod schema { /// Possible schema definition types. + #[non_exhaustive] #[derive( Clone, Copy, @@ -68,6 +70,7 @@ pub mod schema { } } /// Request for the CreateSchema method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSchemaRequest { @@ -91,6 +94,7 @@ pub struct CreateSchemaRequest { pub schema_id: ::prost::alloc::string::String, } /// Request for the GetSchema method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSchemaRequest { @@ -104,6 +108,7 @@ pub struct GetSchemaRequest { pub view: i32, } /// Request for the `ListSchemas` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSchemasRequest { @@ -126,6 +131,7 @@ pub struct ListSchemasRequest { pub page_token: ::prost::alloc::string::String, } /// Response for the `ListSchemas` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSchemasResponse { @@ -138,6 +144,7 @@ pub struct ListSchemasResponse { pub next_page_token: ::prost::alloc::string::String, } /// Request for the `ListSchemaRevisions` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSchemaRevisionsRequest { @@ -158,6 +165,7 @@ pub struct ListSchemaRevisionsRequest { pub page_token: ::prost::alloc::string::String, } /// Response for the `ListSchemaRevisions` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSchemaRevisionsResponse { @@ -170,6 +178,7 @@ pub struct ListSchemaRevisionsResponse { pub next_page_token: ::prost::alloc::string::String, } /// Request for CommitSchema method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitSchemaRequest { @@ -182,6 +191,7 @@ pub struct CommitSchemaRequest { pub schema: ::core::option::Option, } /// Request for the `RollbackSchema` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RollbackSchemaRequest { @@ -196,6 +206,7 @@ pub struct RollbackSchemaRequest { pub revision_id: ::prost::alloc::string::String, } /// Request for the `DeleteSchemaRevision` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSchemaRevisionRequest { @@ -213,6 +224,7 @@ pub struct DeleteSchemaRevisionRequest { pub revision_id: ::prost::alloc::string::String, } /// Request for the `DeleteSchema` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSchemaRequest { @@ -222,6 +234,7 @@ pub struct DeleteSchemaRequest { pub name: ::prost::alloc::string::String, } /// Request for the `ValidateSchema` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidateSchemaRequest { @@ -235,10 +248,12 @@ pub struct ValidateSchemaRequest { } /// Response for the `ValidateSchema` method. /// Empty for now. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidateSchemaResponse {} /// Request for the `ValidateMessage` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidateMessageRequest { @@ -257,6 +272,7 @@ pub struct ValidateMessageRequest { } /// Nested message and enum types in `ValidateMessageRequest`. pub mod validate_message_request { + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum SchemaSpec { @@ -272,10 +288,12 @@ pub mod validate_message_request { } /// Response for the `ValidateMessage` method. /// Empty for now. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidateMessageResponse {} /// View of Schema object fields to be returned by GetSchema and ListSchemas. +#[non_exhaustive] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum SchemaView { @@ -310,6 +328,7 @@ impl SchemaView { } } /// Possible encoding types for messages. +#[non_exhaustive] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum Encoding { @@ -698,20 +717,23 @@ pub mod schema_service_client { } } /// A policy constraining the storage of messages published to the topic. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MessageStoragePolicy { - /// A list of IDs of GCP regions where messages that are published to the topic - /// may be persisted in storage. Messages published by publishers running in - /// non-allowed GCP regions (or running outside of GCP altogether) will be - /// routed for storage in one of the allowed regions. An empty list means that - /// no regions are allowed, and is not a valid configuration. + /// A list of IDs of Google Cloud regions where messages that are published + /// to the topic may be persisted in storage. Messages published by publishers + /// running in non-allowed Google Cloud regions (or running outside of Google + /// Cloud altogether) are routed for storage in one of the allowed regions. + /// An empty list means that no regions are allowed, and is not a valid + /// configuration. #[prost(string, repeated, tag = "1")] pub allowed_persistence_regions: ::prost::alloc::vec::Vec< ::prost::alloc::string::String, >, } /// Settings for validating messages published against a schema. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SchemaSettings { @@ -736,6 +758,7 @@ pub struct SchemaSettings { pub last_revision_id: ::prost::alloc::string::String, } /// A topic resource. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Topic { @@ -747,7 +770,7 @@ pub struct Topic { /// must not start with `"goog"`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, - /// See [Creating and managing labels] + /// See \[Creating and managing labels\] /// (). #[prost(map = "string, string", tag = "2")] pub labels: ::std::collections::HashMap< @@ -788,9 +811,10 @@ pub struct Topic { /// Note that client libraries represent this object differently /// depending on the language. See the corresponding [client library /// documentation]() for -/// more information. See [quotas and limits] +/// more information. See \[quotas and limits\] /// () for more information about message /// limits. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PubsubMessage { @@ -829,6 +853,7 @@ pub struct PubsubMessage { pub ordering_key: ::prost::alloc::string::String, } /// Request for the GetTopic method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTopicRequest { @@ -838,6 +863,7 @@ pub struct GetTopicRequest { pub topic: ::prost::alloc::string::String, } /// Request for the UpdateTopic method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateTopicRequest { @@ -853,6 +879,7 @@ pub struct UpdateTopicRequest { pub update_mask: ::core::option::Option<::prost_types::FieldMask>, } /// Request for the Publish method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PublishRequest { @@ -865,6 +892,7 @@ pub struct PublishRequest { pub messages: ::prost::alloc::vec::Vec, } /// Response for the `Publish` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PublishResponse { @@ -875,6 +903,7 @@ pub struct PublishResponse { pub message_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// Request for the `ListTopics` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListTopicsRequest { @@ -892,6 +921,7 @@ pub struct ListTopicsRequest { pub page_token: ::prost::alloc::string::String, } /// Response for the `ListTopics` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListTopicsResponse { @@ -904,6 +934,7 @@ pub struct ListTopicsResponse { pub next_page_token: ::prost::alloc::string::String, } /// Request for the `ListTopicSubscriptions` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListTopicSubscriptionsRequest { @@ -921,6 +952,7 @@ pub struct ListTopicSubscriptionsRequest { pub page_token: ::prost::alloc::string::String, } /// Response for the `ListTopicSubscriptions` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListTopicSubscriptionsResponse { @@ -934,6 +966,7 @@ pub struct ListTopicSubscriptionsResponse { pub next_page_token: ::prost::alloc::string::String, } /// Request for the `ListTopicSnapshots` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListTopicSnapshotsRequest { @@ -951,6 +984,7 @@ pub struct ListTopicSnapshotsRequest { pub page_token: ::prost::alloc::string::String, } /// Response for the `ListTopicSnapshots` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListTopicSnapshotsResponse { @@ -964,6 +998,7 @@ pub struct ListTopicSnapshotsResponse { pub next_page_token: ::prost::alloc::string::String, } /// Request for the `DeleteTopic` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteTopicRequest { @@ -973,6 +1008,7 @@ pub struct DeleteTopicRequest { pub topic: ::prost::alloc::string::String, } /// Request for the DetachSubscription method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DetachSubscriptionRequest { @@ -983,12 +1019,14 @@ pub struct DetachSubscriptionRequest { } /// Response for the DetachSubscription method. /// Reserved for future use. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DetachSubscriptionResponse {} -/// A subscription resource. If none of `push_config` or `bigquery_config` is -/// set, then the subscriber will pull and ack messages using API methods. At -/// most one of these fields may be set. +/// A subscription resource. If none of `push_config`, `bigquery_config`, or +/// `cloud_storage_config` is set, then the subscriber will pull and ack messages +/// using API methods. At most one of these fields may be set. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Subscription { @@ -1013,6 +1051,10 @@ pub struct Subscription { /// used to configure it. #[prost(message, optional, tag = "18")] pub bigquery_config: ::core::option::Option, + /// If delivery to Google Cloud Storage is used with this subscription, this + /// field is used to configure it. + #[prost(message, optional, tag = "22")] + pub cloud_storage_config: ::core::option::Option, /// The approximate amount of time (on a best-effort basis) Pub/Sub waits for /// the subscriber to acknowledge receipt before resending the message. In the /// interval after the message is delivered and before it is acknowledged, it @@ -1038,7 +1080,7 @@ pub struct Subscription { /// Indicates whether to retain acknowledged messages. If true, then /// messages are not expunged from the subscription's backlog, even if they are /// acknowledged, until they fall out of the `message_retention_duration` - /// window. This must be true if you would like to [`Seek` to a timestamp] + /// window. This must be true if you would like to \[`Seek` to a timestamp\] /// () in /// the past to replay previously-acknowledged messages. #[prost(bool, tag = "7")] @@ -1137,6 +1179,7 @@ pub struct Subscription { /// Nested message and enum types in `Subscription`. pub mod subscription { /// Possible states for a subscription. + #[non_exhaustive] #[derive( Clone, Copy, @@ -1193,6 +1236,7 @@ pub mod subscription { /// Retry Policy is implemented on a best effort basis. At times, the delay /// between consecutive deliveries may not match the configuration. That is, /// delay can be more or less than configured backoff. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RetryPolicy { @@ -1210,6 +1254,7 @@ pub struct RetryPolicy { /// /// If validation on any of the fields fails at subscription creation/updation, /// the create/update subscription request will fail. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeadLetterPolicy { @@ -1242,6 +1287,7 @@ pub struct DeadLetterPolicy { } /// A policy that specifies the conditions for resource expiration (i.e., /// automatic resource deletion). +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExpirationPolicy { @@ -1255,6 +1301,7 @@ pub struct ExpirationPolicy { pub ttl: ::core::option::Option<::prost_types::Duration>, } /// Configuration for a push delivery endpoint. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PushConfig { @@ -1295,20 +1342,25 @@ pub struct PushConfig { /// authenticated push. #[prost(oneof = "push_config::AuthenticationMethod", tags = "3")] pub authentication_method: ::core::option::Option, + /// The format of the delivered message to the push endpoint is defined by + /// the chosen wrapper. When unset, `PubsubWrapper` is used. + #[prost(oneof = "push_config::Wrapper", tags = "4, 5")] + pub wrapper: ::core::option::Option, } /// Nested message and enum types in `PushConfig`. pub mod push_config { /// Contains information needed for generating an /// [OpenID Connect /// token](). + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OidcToken { /// [Service account /// email]() - /// to be used for generating the OIDC token. The caller (for - /// CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must - /// have the iam.serviceAccounts.actAs permission for the service account. + /// used for generating the OIDC token. For more information + /// on setting up authentication, see + /// [Push subscriptions](). #[prost(string, tag = "1")] pub service_account_email: ::prost::alloc::string::String, /// Audience to be used when generating OIDC token. The audience claim @@ -1320,11 +1372,30 @@ pub mod push_config { #[prost(string, tag = "2")] pub audience: ::prost::alloc::string::String, } + /// The payload to the push endpoint is in the form of the JSON representation + /// of a PubsubMessage + /// (). + #[non_exhaustive] + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct PubsubWrapper {} + /// Sets the `data` field as the HTTP body for delivery. + #[non_exhaustive] + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct NoWrapper { + /// When true, writes the Pub/Sub message metadata to + /// `x-goog-pubsub-:` headers of the HTTP request. Writes the + /// Pub/Sub message attributes to `:` headers of the HTTP request. + #[prost(bool, tag = "1")] + pub write_metadata: bool, + } /// An authentication method used by push endpoints to verify the source of /// push requests. This can be used with push endpoints that are private by /// default to allow requests only from the Cloud Pub/Sub system, for example. /// This field is optional and should be set only by users interested in /// authenticated push. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum AuthenticationMethod { @@ -1333,8 +1404,24 @@ pub mod push_config { #[prost(message, tag = "3")] OidcToken(OidcToken), } + /// The format of the delivered message to the push endpoint is defined by + /// the chosen wrapper. When unset, `PubsubWrapper` is used. + #[non_exhaustive] + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Wrapper { + /// When set, the payload to the push endpoint is in the form of the JSON + /// representation of a PubsubMessage + /// (). + #[prost(message, tag = "4")] + PubsubWrapper(PubsubWrapper), + /// When set, the payload to the push endpoint is not wrapped. + #[prost(message, tag = "5")] + NoWrapper(NoWrapper), + } } /// Configuration for a BigQuery subscription. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BigQueryConfig { @@ -1368,6 +1455,7 @@ pub struct BigQueryConfig { /// Nested message and enum types in `BigQueryConfig`. pub mod big_query_config { /// Possible states for a BigQuery subscription. + #[non_exhaustive] #[derive( Clone, Copy, @@ -1390,7 +1478,7 @@ pub mod big_query_config { /// - Pub/Sub SA has not been granted the [appropriate BigQuery IAM /// permissions]() /// - bigquery.googleapis.com API is not enabled for the project - /// (\[instructions\]()) + /// ([instructions]()) PermissionDenied = 2, /// Cannot write to the BigQuery table because it does not exist. NotFound = 3, @@ -1424,7 +1512,132 @@ pub mod big_query_config { } } } +/// Configuration for a Cloud Storage subscription. +#[non_exhaustive] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CloudStorageConfig { + /// Required. User-provided name for the Cloud Storage bucket. + /// The bucket must be created by the user. The bucket name must be without + /// any prefix like "gs://". See the [bucket naming + /// requirements] (). + #[prost(string, tag = "1")] + pub bucket: ::prost::alloc::string::String, + /// User-provided prefix for Cloud Storage filename. See the [object naming + /// requirements](). + #[prost(string, tag = "2")] + pub filename_prefix: ::prost::alloc::string::String, + /// User-provided suffix for Cloud Storage filename. See the [object naming + /// requirements](). Must + /// not end in "/". + #[prost(string, tag = "3")] + pub filename_suffix: ::prost::alloc::string::String, + /// The maximum duration that can elapse before a new Cloud Storage file is + /// created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed + /// the subscription's acknowledgement deadline. + #[prost(message, optional, tag = "6")] + pub max_duration: ::core::option::Option<::prost_types::Duration>, + /// The maximum bytes that can be written to a Cloud Storage file before a new + /// file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded + /// in cases where messages are larger than the limit. + #[prost(int64, tag = "7")] + pub max_bytes: i64, + /// Output only. An output-only field that indicates whether or not the + /// subscription can receive messages. + #[prost(enumeration = "cloud_storage_config::State", tag = "9")] + pub state: i32, + /// Defaults to text format. + #[prost(oneof = "cloud_storage_config::OutputFormat", tags = "4, 5")] + pub output_format: ::core::option::Option, +} +/// Nested message and enum types in `CloudStorageConfig`. +pub mod cloud_storage_config { + /// Configuration for writing message data in text format. + /// Message payloads will be written to files as raw text, separated by a + /// newline. + #[non_exhaustive] + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct TextConfig {} + /// Configuration for writing message data in Avro format. + /// Message payloads and metadata will be written to files as an Avro binary. + #[non_exhaustive] + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct AvroConfig { + /// When true, write the subscription name, message_id, publish_time, + /// attributes, and ordering_key as additional fields in the output. The + /// subscription name, message_id, and publish_time fields are put in their + /// own fields while all other message properties other than data (for + /// example, an ordering_key, if present) are added as entries in the + /// attributes map. + #[prost(bool, tag = "1")] + pub write_metadata: bool, + } + /// Possible states for a Cloud Storage subscription. + #[non_exhaustive] + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum State { + /// Default value. This value is unused. + Unspecified = 0, + /// The subscription can actively send messages to Cloud Storage. + Active = 1, + /// Cannot write to the Cloud Storage bucket because of permission denied + /// errors. + PermissionDenied = 2, + /// Cannot write to the Cloud Storage bucket because it does not exist. + NotFound = 3, + } + impl State { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + State::Unspecified => "STATE_UNSPECIFIED", + State::Active => "ACTIVE", + State::PermissionDenied => "PERMISSION_DENIED", + State::NotFound => "NOT_FOUND", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "STATE_UNSPECIFIED" => Some(Self::Unspecified), + "ACTIVE" => Some(Self::Active), + "PERMISSION_DENIED" => Some(Self::PermissionDenied), + "NOT_FOUND" => Some(Self::NotFound), + _ => None, + } + } + } + /// Defaults to text format. + #[non_exhaustive] + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum OutputFormat { + /// If set, message data will be written to Cloud Storage in text format. + #[prost(message, tag = "4")] + TextConfig(TextConfig), + /// If set, message data will be written to Cloud Storage in Avro format. + #[prost(message, tag = "5")] + AvroConfig(AvroConfig), + } +} /// A message and its corresponding acknowledgment ID. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReceivedMessage { @@ -1454,6 +1667,7 @@ pub struct ReceivedMessage { pub delivery_attempt: i32, } /// Request for the GetSubscription method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSubscriptionRequest { @@ -1463,6 +1677,7 @@ pub struct GetSubscriptionRequest { pub subscription: ::prost::alloc::string::String, } /// Request for the UpdateSubscription method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateSubscriptionRequest { @@ -1475,6 +1690,7 @@ pub struct UpdateSubscriptionRequest { pub update_mask: ::core::option::Option<::prost_types::FieldMask>, } /// Request for the `ListSubscriptions` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSubscriptionsRequest { @@ -1492,6 +1708,7 @@ pub struct ListSubscriptionsRequest { pub page_token: ::prost::alloc::string::String, } /// Response for the `ListSubscriptions` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSubscriptionsResponse { @@ -1505,6 +1722,7 @@ pub struct ListSubscriptionsResponse { pub next_page_token: ::prost::alloc::string::String, } /// Request for the DeleteSubscription method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSubscriptionRequest { @@ -1514,6 +1732,7 @@ pub struct DeleteSubscriptionRequest { pub subscription: ::prost::alloc::string::String, } /// Request for the ModifyPushConfig method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModifyPushConfigRequest { @@ -1531,6 +1750,7 @@ pub struct ModifyPushConfigRequest { pub push_config: ::core::option::Option, } /// Request for the `Pull` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PullRequest { @@ -1555,6 +1775,7 @@ pub struct PullRequest { pub max_messages: i32, } /// Response for the `Pull` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PullResponse { @@ -1567,6 +1788,7 @@ pub struct PullResponse { pub received_messages: ::prost::alloc::vec::Vec, } /// Request for the ModifyAckDeadline method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModifyAckDeadlineRequest { @@ -1589,6 +1811,7 @@ pub struct ModifyAckDeadlineRequest { pub ack_deadline_seconds: i32, } /// Request for the Acknowledge method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AcknowledgeRequest { @@ -1605,6 +1828,7 @@ pub struct AcknowledgeRequest { /// Request for the `StreamingPull` streaming RPC method. This request is used to /// establish the initial stream as well as to stream acknowledgements and ack /// deadline modifications from the client to the server. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamingPullRequest { @@ -1682,6 +1906,7 @@ pub struct StreamingPullRequest { } /// Response for the `StreamingPull` method. This response is used to stream /// messages from the server to the client. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamingPullResponse { @@ -1710,6 +1935,7 @@ pub struct StreamingPullResponse { pub mod streaming_pull_response { /// Acknowledgement IDs sent in one or more previous requests to acknowledge a /// previously received message. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AcknowledgeConfirmation { @@ -1731,6 +1957,7 @@ pub mod streaming_pull_response { } /// Acknowledgement IDs sent in one or more previous requests to modify the /// deadline for a specific message. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModifyAckDeadlineConfirmation { @@ -1748,6 +1975,7 @@ pub mod streaming_pull_response { >, } /// Subscription properties sent as part of the response. + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscriptionProperties { @@ -1760,6 +1988,7 @@ pub mod streaming_pull_response { } } /// Request for the `CreateSnapshot` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSnapshotRequest { @@ -1767,8 +1996,8 @@ pub struct CreateSnapshotRequest { /// in the request, the server will assign a random name for this snapshot on /// the same project as the subscription. Note that for REST API requests, you /// must specify a name. See the [resource name - /// rules](). Format - /// is `projects/{project}/snapshots/{snap}`. + /// rules](). + /// Format is `projects/{project}/snapshots/{snap}`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// Required. The subscription whose backlog the snapshot retains. @@ -1791,6 +2020,7 @@ pub struct CreateSnapshotRequest { >, } /// Request for the UpdateSnapshot method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateSnapshotRequest { @@ -1803,10 +2033,11 @@ pub struct UpdateSnapshotRequest { pub update_mask: ::core::option::Option<::prost_types::FieldMask>, } /// A snapshot resource. Snapshots are used in -/// \[Seek\]() +/// [Seek]() /// operations, which allow you to manage message acknowledgments in bulk. That /// is, you can set the acknowledgment state of messages in an existing /// subscription to the state captured by a snapshot. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Snapshot { @@ -1828,7 +2059,7 @@ pub struct Snapshot { /// snapshot that would expire in less than 1 hour after creation. #[prost(message, optional, tag = "3")] pub expire_time: ::core::option::Option<::prost_types::Timestamp>, - /// See [Creating and managing labels] + /// See \[Creating and managing labels\] /// (). #[prost(map = "string, string", tag = "4")] pub labels: ::std::collections::HashMap< @@ -1837,6 +2068,7 @@ pub struct Snapshot { >, } /// Request for the GetSnapshot method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSnapshotRequest { @@ -1846,6 +2078,7 @@ pub struct GetSnapshotRequest { pub snapshot: ::prost::alloc::string::String, } /// Request for the `ListSnapshots` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSnapshotsRequest { @@ -1863,6 +2096,7 @@ pub struct ListSnapshotsRequest { pub page_token: ::prost::alloc::string::String, } /// Response for the `ListSnapshots` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSnapshotsResponse { @@ -1875,6 +2109,7 @@ pub struct ListSnapshotsResponse { pub next_page_token: ::prost::alloc::string::String, } /// Request for the `DeleteSnapshot` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSnapshotRequest { @@ -1884,6 +2119,7 @@ pub struct DeleteSnapshotRequest { pub snapshot: ::prost::alloc::string::String, } /// Request for the `Seek` method. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SeekRequest { @@ -1895,6 +2131,7 @@ pub struct SeekRequest { } /// Nested message and enum types in `SeekRequest`. pub mod seek_request { + #[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Target { @@ -1919,6 +2156,7 @@ pub mod seek_request { } } /// Response for the `Seek` method (this response is empty). +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SeekResponse {} @@ -2010,7 +2248,7 @@ pub mod publisher_client { self } /// Creates the given topic with the given name. See the [resource name rules] - /// (https://cloud.google.com/pubsub/docs/admin#resource_names). + /// (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). pub async fn create_topic( &mut self, request: impl tonic::IntoRequest, @@ -2345,16 +2583,16 @@ pub mod subscriber_client { self } /// Creates a subscription to a given topic. See the [resource name rules] - /// (https://cloud.google.com/pubsub/docs/admin#resource_names). + /// (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). /// If the subscription already exists, returns `ALREADY_EXISTS`. /// If the corresponding topic doesn't exist, returns `NOT_FOUND`. /// /// If the name is not provided in the request, the server will assign a random /// name for this subscription on the same project as the topic, conforming /// to the [resource name format] - /// (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated - /// name is populated in the returned Subscription object. Note that for REST - /// API requests, you must specify a name in the request. + /// (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The + /// generated name is populated in the returned Subscription object. Note that + /// for REST API requests, you must specify a name in the request. pub async fn create_subscription( &mut self, request: impl tonic::IntoRequest, @@ -2702,7 +2940,7 @@ pub mod subscriber_client { /// the request, the server will assign a random /// name for this snapshot on the same project as the subscription, conforming /// to the [resource name format] - /// (https://cloud.google.com/pubsub/docs/admin#resource_names). The + /// (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The /// generated name is populated in the returned Snapshot object. Note that for /// REST API requests, you must specify a name in the request. pub async fn create_snapshot( diff --git a/src/generated/google.r#type.rs b/src/generated/google.r#type.rs index 45d8c50..ed4b1d7 100644 --- a/src/generated/google.r#type.rs +++ b/src/generated/google.r#type.rs @@ -1,3 +1,35 @@ +/// Represents a textual expression in the Common Expression Language (CEL) +/// syntax. CEL is a C-like expression language. The syntax and semantics of CEL +/// are documented at +/// +/// Example (Comparison): +/// +/// title: "Summary size limit" +/// description: "Determines if a summary is less than 100 chars" +/// expression: "document.summary.size() < 100" +/// +/// Example (Equality): +/// +/// title: "Requestor is owner" +/// description: "Determines if requestor is the document owner" +/// expression: "document.owner == request.auth.claims.email" +/// +/// Example (Logic): +/// +/// title: "Public documents" +/// description: "Determine whether the document should be publicly visible" +/// expression: "document.type != 'private' && document.type != 'internal'" +/// +/// Example (Data Manipulation): +/// +/// title: "Notification string" +/// description: "Create a notification string with a timestamp." +/// expression: "'New message received at ' + string(document.create_time)" +/// +/// The exact variables and functions that may be referenced within an expression +/// are determined by the service that evaluates it. See the service +/// documentation for additional information. +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Expr { diff --git a/src/generated/google.rpc.rs b/src/generated/google.rpc.rs index e20cb14..8293f99 100644 --- a/src/generated/google.rpc.rs +++ b/src/generated/google.rpc.rs @@ -1,20 +1,21 @@ /// The `Status` type defines a logical error model that is suitable for /// different programming environments, including REST APIs and RPC APIs. It is -/// used by \[gRPC\](). Each `Status` message contains +/// used by [gRPC](). Each `Status` message contains /// three pieces of data: error code, error message, and error details. /// /// You can find out more about this error model and how to work with it in the /// [API Design Guide](). +#[non_exhaustive] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Status { /// The status code, which should be an enum value of - /// \[google.rpc.Code][google.rpc.Code\]. + /// [google.rpc.Code][google.rpc.Code]. #[prost(int32, tag = "1")] pub code: i32, /// A developer-facing error message, which should be in English. Any /// user-facing error message should be localized and sent in the - /// \[google.rpc.Status.details][google.rpc.Status.details\] field, or localized + /// [google.rpc.Status.details][google.rpc.Status.details] field, or localized /// by the client. #[prost(string, tag = "2")] pub message: ::prost::alloc::string::String, diff --git a/src/grpc/mod.rs b/src/grpc/mod.rs index 0f6fbac..ea6c84c 100644 --- a/src/grpc/mod.rs +++ b/src/grpc/mod.rs @@ -1,4 +1,13 @@ //! Items and functionality specific to gRPC services +pub use tonic::{ + body::BoxBody, + client::GrpcService, + codegen::{Body, Bytes, StdError}, +}; + mod status_code_set; pub use status_code_set::StatusCodeSet; + +/// The default grpc transport implementation +pub type DefaultGrpcImpl = crate::auth::grpc::AuthGrpcService; diff --git a/src/lib.rs b/src/lib.rs index 50bc0c8..f71035b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,12 +18,6 @@ " )] -// re-export the Connect trait because users will need it for the bound on clients -pub use ::hyper::client::connect::Connect; - -// a convenience alias -pub(crate) type Auth = yup_oauth2::authenticator::Authenticator; - /// Make a given config struct into a builder using the given default values for fields macro_rules! config_default { ( @@ -42,6 +36,7 @@ macro_rules! config_default { } ) => { $(#[$struct_attr])* + #[non_exhaustive] $struct_vis struct $struct_name { $( $(#[$field_attr])* @@ -125,8 +120,7 @@ pub mod storage; mod builder; pub use builder::{ - AuthFlow, ClientBuilder, ClientBuilderConfig, CreateBuilderError, DefaultConnector, - ServiceAccountAuth, + AuthFlow, ClientBuilder, ClientBuilderConfig, CreateBuilderError, ServiceAccountAuth, }; pub mod retry_policy; diff --git a/src/pubsub/client_builder.rs b/src/pubsub/client_builder.rs index 57bc4aa..adca62d 100644 --- a/src/pubsub/client_builder.rs +++ b/src/pubsub/client_builder.rs @@ -1,6 +1,5 @@ use crate::{ - auth::grpc, - builder, + builder, grpc, pubsub::{api, PublisherClient, SubscriberClient}, }; @@ -17,7 +16,6 @@ pub use tower::make::MakeConnection; config_default! { /// Configuration for connecting to pubsub #[derive(Debug, Clone, Eq, PartialEq, Hash, serde::Deserialize)] - #[non_exhaustive] pub struct PubSubConfig { /// Endpoint to connect to pubsub over. @default("https://pubsub.googleapis.com/v1".into(), "PubSubConfig::default_endpoint") @@ -34,28 +32,16 @@ config_default! { #[error(transparent)] pub struct BuildError(#[from] tonic::transport::Error); -impl builder::ClientBuilder -where - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, - Box: From, -{ +impl builder::ClientBuilder { async fn pubsub_authed_service( &self, config: PubSubConfig, - ) -> Result, BuildError> { + ) -> Result { let connection = tonic::transport::Endpoint::new(config.endpoint)? - .connect_with_connector(self.connector.clone()) + .connect() .await?; - Ok(grpc::AuthGrpcService::new( + Ok(grpc::DefaultGrpcImpl::new( connection, self.auth.clone(), config.auth_scopes, @@ -66,28 +52,26 @@ where pub async fn build_pubsub_publisher( &self, config: PubSubConfig, - ) -> Result, BuildError> { + ) -> Result { // the crate's client will wrap the raw grpc client to add features/functions/ergonomics - Ok(PublisherClient { - inner: api::publisher_client::PublisherClient::new( - self.pubsub_authed_service(config).await?, - ) - .max_decoding_message_size(MAX_MESSAGE_SIZE), - }) + Ok(PublisherClient::from_raw_api( + api::publisher_client::PublisherClient::new(self.pubsub_authed_service(config).await?) + .max_decoding_message_size(MAX_MESSAGE_SIZE), + )) } /// Create a client for subscribing to the pubsub service pub async fn build_pubsub_subscriber( &self, config: PubSubConfig, - ) -> Result, BuildError> { + ) -> Result { // the crate's client will wrap the raw grpc client to add features/functions/ergonomics - Ok(SubscriberClient { - inner: api::subscriber_client::SubscriberClient::new( + Ok(SubscriberClient::from_raw_api( + api::subscriber_client::SubscriberClient::new( self.pubsub_authed_service(config).await?, ) .max_decoding_message_size(MAX_MESSAGE_SIZE), - }) + )) } } diff --git a/src/pubsub/emulator.rs b/src/pubsub/emulator.rs index 456fe70..4744298 100644 --- a/src/pubsub/emulator.rs +++ b/src/pubsub/emulator.rs @@ -139,6 +139,7 @@ impl EmulatorClient { let mut publisher = self.builder().build_pubsub_publisher(config).await?; publisher + .raw_api_mut() .create_topic(pubsub::api::Topic { name: pubsub::ProjectTopicName::new(self.project(), topic_name.as_ref()).into(), ..pubsub::api::Topic::default() diff --git a/src/pubsub/mod.rs b/src/pubsub/mod.rs index ca65c8f..43ece2c 100644 --- a/src/pubsub/mod.rs +++ b/src/pubsub/mod.rs @@ -3,12 +3,13 @@ //! Publishing and topic management is done through the [`PublisherClient`], while reading data and //! subscription management is done through the [`SubscriberClient`]. -use crate::{auth::grpc::AuthGrpcService, retry_policy::RetryPredicate}; +use crate::grpc::{Body, BoxBody, Bytes, DefaultGrpcImpl, GrpcService, StdError}; +use crate::retry_policy::RetryPredicate; use std::fmt::Display; use tracing::debug_span; // alias Status as this module's error type -pub use ::tonic::Status as Error; +pub use tonic::Status as Error; pub use client_builder::{BuildError, MakeConnection, PubSubConfig, Uri}; pub use publish_sink::{PublishConfig, PublishError, PublishTopicSink, SinkError}; @@ -40,78 +41,87 @@ pub mod api { /// /// This builds on top of the raw [gRPC publisher API](api::publisher_client::PublisherClient) /// to provide more ergonomic functionality -#[derive(Clone)] -pub struct PublisherClient { - inner: api::publisher_client::PublisherClient>, +#[derive(Debug, Clone)] +pub struct PublisherClient { + inner: api::publisher_client::PublisherClient, } -impl PublisherClient +impl PublisherClient { + /// Manually construct a new client. + /// + /// There are limited circumstances in which this is useful; consider instead using the builder + /// function [crate::builder::ClientBuilder::build_pubsub_publisher] + pub fn from_raw_api(client: api::publisher_client::PublisherClient) -> Self { + PublisherClient { inner: client } + } + + /// Access the underlying grpc api + pub fn raw_api(&self) -> &api::publisher_client::PublisherClient { + &self.inner + } + + /// Mutably access the underlying grpc api + pub fn raw_api_mut(&mut self) -> &mut api::publisher_client::PublisherClient { + &mut self.inner + } +} + +impl PublisherClient where - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, + S: GrpcService + Clone, + S::Error: Into, + S::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, { /// Create a sink which will publish [messages](api::PubsubMessage) to the given topic. /// /// See the type's [documentation](PublishTopicSink) for more details. - pub fn publish_topic_sink(&mut self, topic: ProjectTopicName) -> PublishTopicSink { - self.publish_topic_sink_config(topic, PublishConfig::default()) - } - - /// Create a sink with non-default config - // TODO(major semver) get rid of this method, always require config - pub fn publish_topic_sink_config( + pub fn publish_topic_sink( &mut self, topic: ProjectTopicName, config: PublishConfig, - ) -> PublishTopicSink { + ) -> PublishTopicSink { PublishTopicSink::new(self.inner.clone(), topic, config) } } -impl std::ops::Deref for PublisherClient { - type Target = - api::publisher_client::PublisherClient>; - - fn deref(&self) -> &Self::Target { - &self.inner - } -} - -impl std::ops::DerefMut for PublisherClient { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.inner - } -} - /// A client through which pubsub messages are consumed, and subscriptions are managed. Created /// from the [`build_pubsub_subscriber`](crate::builder::ClientBuilder::build_pubsub_subscriber) /// function. /// /// This is an interface built on top of the raw [gRPC subscriber /// API](api::subscriber_client::SubscriberClient) which provides more ergonomic functionality -#[derive(Clone)] -pub struct SubscriberClient { - inner: api::subscriber_client::SubscriberClient>, +#[derive(Debug, Clone)] +pub struct SubscriberClient { + inner: api::subscriber_client::SubscriberClient, +} + +impl SubscriberClient { + /// Manually construct a new client. + /// + /// There are limited circumstances in which this is useful; consider instead using the builder + /// function [crate::builder::ClientBuilder::build_pubsub_subscriber] + pub fn from_raw_api(client: api::subscriber_client::SubscriberClient) -> Self { + Self { inner: client } + } + + /// Access the underlying grpc api + pub fn raw_api(&self) -> &api::subscriber_client::SubscriberClient { + &self.inner + } + + /// Mutably access the underlying grpc api + pub fn raw_api_mut(&mut self) -> &mut api::subscriber_client::SubscriberClient { + &mut self.inner + } } -impl SubscriberClient +impl SubscriberClient where - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, + S: GrpcService + Clone, + S::Error: Into, + S::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, { /// Start a streaming subscription with the pubsub service. /// @@ -121,7 +131,7 @@ where &mut self, subscription: ProjectSubscriptionName, config: StreamSubscriptionConfig, - ) -> StreamSubscription { + ) -> StreamSubscription { let sub_name: String = subscription.clone().into(); let span = debug_span!("create_subscription", topic = sub_name); let _guard = span.enter(); @@ -129,21 +139,6 @@ where } } -impl std::ops::Deref for SubscriberClient { - type Target = - api::subscriber_client::SubscriberClient>; - - fn deref(&self) -> &Self::Target { - &self.inner - } -} - -impl std::ops::DerefMut for SubscriberClient { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.inner - } -} - /// A project and subscription name combined in a format expected by API calls, /// /// ``` diff --git a/src/pubsub/publish_sink.rs b/src/pubsub/publish_sink.rs index 25811db..574d295 100644 --- a/src/pubsub/publish_sink.rs +++ b/src/pubsub/publish_sink.rs @@ -1,6 +1,9 @@ -use super::{api, ProjectTopicName, PubSubRetryCheck}; +use super::{ + api::{self, publisher_client::PublisherClient as ApiPublisherClient}, + ProjectTopicName, PubSubRetryCheck, +}; use crate::{ - auth::grpc::AuthGrpcService, + grpc::{Body, BoxBody, Bytes, GrpcService, StdError}, retry_policy::{exponential_backoff, ExponentialBackoff, RetryOperation, RetryPolicy}, }; use futures::{future::BoxFuture, ready, stream, Sink, SinkExt, TryFutureExt}; @@ -9,7 +12,6 @@ use prost::Message; use std::{ cmp::Ordering, convert::Infallible, - error::Error as StdError, fmt, future::Future, pin::Pin, @@ -29,8 +31,6 @@ const MAX_MESSAGES_PER_PUBLISH: usize = 1000; const MAX_DATA_FIELD_BYTES: usize = 10 * MB; const MAX_PUBLISH_REQUEST_BYTES: usize = 10 * MB; -type ApiPublisherClient = - api::publisher_client::PublisherClient>; type Drain = futures::sink::Drain; type FlushOutput = (Si, Result<(), SinkError>); @@ -77,8 +77,8 @@ impl fmt::Display for SinkError { } } -impl StdError for SinkError { - fn source(&self) -> Option<&(dyn StdError + 'static)> { +impl std::error::Error for SinkError { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { match self { SinkError::Publish(err) => Some(err as &_), SinkError::Response(err) => Some(err as &_), @@ -103,7 +103,6 @@ config_default! { /// Configuration for a [publish sink](super::PublisherClient::publish_topic_sink) /// request #[derive(Debug, Clone, Copy, Eq, PartialEq, serde::Deserialize)] - #[non_exhaustive] pub struct PublishConfig { /// The amount of time to wait for a publish request to succeed before timing out // TODO use 60sec default value from go lib, or 5 seconds plus backoff from java lib @@ -155,12 +154,12 @@ config_default! { /// [`with_response_sink`]: PublishTopicSink::with_response_sink #[pin_project(project=PublishTopicSinkProjection)] pub struct PublishTopicSink< - C = crate::DefaultConnector, + S = crate::grpc::DefaultGrpcImpl, Retry = ExponentialBackoff, ResponseSink: Sink = Drain, > { /// the underlying client used to execute the requests - client: ApiPublisherClient, + client: ApiPublisherClient, /// the publish request currently being populated with messages buffer: PublishBuffer, @@ -194,16 +193,13 @@ enum FlushState> { Flushing(#[pin] BoxFuture<'static, FlushOutput>), } -impl PublishTopicSink, Drain> { +impl PublishTopicSink, Drain> { /// Create a new `PublishTopicSink` with the default retry policy and no response sink - pub(super) fn new( - client: ApiPublisherClient, + pub(crate) fn new( + client: ApiPublisherClient, topic: ProjectTopicName, config: PublishConfig, - ) -> Self - where - C: crate::Connect + Clone + Send + Sync + 'static, - { + ) -> Self { PublishTopicSink { client, buffer: PublishBuffer::new(String::from(topic)), @@ -218,7 +214,7 @@ impl PublishTopicSink, Drain> { } } -impl> PublishTopicSink { +impl> PublishTopicSink { /// Set the sink to receive successful publishing responses for published messages. /// /// By default, the `PublishTopicSink` will not report when messages are successfully published. @@ -232,7 +228,7 @@ impl> PublishTopicSink(self, sink: Si) -> PublishTopicSink + pub fn with_response_sink(self, sink: Si) -> PublishTopicSink where Si: Sink, { @@ -251,7 +247,7 @@ impl> PublishTopicSink(self, retry_policy: R) -> PublishTopicSink + pub fn with_retry_policy(self, retry_policy: R) -> PublishTopicSink where R: RetryPolicy, { @@ -266,17 +262,13 @@ impl> PublishTopicSink Sink for PublishTopicSink +impl Sink for PublishTopicSink where - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, + S: GrpcService + Clone + Send + 'static, + S::Future: Send + 'static, + S::Error: Into, + S::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, // TODO(type_alias_impl_trait) remove most of these 'static (and Send?) bounds Retry: RetryPolicy + 'static, Retry::RetryOp: Send + 'static, @@ -320,17 +312,13 @@ where // some methods are implemented against a projection instead of the base type to make nested // borrowing/pinning in callers easier -impl<'pin, C, Retry, ResponseSink> PublishTopicSinkProjection<'pin, C, Retry, ResponseSink> +impl<'pin, S, Retry, ResponseSink> PublishTopicSinkProjection<'pin, S, Retry, ResponseSink> where - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, + S: GrpcService + Clone + Send + 'static, + S::Future: Send + 'static, + S::Error: Into, + S::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, Retry: RetryPolicy + 'static, Retry::RetryOp: Send + 'static, >::Sleep: Send + 'static, @@ -420,7 +408,7 @@ where } fn flush( - client: &mut ApiPublisherClient, + client: &mut ApiPublisherClient, mut request: api::PublishRequest, mut response_sink: ResponseSink, retry_policy: &mut Retry, @@ -758,11 +746,11 @@ mod test { } } - fn dummy_client() -> ApiPublisherClient { + fn dummy_client() -> ApiPublisherClient { // by connecting to the endpoint lazily, this client will only work until the first request // is made (then it will error). That's good enough for testing certain functionality // that doesn't require the requests themselves, like validity checking - ApiPublisherClient::new(crate::auth::grpc::AuthGrpcService::new( + ApiPublisherClient::new(crate::grpc::DefaultGrpcImpl::new( tonic::transport::channel::Endpoint::from_static("https://localhost").connect_lazy(), None, vec![], @@ -996,6 +984,7 @@ mod test { .await?; publisher + .raw_api_mut() .create_topic(api::Topic { name: project_topic.clone().into(), ..api::Topic::default() @@ -1008,6 +997,7 @@ mod test { .await?; subscriber + .raw_api_mut() .create_subscription(api::Subscription { name: project_subscription.clone().into(), topic: project_topic.clone().into(), @@ -1017,7 +1007,7 @@ mod test { let (response_sink, responses) = futures::channel::mpsc::unbounded(); let publish_topic_sink = publisher - .publish_topic_sink(project_topic.clone()) + .publish_topic_sink(project_topic.clone(), PublishConfig::default()) .with_response_sink(response_sink); // send 10 messages, each large enough such that at most 4 messages fit into a single @@ -1038,6 +1028,7 @@ mod test { while received_messages.len() < sent_messages.len() { received_messages.extend( subscriber + .raw_api_mut() .pull(api::PullRequest { subscription: project_subscription.clone().into(), max_messages: 10, @@ -1098,6 +1089,7 @@ mod test { .await?; publisher + .raw_api_mut() .create_topic(api::Topic { name: project_topic.clone().into(), ..api::Topic::default() @@ -1106,7 +1098,7 @@ mod test { let (user_sink, mut user_sink_receiver) = futures::channel::mpsc::unbounded(); let mut publish_sink = publisher - .publish_topic_sink(project_topic.clone()) + .publish_topic_sink(project_topic.clone(), PublishConfig::default()) .with_response_sink(user_sink); let message = api::PubsubMessage { diff --git a/src/pubsub/streaming_subscription.rs b/src/pubsub/streaming_subscription.rs index 4fb1bad..18c4f39 100644 --- a/src/pubsub/streaming_subscription.rs +++ b/src/pubsub/streaming_subscription.rs @@ -16,7 +16,7 @@ use tonic::metadata::MetadataValue; use tracing::{debug, trace_span, Instrument}; use crate::{ - auth::grpc::AuthGrpcService, + grpc::{Body, BoxBody, Bytes, GrpcService, StdError}, pubsub::{api, PubSubRetryCheck}, retry_policy::{exponential_backoff, ExponentialBackoff, RetryOperation, RetryPolicy}, }; @@ -265,9 +265,11 @@ fn create_streaming_pull_request_stream( /// The stream returned by the /// [`stream_subscription`](crate::pubsub::SubscriberClient::stream_subscription) function #[pin_project] -pub struct StreamSubscription> -{ - state: StreamState, +pub struct StreamSubscription< + S = crate::grpc::DefaultGrpcImpl, + R = ExponentialBackoff, +> { + state: StreamState, // reserve the right to be !Unpin in the future without a major version bump _p: std::marker::PhantomPinned, } @@ -279,10 +281,9 @@ pub struct StreamSubscription` which then prohibits moving `self`, so no builder methods /// could be called after streaming -enum StreamState { +enum StreamState { Initialized { - client: - api::subscriber_client::SubscriberClient>, + client: api::subscriber_client::SubscriberClient, subscription: String, config: StreamSubscriptionConfig, retry_policy: R, @@ -294,11 +295,9 @@ enum StreamState { ), } -impl StreamSubscription { +impl StreamSubscription { pub(super) fn new( - client: api::subscriber_client::SubscriberClient< - AuthGrpcService, - >, + client: api::subscriber_client::SubscriberClient, subscription: String, config: StreamSubscriptionConfig, ) -> Self { @@ -330,7 +329,7 @@ impl StreamSubscription { } } -impl StreamSubscription { +impl StreamSubscription { /// Set the [`RetryPolicy`] to use for this streaming subscription. /// /// The stream will be reconnected if the policy indicates that an encountered @@ -338,7 +337,7 @@ impl StreamSubscription { // Because `poll_next` requires `Pin<&mut Self>`, this function cannot be called after the // stream has started because it moves `self`. That means that the retry policy can only be // changed before the polling starts, and is fixed from that point on - pub fn with_retry_policy(self, new_retry_policy: R) -> StreamSubscription + pub fn with_retry_policy(self, new_retry_policy: R) -> StreamSubscription where R: RetryPolicy<(), tonic::Status>, { @@ -366,17 +365,13 @@ impl StreamSubscription { } } -impl Stream for StreamSubscription +impl Stream for StreamSubscription where - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, + S: GrpcService + Send + 'static, + S::Future: Send + 'static, + S::Error: Into, + S::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, R: RetryPolicy<(), tonic::Status> + Send + 'static, R::RetryOp: Send + 'static, >::Sleep: Send + 'static, @@ -425,24 +420,18 @@ where /// /// The stream will internally reconnect on error if the given retry policy indicates the /// error is retriable -fn stream_from_client( - mut client: api::subscriber_client::SubscriberClient< - AuthGrpcService, - >, +fn stream_from_client( + mut client: api::subscriber_client::SubscriberClient, subscription: String, config: StreamSubscriptionConfig, mut retry_policy: R, ) -> impl Stream> + Send + 'static where - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, + S: GrpcService + Send + 'static, + S::Future: Send + 'static, + S::Error: Into, + S::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, R: RetryPolicy<(), tonic::Status> + Send + 'static, R::RetryOp: Send + 'static, >::Sleep: Send + 'static, diff --git a/src/storage.rs b/src/storage.rs index b4bb2cc..b84f775 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -154,23 +154,12 @@ pub enum ObjectError { } /// A client used to interact with Google Cloud Storage -pub struct StorageClient { - client: Client, - auth: Option>, +pub struct StorageClient { + client: Client>, + auth: Option, } -impl StorageClient -where - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, -{ +impl StorageClient { /// Add authentication to the request and send it, awaiting the response. The response will be /// collected into a single memory allocation (not a streamed body) async fn send_request( @@ -338,14 +327,11 @@ where } } -impl builder::ClientBuilder -where - C: Clone, -{ +impl builder::ClientBuilder { /// Create a client for access Google Cloud Storage - pub fn build_storage_client(&self) -> StorageClient { + pub fn build_storage_client(&self) -> StorageClient { StorageClient { - client: self.client.clone(), + client: hyper::client::Client::builder().build(crate::builder::https_connector()), auth: self.auth.clone(), } } diff --git a/tests/bigtable_client.rs b/tests/bigtable_client.rs index 08713b8..a80b5b9 100644 --- a/tests/bigtable_client.rs +++ b/tests/bigtable_client.rs @@ -88,7 +88,6 @@ mod bigtable_client_tests { assert_eq!("row1-key", row.key); assert_eq!(1, row.families.len()); assert_eq!("fam1", row.families[0].name); - dbg!(&row.families); assert_eq!(2, row.families[0].columns.len()); assert_eq!("col1", row.families[0].columns[0].qualifier); assert_eq!("data1", row.families[0].columns[0].cells[0].value); @@ -145,19 +144,19 @@ mod bigtable_client_tests { row.most_recent_cells().map(|c| c.value).collect::>() ); - let req = ReadRowsRequest { - table_name: format!( + let req = { + let mut r = ReadRowsRequest::default(); + r.table_name = format!( "projects/{}/instances/{}/tables/{table_name}", emulator.project(), emulator.instance() - ), - rows: Some(api::bigtable::v2::RowSet::default().with_key("row1-key")), - ..Default::default() + ); + r.rows = Some(api::bigtable::v2::RowSet::default().with_key("row1-key")); + r }; let rows: Vec<_> = client.read_rows(req).try_collect().await.unwrap(); assert_eq!(1, rows.len()); let row = &rows[0]; - dbg!(row); assert_eq!(2, row.families[0].columns[0].cells.len()); assert_eq!( vec!["data2".as_bytes()], diff --git a/tests/pubsub_client.rs b/tests/pubsub_client.rs index 2f6a1b7..a293c54 100644 --- a/tests/pubsub_client.rs +++ b/tests/pubsub_client.rs @@ -9,88 +9,59 @@ mod pubsub_client_tests { }; use ya_gcp::pubsub::{ self, api::PubsubMessage, emulator::Emulator, ProjectSubscriptionName, ProjectTopicName, - PublisherClient, SinkError, StreamSubscriptionConfig, + PublisherClient, SinkError, StreamSubscriptionConfig, SubscriberClient, }; /// Helper to create a new topic request. - async fn create_dummy_topic( - client: &mut PublisherClient, + async fn create_dummy_topic( + client: &mut PublisherClient, project_name: &str, topic: &str, - ) -> Result, tonic::Status> - where - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, - { - let request = pubsub::api::Topic { - name: format!("projects/{}/topics/{}", project_name, topic), - ..pubsub::api::Topic::default() + ) -> Result, tonic::Status> { + let request = { + let mut t = pubsub::api::Topic::default(); + t.name = format!("projects/{}/topics/{}", project_name, topic); + t }; - client.create_topic(request).await + client.raw_api_mut().create_topic(request).await } async fn create_dummy_subscription( - client: &mut pubsub::api::subscriber_client::SubscriberClient< - impl tonic::client::GrpcService< - tonic::body::BoxBody, - Error = ya_gcp::auth::grpc::AuthGrpcError< - tonic::transport::Error, - yup_oauth2::Error, - >, - ResponseBody = tonic::transport::Body, - >, - >, + client: &mut SubscriberClient, project_name: &str, subscription_name: &str, topic_name: &str, ) -> Result, tonic::Status> { - let request = pubsub::api::Subscription { - name: ProjectSubscriptionName::new(project_name, subscription_name).into(), - topic: ProjectTopicName::new(project_name, topic_name).into(), - ..pubsub::api::Subscription::default() + let request = { + let mut sub = pubsub::api::Subscription::default(); + sub.name = ProjectSubscriptionName::new(project_name, subscription_name).into(); + sub.topic = ProjectTopicName::new(project_name, topic_name).into(); + sub }; - client.create_subscription(request).await + client.raw_api_mut().create_subscription(request).await } - async fn publish_data( - client: &mut PublisherClient, + async fn publish_data( + client: &mut PublisherClient, project_name: &str, topic_name: &str, messages: impl IntoIterator, BTreeMap)>, - ) -> Result, tonic::Status> - where - C: tower::Service + Clone + Send + Sync + 'static, - C::Response: hyper::client::connect::Connection - + tokio::io::AsyncRead - + tokio::io::AsyncWrite - + Send - + Unpin - + 'static, - C::Future: Send + Unpin + 'static, - C::Error: Into>, - { - let messages = messages - .into_iter() - .map(|(data, attributes)| pubsub::api::PubsubMessage { - data: ::prost::bytes::Bytes::from(data), - attributes, - message_id: Default::default(), - publish_time: None, - ordering_key: Default::default(), - }); + ) -> Result, tonic::Status> { + let messages = messages.into_iter().map(|(data, attributes)| { + let mut msg = pubsub::api::PubsubMessage::default(); + msg.data = ::prost::bytes::Bytes::from(data); + msg.attributes = attributes; + msg + }); let (tx, rx) = futures::channel::mpsc::unbounded(); let message_sink = client - .publish_topic_sink(ProjectTopicName::new(project_name, topic_name)) + .publish_topic_sink( + ProjectTopicName::new(project_name, topic_name), + Default::default(), + ) .with_response_sink(tx); futures::stream::iter(messages.map(Ok)) @@ -143,9 +114,10 @@ mod pubsub_client_tests { .unwrap(); assert_eq!( - pubsub::api::Topic { - name: format!("projects/{}/topics/{}", emulator.project(), topic_name), - ..Default::default() + { + let mut t = pubsub::api::Topic::default(); + t.name = format!("projects/{}/topics/{}", emulator.project(), topic_name); + t }, create_dummy_topic(&mut client, emulator.project(), topic_name) .await @@ -169,16 +141,24 @@ mod pubsub_client_tests { .await .unwrap(); - let request = pubsub::api::GetTopicRequest { - topic: format!("projects/{}/topics/{}", emulator.project(), topic_name), + let request = { + let mut r = pubsub::api::GetTopicRequest::default(); + r.topic = format!("projects/{}/topics/{}", emulator.project(), topic_name); + r }; assert_eq!( - pubsub::api::Topic { - name: format!("projects/{}/topics/{}", emulator.project(), topic_name), - ..Default::default() + { + let mut t = pubsub::api::Topic::default(); + t.name = format!("projects/{}/topics/{}", emulator.project(), topic_name); + t }, - client.get_topic(request).await.unwrap().into_inner() + client + .raw_api_mut() + .get_topic(request) + .await + .unwrap() + .into_inner() ); } @@ -235,18 +215,21 @@ mod pubsub_client_tests { .await .unwrap(); - let request = pubsub::api::ListTopicSubscriptionsRequest { - topic: format!("projects/{}/topics/{}", emulator.project(), topic_name), - page_size: 10, - page_token: Default::default(), + let request = { + let mut r = pubsub::api::ListTopicSubscriptionsRequest::default(); + r.topic = format!("projects/{}/topics/{}", emulator.project(), topic_name); + r.page_size = 10; + r }; - let response = client.list_topic_subscriptions(request).await; + let response = client.raw_api_mut().list_topic_subscriptions(request).await; assert_eq!( - pubsub::api::ListTopicSubscriptionsResponse { - subscriptions: vec![], - next_page_token: String::new(), + { + let mut r = pubsub::api::ListTopicSubscriptionsResponse::default(); + r.subscriptions = vec![]; + r.next_page_token = String::new(); + r }, response.unwrap().into_inner() ); @@ -324,10 +307,12 @@ mod pubsub_client_tests { .into_inner(); #[allow(deprecated)] - let request = pubsub::api::PullRequest { - subscription: response.name, - return_immediately: false, - max_messages: num_messages as i32, + let request = { + let mut r = pubsub::api::PullRequest::default(); + r.subscription = response.name; + r.return_immediately = false; + r.max_messages = num_messages as i32; + r }; let mut attributes = BTreeMap::default(); @@ -346,7 +331,7 @@ mod pubsub_client_tests { assert_eq!(message_ids.len(), num_messages); - let response = subscription_client.pull(request).await; + let response = subscription_client.raw_api_mut().pull(request).await; let mut received_messages = response.unwrap().into_inner().received_messages; let message = received_messages.pop().unwrap(); @@ -487,9 +472,9 @@ mod pubsub_client_tests { let read_messages = stream .take(num_messages) - .map_ok(|(_ack_token, msg)| pubsub::api::PubsubMessage { - publish_time: None, - ..msg + .map_ok(|(_ack_token, mut msg)| { + msg.publish_time = None; + msg }) .try_collect::>() .await @@ -791,43 +776,51 @@ mod pubsub_client_tests { // update the subscription with a DeadLetterPolicy so that the delivery counter engages subscription_client - .update_subscription(pubsub::api::UpdateSubscriptionRequest { - subscription: Some(pubsub::api::Subscription { - dead_letter_policy: Some(pubsub::api::DeadLetterPolicy { - dead_letter_topic: format!( - "projects/{}/topics/{}", - emulator.project(), - topic_name - ), - max_delivery_attempts: 5, - }), - ..subscription - }), - update_mask: Some(pubsub::api::FieldMask { + .raw_api_mut() + .update_subscription({ + let mut update = pubsub::api::UpdateSubscriptionRequest::default(); + update.subscription = Some({ + let mut sub = subscription.clone(); + sub.dead_letter_policy = Some({ + let mut d = pubsub::api::DeadLetterPolicy::default(); + d.dead_letter_topic = + format!("projects/{}/topics/{}", emulator.project(), topic_name); + d.max_delivery_attempts = 5; + d + }); + sub + }); + update.update_mask = Some(pubsub::api::FieldMask { paths: vec!["dead_letter_policy".into()], - }), + }); + update }) .await .unwrap(); // send 1 message to the publisher. this should be delivered again after a nack publish_client - .publish(pubsub::api::PublishRequest { - topic: topic.name, - messages: vec![pubsub::api::PubsubMessage { - data: "foobar".into(), - ..pubsub::api::PubsubMessage::default() - }], + .raw_api_mut() + .publish({ + let mut p = pubsub::api::PublishRequest::default(); + p.topic = topic.name; + p.messages = vec![{ + let mut m = pubsub::api::PubsubMessage::default(); + m.data = "foobar".into(); + m + }]; + p }) .await .unwrap(); let mut subscription_stream = subscription_client.stream_subscription( ProjectSubscriptionName::new(emulator.project(), subscription_name), - StreamSubscriptionConfig { + { + let mut c = StreamSubscriptionConfig::default(); // set a large general deadline to prevent inadvertent delivery - stream_ack_deadline: Duration::from_secs(600), - ..StreamSubscriptionConfig::default() + c.stream_ack_deadline = Duration::from_secs(600); + c }, ); @@ -888,43 +881,51 @@ mod pubsub_client_tests { // update the subscription with a DeadLetterPolicy so that the delivery counter engages subscription_client - .update_subscription(pubsub::api::UpdateSubscriptionRequest { - subscription: Some(pubsub::api::Subscription { - dead_letter_policy: Some(pubsub::api::DeadLetterPolicy { - dead_letter_topic: format!( - "projects/{}/topics/{}", - emulator.project(), - topic_name - ), - max_delivery_attempts: 5, - }), - ..subscription - }), - update_mask: Some(pubsub::api::FieldMask { + .raw_api_mut() + .update_subscription({ + let mut update = pubsub::api::UpdateSubscriptionRequest::default(); + update.subscription = Some({ + let mut sub = subscription.clone(); + sub.dead_letter_policy = Some({ + let mut d = pubsub::api::DeadLetterPolicy::default(); + d.dead_letter_topic = + format!("projects/{}/topics/{}", emulator.project(), topic_name); + d.max_delivery_attempts = 5; + d + }); + sub + }); + update.update_mask = Some(pubsub::api::FieldMask { paths: vec!["dead_letter_policy".into()], - }), + }); + update }) .await .unwrap(); // send 1 message to the publisher. this should be delivered again after its deadline publish_client - .publish(pubsub::api::PublishRequest { - topic: topic.name, - messages: vec![pubsub::api::PubsubMessage { - data: "foobar".into(), - ..pubsub::api::PubsubMessage::default() - }], + .raw_api_mut() + .publish({ + let mut r = pubsub::api::PublishRequest::default(); + r.topic = topic.name; + r.messages = vec![{ + let mut m = pubsub::api::PubsubMessage::default(); + m.data = "foobar".into(); + m + }]; + r }) .await .unwrap(); let mut subscription_stream = subscription_client.stream_subscription( ProjectSubscriptionName::new(emulator.project(), subscription_name), - StreamSubscriptionConfig { + { + let mut c = StreamSubscriptionConfig::default(); // set a large general deadline to prevent inadvertent delivery - stream_ack_deadline: Duration::from_secs(600), - ..StreamSubscriptionConfig::default() + c.stream_ack_deadline = Duration::from_secs(600); + c }, ); @@ -996,12 +997,16 @@ mod pubsub_client_tests { // send 1 message to the publisher to get an ack token publish_client - .publish(pubsub::api::PublishRequest { - topic: topic.name, - messages: vec![pubsub::api::PubsubMessage { - data: "foobar".into(), - ..pubsub::api::PubsubMessage::default() - }], + .raw_api_mut() + .publish({ + let mut p = pubsub::api::PublishRequest::default(); + p.topic = topic.name; + p.messages = vec![{ + let mut m = pubsub::api::PubsubMessage::default(); + m.data = "foobar".into(); + m + }]; + p }) .await .unwrap(); From 18bc811c67e7e04a7915a8f3fc276f392c3b5ec7 Mon Sep 17 00:00:00 2001 From: Renar Narubin Date: Wed, 29 Nov 2023 18:58:57 -0800 Subject: [PATCH 2/3] undo overeager lock updates --- Cargo.lock | 878 +++++++++++++++++++++++++++++------------------------ 1 file changed, 484 insertions(+), 394 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 13b712f..2c38500 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,36 +2,15 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "aho-corasick" -version = "1.1.2" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ "memchr", ] -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -52,9 +31,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "approx" @@ -67,9 +46,9 @@ dependencies = [ [[package]] name = "async-channel" -version = "1.9.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" dependencies = [ "concurrent-queue", "event-listener", @@ -95,18 +74,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.15", ] [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.15", ] [[package]] @@ -128,9 +107,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.20" +version = "0.6.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "113713495a32dd0ab52baf5c10044725aa3aec00b31beda84218e469029b72a3" dependencies = [ "async-trait", "axum-core", @@ -171,21 +150,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - [[package]] name = "base64" version = "0.13.1" @@ -194,9 +158,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" [[package]] name = "bitflags" @@ -206,15 +170,15 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "bytes" -version = "1.5.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cc" @@ -233,17 +197,18 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", + "num-integer", "num-traits", "serde", + "time 0.1.45", "wasm-bindgen", - "windows-targets", + "winapi", ] [[package]] @@ -261,11 +226,21 @@ dependencies = [ "vec_map", ] +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + [[package]] name = "concurrent-queue" -version = "2.3.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" dependencies = [ "crossbeam-utils", ] @@ -294,21 +269,55 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if", ] [[package]] -name = "deranged" -version = "0.3.9" +name = "cxx" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" dependencies = [ - "powerfmt", - "serde", + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn 2.0.15", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.15", ] [[package]] @@ -326,9 +335,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "env_logger" @@ -340,12 +349,6 @@ dependencies = [ "regex", ] -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - [[package]] name = "event-listener" version = "2.5.3" @@ -360,9 +363,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ "percent-encoding", ] @@ -375,9 +378,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -390,9 +393,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -400,15 +403,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -417,38 +420,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.15", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -470,20 +473,14 @@ checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", ] -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - [[package]] name = "h2" -version = "0.3.22" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" dependencies = [ "bytes", "fnv", @@ -491,7 +488,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.1.0", + "indexmap", "slab", "tokio", "tokio-util", @@ -504,12 +501,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - [[package]] name = "heck" version = "0.3.3" @@ -530,15 +521,18 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] [[package]] name = "http" -version = "0.2.11" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", @@ -564,9 +558,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "humantime" @@ -586,9 +580,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" dependencies = [ "bytes", "futures-channel", @@ -601,7 +595,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2", "tokio", "tower-service", "tracing", @@ -638,32 +632,33 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.2" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" dependencies = [ - "cc", + "cxx", + "cxx-build", ] [[package]] name = "idna" -version = "0.5.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -676,17 +671,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" -dependencies = [ - "equivalent", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -698,26 +683,17 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" dependencies = [ "wasm-bindgen", ] @@ -734,11 +710,23 @@ version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +[[package]] +name = "link-cplusplus" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +dependencies = [ + "cc", +] + [[package]] name = "log" -version = "0.4.20" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if", +] [[package]] name = "matchers" @@ -746,20 +734,20 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] name = "matchit" -version = "0.7.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" [[package]] name = "memchr" -version = "2.6.4" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "mime" @@ -767,24 +755,16 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - [[package]] name = "mio" -version = "0.8.9" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", - "wasi", - "windows-sys", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.45.0", ] [[package]] @@ -797,22 +777,32 @@ dependencies = [ "winapi", ] +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.16.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.2.6", "libc", ] @@ -825,20 +815,11 @@ dependencies = [ "libc", ] -[[package]] -name = "object" -version = "0.32.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" -dependencies = [ - "memchr", -] - [[package]] name = "once_cell" -version = "1.18.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "openssl-probe" @@ -854,41 +835,41 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "paste" -version = "1.0.14" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pin-project" -version = "1.1.3" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 1.0.109", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -896,12 +877,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - [[package]] name = "ppv-lite86" version = "0.2.17" @@ -934,9 +909,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.70" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] @@ -958,10 +933,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", - "itertools 0.11.0", + "itertools", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.15", ] [[package]] @@ -997,9 +972,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -1073,14 +1048,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] @@ -1089,18 +1063,7 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] @@ -1109,12 +1072,6 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - [[package]] name = "remove_dir_all" version = "0.5.3" @@ -1126,23 +1083,32 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.16.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ "cc", - "getrandom", "libc", - "spin", - "untrusted", - "windows-sys", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", ] [[package]] -name = "rustc-demangle" -version = "0.1.23" +name = "ring" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "684d5e6e18f669ccebf64a92236bb7db9a34f07be010e3627368182027180866" +dependencies = [ + "cc", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] [[package]] name = "rustc_version" @@ -1160,7 +1126,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" dependencies = [ "log", - "ring", + "ring 0.17.6", "rustls-webpki", "sct", ] @@ -1179,11 +1145,11 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64 0.21.5", + "base64 0.21.0", ] [[package]] @@ -1192,39 +1158,45 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", - "untrusted", + "ring 0.17.6", + "untrusted 0.9.0", ] [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" dependencies = [ - "windows-sys", + "windows-sys 0.42.0", ] +[[package]] +name = "scratch" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" + [[package]] name = "sct" -version = "0.7.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -1235,9 +1207,9 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "security-framework" -version = "2.9.2" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ "bitflags", "core-foundation", @@ -1248,9 +1220,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" dependencies = [ "core-foundation-sys", "libc", @@ -1258,35 +1230,35 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.15", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", @@ -1307,9 +1279,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.7" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" dependencies = [ "lazy_static", ] @@ -1325,38 +1297,34 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.9" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.11.2" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "socket2" -version = "0.4.10" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", ] [[package]] -name = "socket2" -version = "0.5.5" +name = "spin" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -dependencies = [ - "libc", - "windows-sys", -] +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" @@ -1407,9 +1375,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" dependencies = [ "proc-macro2", "quote", @@ -1450,6 +1418,15 @@ dependencies = [ "remove_dir_all", ] +[[package]] +name = "termcolor" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +dependencies = [ + "winapi-util", +] + [[package]] name = "textwrap" version = "0.11.0" @@ -1461,22 +1438,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.15", ] [[package]] @@ -1491,14 +1468,23 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi", +] + +[[package]] +name = "time" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" dependencies = [ - "deranged", "libc", "num_threads", - "powerfmt", "serde", "time-core", "time-macros", @@ -1506,15 +1492,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" dependencies = [ "time-core", ] @@ -1536,20 +1522,20 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.34.0" +version = "1.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" dependencies = [ - "backtrace", + "autocfg", "bytes", "libc", "mio", "num_cpus", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", + "socket2", "tokio-macros", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -1564,13 +1550,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.15", ] [[package]] @@ -1585,9 +1571,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" dependencies = [ "futures-core", "pin-project-lite", @@ -1596,9 +1582,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" dependencies = [ "bytes", "futures-core", @@ -1617,7 +1603,7 @@ dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.5", + "base64 0.21.0", "bytes", "h2", "http", @@ -1648,7 +1634,7 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", - "indexmap 1.9.3", + "indexmap", "pin-project", "pin-project-lite", "rand 0.8.5", @@ -1674,10 +1660,11 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1686,20 +1673,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 1.0.109", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ "once_cell", "valuable", @@ -1707,31 +1694,20 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.4" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" dependencies = [ + "lazy_static", "log", - "once_cell", "tracing-core", ] [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" dependencies = [ "matchers", "nu-ansi-term", @@ -1742,18 +1718,19 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log 0.2.0", + "tracing-log", ] [[package]] name = "tracing-tree" -version = "0.2.5" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ec6adcab41b1391b08a308cc6302b79f8095d1673f6947c2dc65ffb028b0b2d" +checksum = "758e983ab7c54fee18403994507e7f212b9005e957ce7984996fac8d11facedb" dependencies = [ + "atty", "nu-ansi-term", "tracing-core", - "tracing-log 0.1.4", + "tracing-log", "tracing-subscriber", ] @@ -1771,9 +1748,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -1792,9 +1769,15 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "untrusted" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "untrusted" @@ -1804,9 +1787,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", "idna", @@ -1842,13 +1825,20 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "want" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ + "log", "try-lock", ] +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -1857,9 +1847,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1867,24 +1857,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 1.0.109", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1892,22 +1882,32 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" + +[[package]] +name = "web-sys" +version = "0.3.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +dependencies = [ + "js-sys", + "wasm-bindgen", +] [[package]] name = "webpki-roots" @@ -1931,6 +1931,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -1938,12 +1947,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-core" -version = "0.51.1" +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", ] [[package]] @@ -1952,65 +1985,122 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] name = "windows-targets" -version = "0.48.5" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.5" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "ya-gcp" @@ -2065,7 +2155,7 @@ dependencies = [ "http", "hyper", "hyper-rustls", - "itertools 0.10.5", + "itertools", "log", "percent-encoding", "rustls", @@ -2073,7 +2163,7 @@ dependencies = [ "seahash", "serde", "serde_json", - "time", + "time 0.3.20", "tokio", "tower-service", "url", From 8d6794f8dd66b9196ab9029f4caa15e337750f97 Mon Sep 17 00:00:00 2001 From: Renar Narubin Date: Wed, 29 Nov 2023 18:59:13 -0800 Subject: [PATCH 3/3] allow unused crate fn --- src/builder.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/builder.rs b/src/builder.rs index bf2764c..7a7614c 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -103,6 +103,7 @@ pub enum CreateBuilderError { type Client = hyper::client::Client>; +#[allow(unused)] // only used by some feature combinations pub(crate) fn https_connector() -> hyper_rustls::HttpsConnector { #[allow(unused_mut)] let mut roots = rustls::RootCertStore::empty();