From 92e0ebea980d3121929e283b2f4949876e4b53f0 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 30 Jul 2024 12:19:57 +0300 Subject: [PATCH] chore: update to http 1.x crates This requires updating prost crates to 0.13.x, tonic to 0.12.x and prost-wkt-* to 0.6.*. Only the examples still pull in http 0.x, due to https://github.com/seanmonstar/warp/pull/1090, but that shouldn't affect consumers of bigtable_rs. Co-Authored-By: Connor Brewster --- bigtable_rs/Cargo.toml | 19 +- bigtable_rs/build.rs | 169 ++++---- bigtable_rs/rustfmt.toml | 3 + bigtable_rs/src/auth_service.rs | 3 +- bigtable_rs/src/bigtable.rs | 8 +- bigtable_rs/src/google/google.api.rs | 24 +- bigtable_rs/src/google/google.bigtable.v2.rs | 388 +++++++++--------- .../google.cloud.conformance.bigtable.v2.rs | 4 +- bigtable_rs/src/google/google.rpc.rs | 2 +- 9 files changed, 312 insertions(+), 308 deletions(-) create mode 100644 bigtable_rs/rustfmt.toml diff --git a/bigtable_rs/Cargo.toml b/bigtable_rs/Cargo.toml index 522e16c..8878399 100644 --- a/bigtable_rs/Cargo.toml +++ b/bigtable_rs/Cargo.toml @@ -13,14 +13,15 @@ readme = "../README.md" [dependencies] # tonic, prost, and prost-types are need for build generated rs files -http = "0.2.11" +http = "1.1.0" +hyper-util = { version = "0.1.7", features = ["tokio"] } tokio = { version = "1.25.0", features = ["rt-multi-thread"] } -tonic = { version = "0.11.0", features = ["tls", "transport"] } +tonic = { version = "0.12.2", features = ["tls", "transport"] } tower = { version = "0.4" } -prost = "0.12.2" -prost-types = "0.12.2" -prost-wkt = "0.5.0" -prost-wkt-types = "0.5.0" +prost = "0.13.1" +prost-types = "0.13.1" +prost-wkt = { version = "0.6.0" } +prost-wkt-types = { version = "0.6.0" } serde = { version = "1.0.192", features = ["derive"] } serde_with = { version = "3.4.0", features = ["base64"] } # end of above part @@ -34,6 +35,6 @@ serde_json = "1.0.85" serde_path_to_error = "0.1.8" [build-dependencies] -tonic-build = { version = "0.11.0", features = ["cleanup-markdown"] } -prost-build = "0.12.2" -prost-wkt-build = "0.5.0" +tonic-build = { version = "0.12.2", features = ["cleanup-markdown"] } +prost-build = "0.13.1" +prost-wkt-build = { version = "0.6.0" } diff --git a/bigtable_rs/build.rs b/bigtable_rs/build.rs index c250e52..00267bd 100644 --- a/bigtable_rs/build.rs +++ b/bigtable_rs/build.rs @@ -2,90 +2,97 @@ /// https://github.com/fdeantoni/prost-wkt /// https://github.com/hyperium/tonic/tree/master/tonic-build /// https://github.com/tokio-rs/prost/issues/672 +use std::process::Command; + fn main() -> Result<(), Box> { // Uncomment the code below and cargo build again, when updating google protos - // use prost_wkt_build::{FileDescriptorSet, Message}; - // use std::{env, path::PathBuf}; - // let out = PathBuf::from(env::var("OUT_DIR").unwrap()); - // let descriptor_file = out.join("descriptors.bin"); - // - // tonic_build::configure() - // .build_server(false) - // .out_dir("src/google") - // .compile_well_known_types(true) - // .type_attribute(".", "#[serde_with::serde_as]") - // .type_attribute(".", "#[derive(serde::Serialize,serde::Deserialize)]") - // .type_attribute(".", "#[serde(rename_all = \"camelCase\")]") - // .type_attribute( - // ".google.cloud.conformance.bigtable.v2.ReadRowsTest", - // "#[serde(default)]", - // ) - // .field_attribute( - // ".google.bigtable.v2.ReadRowsResponse.CellChunk.row_key", - // "#[serde_as(as = \"serde_with::base64::Base64\")]", - // ) - // .field_attribute( - // ".google.bigtable.v2.ReadRowsResponse.CellChunk.row_key", - // "#[serde(default)]", - // ) - // .field_attribute( - // ".google.bigtable.v2.ReadRowsResponse.CellChunk.qualifier", - // "#[serde_as(as = \"Option\")]", - // ) - // .field_attribute( - // ".google.bigtable.v2.ReadRowsResponse.CellChunk.qualifier", - // "#[serde(default)]", - // ) - // .field_attribute( - // ".google.bigtable.v2.ReadRowsResponse.CellChunk.value", - // "#[serde_as(as = \"serde_with::base64::Base64\")]", - // ) - // .field_attribute( - // ".google.bigtable.v2.ReadRowsResponse.CellChunk.timestamp_micros", - // "#[serde(default)]", - // ) - // .field_attribute( - // ".google.bigtable.v2.ReadRowsResponse.CellChunk.labels", - // "#[serde(default)]", - // ) - // .field_attribute( - // ".google.bigtable.v2.ReadRowsResponse.CellChunk.value", - // "#[serde(default)]", - // ) - // .field_attribute( - // ".google.bigtable.v2.ReadRowsResponse.CellChunk.timestamp_micros", - // "#[serde_as(as = \"serde_with::DisplayFromStr\")]", - // ) - // .field_attribute( - // ".google.bigtable.v2.ReadRowsResponse.CellChunk.value_size", - // "#[serde(default)]", - // ) - // .field_attribute( - // ".google.cloud.conformance.bigtable.v2.ReadRowsTest.Result.timestamp_micros", - // "#[serde_as(as = \"serde_with::DisplayFromStr\")]", - // ) - // .extern_path( - // ".google.protobuf.BytesValue", - // "::prost::alloc::vec::Vec", - // ) - // .extern_path( - // ".google.protobuf.StringValue", - // "::prost::alloc::string::String", - // ) - // .extern_path(".google.protobuf", "::prost_wkt_types") - // .file_descriptor_set_path(&descriptor_file) - // .compile( - // &[ - // "../googleapis/google/bigtable/v2/bigtable.proto", - // "../googleapis/test/bigtable_test.proto", // only works with fork https://github.com/liufuyang/googleapis - // ], - // &["../googleapis"], - // )?; - // - // let descriptor_bytes = std::fs::read(descriptor_file).unwrap(); - // let descriptor = FileDescriptorSet::decode(&descriptor_bytes[..]).unwrap(); - // prost_wkt_build::add_serde(out, descriptor); + use prost_wkt_build::{FileDescriptorSet, Message}; + use std::{env, path::PathBuf}; + let out = PathBuf::from(env::var("OUT_DIR").unwrap()); + let descriptor_file = out.join("descriptors.bin"); + + tonic_build::configure() + .build_server(false) + .out_dir("src/google") + .compile_well_known_types(true) + .type_attribute(".", "#[serde_with::serde_as]") + .type_attribute(".", "#[derive(serde::Serialize,serde::Deserialize)]") + .type_attribute(".", "#[serde(rename_all = \"camelCase\")]") + .type_attribute( + ".google.cloud.conformance.bigtable.v2.ReadRowsTest", + "#[serde(default)]", + ) + .field_attribute( + ".google.bigtable.v2.ReadRowsResponse.CellChunk.row_key", + "#[serde_as(as = \"serde_with::base64::Base64\")]", + ) + .field_attribute( + ".google.bigtable.v2.ReadRowsResponse.CellChunk.row_key", + "#[serde(default)]", + ) + .field_attribute( + ".google.bigtable.v2.ReadRowsResponse.CellChunk.qualifier", + "#[serde_as(as = \"Option\")]", + ) + .field_attribute( + ".google.bigtable.v2.ReadRowsResponse.CellChunk.qualifier", + "#[serde(default)]", + ) + .field_attribute( + ".google.bigtable.v2.ReadRowsResponse.CellChunk.value", + "#[serde_as(as = \"serde_with::base64::Base64\")]", + ) + .field_attribute( + ".google.bigtable.v2.ReadRowsResponse.CellChunk.timestamp_micros", + "#[serde(default)]", + ) + .field_attribute( + ".google.bigtable.v2.ReadRowsResponse.CellChunk.labels", + "#[serde(default)]", + ) + .field_attribute( + ".google.bigtable.v2.ReadRowsResponse.CellChunk.value", + "#[serde(default)]", + ) + .field_attribute( + ".google.bigtable.v2.ReadRowsResponse.CellChunk.timestamp_micros", + "#[serde_as(as = \"serde_with::DisplayFromStr\")]", + ) + .field_attribute( + ".google.bigtable.v2.ReadRowsResponse.CellChunk.value_size", + "#[serde(default)]", + ) + .field_attribute( + ".google.cloud.conformance.bigtable.v2.ReadRowsTest.Result.timestamp_micros", + "#[serde_as(as = \"serde_with::DisplayFromStr\")]", + ) + .extern_path( + ".google.protobuf.BytesValue", + "::prost::alloc::vec::Vec", + ) + .extern_path( + ".google.protobuf.StringValue", + "::prost::alloc::string::String", + ) + .extern_path(".google.protobuf", "::prost_wkt_types") + .file_descriptor_set_path(&descriptor_file) + .compile( + &[ + "../googleapis/google/bigtable/v2/bigtable.proto", + "../googleapis/test/bigtable_test.proto", // only works with fork https://github.com/liufuyang/googleapis + ], + &["../googleapis"], + )?; + + let descriptor_bytes = std::fs::read(descriptor_file).unwrap(); + let descriptor = FileDescriptorSet::decode(&descriptor_bytes[..]).unwrap(); + prost_wkt_build::add_serde(out, descriptor); + + Command::new("cargo") + .arg("fmt") + .output() + .expect("failed to execute cargo fmt"); Ok(()) } diff --git a/bigtable_rs/rustfmt.toml b/bigtable_rs/rustfmt.toml new file mode 100644 index 0000000..75f0bd6 --- /dev/null +++ b/bigtable_rs/rustfmt.toml @@ -0,0 +1,3 @@ +ignore = [ + "src/google", +] \ No newline at end of file diff --git a/bigtable_rs/src/auth_service.rs b/bigtable_rs/src/auth_service.rs index 96fc505..4104949 100644 --- a/bigtable_rs/src/auth_service.rs +++ b/bigtable_rs/src/auth_service.rs @@ -7,7 +7,6 @@ use gcp_auth::TokenProvider; use http::{HeaderValue, Request, Response}; use log::debug; use tonic::body::BoxBody; -use tonic::transport::Body; use tonic::transport::Channel; use tower::Service; @@ -33,7 +32,7 @@ impl AuthSvc { } impl Service> for AuthSvc { - type Response = Response; + type Response = Response; type Error = Box; #[allow(clippy::type_complexity)] type Future = Pin> + Send>>; diff --git a/bigtable_rs/src/bigtable.rs b/bigtable_rs/src/bigtable.rs index 2fdce6e..9fc12ea 100644 --- a/bigtable_rs/src/bigtable.rs +++ b/bigtable_rs/src/bigtable.rs @@ -364,7 +364,13 @@ impl BigTableConnection { let path: String = path.to_string(); let connector = tower::service_fn({ - move |_: tonic::transport::Uri| UnixStream::connect(path.clone()) + move |_: tonic::transport::Uri| { + let path = path.clone(); + async move { + let stream = UnixStream::connect(path).await?; + Ok::<_, std::io::Error>(hyper_util::rt::TokioIo::new(stream)) + } + } }); endpoint.connect_with_connector_lazy(connector) diff --git a/bigtable_rs/src/google/google.api.rs b/bigtable_rs/src/google/google.api.rs index c22f386..33b7417 100644 --- a/bigtable_rs/src/google/google.api.rs +++ b/bigtable_rs/src/google/google.api.rs @@ -1,10 +1,10 @@ +// This file is @generated by prost-build. /// 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 /// to one or more HTTP REST API methods. #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Http { /// A list of HTTP configuration rules that apply to individual API methods. @@ -309,7 +309,6 @@ pub struct Http { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HttpRule { /// Selects a method to which this rule applies. @@ -353,7 +352,6 @@ pub mod http_rule { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Pattern { /// Maps to HTTP GET. Used for listing and getting information about @@ -384,7 +382,6 @@ pub mod http_rule { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CustomHttpPattern { /// The name of this custom HTTP verb. @@ -476,7 +473,6 @@ impl LaunchStage { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommonLanguageSettings { /// Link to automatically generated reference documentation. Example: @@ -492,7 +488,6 @@ pub struct CommonLanguageSettings { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClientLibrarySettings { /// Version of the API to apply these settings to. This is the full protobuf @@ -538,7 +533,6 @@ pub struct ClientLibrarySettings { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Publishing { /// A list of API method settings, e.g. the behavior for methods that use the @@ -586,7 +580,6 @@ pub struct Publishing { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct JavaSettings { /// The package name to use in Java. Clobbers the java_package option @@ -629,7 +622,6 @@ pub struct JavaSettings { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CppSettings { /// Some settings. @@ -640,7 +632,6 @@ pub struct CppSettings { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PhpSettings { /// Some settings. @@ -651,7 +642,6 @@ pub struct PhpSettings { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PythonSettings { /// Some settings. @@ -662,7 +652,6 @@ pub struct PythonSettings { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct NodeSettings { /// Some settings. @@ -673,7 +662,6 @@ pub struct NodeSettings { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DotnetSettings { /// Some settings. @@ -722,7 +710,6 @@ pub struct DotnetSettings { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RubySettings { /// Some settings. @@ -733,7 +720,6 @@ pub struct RubySettings { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GoSettings { /// Some settings. @@ -744,7 +730,6 @@ pub struct GoSettings { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MethodSettings { /// The fully qualified name of the method, for which the options below apply. @@ -781,8 +766,7 @@ pub mod method_settings { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct LongRunning { /// Initial delay after which the first poll request will be made. /// Default value: 5 seconds. @@ -1053,7 +1037,6 @@ impl FieldBehavior { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResourceDescriptor { /// The resource type. It must be in the format of @@ -1244,7 +1227,6 @@ pub mod resource_descriptor { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResourceReference { /// The resource type that the annotated field references. @@ -1703,7 +1685,6 @@ pub struct ResourceReference { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoutingRule { /// A collection of Routing Parameter specifications. @@ -1719,7 +1700,6 @@ pub struct RoutingRule { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoutingParameter { /// A request field to extract the header key-value pair from. diff --git a/bigtable_rs/src/google/google.bigtable.v2.rs b/bigtable_rs/src/google/google.bigtable.v2.rs index 6085827..bc40e74 100644 --- a/bigtable_rs/src/google/google.bigtable.v2.rs +++ b/bigtable_rs/src/google/google.bigtable.v2.rs @@ -1,9 +1,9 @@ +// This file is @generated by prost-build. /// Specifies the complete (requested) contents of a single row of a table. /// Rows which exceed 256MiB in size cannot be read in full. #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Row { /// The unique key which identifies this row within its table. This is the same @@ -21,7 +21,6 @@ pub struct Row { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Family { /// The unique key which identifies this family within its row. This is the @@ -41,7 +40,6 @@ pub struct Family { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Column { /// The unique key which identifies this column within its family. This is the @@ -59,7 +57,6 @@ pub struct Column { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Cell { /// The cell's stored timestamp, which also uniquely identifies it within @@ -83,7 +80,6 @@ pub struct Cell { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RowRange { /// The row key at which to start the range. @@ -102,7 +98,6 @@ pub mod row_range { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum StartKey { /// Used when giving an inclusive lower bound for the range. @@ -117,7 +112,6 @@ pub mod row_range { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum EndKey { /// Used when giving an exclusive upper bound for the range. @@ -132,7 +126,6 @@ pub mod row_range { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RowSet { /// Single rows included in the set. @@ -149,7 +142,6 @@ pub struct RowSet { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ColumnRange { /// The name of the column family within which this range falls. @@ -171,7 +163,6 @@ pub mod column_range { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum StartQualifier { /// Used when giving an inclusive lower bound for the range. @@ -186,7 +177,6 @@ pub mod column_range { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum EndQualifier { /// Used when giving an inclusive upper bound for the range. @@ -201,8 +191,7 @@ pub mod column_range { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct TimestampRange { /// Inclusive lower bound. If left empty, interpreted as 0. #[prost(int64, tag = "1")] @@ -215,7 +204,6 @@ pub struct TimestampRange { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValueRange { /// The value at which to start the range. @@ -234,7 +222,6 @@ pub mod value_range { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum StartValue { /// Used when giving an inclusive lower bound for the range. @@ -249,7 +236,6 @@ pub mod value_range { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum EndValue { /// Used when giving an inclusive upper bound for the range. @@ -296,7 +282,6 @@ pub mod value_range { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RowFilter { /// Which of the possible RowFilter types to apply. If none are set, this @@ -313,7 +298,6 @@ pub mod row_filter { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Chain { /// The elements of "filters" are chained together to process the input row: @@ -327,7 +311,6 @@ pub mod row_filter { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[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 @@ -370,29 +353,33 @@ pub mod row_filter { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Condition { /// If `predicate_filter` outputs any cells, then `true_filter` will be /// evaluated on the input row. Otherwise, `false_filter` will be evaluated. #[prost(message, optional, boxed, tag = "1")] - pub predicate_filter: ::core::option::Option<::prost::alloc::boxed::Box>, + pub predicate_filter: ::core::option::Option< + ::prost::alloc::boxed::Box, + >, /// The filter to apply to the input row if `predicate_filter` returns any /// results. If not provided, no results will be returned in the true case. #[prost(message, optional, boxed, tag = "2")] - pub true_filter: ::core::option::Option<::prost::alloc::boxed::Box>, + pub true_filter: ::core::option::Option< + ::prost::alloc::boxed::Box, + >, /// The filter to apply to the input row if `predicate_filter` does not /// return any results. If not provided, no results will be returned in the /// false case. #[prost(message, optional, boxed, tag = "3")] - pub false_filter: ::core::option::Option<::prost::alloc::boxed::Box>, + pub false_filter: ::core::option::Option< + ::prost::alloc::boxed::Box, + >, } /// Which of the possible RowFilter types to apply. If none are set, this /// RowFilter returns all cells in the input row. #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Filter { /// Applies several RowFilters to the data in sequence, progressively @@ -565,7 +552,6 @@ pub mod row_filter { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Mutation { /// Which of the possible Mutation types to apply. @@ -578,7 +564,6 @@ pub mod mutation { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetCell { /// The name of the family into which new data should be written. @@ -605,7 +590,6 @@ pub mod mutation { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteFromColumn { /// The name of the family from which cells should be deleted. @@ -624,7 +608,6 @@ pub mod mutation { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteFromFamily { /// The name of the family from which cells should be deleted. @@ -636,14 +619,12 @@ pub mod mutation { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct DeleteFromRow {} /// Which of the possible Mutation types to apply. #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Mutation { /// Set a cell's value. @@ -665,7 +646,6 @@ pub mod mutation { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadModifyWriteRule { /// The name of the family to which the read/modify/write should be applied. @@ -689,7 +669,6 @@ pub mod read_modify_write_rule { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Rule { /// Rule specifying that `append_value` be appended to the existing value. @@ -710,7 +689,6 @@ pub mod read_modify_write_rule { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamPartition { /// The row range covered by this partition and is specified by @@ -724,7 +702,6 @@ pub struct StreamPartition { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamContinuationTokens { /// List of continuation tokens. @@ -737,7 +714,6 @@ pub struct StreamContinuationTokens { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamContinuationToken { /// The partition that this token applies to. @@ -753,8 +729,7 @@ pub struct StreamContinuationToken { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ReadIterationStats { /// The rows seen (scanned) as part of the request. This includes the count of /// rows returned, as captured below. @@ -777,8 +752,7 @@ pub struct ReadIterationStats { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestLatencyStats { /// The latency measured by the frontend server handling this request, from /// when the request was received, to when this value is sent back in the @@ -804,8 +778,7 @@ pub struct RequestLatencyStats { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct FullReadStatsView { /// Iteration stats describe how efficient the read is, e.g. comparing /// rows seen vs. rows returned or cells seen vs cells returned can provide an @@ -826,8 +799,7 @@ pub struct FullReadStatsView { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestStats { /// Information pertaining to each request type received. The type is chosen /// based on the requested view. @@ -845,8 +817,7 @@ pub mod request_stats { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum StatsView { /// Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL /// view, see package google.bigtable.v2. @@ -858,7 +829,6 @@ pub mod request_stats { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadRowsRequest { /// Required. The unique name of the table from which to read. @@ -910,7 +880,17 @@ pub mod read_rows_request { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] #[repr(i32)] pub enum RequestStatsView { /// The default / unset value. The API will default to the NONE option below. @@ -949,7 +929,6 @@ pub mod read_rows_request { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadRowsResponse { /// A collection of a row's contents as part of the read request. @@ -994,7 +973,6 @@ pub mod read_rows_response { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CellChunk { /// The row key for this chunk of data. If the row key is empty, @@ -1066,8 +1044,7 @@ pub mod read_rows_response { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum RowStatus { /// Indicates that the client should drop all previous chunks for /// `row_key`, as it will be re-read from the beginning. @@ -1084,7 +1061,6 @@ pub mod read_rows_response { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SampleRowKeysRequest { /// Required. The unique name of the table from which to sample row keys. @@ -1101,7 +1077,6 @@ pub struct SampleRowKeysRequest { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SampleRowKeysResponse { /// Sorted streamed sequence of sample row keys in the table. The table might @@ -1124,7 +1099,6 @@ pub struct SampleRowKeysResponse { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MutateRowRequest { /// Required. The unique name of the table to which the mutation should be @@ -1149,14 +1123,12 @@ pub struct MutateRowRequest { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MutateRowResponse {} /// Request message for BigtableService.MutateRows. #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MutateRowsRequest { /// Required. The unique name of the table to which the mutations should be @@ -1181,7 +1153,6 @@ pub mod mutate_rows_request { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Entry { /// The key of the row to which the `mutations` should be applied. @@ -1198,7 +1169,6 @@ pub mod mutate_rows_request { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[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. @@ -1216,7 +1186,6 @@ pub mod mutate_rows_response { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Entry { /// The index into the original request's `entries` list of the Entry @@ -1235,8 +1204,7 @@ pub mod mutate_rows_response { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, 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 @@ -1262,7 +1230,6 @@ pub struct RateLimitInfo { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CheckAndMutateRowRequest { /// Required. The unique name of the table to which the conditional mutation @@ -1303,8 +1270,7 @@ pub struct CheckAndMutateRowRequest { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct CheckAndMutateRowResponse { /// Whether or not the request's `predicate_filter` yielded any results for /// the specified row. @@ -1315,7 +1281,6 @@ pub struct CheckAndMutateRowResponse { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PingAndWarmRequest { /// Required. The unique name of the instance to check permissions for as well @@ -1332,14 +1297,12 @@ pub struct PingAndWarmRequest { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PingAndWarmResponse {} /// Request message for Bigtable.ReadModifyWriteRow. #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadModifyWriteRowRequest { /// Required. The unique name of the table to which the read/modify/write rules @@ -1365,7 +1328,6 @@ pub struct ReadModifyWriteRowRequest { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadModifyWriteRowResponse { /// A Row containing the new contents of all cells modified by the request. @@ -1377,7 +1339,6 @@ pub struct ReadModifyWriteRowResponse { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenerateInitialChangeStreamPartitionsRequest { /// Required. The unique name of the table from which to get change stream @@ -1397,7 +1358,6 @@ pub struct GenerateInitialChangeStreamPartitionsRequest { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenerateInitialChangeStreamPartitionsResponse { /// A partition of the change stream. @@ -1409,7 +1369,6 @@ pub struct GenerateInitialChangeStreamPartitionsResponse { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadChangeStreamRequest { /// Required. The unique name of the table from which to read a change stream. @@ -1445,7 +1404,6 @@ pub mod read_change_stream_request { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum StartFrom { /// Start reading the stream at the specified timestamp. This timestamp must @@ -1473,7 +1431,6 @@ pub mod read_change_stream_request { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadChangeStreamResponse { /// The data or control message on the stream. @@ -1486,7 +1443,6 @@ pub mod read_change_stream_response { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MutationChunk { /// If set, then the mutation is a `SetCell` with a chunked value across @@ -1507,8 +1463,7 @@ pub mod read_change_stream_response { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ChunkInfo { /// The total value size of all the chunks that make up the `SetCell`. #[prost(int32, tag = "1")] @@ -1531,7 +1486,6 @@ pub mod read_change_stream_response { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DataChange { /// The type of the mutation. @@ -1578,7 +1532,9 @@ pub mod read_change_stream_response { /// an example usage see /// #[prost(message, optional, tag = "10")] - pub estimated_low_watermark: ::core::option::Option<::prost_wkt_types::Timestamp>, + pub estimated_low_watermark: ::core::option::Option< + ::prost_wkt_types::Timestamp, + >, } /// Nested message and enum types in `DataChange`. pub mod data_change { @@ -1587,7 +1543,15 @@ pub mod read_change_stream_response { #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] #[derive( - Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration, + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration )] #[repr(i32)] pub enum Type { @@ -1631,7 +1595,6 @@ pub mod read_change_stream_response { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Heartbeat { /// A token that can be provided to a subsequent `ReadChangeStream` call @@ -1645,7 +1608,9 @@ pub mod read_change_stream_response { /// an example usage see /// #[prost(message, optional, tag = "2")] - pub estimated_low_watermark: ::core::option::Option<::prost_wkt_types::Timestamp>, + pub estimated_low_watermark: ::core::option::Option< + ::prost_wkt_types::Timestamp, + >, } /// A message indicating that the client should stop reading from the stream. /// If status is OK and `continuation_tokens` & `new_partitions` are empty, the @@ -1670,7 +1635,6 @@ pub mod read_change_stream_response { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CloseStream { /// The status of the stream. @@ -1679,7 +1643,9 @@ pub mod read_change_stream_response { /// If non-empty, contains the information needed to resume reading their /// associated partitions. #[prost(message, repeated, tag = "2")] - pub continuation_tokens: ::prost::alloc::vec::Vec, + pub continuation_tokens: ::prost::alloc::vec::Vec< + super::StreamContinuationToken, + >, /// If non-empty, contains the new partitions to start reading from, which /// are related to but not necessarily identical to the partitions for the /// above `continuation_tokens`. @@ -1690,7 +1656,6 @@ pub mod read_change_stream_response { #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum StreamRecord { /// A mutation to the partition. @@ -1707,8 +1672,8 @@ pub mod read_change_stream_response { /// Generated client implementations. pub mod bigtable_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; use tonic::codegen::*; + use tonic::codegen::http::Uri; /// Service for reading from and writing to existing Bigtable tables. #[derive(Debug, Clone)] pub struct BigtableClient { @@ -1729,8 +1694,8 @@ pub mod bigtable_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -1753,8 +1718,9 @@ pub mod bigtable_client { >::ResponseBody, >, >, - >>::Error: - Into + Send + Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { BigtableClient::new(InterceptedService::new(inner, interceptor)) } @@ -1801,15 +1767,19 @@ pub mod bigtable_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + 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.v2.Bigtable/ReadRows"); + let path = http::uri::PathAndQuery::from_static( + "/google.bigtable.v2.Bigtable/ReadRows", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("google.bigtable.v2.Bigtable", "ReadRows")); @@ -1826,20 +1796,22 @@ pub mod bigtable_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + 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.v2.Bigtable/SampleRowKeys"); + let path = http::uri::PathAndQuery::from_static( + "/google.bigtable.v2.Bigtable/SampleRowKeys", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "google.bigtable.v2.Bigtable", - "SampleRowKeys", - )); + req.extensions_mut() + .insert(GrpcMethod::new("google.bigtable.v2.Bigtable", "SampleRowKeys")); self.inner.server_streaming(req, path, codec).await } /// Mutates a row atomically. Cells already present in the row are left @@ -1847,16 +1819,23 @@ pub mod bigtable_client { pub async fn mutate_row( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> 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.v2.Bigtable/MutateRow"); + let path = http::uri::PathAndQuery::from_static( + "/google.bigtable.v2.Bigtable/MutateRow", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("google.bigtable.v2.Bigtable", "MutateRow")); @@ -1872,15 +1851,19 @@ pub mod bigtable_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + 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.v2.Bigtable/MutateRows"); + let path = http::uri::PathAndQuery::from_static( + "/google.bigtable.v2.Bigtable/MutateRows", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("google.bigtable.v2.Bigtable", "MutateRows")); @@ -1890,23 +1873,28 @@ pub mod bigtable_client { pub async fn check_and_mutate_row( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> 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.v2.Bigtable/CheckAndMutateRow", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "google.bigtable.v2.Bigtable", - "CheckAndMutateRow", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("google.bigtable.v2.Bigtable", "CheckAndMutateRow"), + ); self.inner.unary(req, path, codec).await } /// Warm up associated instance metadata for this connection. @@ -1914,22 +1902,26 @@ pub mod bigtable_client { pub async fn ping_and_warm( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> 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.v2.Bigtable/PingAndWarm"); + let path = http::uri::PathAndQuery::from_static( + "/google.bigtable.v2.Bigtable/PingAndWarm", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "google.bigtable.v2.Bigtable", - "PingAndWarm", - )); + req.extensions_mut() + .insert(GrpcMethod::new("google.bigtable.v2.Bigtable", "PingAndWarm")); self.inner.unary(req, path, codec).await } /// Modifies a row atomically on the server. The method reads the latest @@ -1940,23 +1932,28 @@ pub mod bigtable_client { pub async fn read_modify_write_row( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> 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.v2.Bigtable/ReadModifyWriteRow", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "google.bigtable.v2.Bigtable", - "ReadModifyWriteRow", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("google.bigtable.v2.Bigtable", "ReadModifyWriteRow"), + ); self.inner.unary(req, path, codec).await } /// NOTE: This API is intended to be used by Apache Beam BigtableIO. @@ -1965,28 +1962,38 @@ pub mod bigtable_client { /// Partitions can be read with `ReadChangeStream`. pub async fn generate_initial_change_stream_partitions( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest< + super::GenerateInitialChangeStreamPartitionsRequest, + >, ) -> std::result::Result< tonic::Response< - tonic::codec::Streaming, + tonic::codec::Streaming< + super::GenerateInitialChangeStreamPartitionsResponse, + >, >, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + 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.v2.Bigtable/GenerateInitialChangeStreamPartitions", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "google.bigtable.v2.Bigtable", - "GenerateInitialChangeStreamPartitions", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "google.bigtable.v2.Bigtable", + "GenerateInitialChangeStreamPartitions", + ), + ); self.inner.server_streaming(req, path, codec).await } /// NOTE: This API is intended to be used by Apache Beam BigtableIO. @@ -2000,21 +2007,24 @@ pub mod bigtable_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + 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.v2.Bigtable/ReadChangeStream", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "google.bigtable.v2.Bigtable", - "ReadChangeStream", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("google.bigtable.v2.Bigtable", "ReadChangeStream"), + ); self.inner.server_streaming(req, path, codec).await } } diff --git a/bigtable_rs/src/google/google.cloud.conformance.bigtable.v2.rs b/bigtable_rs/src/google/google.cloud.conformance.bigtable.v2.rs index 2e2b055..1ce8e07 100644 --- a/bigtable_rs/src/google/google.cloud.conformance.bigtable.v2.rs +++ b/bigtable_rs/src/google/google.cloud.conformance.bigtable.v2.rs @@ -1,7 +1,7 @@ +// This file is @generated by prost-build. #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TestFile { #[prost(message, repeated, tag = "1")] @@ -11,7 +11,6 @@ pub struct TestFile { #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] #[serde(default)] -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadRowsTest { #[prost(string, tag = "1")] @@ -31,7 +30,6 @@ pub mod read_rows_test { #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] #[serde(default)] - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { #[prost(string, tag = "1")] diff --git a/bigtable_rs/src/google/google.rpc.rs b/bigtable_rs/src/google/google.rpc.rs index c683800..331cd6e 100644 --- a/bigtable_rs/src/google/google.rpc.rs +++ b/bigtable_rs/src/google/google.rpc.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// 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 @@ -8,7 +9,6 @@ #[serde_with::serde_as] #[derive(serde::Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[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