#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Row {
#[prost(bytes = "vec", tag = "1")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "2")]
pub families: ::prost::alloc::vec::Vec<Family>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Family {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub columns: ::prost::alloc::vec::Vec<Column>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Column {
#[prost(bytes = "vec", tag = "1")]
pub qualifier: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "2")]
pub cells: ::prost::alloc::vec::Vec<Cell>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Cell {
#[prost(int64, tag = "1")]
pub timestamp_micros: i64,
#[prost(bytes = "vec", tag = "2")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(string, repeated, tag = "3")]
pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RowRange {
#[prost(oneof = "row_range::StartKey", tags = "1, 2")]
pub start_key: ::core::option::Option<row_range::StartKey>,
#[prost(oneof = "row_range::EndKey", tags = "3, 4")]
pub end_key: ::core::option::Option<row_range::EndKey>,
}
pub mod row_range {
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StartKey {
#[prost(bytes, tag = "1")]
StartKeyClosed(::prost::alloc::vec::Vec<u8>),
#[prost(bytes, tag = "2")]
StartKeyOpen(::prost::alloc::vec::Vec<u8>),
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EndKey {
#[prost(bytes, tag = "3")]
EndKeyOpen(::prost::alloc::vec::Vec<u8>),
#[prost(bytes, tag = "4")]
EndKeyClosed(::prost::alloc::vec::Vec<u8>),
}
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RowSet {
#[prost(bytes = "vec", repeated, tag = "1")]
pub row_keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(message, repeated, tag = "2")]
pub row_ranges: ::prost::alloc::vec::Vec<RowRange>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ColumnRange {
#[prost(string, tag = "1")]
pub family_name: ::prost::alloc::string::String,
#[prost(oneof = "column_range::StartQualifier", tags = "2, 3")]
pub start_qualifier: ::core::option::Option<column_range::StartQualifier>,
#[prost(oneof = "column_range::EndQualifier", tags = "4, 5")]
pub end_qualifier: ::core::option::Option<column_range::EndQualifier>,
}
pub mod column_range {
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StartQualifier {
#[prost(bytes, tag = "2")]
StartQualifierClosed(::prost::alloc::vec::Vec<u8>),
#[prost(bytes, tag = "3")]
StartQualifierOpen(::prost::alloc::vec::Vec<u8>),
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EndQualifier {
#[prost(bytes, tag = "4")]
EndQualifierClosed(::prost::alloc::vec::Vec<u8>),
#[prost(bytes, tag = "5")]
EndQualifierOpen(::prost::alloc::vec::Vec<u8>),
}
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimestampRange {
#[prost(int64, tag = "1")]
pub start_timestamp_micros: i64,
#[prost(int64, tag = "2")]
pub end_timestamp_micros: i64,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValueRange {
#[prost(oneof = "value_range::StartValue", tags = "1, 2")]
pub start_value: ::core::option::Option<value_range::StartValue>,
#[prost(oneof = "value_range::EndValue", tags = "3, 4")]
pub end_value: ::core::option::Option<value_range::EndValue>,
}
pub mod value_range {
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StartValue {
#[prost(bytes, tag = "1")]
StartValueClosed(::prost::alloc::vec::Vec<u8>),
#[prost(bytes, tag = "2")]
StartValueOpen(::prost::alloc::vec::Vec<u8>),
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EndValue {
#[prost(bytes, tag = "3")]
EndValueClosed(::prost::alloc::vec::Vec<u8>),
#[prost(bytes, tag = "4")]
EndValueOpen(::prost::alloc::vec::Vec<u8>),
}
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RowFilter {
#[prost(
oneof = "row_filter::Filter",
tags = "1, 2, 3, 16, 17, 18, 4, 14, 5, 6, 7, 8, 9, 15, 10, 11, 12, 13, 19"
)]
pub filter: ::core::option::Option<row_filter::Filter>,
}
pub mod row_filter {
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Chain {
#[prost(message, repeated, tag = "1")]
pub filters: ::prost::alloc::vec::Vec<super::RowFilter>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Interleave {
#[prost(message, repeated, tag = "1")]
pub filters: ::prost::alloc::vec::Vec<super::RowFilter>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Condition {
#[prost(message, optional, boxed, tag = "1")]
pub predicate_filter: ::core::option::Option<::prost::alloc::boxed::Box<super::RowFilter>>,
#[prost(message, optional, boxed, tag = "2")]
pub true_filter: ::core::option::Option<::prost::alloc::boxed::Box<super::RowFilter>>,
#[prost(message, optional, boxed, tag = "3")]
pub false_filter: ::core::option::Option<::prost::alloc::boxed::Box<super::RowFilter>>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Filter {
#[prost(message, tag = "1")]
Chain(Chain),
#[prost(message, tag = "2")]
Interleave(Interleave),
#[prost(message, tag = "3")]
Condition(::prost::alloc::boxed::Box<Condition>),
#[prost(bool, tag = "16")]
Sink(bool),
#[prost(bool, tag = "17")]
PassAllFilter(bool),
#[prost(bool, tag = "18")]
BlockAllFilter(bool),
#[prost(bytes, tag = "4")]
RowKeyRegexFilter(::prost::alloc::vec::Vec<u8>),
#[prost(double, tag = "14")]
RowSampleFilter(f64),
#[prost(string, tag = "5")]
FamilyNameRegexFilter(::prost::alloc::string::String),
#[prost(bytes, tag = "6")]
ColumnQualifierRegexFilter(::prost::alloc::vec::Vec<u8>),
#[prost(message, tag = "7")]
ColumnRangeFilter(super::ColumnRange),
#[prost(message, tag = "8")]
TimestampRangeFilter(super::TimestampRange),
#[prost(bytes, tag = "9")]
ValueRegexFilter(::prost::alloc::vec::Vec<u8>),
#[prost(message, tag = "15")]
ValueRangeFilter(super::ValueRange),
#[prost(int32, tag = "10")]
CellsPerRowOffsetFilter(i32),
#[prost(int32, tag = "11")]
CellsPerRowLimitFilter(i32),
#[prost(int32, tag = "12")]
CellsPerColumnLimitFilter(i32),
#[prost(bool, tag = "13")]
StripValueTransformer(bool),
#[prost(string, tag = "19")]
ApplyLabelTransformer(::prost::alloc::string::String),
}
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mutation {
#[prost(oneof = "mutation::Mutation", tags = "1, 2, 3, 4")]
pub mutation: ::core::option::Option<mutation::Mutation>,
}
pub mod mutation {
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetCell {
#[prost(string, tag = "1")]
pub family_name: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub column_qualifier: ::prost::alloc::vec::Vec<u8>,
#[prost(int64, tag = "3")]
pub timestamp_micros: i64,
#[prost(bytes = "vec", tag = "4")]
pub value: ::prost::alloc::vec::Vec<u8>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFromColumn {
#[prost(string, tag = "1")]
pub family_name: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub column_qualifier: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub time_range: ::core::option::Option<super::TimestampRange>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFromFamily {
#[prost(string, tag = "1")]
pub family_name: ::prost::alloc::string::String,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFromRow {}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Mutation {
#[prost(message, tag = "1")]
SetCell(SetCell),
#[prost(message, tag = "2")]
DeleteFromColumn(DeleteFromColumn),
#[prost(message, tag = "3")]
DeleteFromFamily(DeleteFromFamily),
#[prost(message, tag = "4")]
DeleteFromRow(DeleteFromRow),
}
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadModifyWriteRule {
#[prost(string, tag = "1")]
pub family_name: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub column_qualifier: ::prost::alloc::vec::Vec<u8>,
#[prost(oneof = "read_modify_write_rule::Rule", tags = "3, 4")]
pub rule: ::core::option::Option<read_modify_write_rule::Rule>,
}
pub mod read_modify_write_rule {
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Rule {
#[prost(bytes, tag = "3")]
AppendValue(::prost::alloc::vec::Vec<u8>),
#[prost(int64, tag = "4")]
IncrementAmount(i64),
}
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadIteratorStats {
#[prost(int64, tag = "1")]
pub rows_seen_count: i64,
#[prost(int64, tag = "2")]
pub rows_returned_count: i64,
#[prost(int64, tag = "3")]
pub cells_seen_count: i64,
#[prost(int64, tag = "4")]
pub cells_returned_count: i64,
#[prost(int64, tag = "5")]
pub deletes_seen_count: i64,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestLatencyStats {
#[prost(message, optional, tag = "1")]
pub frontend_server_latency: ::core::option::Option<::prost_wkt_types::Duration>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadEfficiencyStats {
#[prost(message, optional, tag = "1")]
pub read_iterator_stats: ::core::option::Option<ReadIteratorStats>,
#[prost(message, optional, tag = "2")]
pub request_latency_stats: ::core::option::Option<RequestLatencyStats>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllReadStats {
#[prost(message, optional, tag = "1")]
pub read_iterator_stats: ::core::option::Option<ReadIteratorStats>,
#[prost(message, optional, tag = "2")]
pub request_latency_stats: ::core::option::Option<RequestLatencyStats>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestStats {
#[prost(oneof = "request_stats::Stats", tags = "1, 2")]
pub stats: ::core::option::Option<request_stats::Stats>,
}
pub mod request_stats {
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Stats {
#[prost(message, tag = "1")]
ReadEfficiencyStats(super::ReadEfficiencyStats),
#[prost(message, tag = "2")]
AllReadStats(super::AllReadStats),
}
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadRowsRequest {
#[prost(string, tag = "1")]
pub table_name: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub app_profile_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub rows: ::core::option::Option<RowSet>,
#[prost(message, optional, tag = "3")]
pub filter: ::core::option::Option<RowFilter>,
#[prost(int64, tag = "4")]
pub rows_limit: i64,
#[prost(enumeration = "read_rows_request::RequestStatsView", tag = "6")]
pub request_stats_view: i32,
}
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)]
#[repr(i32)]
pub enum RequestStatsView {
Unspecified = 0,
RequestStatsNone = 1,
RequestStatsEfficiency = 2,
RequestStatsFull = 3,
}
impl RequestStatsView {
pub fn as_str_name(&self) -> &'static str {
match self {
RequestStatsView::Unspecified => "REQUEST_STATS_VIEW_UNSPECIFIED",
RequestStatsView::RequestStatsNone => "REQUEST_STATS_NONE",
RequestStatsView::RequestStatsEfficiency => "REQUEST_STATS_EFFICIENCY",
RequestStatsView::RequestStatsFull => "REQUEST_STATS_FULL",
}
}
}
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadRowsResponse {
#[prost(message, repeated, tag = "1")]
pub chunks: ::prost::alloc::vec::Vec<read_rows_response::CellChunk>,
#[prost(bytes = "vec", tag = "2")]
pub last_scanned_row_key: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub request_stats: ::core::option::Option<RequestStats>,
}
pub mod read_rows_response {
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CellChunk {
#[prost(bytes = "vec", tag = "1")]
#[serde_as(as = "serde_with::base64::Base64")]
#[serde(default)]
pub row_key: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "2")]
pub family_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
#[serde_as(as = "Option<serde_with::base64::Base64>")]
#[serde(default)]
pub qualifier: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
#[prost(int64, tag = "4")]
#[serde(default)]
#[serde_as(as = "serde_with::DisplayFromStr")]
pub timestamp_micros: i64,
#[prost(string, repeated, tag = "5")]
#[serde(default)]
pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bytes = "vec", tag = "6")]
#[serde_as(as = "serde_with::base64::Base64")]
#[serde(default)]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(int32, tag = "7")]
#[serde(default)]
pub value_size: i32,
#[prost(oneof = "cell_chunk::RowStatus", tags = "8, 9")]
pub row_status: ::core::option::Option<cell_chunk::RowStatus>,
}
pub mod cell_chunk {
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum RowStatus {
#[prost(bool, tag = "8")]
ResetRow(bool),
#[prost(bool, tag = "9")]
CommitRow(bool),
}
}
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SampleRowKeysRequest {
#[prost(string, tag = "1")]
pub table_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub app_profile_id: ::prost::alloc::string::String,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SampleRowKeysResponse {
#[prost(bytes = "vec", tag = "1")]
pub row_key: ::prost::alloc::vec::Vec<u8>,
#[prost(int64, tag = "2")]
pub offset_bytes: i64,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateRowRequest {
#[prost(string, tag = "1")]
pub table_name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub app_profile_id: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub row_key: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "3")]
pub mutations: ::prost::alloc::vec::Vec<Mutation>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateRowResponse {}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateRowsRequest {
#[prost(string, tag = "1")]
pub table_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub app_profile_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub entries: ::prost::alloc::vec::Vec<mutate_rows_request::Entry>,
}
pub mod mutate_rows_request {
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Entry {
#[prost(bytes = "vec", tag = "1")]
pub row_key: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "2")]
pub mutations: ::prost::alloc::vec::Vec<super::Mutation>,
}
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateRowsResponse {
#[prost(message, repeated, tag = "1")]
pub entries: ::prost::alloc::vec::Vec<mutate_rows_response::Entry>,
}
pub mod mutate_rows_response {
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Entry {
#[prost(int64, tag = "1")]
pub index: i64,
#[prost(message, optional, tag = "2")]
pub status: ::core::option::Option<super::super::super::rpc::Status>,
}
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckAndMutateRowRequest {
#[prost(string, tag = "1")]
pub table_name: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub app_profile_id: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub row_key: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "6")]
pub predicate_filter: ::core::option::Option<RowFilter>,
#[prost(message, repeated, tag = "4")]
pub true_mutations: ::prost::alloc::vec::Vec<Mutation>,
#[prost(message, repeated, tag = "5")]
pub false_mutations: ::prost::alloc::vec::Vec<Mutation>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckAndMutateRowResponse {
#[prost(bool, tag = "1")]
pub predicate_matched: bool,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PingAndWarmRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub app_profile_id: ::prost::alloc::string::String,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PingAndWarmResponse {}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadModifyWriteRowRequest {
#[prost(string, tag = "1")]
pub table_name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub app_profile_id: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub row_key: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "3")]
pub rules: ::prost::alloc::vec::Vec<ReadModifyWriteRule>,
}
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadModifyWriteRowResponse {
#[prost(message, optional, tag = "1")]
pub row: ::core::option::Option<Row>,
}
pub mod bigtable_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct BigtableClient<T> {
inner: tonic::client::Grpc<T>,
}
impl BigtableClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> BigtableClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> BigtableClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
BigtableClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
pub async fn read_rows(
&mut self,
request: impl tonic::IntoRequest<super::ReadRowsRequest>,
) -> Result<tonic::Response<tonic::codec::Streaming<super::ReadRowsResponse>>, 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/ReadRows");
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
pub async fn sample_row_keys(
&mut self,
request: impl tonic::IntoRequest<super::SampleRowKeysRequest>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::SampleRowKeysResponse>>,
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/SampleRowKeys");
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
pub async fn mutate_row(
&mut self,
request: impl tonic::IntoRequest<super::MutateRowRequest>,
) -> Result<tonic::Response<super::MutateRowResponse>, 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");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn mutate_rows(
&mut self,
request: impl tonic::IntoRequest<super::MutateRowsRequest>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::MutateRowsResponse>>,
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/MutateRows");
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
pub async fn check_and_mutate_row(
&mut self,
request: impl tonic::IntoRequest<super::CheckAndMutateRowRequest>,
) -> Result<tonic::Response<super::CheckAndMutateRowResponse>, 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",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn ping_and_warm(
&mut self,
request: impl tonic::IntoRequest<super::PingAndWarmRequest>,
) -> Result<tonic::Response<super::PingAndWarmResponse>, 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");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn read_modify_write_row(
&mut self,
request: impl tonic::IntoRequest<super::ReadModifyWriteRowRequest>,
) -> Result<tonic::Response<super::ReadModifyWriteRowResponse>, 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",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}