1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797
// This file is @generated by prost-build.
/// Request message for TablesService.GetTable.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTableRequest {
/// Required. The name of the table to retrieve.
/// Format: tables/{table}
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for TablesService.ListTables.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTablesRequest {
/// The maximum number of tables to return. The service may return fewer than
/// this value.
///
/// If unspecified, at most 20 tables are returned. The maximum value is 100;
/// values above 100 are coerced to 100.
#[prost(int32, tag = "1")]
pub page_size: i32,
/// A page token, received from a previous `ListTables` call.
/// Provide this to retrieve the subsequent page.
///
/// When paginating, all other parameters provided to `ListTables` must match
/// the call that provided the page token.
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
}
/// Response message for TablesService.ListTables.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTablesResponse {
/// The list of tables.
#[prost(message, repeated, tag = "1")]
pub tables: ::prost::alloc::vec::Vec<Table>,
/// A token, which can be sent as `page_token` to retrieve the next page.
/// If this field is empty, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Request message for TablesService.GetWorkspace.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetWorkspaceRequest {
/// Required. The name of the workspace to retrieve.
/// Format: workspaces/{workspace}
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for TablesService.ListWorkspaces.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListWorkspacesRequest {
/// The maximum number of workspaces to return. The service may return fewer
/// than this value.
///
/// If unspecified, at most 10 workspaces are returned. The maximum value is
/// 25; values above 25 are coerced to 25.
#[prost(int32, tag = "1")]
pub page_size: i32,
/// A page token, received from a previous `ListWorkspaces` call.
/// Provide this to retrieve the subsequent page.
///
/// When paginating, all other parameters provided to `ListWorkspaces` must
/// match the call that provided the page token.
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
}
/// Response message for TablesService.ListWorkspaces.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListWorkspacesResponse {
/// The list of workspaces.
#[prost(message, repeated, tag = "1")]
pub workspaces: ::prost::alloc::vec::Vec<Workspace>,
/// A token, which can be sent as `page_token` to retrieve the next page.
/// If this field is empty, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Request message for TablesService.GetRow.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRowRequest {
/// Required. The name of the row to retrieve.
/// Format: tables/{table}/rows/{row}
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. Column key to use for values in the row.
/// Defaults to user entered name.
#[prost(enumeration = "View", tag = "2")]
pub view: i32,
}
/// Request message for TablesService.ListRows.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRowsRequest {
/// Required. The parent table.
/// Format: tables/{table}
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// The maximum number of rows to return. The service may return fewer than
/// this value.
///
/// If unspecified, at most 50 rows are returned. The maximum value is 1,000;
/// values above 1,000 are coerced to 1,000.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token, received from a previous `ListRows` call.
/// Provide this to retrieve the subsequent page.
///
/// When paginating, all other parameters provided to `ListRows` must match
/// the call that provided the page token.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Optional. Column key to use for values in the row.
/// Defaults to user entered name.
#[prost(enumeration = "View", tag = "4")]
pub view: i32,
/// Optional. Raw text query to search for in rows of the table.
/// Special characters must be escaped. Logical operators and field specific
/// filtering not supported.
#[prost(string, tag = "5")]
pub filter: ::prost::alloc::string::String,
}
/// Response message for TablesService.ListRows.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRowsResponse {
/// The rows from the specified table.
#[prost(message, repeated, tag = "1")]
pub rows: ::prost::alloc::vec::Vec<Row>,
/// A token, which can be sent as `page_token` to retrieve the next page.
/// If this field is empty, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Request message for TablesService.CreateRow.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateRowRequest {
/// Required. The parent table where this row will be created.
/// Format: tables/{table}
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The row to create.
#[prost(message, optional, tag = "2")]
pub row: ::core::option::Option<Row>,
/// Optional. Column key to use for values in the row.
/// Defaults to user entered name.
#[prost(enumeration = "View", tag = "3")]
pub view: i32,
}
/// Request message for TablesService.BatchCreateRows.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateRowsRequest {
/// Required. The parent table where the rows will be created.
/// Format: tables/{table}
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The request message specifying the rows to create.
///
/// A maximum of 500 rows can be created in a single batch.
#[prost(message, repeated, tag = "2")]
pub requests: ::prost::alloc::vec::Vec<CreateRowRequest>,
}
/// Response message for TablesService.BatchCreateRows.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateRowsResponse {
/// The created rows.
#[prost(message, repeated, tag = "1")]
pub rows: ::prost::alloc::vec::Vec<Row>,
}
/// Request message for TablesService.UpdateRow.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateRowRequest {
/// Required. The row to update.
#[prost(message, optional, tag = "1")]
pub row: ::core::option::Option<Row>,
/// The list of fields to update.
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Optional. Column key to use for values in the row.
/// Defaults to user entered name.
#[prost(enumeration = "View", tag = "3")]
pub view: i32,
}
/// Request message for TablesService.BatchUpdateRows.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchUpdateRowsRequest {
/// Required. The parent table shared by all rows being updated.
/// Format: tables/{table}
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The request messages specifying the rows to update.
///
/// A maximum of 500 rows can be modified in a single batch.
#[prost(message, repeated, tag = "2")]
pub requests: ::prost::alloc::vec::Vec<UpdateRowRequest>,
}
/// Response message for TablesService.BatchUpdateRows.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchUpdateRowsResponse {
/// The updated rows.
#[prost(message, repeated, tag = "1")]
pub rows: ::prost::alloc::vec::Vec<Row>,
}
/// Request message for TablesService.DeleteRow
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRowRequest {
/// Required. The name of the row to delete.
/// Format: tables/{table}/rows/{row}
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for TablesService.BatchDeleteRows
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDeleteRowsRequest {
/// Required. The parent table shared by all rows being deleted.
/// Format: tables/{table}
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The names of the rows to delete. All rows must belong to the parent table
/// or else the entire batch will fail. A maximum of 500 rows can be deleted
/// in a batch.
/// Format: tables/{table}/rows/{row}
#[prost(string, repeated, tag = "2")]
pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// A single table.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Table {
/// The resource name of the table.
/// Table names have the form `tables/{table}`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The human readable title of the table.
#[prost(string, tag = "2")]
pub display_name: ::prost::alloc::string::String,
/// List of columns in this table.
/// Order of columns matches the display order.
#[prost(message, repeated, tag = "3")]
pub columns: ::prost::alloc::vec::Vec<ColumnDescription>,
}
/// Details on a column in the table.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ColumnDescription {
/// column name
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Data type of the column
/// Supported types are auto_id, boolean, boolean_list, creator,
/// create_timestamp, date, dropdown, location, integer,
/// integer_list, number, number_list, person, person_list, tags, check_list,
/// text, text_list, update_timestamp, updater, relationship,
/// file_attachment_list.
/// These types directly map to the column types supported on Tables website.
#[prost(string, tag = "2")]
pub data_type: ::prost::alloc::string::String,
/// Internal id for a column.
#[prost(string, tag = "3")]
pub id: ::prost::alloc::string::String,
/// Optional. Range of labeled values for the column.
/// Some columns like tags and drop-downs limit the values to a set of
/// possible values. We return the range of values in such cases to help
/// clients implement better user data validation.
#[prost(message, repeated, tag = "4")]
pub labels: ::prost::alloc::vec::Vec<LabeledItem>,
/// Optional. Additional details about a relationship column. Specified when data_type
/// is relationship.
#[prost(message, optional, tag = "5")]
pub relationship_details: ::core::option::Option<RelationshipDetails>,
/// Optional. Indicates that this is a lookup column whose value is derived from the
/// relationship column specified in the details. Lookup columns can not be
/// updated directly. To change the value you must update the associated
/// relationship column.
#[prost(message, optional, tag = "6")]
pub lookup_details: ::core::option::Option<LookupDetails>,
}
/// A single item in a labeled column.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LabeledItem {
/// Display string as entered by user.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Internal id associated with the item.
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
}
/// Details about a relationship column.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RelationshipDetails {
/// The name of the table this relationship is linked to.
#[prost(string, tag = "1")]
pub linked_table: ::prost::alloc::string::String,
}
/// Details about a lookup column whose value comes from the associated
/// relationship.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LookupDetails {
/// The name of the relationship column associated with the lookup.
#[prost(string, tag = "1")]
pub relationship_column: ::prost::alloc::string::String,
/// The id of the relationship column.
#[prost(string, tag = "2")]
pub relationship_column_id: ::prost::alloc::string::String,
}
/// A single row in a table.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Row {
/// The resource name of the row.
/// Row names have the form `tables/{table}/rows/{row}`.
/// The name is ignored when creating a row.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The values of the row. This is a map of column key to value.
/// Key is user entered name(default) or the internal column id based on
/// the view in the request.
#[prost(btree_map = "string, message", tag = "2")]
pub values: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost_types::Value,
>,
}
/// A single workspace.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Workspace {
/// The resource name of the workspace.
/// Workspace names have the form `workspaces/{workspace}`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The human readable title of the workspace.
#[prost(string, tag = "2")]
pub display_name: ::prost::alloc::string::String,
/// The list of tables in the workspace.
#[prost(message, repeated, tag = "3")]
pub tables: ::prost::alloc::vec::Vec<Table>,
}
/// Column identifier used for the values in the row.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum View {
/// Defaults to user entered text.
Unspecified = 0,
/// Uses internally generated column id to identify values.
ColumnIdView = 1,
}
impl View {
/// 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 {
View::Unspecified => "VIEW_UNSPECIFIED",
View::ColumnIdView => "COLUMN_ID_VIEW",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VIEW_UNSPECIFIED" => Some(Self::Unspecified),
"COLUMN_ID_VIEW" => Some(Self::ColumnIdView),
_ => None,
}
}
}
/// Generated client implementations.
pub mod tables_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// The Tables Service provides an API for reading and updating tables.
/// It defines the following resource model:
///
/// - The API has a collection of [Table][google.area120.tables.v1alpha1.Table]
/// resources, named `tables/*`
///
/// - Each Table has a collection of [Row][google.area120.tables.v1alpha1.Row]
/// resources, named `tables/*/rows/*`
///
/// - The API has a collection of
/// [Workspace][google.area120.tables.v1alpha1.Workspace]
/// resources, named `workspaces/*`.
#[derive(Debug, Clone)]
pub struct TablesServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> TablesServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::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,
) -> TablesServiceClient<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> + std::marker::Send + std::marker::Sync,
{
TablesServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Gets a table. Returns NOT_FOUND if the table does not exist.
pub async fn get_table(
&mut self,
request: impl tonic::IntoRequest<super::GetTableRequest>,
) -> std::result::Result<tonic::Response<super::Table>, 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.area120.tables.v1alpha1.TablesService/GetTable",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.area120.tables.v1alpha1.TablesService",
"GetTable",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists tables for the user.
pub async fn list_tables(
&mut self,
request: impl tonic::IntoRequest<super::ListTablesRequest>,
) -> std::result::Result<
tonic::Response<super::ListTablesResponse>,
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.area120.tables.v1alpha1.TablesService/ListTables",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.area120.tables.v1alpha1.TablesService",
"ListTables",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a workspace. Returns NOT_FOUND if the workspace does not exist.
pub async fn get_workspace(
&mut self,
request: impl tonic::IntoRequest<super::GetWorkspaceRequest>,
) -> std::result::Result<tonic::Response<super::Workspace>, 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.area120.tables.v1alpha1.TablesService/GetWorkspace",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.area120.tables.v1alpha1.TablesService",
"GetWorkspace",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists workspaces for the user.
pub async fn list_workspaces(
&mut self,
request: impl tonic::IntoRequest<super::ListWorkspacesRequest>,
) -> std::result::Result<
tonic::Response<super::ListWorkspacesResponse>,
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.area120.tables.v1alpha1.TablesService/ListWorkspaces",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.area120.tables.v1alpha1.TablesService",
"ListWorkspaces",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a row. Returns NOT_FOUND if the row does not exist in the table.
pub async fn get_row(
&mut self,
request: impl tonic::IntoRequest<super::GetRowRequest>,
) -> std::result::Result<tonic::Response<super::Row>, 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.area120.tables.v1alpha1.TablesService/GetRow",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.area120.tables.v1alpha1.TablesService",
"GetRow",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists rows in a table. Returns NOT_FOUND if the table does not exist.
pub async fn list_rows(
&mut self,
request: impl tonic::IntoRequest<super::ListRowsRequest>,
) -> std::result::Result<
tonic::Response<super::ListRowsResponse>,
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.area120.tables.v1alpha1.TablesService/ListRows",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.area120.tables.v1alpha1.TablesService",
"ListRows",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a row.
pub async fn create_row(
&mut self,
request: impl tonic::IntoRequest<super::CreateRowRequest>,
) -> std::result::Result<tonic::Response<super::Row>, 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.area120.tables.v1alpha1.TablesService/CreateRow",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.area120.tables.v1alpha1.TablesService",
"CreateRow",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates multiple rows.
pub async fn batch_create_rows(
&mut self,
request: impl tonic::IntoRequest<super::BatchCreateRowsRequest>,
) -> std::result::Result<
tonic::Response<super::BatchCreateRowsResponse>,
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.area120.tables.v1alpha1.TablesService/BatchCreateRows",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.area120.tables.v1alpha1.TablesService",
"BatchCreateRows",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates a row.
pub async fn update_row(
&mut self,
request: impl tonic::IntoRequest<super::UpdateRowRequest>,
) -> std::result::Result<tonic::Response<super::Row>, 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.area120.tables.v1alpha1.TablesService/UpdateRow",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.area120.tables.v1alpha1.TablesService",
"UpdateRow",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates multiple rows.
pub async fn batch_update_rows(
&mut self,
request: impl tonic::IntoRequest<super::BatchUpdateRowsRequest>,
) -> std::result::Result<
tonic::Response<super::BatchUpdateRowsResponse>,
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.area120.tables.v1alpha1.TablesService/BatchUpdateRows",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.area120.tables.v1alpha1.TablesService",
"BatchUpdateRows",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a row.
pub async fn delete_row(
&mut self,
request: impl tonic::IntoRequest<super::DeleteRowRequest>,
) -> 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.area120.tables.v1alpha1.TablesService/DeleteRow",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.area120.tables.v1alpha1.TablesService",
"DeleteRow",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes multiple rows.
pub async fn batch_delete_rows(
&mut self,
request: impl tonic::IntoRequest<super::BatchDeleteRowsRequest>,
) -> 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.area120.tables.v1alpha1.TablesService/BatchDeleteRows",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.area120.tables.v1alpha1.TablesService",
"BatchDeleteRows",
),
);
self.inner.unary(req, path, codec).await
}
}
}