mirror of
https://github.com/googleapis/googleapis.git
synced 2026-08-16 13:00:34 +02:00
feat: Initial client libraries for Area 120 Tables API.
PiperOrigin-RevId: 329103436
This commit is contained in:
parent
b267d696cd
commit
4bc344a7c1
5 changed files with 795 additions and 0 deletions
376
google/area120/tables/v1alpha1/BUILD.bazel
Normal file
376
google/area120/tables/v1alpha1/BUILD.bazel
Normal file
|
|
@ -0,0 +1,376 @@
|
|||
# This file was automatically generated by BuildFileGenerator
|
||||
# https://github.com/googleapis/gapic-generator/tree/master/rules_gapic/bazel
|
||||
|
||||
# Most of the manual changes to this file will be overwritten.
|
||||
# It's **only** allowed to change the following rule attribute values:
|
||||
# - names of *_gapic_assembly_* rules
|
||||
# - certain parameters of *_gapic_library rules, including but not limited to:
|
||||
# * extra_protoc_parameters
|
||||
# * extra_protoc_file_parameters
|
||||
# The complete list of preserved parameters can be found in the source code.
|
||||
|
||||
# This is an API workspace, having public visibility by default makes perfect sense.
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
##############################################################################
|
||||
# Common
|
||||
##############################################################################
|
||||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
|
||||
|
||||
proto_library(
|
||||
name = "tables_proto",
|
||||
srcs = [
|
||||
"tables.proto",
|
||||
],
|
||||
deps = [
|
||||
"//google/api:annotations_proto",
|
||||
"//google/api:client_proto",
|
||||
"//google/api:field_behavior_proto",
|
||||
"//google/api:resource_proto",
|
||||
"@com_google_protobuf//:empty_proto",
|
||||
"@com_google_protobuf//:field_mask_proto",
|
||||
"@com_google_protobuf//:struct_proto",
|
||||
],
|
||||
)
|
||||
|
||||
proto_library_with_info(
|
||||
name = "tables_proto_with_info",
|
||||
deps = [
|
||||
":tables_proto",
|
||||
"//google/cloud:common_resources_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Java
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"java_gapic_assembly_gradle_pkg",
|
||||
"java_gapic_library",
|
||||
"java_gapic_test",
|
||||
"java_grpc_library",
|
||||
"java_proto_library",
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "tables_java_proto",
|
||||
deps = [":tables_proto"],
|
||||
)
|
||||
|
||||
java_grpc_library(
|
||||
name = "tables_java_grpc",
|
||||
srcs = [":tables_proto"],
|
||||
deps = [":tables_java_proto"],
|
||||
)
|
||||
|
||||
java_gapic_library(
|
||||
name = "tables_java_gapic",
|
||||
src = ":tables_proto_with_info",
|
||||
gapic_yaml = "language_gapic.yaml",
|
||||
grpc_service_config = "tables_grpc_service_config.json",
|
||||
package = "google.area120.tables.v1alpha1",
|
||||
service_yaml = "area120tables_v1alpha1.yaml",
|
||||
test_deps = [
|
||||
":tables_java_grpc",
|
||||
],
|
||||
deps = [
|
||||
":tables_java_proto",
|
||||
],
|
||||
)
|
||||
|
||||
java_gapic_test(
|
||||
name = "tables_java_gapic_test_suite",
|
||||
test_classes = [
|
||||
"com.google.area120.tables.v1alpha.TablesServiceClientTest",
|
||||
],
|
||||
runtime_deps = [":tables_java_gapic_test"],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
java_gapic_assembly_gradle_pkg(
|
||||
name = "google-cloud-area120-tables-v1alpha1-java",
|
||||
deps = [
|
||||
":tables_java_gapic",
|
||||
":tables_java_grpc",
|
||||
":tables_java_proto",
|
||||
":tables_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Go
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"go_gapic_assembly_pkg",
|
||||
"go_gapic_library",
|
||||
"go_proto_library",
|
||||
"go_test",
|
||||
)
|
||||
|
||||
go_proto_library(
|
||||
name = "tables_go_proto",
|
||||
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
|
||||
importpath = "google.golang.org/genproto/googleapis/area120/tables/v1alpha1",
|
||||
protos = [":tables_proto"],
|
||||
deps = [
|
||||
"//google/api:annotations_go_proto",
|
||||
],
|
||||
)
|
||||
|
||||
go_gapic_library(
|
||||
name = "tables_go_gapic",
|
||||
srcs = [":tables_proto_with_info"],
|
||||
grpc_service_config = "tables_grpc_service_config.json",
|
||||
importpath = "google.golang.org/google/area120/tables/v1alpha1;tables",
|
||||
service_yaml = "area120tables_v1alpha1.yaml",
|
||||
deps = [
|
||||
":tables_go_proto",
|
||||
],
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "tables_go_gapic_test",
|
||||
srcs = [":tables_go_gapic_srcjar_test"],
|
||||
embed = [":tables_go_gapic"],
|
||||
importpath = "google.golang.org/google/area120/tables/v1alpha1",
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
go_gapic_assembly_pkg(
|
||||
name = "gapi-cloud-area120-tables-v1alpha1-go",
|
||||
deps = [
|
||||
":tables_go_gapic",
|
||||
":tables_go_gapic_srcjar-test.srcjar",
|
||||
":tables_go_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Python
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"moved_proto_library",
|
||||
"py_gapic_assembly_pkg",
|
||||
"py_gapic_library",
|
||||
"py_grpc_library",
|
||||
"py_proto_library",
|
||||
)
|
||||
|
||||
moved_proto_library(
|
||||
name = "tables_moved_proto",
|
||||
srcs = [":tables_proto"],
|
||||
deps = [
|
||||
"//google/api:annotations_proto",
|
||||
"//google/api:client_proto",
|
||||
"//google/api:field_behavior_proto",
|
||||
"//google/api:resource_proto",
|
||||
"@com_google_protobuf//:empty_proto",
|
||||
"@com_google_protobuf//:field_mask_proto",
|
||||
"@com_google_protobuf//:struct_proto",
|
||||
],
|
||||
)
|
||||
|
||||
py_proto_library(
|
||||
name = "tables_py_proto",
|
||||
plugin = "@protoc_docs_plugin//:docs_plugin",
|
||||
deps = [":tables_moved_proto"],
|
||||
)
|
||||
|
||||
py_grpc_library(
|
||||
name = "tables_py_grpc",
|
||||
srcs = [":tables_moved_proto"],
|
||||
deps = [":tables_py_proto"],
|
||||
)
|
||||
|
||||
py_gapic_library(
|
||||
name = "tables_py_gapic",
|
||||
src = ":tables_proto_with_info",
|
||||
gapic_yaml = "language_gapic.yaml",
|
||||
grpc_service_config = "tables_grpc_service_config.json",
|
||||
package = "google.area120.tables.v1alpha1",
|
||||
service_yaml = "area120tables_v1alpha1.yaml",
|
||||
deps = [
|
||||
":tables_py_grpc",
|
||||
":tables_py_proto",
|
||||
],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
py_gapic_assembly_pkg(
|
||||
name = "area120-tables-v1alpha1-py",
|
||||
deps = [
|
||||
":tables_py_gapic",
|
||||
":tables_py_grpc",
|
||||
":tables_py_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# PHP
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"php_gapic_assembly_pkg",
|
||||
"php_gapic_library",
|
||||
"php_grpc_library",
|
||||
"php_proto_library",
|
||||
)
|
||||
|
||||
php_proto_library(
|
||||
name = "tables_php_proto",
|
||||
deps = [":tables_proto"],
|
||||
)
|
||||
|
||||
php_grpc_library(
|
||||
name = "tables_php_grpc",
|
||||
srcs = [":tables_proto"],
|
||||
deps = [":tables_php_proto"],
|
||||
)
|
||||
|
||||
php_gapic_library(
|
||||
name = "tables_php_gapic",
|
||||
src = ":tables_proto_with_info",
|
||||
gapic_yaml = "language_gapic.yaml",
|
||||
grpc_service_config = "tables_grpc_service_config.json",
|
||||
package = "google.area120.tables.v1alpha1",
|
||||
service_yaml = "area120tables_v1alpha1.yaml",
|
||||
deps = [
|
||||
":tables_php_grpc",
|
||||
":tables_php_proto",
|
||||
],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
php_gapic_assembly_pkg(
|
||||
name = "google-cloud-area120-tables-v1alpha1-php",
|
||||
deps = [
|
||||
":tables_php_gapic",
|
||||
":tables_php_grpc",
|
||||
":tables_php_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Node.js
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"nodejs_gapic_assembly_pkg",
|
||||
"nodejs_gapic_library",
|
||||
)
|
||||
|
||||
nodejs_gapic_library(
|
||||
name = "tables_nodejs_gapic",
|
||||
src = ":tables_proto_with_info",
|
||||
grpc_service_config = "tables_grpc_service_config.json",
|
||||
package = "google.area120.tables.v1alpha1",
|
||||
service_yaml = "area120tables_v1alpha1.yaml",
|
||||
deps = [],
|
||||
)
|
||||
|
||||
nodejs_gapic_assembly_pkg(
|
||||
name = "area120-tables-v1alpha1-nodejs",
|
||||
deps = [
|
||||
":tables_nodejs_gapic",
|
||||
":tables_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Ruby
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"ruby_gapic_assembly_pkg",
|
||||
"ruby_gapic_library",
|
||||
"ruby_grpc_library",
|
||||
"ruby_proto_library",
|
||||
)
|
||||
|
||||
ruby_proto_library(
|
||||
name = "tables_ruby_proto",
|
||||
deps = [":tables_proto"],
|
||||
)
|
||||
|
||||
ruby_grpc_library(
|
||||
name = "tables_ruby_grpc",
|
||||
srcs = [":tables_proto"],
|
||||
deps = [":tables_ruby_proto"],
|
||||
)
|
||||
|
||||
ruby_gapic_library(
|
||||
name = "tables_ruby_gapic",
|
||||
src = ":tables_proto_with_info",
|
||||
gapic_yaml = "language_gapic.yaml",
|
||||
grpc_service_config = "tables_grpc_service_config.json",
|
||||
package = "google.area120.tables.v1alpha1",
|
||||
service_yaml = "area120tables_v1alpha1.yaml",
|
||||
deps = [
|
||||
":tables_ruby_grpc",
|
||||
":tables_ruby_proto",
|
||||
],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
ruby_gapic_assembly_pkg(
|
||||
name = "google-cloud-area120-tables-v1alpha1-ruby",
|
||||
deps = [
|
||||
":tables_ruby_gapic",
|
||||
":tables_ruby_grpc",
|
||||
":tables_ruby_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# C#
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"csharp_gapic_assembly_pkg",
|
||||
"csharp_gapic_library",
|
||||
"csharp_grpc_library",
|
||||
"csharp_proto_library",
|
||||
)
|
||||
|
||||
csharp_proto_library(
|
||||
name = "tables_csharp_proto",
|
||||
deps = [":tables_proto"],
|
||||
)
|
||||
|
||||
csharp_grpc_library(
|
||||
name = "tables_csharp_grpc",
|
||||
srcs = [":tables_proto"],
|
||||
deps = [":tables_csharp_proto"],
|
||||
)
|
||||
|
||||
csharp_gapic_library(
|
||||
name = "tables_csharp_gapic",
|
||||
src = ":tables_proto_with_info",
|
||||
gapic_yaml = "language_gapic.yaml",
|
||||
grpc_service_config = "tables_grpc_service_config.json",
|
||||
package = "google.area120.tables.v1alpha1",
|
||||
service_yaml = "area120tables_v1alpha1.yaml",
|
||||
deps = [
|
||||
":tables_csharp_grpc",
|
||||
":tables_csharp_proto",
|
||||
],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
csharp_gapic_assembly_pkg(
|
||||
name = "google-cloud-area120-tables-v1alpha1-csharp",
|
||||
deps = [
|
||||
":tables_csharp_gapic",
|
||||
":tables_csharp_grpc",
|
||||
":tables_csharp_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# C++
|
||||
##############################################################################
|
||||
# Put your C++ rules here
|
||||
40
google/area120/tables/v1alpha1/area120tables_v1alpha1.yaml
Normal file
40
google/area120/tables/v1alpha1/area120tables_v1alpha1.yaml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
type: google.api.Service
|
||||
config_version: 3
|
||||
name: area120tables.googleapis.com
|
||||
title: Area120 Tables API
|
||||
|
||||
apis:
|
||||
- name: google.area120.tables.v1alpha1.TablesService
|
||||
|
||||
authentication:
|
||||
rules:
|
||||
- selector: 'google.area120.tables.v1alpha1.TablesService.*'
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/drive,
|
||||
https://www.googleapis.com/auth/drive.file,
|
||||
https://www.googleapis.com/auth/spreadsheets
|
||||
- selector: google.area120.tables.v1alpha1.TablesService.GetRow
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/drive,
|
||||
https://www.googleapis.com/auth/drive.file,
|
||||
https://www.googleapis.com/auth/drive.readonly,
|
||||
https://www.googleapis.com/auth/spreadsheets,
|
||||
https://www.googleapis.com/auth/spreadsheets.readonly
|
||||
- selector: google.area120.tables.v1alpha1.TablesService.GetTable
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/drive,
|
||||
https://www.googleapis.com/auth/drive.file,
|
||||
https://www.googleapis.com/auth/drive.readonly,
|
||||
https://www.googleapis.com/auth/spreadsheets,
|
||||
https://www.googleapis.com/auth/spreadsheets.readonly
|
||||
- selector: google.area120.tables.v1alpha1.TablesService.ListRows
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/drive,
|
||||
https://www.googleapis.com/auth/drive.file,
|
||||
https://www.googleapis.com/auth/drive.readonly,
|
||||
https://www.googleapis.com/auth/spreadsheets,
|
||||
https://www.googleapis.com/auth/spreadsheets.readonly
|
||||
15
google/area120/tables/v1alpha1/language_gapic.yaml
Normal file
15
google/area120/tables/v1alpha1/language_gapic.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
type: com.google.api.codegen.ConfigProto
|
||||
config_schema_version: 2.0.0
|
||||
# The settings of generated code in a specific language.
|
||||
language_settings:
|
||||
java:
|
||||
package_name: com.google.area120.tables.v1alpha
|
||||
python:
|
||||
package_name: google.area120.tables_v1alpha.gapic
|
||||
go:
|
||||
package_name: cloud.google.com/go/area120/tables/v1alpha1
|
||||
csharp:
|
||||
package_name: Google.Area120.Tables.V1Alpha
|
||||
nodejs:
|
||||
package_name: tables.v1alpha
|
||||
domain_layer_location: google-area120
|
||||
336
google/area120/tables/v1alpha1/tables.proto
Normal file
336
google/area120/tables/v1alpha1/tables.proto
Normal file
|
|
@ -0,0 +1,336 @@
|
|||
// Copyright 2020 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.area120.tables.v1alpha1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
import "google/api/resource.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/area120/tables/v1alpha1;tables";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "TablesProto";
|
||||
option java_package = "com.google.area120.tables.v1alpha1";
|
||||
|
||||
// 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/*`
|
||||
service TablesService {
|
||||
option (google.api.default_host) = "area120tables.googleapis.com";
|
||||
option (google.api.oauth_scopes) =
|
||||
"https://www.googleapis.com/auth/drive,"
|
||||
"https://www.googleapis.com/auth/drive.file,"
|
||||
"https://www.googleapis.com/auth/drive.readonly,"
|
||||
"https://www.googleapis.com/auth/spreadsheets,"
|
||||
"https://www.googleapis.com/auth/spreadsheets.readonly";
|
||||
|
||||
// Gets a table. Returns NOT_FOUND if the table does not exist.
|
||||
rpc GetTable(GetTableRequest) returns (Table) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1alpha1/{name=tables/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Lists tables for the user.
|
||||
rpc ListTables(ListTablesRequest) returns (ListTablesResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1alpha1/tables"
|
||||
};
|
||||
}
|
||||
|
||||
// Gets a row. Returns NOT_FOUND if the row does not exist in the table.
|
||||
rpc GetRow(GetRowRequest) returns (Row) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1alpha1/{name=tables/*/rows/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Lists rows in a table. Returns NOT_FOUND if the table does not exist.
|
||||
rpc ListRows(ListRowsRequest) returns (ListRowsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1alpha1/{parent=tables/*}/rows"
|
||||
};
|
||||
option (google.api.method_signature) = "parent";
|
||||
}
|
||||
|
||||
// Creates a row.
|
||||
rpc CreateRow(CreateRowRequest) returns (Row) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1alpha1/{parent=tables/*}/rows"
|
||||
body: "row"
|
||||
};
|
||||
option (google.api.method_signature) = "parent,row";
|
||||
}
|
||||
|
||||
// Creates multiple rows.
|
||||
rpc BatchCreateRows(BatchCreateRowsRequest) returns (BatchCreateRowsResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1alpha1/{parent=tables/*}/rows:batchCreate"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// Updates a row.
|
||||
rpc UpdateRow(UpdateRowRequest) returns (Row) {
|
||||
option (google.api.http) = {
|
||||
patch: "/v1alpha1/{row.name=tables/*/rows/*}"
|
||||
body: "row"
|
||||
};
|
||||
option (google.api.method_signature) = "row,update_mask";
|
||||
}
|
||||
|
||||
// Updates multiple rows.
|
||||
rpc BatchUpdateRows(BatchUpdateRowsRequest) returns (BatchUpdateRowsResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1alpha1/{parent=tables/*}/rows:batchUpdate"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// Deletes a row.
|
||||
rpc DeleteRow(DeleteRowRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v1alpha1/{name=tables/*/rows/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
}
|
||||
|
||||
// Request message for TablesService.GetTable.
|
||||
message GetTableRequest {
|
||||
// Required. The name of the table to retrieve.
|
||||
// Format: tables/{table}
|
||||
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
// Request message for TablesService.ListTables.
|
||||
message 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.
|
||||
int32 page_size = 1;
|
||||
|
||||
// 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.
|
||||
string page_token = 2;
|
||||
}
|
||||
|
||||
// Response message for TablesService.ListTables.
|
||||
message ListTablesResponse {
|
||||
// The list of tables.
|
||||
repeated Table tables = 1;
|
||||
|
||||
// A token, which can be sent as `page_token` to retrieve the next page.
|
||||
// If this field is empty, there are no subsequent pages.
|
||||
string next_page_token = 2;
|
||||
}
|
||||
|
||||
// Request message for TablesService.GetRow.
|
||||
message GetRowRequest {
|
||||
// Required. The name of the row to retrieve.
|
||||
// Format: tables/{table}/rows/{row}
|
||||
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Optional. Column key to use for values in the row.
|
||||
// Defaults to user entered name.
|
||||
View view = 2 [(google.api.field_behavior) = OPTIONAL];
|
||||
}
|
||||
|
||||
// Request message for TablesService.ListRows.
|
||||
message ListRowsRequest {
|
||||
// Required. The parent table.
|
||||
// Format: tables/{table}
|
||||
string parent = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// 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.
|
||||
int32 page_size = 2;
|
||||
|
||||
// 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.
|
||||
string page_token = 3;
|
||||
|
||||
// Optional. Column key to use for values in the row.
|
||||
// Defaults to user entered name.
|
||||
View view = 4 [(google.api.field_behavior) = OPTIONAL];
|
||||
}
|
||||
|
||||
// Response message for TablesService.ListRows.
|
||||
message ListRowsResponse {
|
||||
// The rows from the specified table.
|
||||
repeated Row rows = 1;
|
||||
|
||||
// A token, which can be sent as `page_token` to retrieve the next page.
|
||||
// If this field is empty, there are no subsequent pages.
|
||||
string next_page_token = 2;
|
||||
}
|
||||
|
||||
// Request message for TablesService.CreateRow.
|
||||
message CreateRowRequest {
|
||||
// Required. The parent table where this row will be created.
|
||||
// Format: tables/{table}
|
||||
string parent = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Required. The row to create.
|
||||
Row row = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Optional. Column key to use for values in the row.
|
||||
// Defaults to user entered name.
|
||||
View view = 3 [(google.api.field_behavior) = OPTIONAL];
|
||||
}
|
||||
|
||||
// Request message for TablesService.BatchCreateRows.
|
||||
message BatchCreateRowsRequest {
|
||||
// Required. The parent table where the rows will be created.
|
||||
// Format: tables/{table}
|
||||
string parent = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Required. The request message specifying the rows to create.
|
||||
//
|
||||
// A maximum of 500 rows can be created in a single batch.
|
||||
repeated CreateRowRequest requests = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
// Response message for TablesService.BatchCreateRows.
|
||||
message BatchCreateRowsResponse {
|
||||
// The created rows.
|
||||
repeated Row rows = 1;
|
||||
}
|
||||
|
||||
// Request message for TablesService.UpdateRow.
|
||||
message UpdateRowRequest {
|
||||
// Required. The row to update.
|
||||
Row row = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The list of fields to update.
|
||||
google.protobuf.FieldMask update_mask = 2;
|
||||
|
||||
// Optional. Column key to use for values in the row.
|
||||
// Defaults to user entered name.
|
||||
View view = 3 [(google.api.field_behavior) = OPTIONAL];
|
||||
}
|
||||
|
||||
// Request message for TablesService.BatchUpdateRows.
|
||||
message BatchUpdateRowsRequest {
|
||||
// Required. The parent table shared by all rows being updated.
|
||||
// Format: tables/{table}
|
||||
string parent = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Required. The request messages specifying the rows to update.
|
||||
//
|
||||
// A maximum of 500 rows can be modified in a single batch.
|
||||
repeated UpdateRowRequest requests = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
// Response message for TablesService.BatchUpdateRows.
|
||||
message BatchUpdateRowsResponse {
|
||||
// The updated rows.
|
||||
repeated Row rows = 1;
|
||||
}
|
||||
|
||||
// Request message for TablesService.DeleteRow
|
||||
message DeleteRowRequest {
|
||||
// Required. The name of the row to delete.
|
||||
// Format: tables/{table}/rows/{row}
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {
|
||||
type: "area120tables.googleapis.com/Row"
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
// A single table.
|
||||
message Table {
|
||||
option (google.api.resource) = {
|
||||
type: "area120tables.googleapis.com/Table"
|
||||
pattern: "tables/{table}"
|
||||
};
|
||||
|
||||
// The resource name of the table.
|
||||
// Table names have the form `tables/{table}`.
|
||||
string name = 1;
|
||||
|
||||
// The human readable title of the table.
|
||||
string display_name = 2;
|
||||
|
||||
// List of columns in this table.
|
||||
// Order of columns matches the display order.
|
||||
repeated ColumnDescription columns = 3;
|
||||
}
|
||||
|
||||
// Details on a column in the table.
|
||||
message ColumnDescription {
|
||||
// column name
|
||||
string name = 1;
|
||||
|
||||
// Data type of the column
|
||||
// Supported types are number, text, boolean, number_list, text_list,
|
||||
// boolean_list.
|
||||
string data_type = 2;
|
||||
|
||||
// Internal id for a column.
|
||||
string id = 3;
|
||||
}
|
||||
|
||||
// A single row in a table.
|
||||
message Row {
|
||||
option (google.api.resource) = {
|
||||
type: "area120tables.googleapis.com/Row"
|
||||
pattern: "tables/{table}/rows/{row}"
|
||||
};
|
||||
|
||||
// The resource name of the row.
|
||||
// Row names have the form `tables/{table}/rows/{row}`.
|
||||
// The name is ignored when creating a row.
|
||||
string name = 1;
|
||||
|
||||
// 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.
|
||||
map<string, google.protobuf.Value> values = 2;
|
||||
}
|
||||
|
||||
// Column identifier used for the values in the row.
|
||||
enum View {
|
||||
// Defaults to user entered text.
|
||||
VIEW_UNSPECIFIED = 0;
|
||||
|
||||
// Uses internally generated column id to identify values.
|
||||
COLUMN_ID_VIEW = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"methodConfig": [{
|
||||
"name": [{ "service": "google.area120.tables.v1alpha1.TablesService" }],
|
||||
"timeout": "60s",
|
||||
"retryPolicy": {
|
||||
"maxAttempts": 5,
|
||||
"initialBackoff": "1s",
|
||||
"maxBackoff": "10s",
|
||||
"backoffMultiplier": 1.3,
|
||||
"retryableStatusCodes": ["UNAVAILABLE"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{ "service": "google.area120.tables.v1alpha1.TablesService", "method": "ListTables" },
|
||||
{ "service": "google.area120.tables.v1alpha1.TablesService", "method": "GetTable" },
|
||||
{ "service": "google.area120.tables.v1alpha1.TablesService", "method": "GetRow" },
|
||||
{ "service": "google.area120.tables.v1alpha1.TablesService", "method": "ListRows" },
|
||||
{ "service": "google.area120.tables.v1alpha1.TablesService", "method": "CreateRow" },
|
||||
{ "service": "google.area120.tables.v1alpha1.TablesService", "method": "BatchCreateRows" },
|
||||
{ "service": "google.area120.tables.v1alpha1.TablesService", "method": "UpdateRow" },
|
||||
{ "service": "google.area120.tables.v1alpha1.TablesService", "method": "BatchUpdateRows" },
|
||||
{ "service": "google.area120.tables.v1alpha1.TablesService", "method": "DeleteRow" }
|
||||
],
|
||||
"timeout": "60s"
|
||||
}]
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue