mirror of
https://github.com/mozilla-services/syncstorage-rs.git
synced 2026-05-12 08:06:47 +02:00
Merge pull request #477 from mozilla-services/vendor
chore: vendor mozilla-rust-sdk
This commit is contained in:
commit
eb18b11924
@ -41,18 +41,8 @@ commands:
|
||||
- run:
|
||||
name: cargo build
|
||||
command: cargo build
|
||||
checkout-gcp-grpc:
|
||||
setup-gcp-grpc:
|
||||
steps:
|
||||
- add_ssh_keys:
|
||||
fingerprints:
|
||||
- "f1:d3:a1:e0:b1:cc:60:80:e5:bd:fa:f9:9c:3f:93:6f"
|
||||
- run:
|
||||
name: Checkout gcp-grpc
|
||||
command: git clone git@github.com:mozilla-services/mozilla-rust-sdk.git
|
||||
- run:
|
||||
name: Adjust gcp-grpc dep path
|
||||
# Switch it into the working dir so it's sent to Docker
|
||||
command: sed -i "s/..\/mozilla-rust-sdk/mozilla-rust-sdk/" Cargo.toml
|
||||
- run:
|
||||
name: Install grpcio dependencies
|
||||
command: sudo apt-get update && sudo apt-get install -y cmake golang-go
|
||||
@ -119,9 +109,9 @@ jobs:
|
||||
- image: circleci/rust:latest
|
||||
steps:
|
||||
- checkout
|
||||
- checkout-gcp-grpc
|
||||
- setup-rust
|
||||
- setup-rust-check
|
||||
- setup-gcp-grpc
|
||||
- rust-check
|
||||
- rust-clippy
|
||||
|
||||
@ -141,8 +131,8 @@ jobs:
|
||||
MYSQL_DATABASE: syncstorage
|
||||
steps:
|
||||
- checkout
|
||||
- checkout-gcp-grpc
|
||||
- setup-rust
|
||||
- setup-gcp-grpc
|
||||
# XXX: currently the time needed to setup-sccache negates its savings
|
||||
#- setup-sccache
|
||||
#- restore-sccache-cache
|
||||
|
||||
@ -30,7 +30,7 @@ docopt = "1.1.0"
|
||||
env_logger = "0.7.1"
|
||||
failure = "0.1.6"
|
||||
futures = { version = "0.3", features = ["compat"] }
|
||||
googleapis-raw = { version = "0", path = "../mozilla-rust-sdk/googleapis-raw" }
|
||||
googleapis-raw = { version = "0", path = "vendor/mozilla-rust-sdk/googleapis-raw" }
|
||||
grpcio = { version = "0.5.0-alpha.5" }
|
||||
lazy_static = "1.4.0"
|
||||
hawk = "3.0.0"
|
||||
|
||||
4
vendor/mozilla-rust-sdk/.gitignore
vendored
Normal file
4
vendor/mozilla-rust-sdk/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/target
|
||||
**/*.rs.bk
|
||||
Cargo.lock
|
||||
.env
|
||||
3
vendor/mozilla-rust-sdk/.gitmodules
vendored
Normal file
3
vendor/mozilla-rust-sdk/.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "googleapis-raw/grpc"]
|
||||
path = googleapis-raw/grpc
|
||||
url = https://github.com/grpc/grpc.git
|
||||
5
vendor/mozilla-rust-sdk/Cargo.toml
vendored
Normal file
5
vendor/mozilla-rust-sdk/Cargo.toml
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
[workspace]
|
||||
members = [
|
||||
"googleapis",
|
||||
"googleapis-raw",
|
||||
]
|
||||
4
vendor/mozilla-rust-sdk/LICENSE.md
vendored
Normal file
4
vendor/mozilla-rust-sdk/LICENSE.md
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
This library is subject to the terms of the Apache 2.0 license. If a
|
||||
copy of the APACHE-2 license is not distributed with these files, you
|
||||
can obtain one from https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
6
vendor/mozilla-rust-sdk/README.md
vendored
Normal file
6
vendor/mozilla-rust-sdk/README.md
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
# Rust bindings for Google APIs
|
||||
|
||||
See [`googleapis-raw`](googleapis-raw) for raw bindings based on
|
||||
[`grpcio`](https://github.com/pingcap/grpc-rs).
|
||||
|
||||
See [`googleapis`](googleapis) for high-level bindings (not ready for use yet).
|
||||
1
vendor/mozilla-rust-sdk/docker/.gitignore
vendored
Normal file
1
vendor/mozilla-rust-sdk/docker/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
files/credentials.json
|
||||
30
vendor/mozilla-rust-sdk/docker/Dockerfile
vendored
Normal file
30
vendor/mozilla-rust-sdk/docker/Dockerfile
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
FROM rust:1.36.0
|
||||
|
||||
RUN apt-get update -qq && apt-get install -y clang
|
||||
|
||||
# Install Gcloud CLI
|
||||
RUN curl https://sdk.cloud.google.com | bash
|
||||
ENV PATH $PATH:/root/google-cloud-sdk/bin/
|
||||
|
||||
# Install CMake, required by Rust crates
|
||||
RUN wget -qO- "https://cmake.org/files/v3.15/cmake-3.15.1-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local
|
||||
|
||||
# Install Protobuf, gmock folder is created to make autogen.sh script work
|
||||
RUN mkdir /protobuf-2.7.0
|
||||
WORKDIR /protobuf-2.7.0
|
||||
RUN curl -OL https://chromium.googlesource.com/external/github.com/google/protobuf/+archive/2.7.0.tar.gz \
|
||||
&& tar -xvf 2.7.0.tar.gz \
|
||||
&& mkdir -p gmock \
|
||||
&& ./autogen.sh \
|
||||
&& ./configure \
|
||||
&& make install
|
||||
|
||||
# Install Go
|
||||
RUN curl -s https://dl.google.com/go/go1.12.7.linux-amd64.tar.gz | tar -v -C /usr/local -xz
|
||||
ENV PATH $PATH:/usr/local/go/bin
|
||||
|
||||
# copy Google credentials configuration and set env var
|
||||
COPY files/credentials.json /root/credentials.json
|
||||
ENV GOOGLE_APPLICATION_CREDENTIALS /root/credentials.json
|
||||
|
||||
WORKDIR /googleapis-rs
|
||||
26
vendor/mozilla-rust-sdk/docker/README.md
vendored
Normal file
26
vendor/mozilla-rust-sdk/docker/README.md
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
# Docker Setup
|
||||
|
||||
On some operating systems, e.g. Mac OSX, the setup is not working fully or the installation of a few programming languages and libraries on the host system is not desired. For this reason a Docker setup is available. It is based on a Docker image that comes with a recent Rust toolchain.
|
||||
|
||||
## Installation
|
||||
|
||||
Install Docker on your operating system, e.g. Docker Desktop on Mac OSX, also install [docker-compose](https://docs.docker.com/compose/install/). To build the Docker image run:
|
||||
|
||||
```
|
||||
docker-compose build rust
|
||||
```
|
||||
|
||||
Then to start the container and connect to it
|
||||
|
||||
```
|
||||
docker-compose run rust /bin/bash
|
||||
```
|
||||
|
||||
this starts a shell in the container. The project repository is mounted into the image.
|
||||
|
||||
|
||||
## Google Authentication
|
||||
|
||||
In order to run all examples inside the Docker container, the setup requires the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to be set, pointing to the Google credentials file. For this the file `files/credentials.json` is copied into the Docker image.
|
||||
Therefore copy the credentials file into this location to make the credentials available in the image. **Note**, this file
|
||||
is not under version control.
|
||||
11
vendor/mozilla-rust-sdk/docker/docker-compose.yml
vendored
Normal file
11
vendor/mozilla-rust-sdk/docker/docker-compose.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
version: "3"
|
||||
services:
|
||||
rust:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
volumes:
|
||||
- ..:/googleapis-rs
|
||||
tty: true
|
||||
stdin_open: true
|
||||
working_dir: /googleapis-rs
|
||||
1
vendor/mozilla-rust-sdk/googleapis-raw/.gitignore
vendored
Normal file
1
vendor/mozilla-rust-sdk/googleapis-raw/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
grpc/
|
||||
18
vendor/mozilla-rust-sdk/googleapis-raw/Cargo.toml
vendored
Normal file
18
vendor/mozilla-rust-sdk/googleapis-raw/Cargo.toml
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
[package]
|
||||
name = "googleapis-raw"
|
||||
version = "0.0.1"
|
||||
authors = ["Ferrous Systems"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
futures = "0.1.28"
|
||||
grpcio = "0.5.0-alpha.1"
|
||||
protobuf = "= 2.7.0"
|
||||
|
||||
[dev-dependencies]
|
||||
slog = "2.5.0"
|
||||
slog-scope = "4.1.1"
|
||||
slog-term = "2.4.1"
|
||||
slog-stdlog = "3.0.2"
|
||||
slog-async = "2.3.0"
|
||||
log = "0.4.7"
|
||||
92
vendor/mozilla-rust-sdk/googleapis-raw/README.md
vendored
Normal file
92
vendor/mozilla-rust-sdk/googleapis-raw/README.md
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
# googleapis-raw
|
||||
|
||||
These are raw bindings for Google APIs based on [`grpcio`](https://github.com/pingcap/grpc-rs).
|
||||
|
||||
## Documentation
|
||||
|
||||
To generate and open documentation, run:
|
||||
|
||||
```
|
||||
cargo doc --open
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
To run hand-written examples, try:
|
||||
|
||||
```
|
||||
cargo run --example spanner-query
|
||||
cargo run --example bigtable-query
|
||||
```
|
||||
|
||||
## Setting up Google Cloud SDK
|
||||
|
||||
Before running examples, make sure the Google Cloud SDK is set up in your environment.
|
||||
If you need help, follow these guides:
|
||||
|
||||
1. [Installing the SDK](https://cloud.google.com/sdk/install)
|
||||
2. [Setting up the SDK](https://cloud.google.com/sdk/docs/initializing)
|
||||
3. [Getting started with Authentication](https://cloud.google.com/docs/authentication/getting-started)
|
||||
|
||||
As a final check:
|
||||
|
||||
* Run `gcloud info` to see the SDK configuration.
|
||||
* Run `echo $GOOGLE_APPLICATION_CREDENTIALS` to verify that the credentials have been set up.
|
||||
* Run `gcloud auth login` to login into Google Cloud
|
||||
|
||||
There is Docker setup available that installs all necessary tools, libraries, see the [README](../docker/README.md)
|
||||
inside the `./docker` folder.
|
||||
|
||||
|
||||
Useful links for setting up specific Google services:
|
||||
|
||||
* [Setting up Spanner](https://cloud.google.com/spanner/docs/getting-started/set-up)
|
||||
* [Installing the Cloud SDK for Cloud Bigtable](https://cloud.google.com/bigtable/docs/installing-cloud-sdk)
|
||||
* [Quickstart using the Pub/Sub CLI tool](https://cloud.google.com/pubsub/docs/quickstart-cli)
|
||||
|
||||
## Generating Rust bindings from `.proto` files
|
||||
|
||||
**NOTE:** You do not need to do this step. Rust bindings are already included in this repository.
|
||||
|
||||
But if you still want to regenerate them from scratch, run:
|
||||
|
||||
```
|
||||
./generate.sh
|
||||
```
|
||||
|
||||
This requires the installation of [protobuf](https://google.github.io/proto-lens/installing-protoc.html) library
|
||||
and [protoc-gen-rust](https://github.com/stepancheg/rust-protobuf/tree/master/protobuf-codegen), a plugin
|
||||
for protobuf. The installed protobuf version and the protobuf crate should have the same version, e.g. `2.7.0`.
|
||||
Installation of the protoc-gen-rust plugin is done via `cargo`:
|
||||
|
||||
```
|
||||
cargo install protobuf-codegen
|
||||
```
|
||||
|
||||
Make sure the `protoc-gen-rust` binary is available in your `$PATH` env variable.
|
||||
|
||||
|
||||
## Google Cloud Console
|
||||
|
||||
Links to Google Cloud Console for our testing environment:
|
||||
|
||||
* [Spanner Console](https://console.cloud.google.com/spanner/instances?project=mozilla-rust-sdk-dev)
|
||||
* [Bigtable Console](https://console.cloud.google.com/bigtable/instances?project=mozilla-rust-sdk-dev)
|
||||
* [Pub/Sub Console](https://console.cloud.google.com/cloudpubsub/topic/detail/mytopic?project=mozilla-rust-sdk-dev)
|
||||
|
||||
## References
|
||||
|
||||
Google APIs and their `.proto` files:
|
||||
|
||||
* [Spanner](https://github.com/googleapis/googleapis/tree/master/google/spanner)
|
||||
* [Bigtable](https://github.com/googleapis/googleapis/tree/master/google/bigtable)
|
||||
* [Pub/Sub](https://github.com/googleapis/googleapis/tree/master/google/pubsub)
|
||||
|
||||
Golang clients:
|
||||
|
||||
* [Spanner client](https://github.com/googleapis/google-cloud-go/tree/master/spanner)
|
||||
([docs](https://godoc.org/cloud.google.com/go/spanner))
|
||||
* [Bigtable client](https://github.com/googleapis/google-cloud-go/tree/master/bigtable)
|
||||
([docs](https://godoc.org/cloud.google.com/go/bigtable))
|
||||
* [Pub/Sub client](https://github.com/googleapis/google-cloud-go/tree/master/pubsub)
|
||||
([docs](https://godoc.org/cloud.google.com/go/pubsub))
|
||||
211
vendor/mozilla-rust-sdk/googleapis-raw/examples/bigtable-helloworld.rs
vendored
Normal file
211
vendor/mozilla-rust-sdk/googleapis-raw/examples/bigtable-helloworld.rs
vendored
Normal file
@ -0,0 +1,211 @@
|
||||
use std::collections::HashMap;
|
||||
use std::error::Error;
|
||||
use std::sync::Arc;
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
use futures::prelude::*;
|
||||
use googleapis_raw::bigtable::admin::v2::{
|
||||
bigtable_instance_admin::GetClusterRequest,
|
||||
bigtable_instance_admin_grpc::BigtableInstanceAdminClient,
|
||||
bigtable_table_admin::CreateTableRequest, bigtable_table_admin::DeleteTableRequest,
|
||||
bigtable_table_admin::ListTablesRequest, bigtable_table_admin_grpc::BigtableTableAdminClient,
|
||||
instance::Cluster, table::ColumnFamily, table::GcRule, table::Table,
|
||||
};
|
||||
use googleapis_raw::bigtable::v2::{
|
||||
bigtable::MutateRowsRequest, bigtable::MutateRowsRequest_Entry, bigtable_grpc::BigtableClient,
|
||||
data::Mutation, data::Mutation_SetCell,
|
||||
};
|
||||
use googleapis_raw::empty::Empty;
|
||||
use grpcio::{Channel, ChannelBuilder, ChannelCredentials, ClientUnaryReceiver, EnvBuilder};
|
||||
use protobuf::well_known_types::Duration;
|
||||
use protobuf::RepeatedField;
|
||||
|
||||
fn timestamp() -> u128 {
|
||||
let start = SystemTime::now();
|
||||
let time = start
|
||||
.duration_since(UNIX_EPOCH)
|
||||
.expect("Failed to fetch timestamp");
|
||||
time.as_micros()
|
||||
}
|
||||
|
||||
/// Create a new channel used for the different types of clients
|
||||
fn connect(endpoint: &str) -> Channel {
|
||||
// Set up the gRPC environment.
|
||||
let env = Arc::new(EnvBuilder::new().build());
|
||||
let creds =
|
||||
ChannelCredentials::google_default_credentials().expect("No Google credentials found");
|
||||
|
||||
// Create a channel to connect to Gcloud.
|
||||
ChannelBuilder::new(env.clone())
|
||||
// Set the max size to correspond to server-side limits.
|
||||
.max_send_message_len(1 << 28)
|
||||
.max_receive_message_len(1 << 28)
|
||||
.secure_connect(&endpoint, creds)
|
||||
}
|
||||
|
||||
/// Returns the cluster information
|
||||
///
|
||||
fn get_cluster(
|
||||
client: &BigtableInstanceAdminClient,
|
||||
cluster_id: &String,
|
||||
) -> ::grpcio::Result<Cluster> {
|
||||
println!("Get cluster information");
|
||||
let mut request = GetClusterRequest::new();
|
||||
request.set_name(cluster_id.to_string());
|
||||
client.get_cluster(&request)
|
||||
}
|
||||
|
||||
/// Lists all tables for a given cluster
|
||||
///
|
||||
fn list_tables(client: &BigtableTableAdminClient, instance_id: &String) {
|
||||
println!("List all existing tables");
|
||||
let mut request = ListTablesRequest::new();
|
||||
request.set_parent(instance_id.clone());
|
||||
match client.list_tables(&request) {
|
||||
Ok(response) => {
|
||||
response
|
||||
.get_tables()
|
||||
.iter()
|
||||
.for_each(|table| println!(" table: {:?}", table));
|
||||
}
|
||||
Err(error) => println!("Failed to list tables: {}", error),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a new table in the BigTable cluster
|
||||
///
|
||||
fn create_table(
|
||||
client: &BigtableTableAdminClient,
|
||||
instance_id: &String,
|
||||
table_name: &String,
|
||||
table: Table,
|
||||
) -> ::grpcio::Result<Table> {
|
||||
println!("Creating table {}", table_name);
|
||||
let mut request = CreateTableRequest::new();
|
||||
request.set_parent(instance_id.clone());
|
||||
request.set_table(table);
|
||||
request.set_table_id("hello-world".to_string());
|
||||
client.create_table(&request)
|
||||
}
|
||||
|
||||
/// Deletes a table asynchronously, returns a future
|
||||
fn delete_table_async(
|
||||
client: &BigtableTableAdminClient,
|
||||
table_name: &String,
|
||||
) -> grpcio::Result<ClientUnaryReceiver<Empty>> {
|
||||
println!("Deleting the {} table", table_name);
|
||||
let mut request = DeleteTableRequest::new();
|
||||
request.set_name(table_name.clone());
|
||||
client.delete_table_async(&request)
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
// BigTable project id
|
||||
let project_id = String::from("mozilla-rust-sdk-dev");
|
||||
// The BigTable instance id
|
||||
let instance_id = String::from("projects/mozilla-rust-sdk-dev/instances/mozilla-rust-sdk");
|
||||
// The cluster id
|
||||
let cluster_id = String::from(
|
||||
"projects/mozilla-rust-sdk-dev/instances/mozilla-rust-sdk/clusters/mozilla-rust-sdk-c1",
|
||||
);
|
||||
// common table endpoint
|
||||
let endpoint = "bigtable.googleapis.com";
|
||||
// Google Cloud configuration.
|
||||
let admin_endpoint = "bigtableadmin.googleapis.com";
|
||||
// The table name
|
||||
let table_name =
|
||||
String::from("projects/mozilla-rust-sdk-dev/instances/mozilla-rust-sdk/tables/hello-world");
|
||||
|
||||
let column_family_id = "cf1";
|
||||
|
||||
// Create a Bigtable client.
|
||||
let channel = connect(admin_endpoint);
|
||||
let client = BigtableInstanceAdminClient::new(channel.clone());
|
||||
|
||||
// display cluster information
|
||||
let cluster = get_cluster(&client, &cluster_id)?;
|
||||
dbg!(cluster);
|
||||
|
||||
// create admin client for tables
|
||||
let admin_client = BigtableTableAdminClient::new(channel.clone());
|
||||
|
||||
// display current tables
|
||||
list_tables(&admin_client, &instance_id);
|
||||
|
||||
// create a new table with a custom column family / gc rule
|
||||
let mut duration = Duration::new();
|
||||
duration.set_seconds(60 * 60 * 24 * 5);
|
||||
let mut gc_rule = GcRule::new();
|
||||
gc_rule.set_max_num_versions(2);
|
||||
gc_rule.set_max_age(duration);
|
||||
let mut column_family = ColumnFamily::new();
|
||||
column_family.set_gc_rule(gc_rule);
|
||||
let mut hash_map = HashMap::new();
|
||||
hash_map.insert(column_family_id.to_string(), column_family);
|
||||
let mut table = Table::new();
|
||||
table.set_column_families(hash_map);
|
||||
match create_table(&admin_client, &instance_id, &table_name, table) {
|
||||
Ok(table) => println!(" table {:?} created", table),
|
||||
Err(error) => println!(" failed to created table: {}", error),
|
||||
}
|
||||
|
||||
// insert entries into new table
|
||||
println!("Insert entries into table");
|
||||
|
||||
let greetings = vec!["Hello World!", "Hello Cloud!", "Hello Rust!"];
|
||||
let mut mutation_requests = Vec::new();
|
||||
let column = "greeting";
|
||||
for (i, greeting) in greetings.iter().enumerate() {
|
||||
let row_key = format!("greeting{}", i);
|
||||
|
||||
let mut set_cell = Mutation_SetCell::new();
|
||||
set_cell.set_column_qualifier(column.to_string().into_bytes());
|
||||
set_cell.set_timestamp_micros(-1);
|
||||
set_cell.set_value(greeting.to_string().into_bytes());
|
||||
set_cell.set_family_name(column_family_id.to_string());
|
||||
|
||||
let mut mutation = Mutation::new();
|
||||
mutation.set_set_cell(set_cell);
|
||||
|
||||
let mut request = MutateRowsRequest_Entry::new();
|
||||
request.set_row_key(row_key.into_bytes());
|
||||
request.set_mutations(RepeatedField::from_vec(vec![mutation]));
|
||||
|
||||
mutation_requests.push(request);
|
||||
}
|
||||
|
||||
let channel = connect(endpoint);
|
||||
let client = BigtableClient::new(channel.clone());
|
||||
let mut request = MutateRowsRequest::new();
|
||||
request.set_table_name(table_name.to_string());
|
||||
request.set_entries(RepeatedField::from_vec(mutation_requests));
|
||||
|
||||
// apply changes and check responses
|
||||
let response = client
|
||||
.mutate_rows(&request)?
|
||||
.collect()
|
||||
.into_future()
|
||||
.wait()?;
|
||||
for response in response.iter() {
|
||||
for entry in response.get_entries().iter() {
|
||||
let status = entry.get_status();
|
||||
println!(
|
||||
" entry index: {}, status: {} - {}",
|
||||
entry.get_index(),
|
||||
status.code,
|
||||
status.message
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// display all tables, should include new table
|
||||
list_tables(&admin_client, &instance_id);
|
||||
|
||||
// delete the table
|
||||
delete_table_async(&admin_client, &table_name)?.wait()?;
|
||||
|
||||
// list of tables should not have deleted table
|
||||
list_tables(&admin_client, &instance_id);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
39
vendor/mozilla-rust-sdk/googleapis-raw/examples/bigtable-query.rs
vendored
Normal file
39
vendor/mozilla-rust-sdk/googleapis-raw/examples/bigtable-query.rs
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
use std::error::Error;
|
||||
use std::sync::Arc;
|
||||
|
||||
use futures::prelude::*;
|
||||
use googleapis_raw::bigtable::v2::{bigtable::ReadRowsRequest, bigtable_grpc::BigtableClient};
|
||||
use grpcio::{ChannelBuilder, ChannelCredentials, EnvBuilder};
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
// An example database inside Mozilla's Bigtable instance.
|
||||
let table = "projects/mozilla-rust-sdk-dev/instances/mozilla-rust-sdk/tables/prezzy";
|
||||
|
||||
// Google Cloud configuration.
|
||||
let endpoint = "bigtable.googleapis.com:443";
|
||||
|
||||
// Set up the gRPC environment.
|
||||
let env = Arc::new(EnvBuilder::new().build());
|
||||
let creds = ChannelCredentials::google_default_credentials()?;
|
||||
|
||||
// Create a Bigtable client.
|
||||
let chan = ChannelBuilder::new(env.clone())
|
||||
// Set the max size to correspond to server-side limits.
|
||||
.max_send_message_len(1 << 28)
|
||||
.max_receive_message_len(1 << 28)
|
||||
.secure_connect(&endpoint, creds);
|
||||
let client = BigtableClient::new(chan);
|
||||
|
||||
// Create a request to read all rows.
|
||||
let mut req = ReadRowsRequest::new();
|
||||
req.table_name = table.to_string();
|
||||
|
||||
// Iterate over the rows and print them.
|
||||
let mut stream = client.read_rows(&req)?;
|
||||
while let (Some(row), s) = stream.into_future().wait().map_err(|(e, _)| e)? {
|
||||
stream = s;
|
||||
dbg!(row);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
191
vendor/mozilla-rust-sdk/googleapis-raw/examples/pubsub-publisher.rs
vendored
Normal file
191
vendor/mozilla-rust-sdk/googleapis-raw/examples/pubsub-publisher.rs
vendored
Normal file
@ -0,0 +1,191 @@
|
||||
use std::collections::HashMap;
|
||||
use std::error::Error;
|
||||
use std::sync::Arc;
|
||||
use std::time::SystemTime;
|
||||
|
||||
use futures::prelude::*;
|
||||
use googleapis_raw::pubsub::v1::{
|
||||
pubsub::AcknowledgeRequest, pubsub::ExpirationPolicy, pubsub::GetSubscriptionRequest,
|
||||
pubsub::GetTopicRequest, pubsub::PublishRequest, pubsub::PublishResponse,
|
||||
pubsub::PubsubMessage, pubsub::PullRequest, pubsub::PushConfig, pubsub::Subscription,
|
||||
pubsub::Topic, pubsub_grpc::PublisherClient, pubsub_grpc::SubscriberClient,
|
||||
};
|
||||
use grpcio::{Channel, ChannelBuilder, ChannelCredentials, ClientUnaryReceiver, EnvBuilder};
|
||||
use protobuf::RepeatedField;
|
||||
|
||||
/// Creates a topic or finds an existing one, then returns the topic
|
||||
///
|
||||
fn find_or_create_topic(client: &PublisherClient, topic_name: &str) -> ::grpcio::Result<Topic> {
|
||||
// find topic
|
||||
println!("Finding topic {}", topic_name);
|
||||
let mut request = GetTopicRequest::new();
|
||||
request.set_topic(topic_name.to_string());
|
||||
if let Ok(topic) = client.get_topic(&request) {
|
||||
println!("Found topic: {}", topic.get_name());
|
||||
return Ok(topic);
|
||||
} else {
|
||||
println!("Topic not found");
|
||||
}
|
||||
|
||||
// otherwise create topic
|
||||
println!("Creating topic {}", topic_name);
|
||||
let mut labels = HashMap::new();
|
||||
labels.insert("environment".to_string(), "test".to_string());
|
||||
let mut topic = Topic::new();
|
||||
topic.set_name(topic_name.to_string());
|
||||
topic.set_labels(labels);
|
||||
client.create_topic(&topic)
|
||||
}
|
||||
|
||||
/// Creates a subscription or finds an existing one
|
||||
///
|
||||
fn find_or_create_subscription(
|
||||
client: &SubscriberClient,
|
||||
subscription_name: &str,
|
||||
topic_name: &str,
|
||||
) -> ::grpcio::Result<Subscription> {
|
||||
// find subscription
|
||||
println!(
|
||||
"Finding subscription {} for topic {}",
|
||||
subscription_name, topic_name
|
||||
);
|
||||
let mut request = GetSubscriptionRequest::new();
|
||||
request.set_subscription(subscription_name.to_string());
|
||||
if let Ok(subscription) = client.get_subscription(&request) {
|
||||
println!("Found subscription: {}", subscription.get_name());
|
||||
return Ok(subscription);
|
||||
} else {
|
||||
println!("Subscription not found");
|
||||
}
|
||||
|
||||
// create a new subscription
|
||||
println!("Creating a new subscription {}", subscription_name);
|
||||
let mut labels = HashMap::new();
|
||||
labels.insert("environment".to_string(), "test".to_string());
|
||||
let mut attributes = HashMap::new();
|
||||
attributes.insert("attribute".to_string(), "hello".to_string());
|
||||
let mut push_config = PushConfig::new();
|
||||
let mut expiration_policy = ExpirationPolicy::new();
|
||||
let mut expiration_duration = protobuf::well_known_types::Duration::new();
|
||||
let mut subscription = Subscription::new();
|
||||
push_config.set_attributes(attributes);
|
||||
expiration_duration.set_seconds(60 * 60 * 48);
|
||||
expiration_policy.set_ttl(expiration_duration.clone());
|
||||
subscription.set_name(subscription_name.to_string());
|
||||
subscription.set_topic(topic_name.to_string());
|
||||
subscription.set_ack_deadline_seconds(20);
|
||||
// subscription.set_expiration_policy(expiration_policy);
|
||||
// subscription.set_message_retention_duration(expiration_duration.clone());
|
||||
// subscription.set_push_config(push_config);
|
||||
// subscription.set_labels(labels);
|
||||
|
||||
client.create_subscription(&subscription)
|
||||
}
|
||||
|
||||
fn timestamp_in_seconds() -> u64 {
|
||||
let timestamp = SystemTime::now()
|
||||
.duration_since(SystemTime::UNIX_EPOCH)
|
||||
.unwrap();
|
||||
timestamp.as_secs()
|
||||
}
|
||||
|
||||
/// Creates a new PubSubMessage instance
|
||||
///
|
||||
fn create_pubsub_msg(message: &str) -> PubsubMessage {
|
||||
println!("Publishing message: {}", message);
|
||||
let mut timestamp = ::protobuf::well_known_types::Timestamp::new();
|
||||
timestamp.set_seconds(timestamp_in_seconds() as i64);
|
||||
|
||||
let mut pubsub_msg = PubsubMessage::new();
|
||||
pubsub_msg.set_data(message.to_string().into_bytes());
|
||||
pubsub_msg.set_publish_time(timestamp);
|
||||
pubsub_msg
|
||||
}
|
||||
|
||||
/// Publishes a message asynchronously, returning a future
|
||||
///
|
||||
fn publish_msg_async(
|
||||
client: &PublisherClient,
|
||||
topic: &Topic,
|
||||
messages: Vec<String>,
|
||||
) -> ::grpcio::Result<ClientUnaryReceiver<PublishResponse>> {
|
||||
let pub_messages = messages.iter().map(|msg| create_pubsub_msg(msg)).collect();
|
||||
|
||||
let mut request = PublishRequest::new();
|
||||
request.set_topic(topic.get_name().to_string());
|
||||
request.set_messages(RepeatedField::from_vec(pub_messages));
|
||||
client.publish_async(&request)
|
||||
}
|
||||
|
||||
/// Create a new channel used for the different types of clients
|
||||
///
|
||||
fn connect(endpoint: &str) -> Channel {
|
||||
// Set up the gRPC environment.
|
||||
let env = Arc::new(EnvBuilder::new().build());
|
||||
let creds =
|
||||
ChannelCredentials::google_default_credentials().expect("No Google redentials found");
|
||||
|
||||
// Create a channel to connect to Gcloud.
|
||||
ChannelBuilder::new(env.clone())
|
||||
// Set the max size to correspond to server-side limits.
|
||||
.max_send_message_len(1 << 28)
|
||||
.max_receive_message_len(1 << 28)
|
||||
.secure_connect(&endpoint, creds)
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
// API endpoint
|
||||
let endpoint = "pubsub.googleapis.com";
|
||||
// GCloud project id
|
||||
let project_id = "mozilla-rust-sdk-dev";
|
||||
|
||||
// create client
|
||||
let channel = connect(&endpoint);
|
||||
let publisher = PublisherClient::new(channel.clone());
|
||||
|
||||
// get topic
|
||||
let topic_name = format!("projects/{}/topics/greetings", project_id);
|
||||
let topic = dbg!(find_or_create_topic(&publisher, &topic_name)?);
|
||||
|
||||
// publish a number of greeting messages
|
||||
let greetings = vec!["hello", "hi", "hola", "bonjour", "ahoi"];
|
||||
let messages = greetings.iter().map(|g| g.to_string()).collect();
|
||||
publish_msg_async(&publisher, &topic, messages)?.wait()?;
|
||||
|
||||
// create a subscriber to consume these messages
|
||||
let subscription_name = format!("projects/{}/subscriptions/sub-greetings", project_id);
|
||||
let subscriber = SubscriberClient::new(channel.clone());
|
||||
|
||||
// get subscription
|
||||
let subscription = find_or_create_subscription(&subscriber, &subscription_name, &topic_name)?;
|
||||
|
||||
// Pubsub Subscription Pull, receive all messages
|
||||
println!("Pulling messages from subscription {:?}", subscription);
|
||||
let mut request = PullRequest::new();
|
||||
request.set_subscription(subscription_name.to_string());
|
||||
request.set_max_messages(10);
|
||||
|
||||
loop {
|
||||
let future = subscriber.pull_async(&request)?;
|
||||
let response = future.wait()?;
|
||||
let pubsub_messages = response.get_received_messages();
|
||||
|
||||
println!("Handling {} messages", pubsub_messages.len());
|
||||
for pubsub_message in pubsub_messages {
|
||||
println!(" >> message: {:?}", pubsub_message);
|
||||
let ack_id = pubsub_message.get_ack_id().to_string();
|
||||
|
||||
let mut request = AcknowledgeRequest::new();
|
||||
request.set_subscription(subscription_name.to_string());
|
||||
request.set_ack_ids(RepeatedField::from_vec(vec![ack_id]));
|
||||
subscriber.acknowledge(&request)?;
|
||||
}
|
||||
|
||||
// once all messages are handled leave
|
||||
if pubsub_messages.is_empty() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
261
vendor/mozilla-rust-sdk/googleapis-raw/examples/spanner-db.rs
vendored
Normal file
261
vendor/mozilla-rust-sdk/googleapis-raw/examples/spanner-db.rs
vendored
Normal file
@ -0,0 +1,261 @@
|
||||
use googleapis_raw::empty::Empty;
|
||||
use googleapis_raw::longrunning::operations::GetOperationRequest;
|
||||
use googleapis_raw::longrunning::operations_grpc::OperationsClient;
|
||||
use googleapis_raw::spanner::admin::database::v1::{
|
||||
spanner_database_admin::CreateDatabaseRequest, spanner_database_admin::DropDatabaseRequest,
|
||||
spanner_database_admin::GetDatabaseRequest, spanner_database_admin_grpc::DatabaseAdminClient,
|
||||
};
|
||||
use googleapis_raw::spanner::v1::{
|
||||
mutation::Mutation, mutation::Mutation_Write, spanner::BeginTransactionRequest,
|
||||
spanner::CommitRequest, spanner::CreateSessionRequest, spanner::Session,
|
||||
spanner_grpc::SpannerClient, transaction::Transaction, transaction::TransactionOptions,
|
||||
transaction::TransactionOptions_ReadWrite,
|
||||
};
|
||||
use grpcio::{
|
||||
CallOption, Channel, ChannelBuilder, ChannelCredentials, ClientUnaryReceiver, EnvBuilder,
|
||||
MetadataBuilder,
|
||||
};
|
||||
use protobuf::well_known_types::{ListValue, Value};
|
||||
use protobuf::RepeatedField;
|
||||
#[allow(unused_imports)]
|
||||
use std::error::Error;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
const CREATE_DATABASE: &str = "CREATE DATABASE music";
|
||||
|
||||
const CREATE_SINGER_TABLE: &str = "CREATE TABLE Singers (
|
||||
SingerId INT64 NOT NULL,
|
||||
FirstName STRING(1024),
|
||||
LastName STRING(1024),
|
||||
SingerInfo BYTES(MAX),
|
||||
) PRIMARY KEY (SingerId)";
|
||||
|
||||
const CREATE_ALBUMS_TABLE: &str = "CREATE TABLE Albums (
|
||||
SingerId INT64 NOT NULL,
|
||||
AlbumId INT64 NOT NULL,
|
||||
AlbumTitle STRING(MAX),
|
||||
) PRIMARY KEY (SingerId, AlbumId),
|
||||
INTERLEAVE IN PARENT Singers ON DELETE CASCADE";
|
||||
|
||||
/// A basic struct for a singer
|
||||
///
|
||||
struct Singer {
|
||||
pub id: i64,
|
||||
pub first_name: String,
|
||||
pub last_name: String,
|
||||
}
|
||||
|
||||
/// Waits until the operation is finished
|
||||
///
|
||||
fn wait_operation_finished(channel: &Channel, operation: &str) {
|
||||
let operations_client = OperationsClient::new(channel.clone());
|
||||
|
||||
let mut request = GetOperationRequest::new();
|
||||
request.set_name(operation.to_string());
|
||||
|
||||
loop {
|
||||
println!("Checking operation: {}", operation);
|
||||
match operations_client.get_operation(&request) {
|
||||
Ok(response) => {
|
||||
if response.get_done() {
|
||||
println!("Operation {} finished", operation);
|
||||
break;
|
||||
}
|
||||
|
||||
// wait instead
|
||||
let wait_time = Duration::from_millis(250);
|
||||
std::thread::sleep(wait_time);
|
||||
}
|
||||
Err(error) => {
|
||||
println!("Failed to get operation");
|
||||
dbg!(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a new database if it does not exist yet.
|
||||
///
|
||||
fn create_database_if_not_exists(channel: &Channel, database_name: &str, instance_id: &str) {
|
||||
let client = DatabaseAdminClient::new(channel.clone());
|
||||
// find database
|
||||
println!("Finding database {}", database_name);
|
||||
let mut request = GetDatabaseRequest::new();
|
||||
request.set_name(database_name.to_string());
|
||||
if let Ok(database) = client.get_database(&request) {
|
||||
println!("Found database: {}", database.get_name());
|
||||
return;
|
||||
} else {
|
||||
println!("Database not found");
|
||||
}
|
||||
|
||||
// create a new database
|
||||
println!("Create database {}", database_name);
|
||||
let statements = vec![CREATE_SINGER_TABLE, CREATE_ALBUMS_TABLE]
|
||||
.iter()
|
||||
.map(|s| s.to_string())
|
||||
.collect();
|
||||
|
||||
let mut request = CreateDatabaseRequest::new();
|
||||
request.set_parent(instance_id.to_string());
|
||||
request.set_create_statement(CREATE_DATABASE.to_string());
|
||||
request.set_extra_statements(RepeatedField::from_vec(statements));
|
||||
let operation = client
|
||||
.create_database(&request)
|
||||
.expect("Failed to create database");
|
||||
dbg!(operation.clone());
|
||||
|
||||
// check that operation is finished
|
||||
wait_operation_finished(&channel, operation.get_name());
|
||||
}
|
||||
|
||||
/// Deletes a given database
|
||||
///
|
||||
fn drop_database(
|
||||
channel: &Channel,
|
||||
database_name: &str,
|
||||
) -> ::grpcio::Result<ClientUnaryReceiver<Empty>> {
|
||||
println!("Drop database {}", database_name);
|
||||
let client = DatabaseAdminClient::new(channel.clone());
|
||||
|
||||
let mut request = DropDatabaseRequest::new();
|
||||
request.set_database(database_name.to_string());
|
||||
|
||||
client.drop_database_async(&request)
|
||||
}
|
||||
|
||||
/// Create a new session to communicate with Spanner
|
||||
///
|
||||
fn create_session(client: &SpannerClient, database_name: &str) -> ::grpcio::Result<Session> {
|
||||
let mut request = CreateSessionRequest::new();
|
||||
request.set_database(database_name.to_string());
|
||||
let mut meta = MetadataBuilder::new();
|
||||
meta.add_str("google-cloud-resource-prefix", database_name)
|
||||
.expect("Failed to set meta data");
|
||||
meta.add_str("x-goog-api-client", "googleapis-rs")
|
||||
.expect("Failed to set meta data");
|
||||
let opt = CallOption::default().headers(meta.build());
|
||||
client.create_session_opt(&request, opt)
|
||||
}
|
||||
|
||||
/// Create a new channel used for the different types of clients
|
||||
///
|
||||
fn connect(endpoint: &str) -> Channel {
|
||||
// Set up the gRPC environment.
|
||||
let env = Arc::new(EnvBuilder::new().build());
|
||||
let creds =
|
||||
ChannelCredentials::google_default_credentials().expect("No Google credentials found");
|
||||
|
||||
// Create a channel to connect to Gcloud.
|
||||
ChannelBuilder::new(env.clone())
|
||||
// Set the max size to correspond to server-side limits.
|
||||
.max_send_message_len(1 << 28)
|
||||
.max_receive_message_len(1 << 28)
|
||||
.secure_connect(&endpoint, creds)
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
let endpoint = "spanner.googleapis.com";
|
||||
|
||||
// global project_id
|
||||
let _project_id = "projects/mozilla-rust-sdk-dev";
|
||||
// spanner instance id
|
||||
let instance_id = "projects/mozilla-rust-sdk-dev/instances/mozilla-spanner-dev";
|
||||
// database name
|
||||
let database_name =
|
||||
"projects/mozilla-rust-sdk-dev/instances/mozilla-spanner-dev/databases/music";
|
||||
|
||||
// create spanner admin client
|
||||
let channel = connect(endpoint);
|
||||
|
||||
// create database if it not already exists
|
||||
create_database_if_not_exists(&channel, database_name, instance_id);
|
||||
|
||||
// create session to communicate
|
||||
let client = SpannerClient::new(channel.clone());
|
||||
let session = create_session(&client, database_name)?;
|
||||
|
||||
// insert data into database by using a transaction
|
||||
let client = SpannerClient::new(channel.clone());
|
||||
let mut request = BeginTransactionRequest::new();
|
||||
let mut read_write = TransactionOptions::new();
|
||||
read_write.set_read_write(TransactionOptions_ReadWrite::new());
|
||||
request.set_session(session.get_name().to_string());
|
||||
request.set_options(read_write);
|
||||
let transaction = client.begin_transaction(&request)?;
|
||||
|
||||
// the list of singers to add
|
||||
let columns = vec![
|
||||
"SingerId".to_string(),
|
||||
"FirstName".to_string(),
|
||||
"LastName".to_string(),
|
||||
];
|
||||
let singers = vec![
|
||||
Singer {
|
||||
id: 1,
|
||||
first_name: "Marc".to_string(),
|
||||
last_name: "Richards".to_string(),
|
||||
},
|
||||
Singer {
|
||||
id: 2,
|
||||
first_name: "Catalina".to_string(),
|
||||
last_name: "Smith".to_string(),
|
||||
},
|
||||
Singer {
|
||||
id: 3,
|
||||
first_name: "Alice".to_string(),
|
||||
last_name: "Trentor".to_string(),
|
||||
},
|
||||
Singer {
|
||||
id: 4,
|
||||
first_name: "Lea".to_string(),
|
||||
last_name: "Martin".to_string(),
|
||||
},
|
||||
Singer {
|
||||
id: 5,
|
||||
first_name: "David".to_string(),
|
||||
last_name: "Lomond".to_string(),
|
||||
},
|
||||
];
|
||||
|
||||
// collect all values
|
||||
let mut list_values = Vec::new();
|
||||
for singer in singers {
|
||||
let mut id = Value::new();
|
||||
id.set_string_value(singer.id.to_string());
|
||||
let mut first_name = Value::new();
|
||||
first_name.set_string_value(singer.first_name.clone());
|
||||
let mut last_name = Value::new();
|
||||
last_name.set_string_value(singer.last_name.clone());
|
||||
|
||||
let mut list = ListValue::new();
|
||||
list.set_values(RepeatedField::from_vec(vec![id, first_name, last_name]));
|
||||
list_values.push(list);
|
||||
}
|
||||
|
||||
// create a suitable mutation with all values
|
||||
println!("Preparing write mutation to add singers");
|
||||
let mut mutation_write = Mutation_Write::new();
|
||||
mutation_write.set_table("Singers".to_string());
|
||||
mutation_write.set_columns(RepeatedField::from_vec(columns));
|
||||
mutation_write.set_values(RepeatedField::from_vec(list_values));
|
||||
println!("Mutation write object");
|
||||
dbg!(mutation_write.clone());
|
||||
|
||||
// finally commit to database
|
||||
println!("Commit data to database {}", database_name);
|
||||
let mut commit = CommitRequest::new();
|
||||
commit.set_transaction_id(transaction.get_id().to_vec());
|
||||
commit.set_session(session.get_name().to_string());
|
||||
let mut mutation = Mutation::new();
|
||||
mutation.set_insert_or_update(mutation_write);
|
||||
commit.set_mutations(RepeatedField::from_vec(vec![mutation]));
|
||||
let response = client.commit(&commit)?;
|
||||
dbg!(response);
|
||||
|
||||
// delete database
|
||||
// drop_database(&channel, database_name)?.wait()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
53
vendor/mozilla-rust-sdk/googleapis-raw/examples/spanner-query.rs
vendored
Normal file
53
vendor/mozilla-rust-sdk/googleapis-raw/examples/spanner-query.rs
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
use std::error::Error;
|
||||
use std::sync::Arc;
|
||||
|
||||
use futures::prelude::*;
|
||||
use googleapis_raw::spanner::v1::{
|
||||
spanner::{CreateSessionRequest, ExecuteSqlRequest},
|
||||
spanner_grpc::SpannerClient,
|
||||
};
|
||||
use grpcio::{CallOption, ChannelBuilder, ChannelCredentials, EnvBuilder, MetadataBuilder};
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
// An example database inside Mozilla's Spanner instance.
|
||||
let database = "projects/mozilla-rust-sdk-dev/instances/mozilla-spanner-dev/databases/mydb";
|
||||
|
||||
// Google Cloud configuration.
|
||||
let endpoint = "spanner.googleapis.com:443";
|
||||
|
||||
// Set up the gRPC environment.
|
||||
let env = Arc::new(EnvBuilder::new().build());
|
||||
let creds = ChannelCredentials::google_default_credentials()?;
|
||||
|
||||
// Create a Spanner client.
|
||||
let chan = ChannelBuilder::new(env.clone())
|
||||
.max_send_message_len(100 << 20)
|
||||
.max_receive_message_len(100 << 20)
|
||||
.secure_connect(&endpoint, creds);
|
||||
let client = SpannerClient::new(chan);
|
||||
|
||||
// Connect to the instance and create a Spanner session.
|
||||
let mut req = CreateSessionRequest::new();
|
||||
req.database = database.to_string();
|
||||
let mut meta = MetadataBuilder::new();
|
||||
meta.add_str("google-cloud-resource-prefix", database)?;
|
||||
meta.add_str("x-goog-api-client", "googleapis-rs")?;
|
||||
let opt = CallOption::default().headers(meta.build());
|
||||
let session = client.create_session_opt(&req, opt)?;
|
||||
|
||||
// Prepare a SQL command to execute.
|
||||
let mut req = ExecuteSqlRequest::new();
|
||||
req.session = session.get_name().to_string();
|
||||
req.sql = "select * from planets".to_string();
|
||||
|
||||
// Execute the command synchronously.
|
||||
let out = client.execute_sql(&req)?;
|
||||
dbg!(out);
|
||||
|
||||
// Execute the command asynchronously.
|
||||
let fut = client.execute_sql_async(&req)?;
|
||||
let out = fut.wait()?;
|
||||
dbg!(out);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
60
vendor/mozilla-rust-sdk/googleapis-raw/generate.sh
vendored
Executable file
60
vendor/mozilla-rust-sdk/googleapis-raw/generate.sh
vendored
Executable file
@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
if ! [[ -x "$(command -v grpc_rust_plugin)" ]]; then
|
||||
echo "Error: grpc_rust_plugin was not found"
|
||||
echo
|
||||
echo "To install, run: cargo install grpcio-compiler"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Pulling git submodules"
|
||||
git submodule update --init --recursive
|
||||
|
||||
apis=grpc/third_party/googleapis
|
||||
|
||||
proto_files="
|
||||
grpc/src/proto/grpc/testing/empty.proto
|
||||
"
|
||||
|
||||
for proto in $proto_files; do
|
||||
echo "Processing: $proto"
|
||||
protoc \
|
||||
--rust_out=$PWD/src \
|
||||
--grpc_out=$PWD/src \
|
||||
--plugin=protoc-gen-grpc=`which grpc_rust_plugin` \
|
||||
--proto_path=grpc/src/proto/grpc/testing \
|
||||
$proto
|
||||
done
|
||||
|
||||
proto_dirs="
|
||||
bigtable/admin/cluster/v1
|
||||
bigtable/admin/table/v1
|
||||
bigtable/admin/v2
|
||||
bigtable/v1
|
||||
bigtable/v2
|
||||
iam/v1
|
||||
longrunning
|
||||
pubsub/v1
|
||||
pubsub/v1beta2
|
||||
rpc
|
||||
spanner/admin/database/v1
|
||||
spanner/admin/instance/v1
|
||||
spanner/v1
|
||||
"
|
||||
|
||||
for dir in $proto_dirs; do
|
||||
mkdir -p "$PWD/src/$dir"
|
||||
|
||||
for proto in `find $apis/google/$dir/*.proto`; do
|
||||
echo "Processing: $proto"
|
||||
protoc \
|
||||
--rust_out="$PWD/src/$dir" \
|
||||
--grpc_out="$PWD/src/$dir" \
|
||||
--plugin=protoc-gen-grpc="`which grpc_rust_plugin`" \
|
||||
--proto_path="$apis" \
|
||||
$proto
|
||||
done
|
||||
done
|
||||
1
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/cluster/mod.rs
vendored
Normal file
1
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/cluster/mod.rs
vendored
Normal file
@ -0,0 +1 @@
|
||||
pub mod v1;
|
||||
855
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/cluster/v1/bigtable_cluster_data.rs
vendored
Normal file
855
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/cluster/v1/bigtable_cluster_data.rs
vendored
Normal file
@ -0,0 +1,855 @@
|
||||
// This file is generated by rust-protobuf 2.7.0. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! Generated file from `google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto`
|
||||
|
||||
use protobuf::Message as Message_imported_for_functions;
|
||||
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct Zone {
|
||||
// message fields
|
||||
pub name: ::std::string::String,
|
||||
pub display_name: ::std::string::String,
|
||||
pub status: Zone_Status,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a Zone {
|
||||
fn default() -> &'a Zone {
|
||||
<Zone as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl Zone {
|
||||
pub fn new() -> Zone {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
pub fn clear_name(&mut self) {
|
||||
self.name.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_name(&mut self, v: ::std::string::String) {
|
||||
self.name = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_name(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.name
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_name(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.name, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// string display_name = 2;
|
||||
|
||||
|
||||
pub fn get_display_name(&self) -> &str {
|
||||
&self.display_name
|
||||
}
|
||||
pub fn clear_display_name(&mut self) {
|
||||
self.display_name.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_display_name(&mut self, v: ::std::string::String) {
|
||||
self.display_name = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_display_name(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.display_name
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_display_name(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.display_name, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// .google.bigtable.admin.cluster.v1.Zone.Status status = 3;
|
||||
|
||||
|
||||
pub fn get_status(&self) -> Zone_Status {
|
||||
self.status
|
||||
}
|
||||
pub fn clear_status(&mut self) {
|
||||
self.status = Zone_Status::UNKNOWN;
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_status(&mut self, v: Zone_Status) {
|
||||
self.status = v;
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for Zone {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.display_name)?;
|
||||
},
|
||||
3 => {
|
||||
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.status, 3, &mut self.unknown_fields)?
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.name);
|
||||
}
|
||||
if !self.display_name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(2, &self.display_name);
|
||||
}
|
||||
if self.status != Zone_Status::UNKNOWN {
|
||||
my_size += ::protobuf::rt::enum_size(3, self.status);
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.name.is_empty() {
|
||||
os.write_string(1, &self.name)?;
|
||||
}
|
||||
if !self.display_name.is_empty() {
|
||||
os.write_string(2, &self.display_name)?;
|
||||
}
|
||||
if self.status != Zone_Status::UNKNOWN {
|
||||
os.write_enum(3, self.status.value())?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &::std::any::Any {
|
||||
self as &::std::any::Any
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
|
||||
self as &mut ::std::any::Any
|
||||
}
|
||||
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> Zone {
|
||||
Zone::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &Zone| { &m.name },
|
||||
|m: &mut Zone| { &mut m.name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"display_name",
|
||||
|m: &Zone| { &m.display_name },
|
||||
|m: &mut Zone| { &mut m.display_name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Zone_Status>>(
|
||||
"status",
|
||||
|m: &Zone| { &m.status },
|
||||
|m: &mut Zone| { &mut m.status },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<Zone>(
|
||||
"Zone",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static Zone {
|
||||
static mut instance: ::protobuf::lazy::Lazy<Zone> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const Zone,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(Zone::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for Zone {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.display_name.clear();
|
||||
self.status = Zone_Status::UNKNOWN;
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for Zone {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for Zone {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
|
||||
pub enum Zone_Status {
|
||||
UNKNOWN = 0,
|
||||
OK = 1,
|
||||
PLANNED_MAINTENANCE = 2,
|
||||
EMERGENCY_MAINENANCE = 3,
|
||||
}
|
||||
|
||||
impl ::protobuf::ProtobufEnum for Zone_Status {
|
||||
fn value(&self) -> i32 {
|
||||
*self as i32
|
||||
}
|
||||
|
||||
fn from_i32(value: i32) -> ::std::option::Option<Zone_Status> {
|
||||
match value {
|
||||
0 => ::std::option::Option::Some(Zone_Status::UNKNOWN),
|
||||
1 => ::std::option::Option::Some(Zone_Status::OK),
|
||||
2 => ::std::option::Option::Some(Zone_Status::PLANNED_MAINTENANCE),
|
||||
3 => ::std::option::Option::Some(Zone_Status::EMERGENCY_MAINENANCE),
|
||||
_ => ::std::option::Option::None
|
||||
}
|
||||
}
|
||||
|
||||
fn values() -> &'static [Self] {
|
||||
static values: &'static [Zone_Status] = &[
|
||||
Zone_Status::UNKNOWN,
|
||||
Zone_Status::OK,
|
||||
Zone_Status::PLANNED_MAINTENANCE,
|
||||
Zone_Status::EMERGENCY_MAINENANCE,
|
||||
];
|
||||
values
|
||||
}
|
||||
|
||||
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
::protobuf::reflect::EnumDescriptor::new("Zone_Status", file_descriptor_proto())
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::marker::Copy for Zone_Status {
|
||||
}
|
||||
|
||||
impl ::std::default::Default for Zone_Status {
|
||||
fn default() -> Self {
|
||||
Zone_Status::UNKNOWN
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for Zone_Status {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct Cluster {
|
||||
// message fields
|
||||
pub name: ::std::string::String,
|
||||
pub current_operation: ::protobuf::SingularPtrField<super::operations::Operation>,
|
||||
pub display_name: ::std::string::String,
|
||||
pub serve_nodes: i32,
|
||||
pub default_storage_type: StorageType,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a Cluster {
|
||||
fn default() -> &'a Cluster {
|
||||
<Cluster as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl Cluster {
|
||||
pub fn new() -> Cluster {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
pub fn clear_name(&mut self) {
|
||||
self.name.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_name(&mut self, v: ::std::string::String) {
|
||||
self.name = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_name(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.name
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_name(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.name, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// .google.longrunning.Operation current_operation = 3;
|
||||
|
||||
|
||||
pub fn get_current_operation(&self) -> &super::operations::Operation {
|
||||
self.current_operation.as_ref().unwrap_or_else(|| super::operations::Operation::default_instance())
|
||||
}
|
||||
pub fn clear_current_operation(&mut self) {
|
||||
self.current_operation.clear();
|
||||
}
|
||||
|
||||
pub fn has_current_operation(&self) -> bool {
|
||||
self.current_operation.is_some()
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_current_operation(&mut self, v: super::operations::Operation) {
|
||||
self.current_operation = ::protobuf::SingularPtrField::some(v);
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_current_operation(&mut self) -> &mut super::operations::Operation {
|
||||
if self.current_operation.is_none() {
|
||||
self.current_operation.set_default();
|
||||
}
|
||||
self.current_operation.as_mut().unwrap()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_current_operation(&mut self) -> super::operations::Operation {
|
||||
self.current_operation.take().unwrap_or_else(|| super::operations::Operation::new())
|
||||
}
|
||||
|
||||
// string display_name = 4;
|
||||
|
||||
|
||||
pub fn get_display_name(&self) -> &str {
|
||||
&self.display_name
|
||||
}
|
||||
pub fn clear_display_name(&mut self) {
|
||||
self.display_name.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_display_name(&mut self, v: ::std::string::String) {
|
||||
self.display_name = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_display_name(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.display_name
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_display_name(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.display_name, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// int32 serve_nodes = 5;
|
||||
|
||||
|
||||
pub fn get_serve_nodes(&self) -> i32 {
|
||||
self.serve_nodes
|
||||
}
|
||||
pub fn clear_serve_nodes(&mut self) {
|
||||
self.serve_nodes = 0;
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_serve_nodes(&mut self, v: i32) {
|
||||
self.serve_nodes = v;
|
||||
}
|
||||
|
||||
// .google.bigtable.admin.cluster.v1.StorageType default_storage_type = 8;
|
||||
|
||||
|
||||
pub fn get_default_storage_type(&self) -> StorageType {
|
||||
self.default_storage_type
|
||||
}
|
||||
pub fn clear_default_storage_type(&mut self) {
|
||||
self.default_storage_type = StorageType::STORAGE_UNSPECIFIED;
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_default_storage_type(&mut self, v: StorageType) {
|
||||
self.default_storage_type = v;
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for Cluster {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.current_operation {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||
},
|
||||
3 => {
|
||||
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.current_operation)?;
|
||||
},
|
||||
4 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.display_name)?;
|
||||
},
|
||||
5 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeVarint {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
let tmp = is.read_int32()?;
|
||||
self.serve_nodes = tmp;
|
||||
},
|
||||
8 => {
|
||||
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.default_storage_type, 8, &mut self.unknown_fields)?
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.name);
|
||||
}
|
||||
if let Some(ref v) = self.current_operation.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
}
|
||||
if !self.display_name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(4, &self.display_name);
|
||||
}
|
||||
if self.serve_nodes != 0 {
|
||||
my_size += ::protobuf::rt::value_size(5, self.serve_nodes, ::protobuf::wire_format::WireTypeVarint);
|
||||
}
|
||||
if self.default_storage_type != StorageType::STORAGE_UNSPECIFIED {
|
||||
my_size += ::protobuf::rt::enum_size(8, self.default_storage_type);
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.name.is_empty() {
|
||||
os.write_string(1, &self.name)?;
|
||||
}
|
||||
if let Some(ref v) = self.current_operation.as_ref() {
|
||||
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
}
|
||||
if !self.display_name.is_empty() {
|
||||
os.write_string(4, &self.display_name)?;
|
||||
}
|
||||
if self.serve_nodes != 0 {
|
||||
os.write_int32(5, self.serve_nodes)?;
|
||||
}
|
||||
if self.default_storage_type != StorageType::STORAGE_UNSPECIFIED {
|
||||
os.write_enum(8, self.default_storage_type.value())?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &::std::any::Any {
|
||||
self as &::std::any::Any
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
|
||||
self as &mut ::std::any::Any
|
||||
}
|
||||
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> Cluster {
|
||||
Cluster::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &Cluster| { &m.name },
|
||||
|m: &mut Cluster| { &mut m.name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::operations::Operation>>(
|
||||
"current_operation",
|
||||
|m: &Cluster| { &m.current_operation },
|
||||
|m: &mut Cluster| { &mut m.current_operation },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"display_name",
|
||||
|m: &Cluster| { &m.display_name },
|
||||
|m: &mut Cluster| { &mut m.display_name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
|
||||
"serve_nodes",
|
||||
|m: &Cluster| { &m.serve_nodes },
|
||||
|m: &mut Cluster| { &mut m.serve_nodes },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<StorageType>>(
|
||||
"default_storage_type",
|
||||
|m: &Cluster| { &m.default_storage_type },
|
||||
|m: &mut Cluster| { &mut m.default_storage_type },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<Cluster>(
|
||||
"Cluster",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static Cluster {
|
||||
static mut instance: ::protobuf::lazy::Lazy<Cluster> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const Cluster,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(Cluster::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for Cluster {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.current_operation.clear();
|
||||
self.display_name.clear();
|
||||
self.serve_nodes = 0;
|
||||
self.default_storage_type = StorageType::STORAGE_UNSPECIFIED;
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for Cluster {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for Cluster {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
|
||||
pub enum StorageType {
|
||||
STORAGE_UNSPECIFIED = 0,
|
||||
STORAGE_SSD = 1,
|
||||
STORAGE_HDD = 2,
|
||||
}
|
||||
|
||||
impl ::protobuf::ProtobufEnum for StorageType {
|
||||
fn value(&self) -> i32 {
|
||||
*self as i32
|
||||
}
|
||||
|
||||
fn from_i32(value: i32) -> ::std::option::Option<StorageType> {
|
||||
match value {
|
||||
0 => ::std::option::Option::Some(StorageType::STORAGE_UNSPECIFIED),
|
||||
1 => ::std::option::Option::Some(StorageType::STORAGE_SSD),
|
||||
2 => ::std::option::Option::Some(StorageType::STORAGE_HDD),
|
||||
_ => ::std::option::Option::None
|
||||
}
|
||||
}
|
||||
|
||||
fn values() -> &'static [Self] {
|
||||
static values: &'static [StorageType] = &[
|
||||
StorageType::STORAGE_UNSPECIFIED,
|
||||
StorageType::STORAGE_SSD,
|
||||
StorageType::STORAGE_HDD,
|
||||
];
|
||||
values
|
||||
}
|
||||
|
||||
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
::protobuf::reflect::EnumDescriptor::new("StorageType", file_descriptor_proto())
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::marker::Copy for StorageType {
|
||||
}
|
||||
|
||||
impl ::std::default::Default for StorageType {
|
||||
fn default() -> Self {
|
||||
StorageType::STORAGE_UNSPECIFIED
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for StorageType {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
|
||||
}
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n<google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto\x12\x20g\
|
||||
oogle.bigtable.admin.cluster.v1\x1a\x1cgoogle/api/annotations.proto\x1a#\
|
||||
google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.pro\
|
||||
to\"\xd6\x01\n\x04Zone\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12\
|
||||
!\n\x0cdisplay_name\x18\x02\x20\x01(\tR\x0bdisplayName\x12E\n\x06status\
|
||||
\x18\x03\x20\x01(\x0e2-.google.bigtable.admin.cluster.v1.Zone.StatusR\
|
||||
\x06status\"P\n\x06Status\x12\x0b\n\x07UNKNOWN\x10\0\x12\x06\n\x02OK\x10\
|
||||
\x01\x12\x17\n\x13PLANNED_MAINTENANCE\x10\x02\x12\x18\n\x14EMERGENCY_MAI\
|
||||
NENANCE\x10\x03\"\x8e\x02\n\x07Cluster\x12\x12\n\x04name\x18\x01\x20\x01\
|
||||
(\tR\x04name\x12J\n\x11current_operation\x18\x03\x20\x01(\x0b2\x1d.googl\
|
||||
e.longrunning.OperationR\x10currentOperation\x12!\n\x0cdisplay_name\x18\
|
||||
\x04\x20\x01(\tR\x0bdisplayName\x12\x1f\n\x0bserve_nodes\x18\x05\x20\x01\
|
||||
(\x05R\nserveNodes\x12_\n\x14default_storage_type\x18\x08\x20\x01(\x0e2-\
|
||||
.google.bigtable.admin.cluster.v1.StorageTypeR\x12defaultStorageType*H\n\
|
||||
\x0bStorageType\x12\x17\n\x13STORAGE_UNSPECIFIED\x10\0\x12\x0f\n\x0bSTOR\
|
||||
AGE_SSD\x10\x01\x12\x0f\n\x0bSTORAGE_HDD\x10\x02B\x8b\x01\n$com.google.b\
|
||||
igtable.admin.cluster.v1B\x18BigtableClusterDataProtoP\x01ZGgoogle.golan\
|
||||
g.org/genproto/googleapis/bigtable/admin/cluster/v1;clusterJ\xfc\x18\n\
|
||||
\x06\x12\x04\x0e\0]\x01\n\xbd\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb2\x04\
|
||||
\x20Copyright\x202017\x20Google\x20Inc.\n\n\x20Licensed\x20under\x20the\
|
||||
\x20Apache\x20License,\x20Version\x202.0\x20(the\x20\"License\");\n\x20y\
|
||||
ou\x20may\x20not\x20use\x20this\x20file\x20except\x20in\x20compliance\
|
||||
\x20with\x20the\x20License.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\
|
||||
\x20the\x20License\x20at\n\n\x20\x20\x20\x20\x20http://www.apache.org/li\
|
||||
censes/LICENSE-2.0\n\n\x20Unless\x20required\x20by\x20applicable\x20law\
|
||||
\x20or\x20agreed\x20to\x20in\x20writing,\x20software\n\x20distributed\
|
||||
\x20under\x20the\x20License\x20is\x20distributed\x20on\x20an\x20\"AS\x20\
|
||||
IS\"\x20BASIS,\n\x20WITHOUT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20A\
|
||||
NY\x20KIND,\x20either\x20express\x20or\x20implied.\n\x20See\x20the\x20Li\
|
||||
cense\x20for\x20the\x20specific\x20language\x20governing\x20permissions\
|
||||
\x20and\n\x20limitations\x20under\x20the\x20License.\n\n\x08\n\x01\x02\
|
||||
\x12\x03\x10\0)\n\t\n\x02\x03\0\x12\x03\x12\0&\n\t\n\x02\x03\x01\x12\x03\
|
||||
\x13\0-\n\t\n\x02\x03\x02\x12\x03\x14\0)\n\x08\n\x01\x08\x12\x03\x16\0^\
|
||||
\n\t\n\x02\x08\x0b\x12\x03\x16\0^\n\x08\n\x01\x08\x12\x03\x17\0\"\n\t\n\
|
||||
\x02\x08\n\x12\x03\x17\0\"\n\x08\n\x01\x08\x12\x03\x18\09\n\t\n\x02\x08\
|
||||
\x08\x12\x03\x18\09\n\x08\n\x01\x08\x12\x03\x19\0=\n\t\n\x02\x08\x01\x12\
|
||||
\x03\x19\0=\ng\n\x02\x04\0\x12\x04\x1e\07\x01\x1a[\x20A\x20physical\x20l\
|
||||
ocation\x20in\x20which\x20a\x20particular\x20project\x20can\x20allocate\
|
||||
\x20Cloud\x20BigTable\n\x20resources.\n\n\n\n\x03\x04\0\x01\x12\x03\x1e\
|
||||
\x08\x0c\n*\n\x04\x04\0\x04\0\x12\x04\x20\x02,\x03\x1a\x1c\x20Possible\
|
||||
\x20states\x20of\x20a\x20zone.\n\n\x0c\n\x05\x04\0\x04\0\x01\x12\x03\x20\
|
||||
\x07\r\nA\n\x06\x04\0\x04\0\x02\0\x12\x03\"\x04\x10\x1a2\x20The\x20state\
|
||||
\x20of\x20the\x20zone\x20is\x20unknown\x20or\x20unspecified.\n\n\x0e\n\
|
||||
\x07\x04\0\x04\0\x02\0\x01\x12\x03\"\x04\x0b\n\x0e\n\x07\x04\0\x04\0\x02\
|
||||
\0\x02\x12\x03\"\x0e\x0f\n-\n\x06\x04\0\x04\0\x02\x01\x12\x03%\x04\x0b\
|
||||
\x1a\x1e\x20The\x20zone\x20is\x20in\x20a\x20good\x20state.\n\n\x0e\n\x07\
|
||||
\x04\0\x04\0\x02\x01\x01\x12\x03%\x04\x06\n\x0e\n\x07\x04\0\x04\0\x02\
|
||||
\x01\x02\x12\x03%\t\n\n:\n\x06\x04\0\x04\0\x02\x02\x12\x03(\x04\x1c\x1a+\
|
||||
\x20The\x20zone\x20is\x20down\x20for\x20planned\x20maintenance.\n\n\x0e\
|
||||
\n\x07\x04\0\x04\0\x02\x02\x01\x12\x03(\x04\x17\n\x0e\n\x07\x04\0\x04\0\
|
||||
\x02\x02\x02\x12\x03(\x1a\x1b\nI\n\x06\x04\0\x04\0\x02\x03\x12\x03+\x04\
|
||||
\x1d\x1a:\x20The\x20zone\x20is\x20down\x20for\x20emergency\x20or\x20unpl\
|
||||
anned\x20maintenance.\n\n\x0e\n\x07\x04\0\x04\0\x02\x03\x01\x12\x03+\x04\
|
||||
\x18\n\x0e\n\x07\x04\0\x04\0\x02\x03\x02\x12\x03+\x1b\x1c\n{\n\x04\x04\0\
|
||||
\x02\0\x12\x030\x02\x12\x1an\x20A\x20permanent\x20unique\x20identifier\
|
||||
\x20for\x20the\x20zone.\n\x20Values\x20are\x20of\x20the\x20form\x20proje\
|
||||
cts/<project>/zones/[a-z][-a-z0-9]*\n\n\r\n\x05\x04\0\x02\0\x04\x12\x040\
|
||||
\x02,\x03\n\x0c\n\x05\x04\0\x02\0\x05\x12\x030\x02\x08\n\x0c\n\x05\x04\0\
|
||||
\x02\0\x01\x12\x030\t\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x030\x10\x11\n:\
|
||||
\n\x04\x04\0\x02\x01\x12\x033\x02\x1a\x1a-\x20The\x20name\x20of\x20this\
|
||||
\x20zone\x20as\x20it\x20appears\x20in\x20UIs.\n\n\r\n\x05\x04\0\x02\x01\
|
||||
\x04\x12\x043\x020\x12\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x033\x02\x08\n\
|
||||
\x0c\n\x05\x04\0\x02\x01\x01\x12\x033\t\x15\n\x0c\n\x05\x04\0\x02\x01\
|
||||
\x03\x12\x033\x18\x19\n.\n\x04\x04\0\x02\x02\x12\x036\x02\x14\x1a!\x20Th\
|
||||
e\x20current\x20state\x20of\x20this\x20zone.\n\n\r\n\x05\x04\0\x02\x02\
|
||||
\x04\x12\x046\x023\x1a\n\x0c\n\x05\x04\0\x02\x02\x06\x12\x036\x02\x08\n\
|
||||
\x0c\n\x05\x04\0\x02\x02\x01\x12\x036\t\x0f\n\x0c\n\x05\x04\0\x02\x02\
|
||||
\x03\x12\x036\x12\x13\nX\n\x02\x04\x01\x12\x04:\0Q\x01\x1aL\x20An\x20iso\
|
||||
lated\x20set\x20of\x20Cloud\x20BigTable\x20resources\x20on\x20which\x20t\
|
||||
ables\x20can\x20be\x20hosted.\n\n\n\n\x03\x04\x01\x01\x12\x03:\x08\x0f\n\
|
||||
\xe0\x01\n\x04\x04\x01\x02\0\x12\x03?\x02\x12\x1a\xd2\x01\x20A\x20perman\
|
||||
ent\x20unique\x20identifier\x20for\x20the\x20cluster.\x20For\x20technica\
|
||||
l\x20reasons,\x20the\n\x20zone\x20in\x20which\x20the\x20cluster\x20resid\
|
||||
es\x20is\x20included\x20here.\n\x20Values\x20are\x20of\x20the\x20form\n\
|
||||
\x20projects/<project>/zones/<zone>/clusters/[a-z][-a-z0-9]*\n\n\r\n\x05\
|
||||
\x04\x01\x02\0\x04\x12\x04?\x02:\x11\n\x0c\n\x05\x04\x01\x02\0\x05\x12\
|
||||
\x03?\x02\x08\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03?\t\r\n\x0c\n\x05\x04\
|
||||
\x01\x02\0\x03\x12\x03?\x10\x11\n\xf5\x01\n\x04\x04\x01\x02\x01\x12\x03E\
|
||||
\x025\x1a\xe7\x01\x20The\x20operation\x20currently\x20running\x20on\x20t\
|
||||
he\x20cluster,\x20if\x20any.\n\x20This\x20cannot\x20be\x20set\x20directl\
|
||||
y,\x20only\x20through\x20CreateCluster,\x20UpdateCluster,\n\x20or\x20Und\
|
||||
eleteCluster.\x20Calls\x20to\x20these\x20methods\x20will\x20be\x20reject\
|
||||
ed\x20if\n\x20\"current_operation\"\x20is\x20already\x20set.\n\n\r\n\x05\
|
||||
\x04\x01\x02\x01\x04\x12\x04E\x02?\x12\n\x0c\n\x05\x04\x01\x02\x01\x06\
|
||||
\x12\x03E\x02\x1e\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03E\x1f0\n\x0c\n\
|
||||
\x05\x04\x01\x02\x01\x03\x12\x03E34\nd\n\x04\x04\x01\x02\x02\x12\x03I\
|
||||
\x02\x1a\x1aW\x20The\x20descriptive\x20name\x20for\x20this\x20cluster\
|
||||
\x20as\x20it\x20appears\x20in\x20UIs.\n\x20Must\x20be\x20unique\x20per\
|
||||
\x20zone.\n\n\r\n\x05\x04\x01\x02\x02\x04\x12\x04I\x02E5\n\x0c\n\x05\x04\
|
||||
\x01\x02\x02\x05\x12\x03I\x02\x08\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\
|
||||
\x03I\t\x15\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03I\x18\x19\nC\n\x04\
|
||||
\x04\x01\x02\x03\x12\x03L\x02\x18\x1a6\x20The\x20number\x20of\x20serve\
|
||||
\x20nodes\x20allocated\x20to\x20this\x20cluster.\n\n\r\n\x05\x04\x01\x02\
|
||||
\x03\x04\x12\x04L\x02I\x1a\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\x03L\x02\
|
||||
\x07\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03L\x08\x13\n\x0c\n\x05\x04\
|
||||
\x01\x02\x03\x03\x12\x03L\x16\x17\n\x9b\x01\n\x04\x04\x01\x02\x04\x12\
|
||||
\x03P\x02'\x1a\x8d\x01\x20What\x20storage\x20type\x20to\x20use\x20for\
|
||||
\x20tables\x20in\x20this\x20cluster.\x20Only\x20configurable\x20at\n\x20\
|
||||
cluster\x20creation\x20time.\x20If\x20unspecified,\x20STORAGE_SSD\x20wil\
|
||||
l\x20be\x20used.\n\n\r\n\x05\x04\x01\x02\x04\x04\x12\x04P\x02L\x18\n\x0c\
|
||||
\n\x05\x04\x01\x02\x04\x06\x12\x03P\x02\r\n\x0c\n\x05\x04\x01\x02\x04\
|
||||
\x01\x12\x03P\x0e\"\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x03P%&\n\n\n\x02\
|
||||
\x05\0\x12\x04S\0]\x01\n\n\n\x03\x05\0\x01\x12\x03S\x05\x10\n4\n\x04\x05\
|
||||
\0\x02\0\x12\x03U\x02\x1a\x1a'\x20The\x20storage\x20type\x20used\x20is\
|
||||
\x20unspecified.\n\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03U\x02\x15\n\x0c\n\
|
||||
\x05\x05\0\x02\0\x02\x12\x03U\x18\x19\nR\n\x04\x05\0\x02\x01\x12\x03X\
|
||||
\x02\x12\x1aE\x20Data\x20will\x20be\x20stored\x20in\x20SSD,\x20providing\
|
||||
\x20low\x20and\x20consistent\x20latencies.\n\n\x0c\n\x05\x05\0\x02\x01\
|
||||
\x01\x12\x03X\x02\r\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03X\x10\x11\nZ\n\
|
||||
\x04\x05\0\x02\x02\x12\x03\\\x02\x12\x1aM\x20Data\x20will\x20be\x20store\
|
||||
d\x20in\x20HDD,\x20providing\x20high\x20and\x20less\x20predictable\n\x20\
|
||||
latencies.\n\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\\\x02\r\n\x0c\n\x05\
|
||||
\x05\0\x02\x02\x02\x12\x03\\\x10\x11b\x06proto3\
|
||||
";
|
||||
|
||||
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
|
||||
};
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
unsafe {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
}
|
||||
212
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/cluster/v1/bigtable_cluster_service.rs
vendored
Normal file
212
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/cluster/v1/bigtable_cluster_service.rs
vendored
Normal file
@ -0,0 +1,212 @@
|
||||
// This file is generated by rust-protobuf 2.7.0. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! Generated file from `google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto`
|
||||
|
||||
use protobuf::Message as Message_imported_for_functions;
|
||||
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n?google/bigtable/admin/cluster/v1/bigtable_cluster_service.proto\x12\
|
||||
\x20google.bigtable.admin.cluster.v1\x1a\x1cgoogle/api/annotations.proto\
|
||||
\x1a<google/bigtable/admin/cluster/v1/bigtable_cluster_data.proto\x1aHgo\
|
||||
ogle/bigtable/admin/cluster/v1/bigtable_cluster_service_messages.proto\
|
||||
\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.pr\
|
||||
oto2\x89\t\n\x16BigtableClusterService\x12\x99\x01\n\tListZones\x122.goo\
|
||||
gle.bigtable.admin.cluster.v1.ListZonesRequest\x1a3.google.bigtable.admi\
|
||||
n.cluster.v1.ListZonesResponse\"#\x82\xd3\xe4\x93\x02\x1d\x12\x1b/v1/{na\
|
||||
me=projects/*}/zones\x12\x9e\x01\n\nGetCluster\x123.google.bigtable.admi\
|
||||
n.cluster.v1.GetClusterRequest\x1a).google.bigtable.admin.cluster.v1.Clu\
|
||||
ster\"0\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/zones/*/clusters/*\
|
||||
}\x12\xb0\x01\n\x0cListClusters\x125.google.bigtable.admin.cluster.v1.Li\
|
||||
stClustersRequest\x1a6.google.bigtable.admin.cluster.v1.ListClustersResp\
|
||||
onse\"1\x82\xd3\xe4\x93\x02+\x12)/v1/{name=projects/*}/aggregated/cluste\
|
||||
rs\x12\xa5\x01\n\rCreateCluster\x126.google.bigtable.admin.cluster.v1.Cr\
|
||||
eateClusterRequest\x1a).google.bigtable.admin.cluster.v1.Cluster\"1\x82\
|
||||
\xd3\xe4\x93\x02+\"&/v1/{name=projects/*/zones/*}/clusters:\x01*\x12\x9a\
|
||||
\x01\n\rUpdateCluster\x12).google.bigtable.admin.cluster.v1.Cluster\x1a)\
|
||||
.google.bigtable.admin.cluster.v1.Cluster\"3\x82\xd3\xe4\x93\x02-\x1a(/v\
|
||||
1/{name=projects/*/zones/*/clusters/*}:\x01*\x12\x91\x01\n\rDeleteCluste\
|
||||
r\x126.google.bigtable.admin.cluster.v1.DeleteClusterRequest\x1a\x16.goo\
|
||||
gle.protobuf.Empty\"0\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/zones/*\
|
||||
/clusters/*}\x12\xa5\x01\n\x0fUndeleteCluster\x128.google.bigtable.admin\
|
||||
.cluster.v1.UndeleteClusterRequest\x1a\x1d.google.longrunning.Operation\
|
||||
\"9\x82\xd3\xe4\x93\x023\"1/v1/{name=projects/*/zones/*/clusters/*}:unde\
|
||||
leteB\x8f\x01\n$com.google.bigtable.admin.cluster.v1B\x1cBigtableCluster\
|
||||
ServicesProtoP\x01ZGgoogle.golang.org/genproto/googleapis/bigtable/admin\
|
||||
/cluster/v1;clusterJ\x9d,\n\x07\x12\x05\x0e\0\x81\x01\x01\n\xbd\x04\n\
|
||||
\x01\x0c\x12\x03\x0e\0\x122\xb2\x04\x20Copyright\x202017\x20Google\x20In\
|
||||
c.\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\x20Version\x202\
|
||||
.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20use\x20this\x20fil\
|
||||
e\x20except\x20in\x20compliance\x20with\x20the\x20License.\n\x20You\x20m\
|
||||
ay\x20obtain\x20a\x20copy\x20of\x20the\x20License\x20at\n\n\x20\x20\x20\
|
||||
\x20\x20http://www.apache.org/licenses/LICENSE-2.0\n\n\x20Unless\x20requ\
|
||||
ired\x20by\x20applicable\x20law\x20or\x20agreed\x20to\x20in\x20writing,\
|
||||
\x20software\n\x20distributed\x20under\x20the\x20License\x20is\x20distri\
|
||||
buted\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\x20WITHOUT\x20WARRANTIES\
|
||||
\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20either\x20express\x20or\
|
||||
\x20implied.\n\x20See\x20the\x20License\x20for\x20the\x20specific\x20lan\
|
||||
guage\x20governing\x20permissions\x20and\n\x20limitations\x20under\x20th\
|
||||
e\x20License.\n\n\x08\n\x01\x02\x12\x03\x10\0)\n\t\n\x02\x03\0\x12\x03\
|
||||
\x12\0&\n\t\n\x02\x03\x01\x12\x03\x13\0F\n\t\n\x02\x03\x02\x12\x03\x14\0\
|
||||
R\n\t\n\x02\x03\x03\x12\x03\x15\0-\n\t\n\x02\x03\x04\x12\x03\x16\0%\n\
|
||||
\x08\n\x01\x08\x12\x03\x18\0^\n\t\n\x02\x08\x0b\x12\x03\x18\0^\n\x08\n\
|
||||
\x01\x08\x12\x03\x19\0\"\n\t\n\x02\x08\n\x12\x03\x19\0\"\n\x08\n\x01\x08\
|
||||
\x12\x03\x1a\0=\n\t\n\x02\x08\x08\x12\x03\x1a\0=\n\x08\n\x01\x08\x12\x03\
|
||||
\x1b\0=\n\t\n\x02\x08\x01\x12\x03\x1b\0=\nC\n\x02\x06\0\x12\x05\x1f\0\
|
||||
\x81\x01\x01\x1a6\x20Service\x20for\x20managing\x20zonal\x20Cloud\x20Big\
|
||||
table\x20resources.\n\n\n\n\x03\x06\0\x01\x12\x03\x1f\x08\x1e\n@\n\x04\
|
||||
\x06\0\x02\0\x12\x04!\x02#\x03\x1a2\x20Lists\x20the\x20supported\x20zone\
|
||||
s\x20for\x20the\x20given\x20project.\n\n\x0c\n\x05\x06\0\x02\0\x01\x12\
|
||||
\x03!\x06\x0f\n\x0c\n\x05\x06\0\x02\0\x02\x12\x03!\x10\x20\n\x0c\n\x05\
|
||||
\x06\0\x02\0\x03\x12\x03!+<\n\x0c\n\x05\x06\0\x02\0\x04\x12\x03\"\x04F\n\
|
||||
\x10\n\t\x06\0\x02\0\x04\xb0\xca\xbc\"\x12\x03\"\x04F\n<\n\x04\x06\0\x02\
|
||||
\x01\x12\x04&\x02(\x03\x1a.\x20Gets\x20information\x20about\x20a\x20part\
|
||||
icular\x20cluster.\n\n\x0c\n\x05\x06\0\x02\x01\x01\x12\x03&\x06\x10\n\
|
||||
\x0c\n\x05\x06\0\x02\x01\x02\x12\x03&\x11\"\n\x0c\n\x05\x06\0\x02\x01\
|
||||
\x03\x12\x03&-4\n\x0c\n\x05\x06\0\x02\x01\x04\x12\x03'\x04S\n\x10\n\t\
|
||||
\x06\0\x02\x01\x04\xb0\xca\xbc\"\x12\x03'\x04S\n\x84\x01\n\x04\x06\0\x02\
|
||||
\x02\x12\x04,\x02.\x03\x1av\x20Lists\x20all\x20clusters\x20in\x20the\x20\
|
||||
given\x20project,\x20along\x20with\x20any\x20zones\x20for\x20which\n\x20\
|
||||
cluster\x20information\x20could\x20not\x20be\x20retrieved.\n\n\x0c\n\x05\
|
||||
\x06\0\x02\x02\x01\x12\x03,\x06\x12\n\x0c\n\x05\x06\0\x02\x02\x02\x12\
|
||||
\x03,\x13&\n\x0c\n\x05\x06\0\x02\x02\x03\x12\x03,1E\n\x0c\n\x05\x06\0\
|
||||
\x02\x02\x04\x12\x03-\x04T\n\x10\n\t\x06\0\x02\x02\x04\xb0\xca\xbc\"\x12\
|
||||
\x03-\x04T\n\xec\x08\n\x04\x06\0\x02\x03\x12\x04B\x02D\x03\x1a\xdd\x08\
|
||||
\x20Creates\x20a\x20cluster\x20and\x20begins\x20preparing\x20it\x20to\
|
||||
\x20begin\x20serving.\x20The\x20returned\n\x20cluster\x20embeds\x20as\
|
||||
\x20its\x20\"current_operation\"\x20a\x20long-running\x20operation\x20wh\
|
||||
ich\n\x20can\x20be\x20used\x20to\x20track\x20the\x20progress\x20of\x20tu\
|
||||
rning\x20up\x20the\x20new\x20cluster.\n\x20Immediately\x20upon\x20comple\
|
||||
tion\x20of\x20this\x20request:\n\x20\x20*\x20The\x20cluster\x20will\x20b\
|
||||
e\x20readable\x20via\x20the\x20API,\x20with\x20all\x20requested\x20attri\
|
||||
butes\n\x20\x20\x20\x20but\x20no\x20allocated\x20resources.\n\x20Until\
|
||||
\x20completion\x20of\x20the\x20embedded\x20operation:\n\x20\x20*\x20Canc\
|
||||
elling\x20the\x20operation\x20will\x20render\x20the\x20cluster\x20immedi\
|
||||
ately\x20unreadable\n\x20\x20\x20\x20via\x20the\x20API.\n\x20\x20*\x20Al\
|
||||
l\x20other\x20attempts\x20to\x20modify\x20or\x20delete\x20the\x20cluster\
|
||||
\x20will\x20be\x20rejected.\n\x20Upon\x20completion\x20of\x20the\x20embe\
|
||||
dded\x20operation:\n\x20\x20*\x20Billing\x20for\x20all\x20successfully-a\
|
||||
llocated\x20resources\x20will\x20begin\x20(some\x20types\n\x20\x20\x20\
|
||||
\x20may\x20have\x20lower\x20than\x20the\x20requested\x20levels).\n\x20\
|
||||
\x20*\x20New\x20tables\x20can\x20be\x20created\x20in\x20the\x20cluster.\
|
||||
\n\x20\x20*\x20The\x20cluster's\x20allocated\x20resource\x20levels\x20wi\
|
||||
ll\x20be\x20readable\x20via\x20the\x20API.\n\x20The\x20embedded\x20opera\
|
||||
tion's\x20\"metadata\"\x20field\x20type\x20is\n\x20[CreateClusterMetadat\
|
||||
a][google.bigtable.admin.cluster.v1.CreateClusterMetadata]\x20The\x20emb\
|
||||
edded\x20operation's\x20\"response\"\x20field\x20type\x20is\n\x20[Cluste\
|
||||
r][google.bigtable.admin.cluster.v1.Cluster],\x20if\x20successful.\n\n\
|
||||
\x0c\n\x05\x06\0\x02\x03\x01\x12\x03B\x06\x13\n\x0c\n\x05\x06\0\x02\x03\
|
||||
\x02\x12\x03B\x14(\n\x0c\n\x05\x06\0\x02\x03\x03\x12\x03B3:\n\x0c\n\x05\
|
||||
\x06\0\x02\x03\x04\x12\x03C\x04\\\n\x10\n\t\x06\0\x02\x03\x04\xb0\xca\
|
||||
\xbc\"\x12\x03C\x04\\\n\xa7\x0b\n\x04\x06\0\x02\x04\x12\x04]\x02_\x03\
|
||||
\x1a\x98\x0b\x20Updates\x20a\x20cluster,\x20and\x20begins\x20allocating\
|
||||
\x20or\x20releasing\x20resources\x20as\n\x20requested.\x20The\x20returne\
|
||||
d\x20cluster\x20embeds\x20as\x20its\x20\"current_operation\"\x20a\n\x20l\
|
||||
ong-running\x20operation\x20which\x20can\x20be\x20used\x20to\x20track\
|
||||
\x20the\x20progress\x20of\x20updating\n\x20the\x20cluster.\n\x20Immediat\
|
||||
ely\x20upon\x20completion\x20of\x20this\x20request:\n\x20\x20*\x20For\
|
||||
\x20resource\x20types\x20where\x20a\x20decrease\x20in\x20the\x20cluster'\
|
||||
s\x20allocation\x20has\x20been\n\x20\x20\x20\x20requested,\x20billing\
|
||||
\x20will\x20be\x20based\x20on\x20the\x20newly-requested\x20level.\n\x20U\
|
||||
ntil\x20completion\x20of\x20the\x20embedded\x20operation:\n\x20\x20*\x20\
|
||||
Cancelling\x20the\x20operation\x20will\x20set\x20its\x20metadata's\x20\"\
|
||||
cancelled_at_time\",\n\x20\x20\x20\x20and\x20begin\x20restoring\x20resou\
|
||||
rces\x20to\x20their\x20pre-request\x20values.\x20The\x20operation\n\x20\
|
||||
\x20\x20\x20is\x20guaranteed\x20to\x20succeed\x20at\x20undoing\x20all\
|
||||
\x20resource\x20changes,\x20after\x20which\n\x20\x20\x20\x20point\x20it\
|
||||
\x20will\x20terminate\x20with\x20a\x20CANCELLED\x20status.\n\x20\x20*\
|
||||
\x20All\x20other\x20attempts\x20to\x20modify\x20or\x20delete\x20the\x20c\
|
||||
luster\x20will\x20be\x20rejected.\n\x20\x20*\x20Reading\x20the\x20cluste\
|
||||
r\x20via\x20the\x20API\x20will\x20continue\x20to\x20give\x20the\x20pre-r\
|
||||
equest\n\x20\x20\x20\x20resource\x20levels.\n\x20Upon\x20completion\x20o\
|
||||
f\x20the\x20embedded\x20operation:\n\x20\x20*\x20Billing\x20will\x20begi\
|
||||
n\x20for\x20all\x20successfully-allocated\x20resources\x20(some\x20types\
|
||||
\n\x20\x20\x20\x20may\x20have\x20lower\x20than\x20the\x20requested\x20le\
|
||||
vels).\n\x20\x20*\x20All\x20newly-reserved\x20resources\x20will\x20be\
|
||||
\x20available\x20for\x20serving\x20the\x20cluster's\n\x20\x20\x20\x20tab\
|
||||
les.\n\x20\x20*\x20The\x20cluster's\x20new\x20resource\x20levels\x20will\
|
||||
\x20be\x20readable\x20via\x20the\x20API.\n\x20[UpdateClusterMetadata][go\
|
||||
ogle.bigtable.admin.cluster.v1.UpdateClusterMetadata]\x20The\x20embedded\
|
||||
\x20operation's\x20\"response\"\x20field\x20type\x20is\n\x20[Cluster][go\
|
||||
ogle.bigtable.admin.cluster.v1.Cluster],\x20if\x20successful.\n\n\x0c\n\
|
||||
\x05\x06\0\x02\x04\x01\x12\x03]\x06\x13\n\x0c\n\x05\x06\0\x02\x04\x02\
|
||||
\x12\x03]\x14\x1b\n\x0c\n\x05\x06\0\x02\x04\x03\x12\x03]&-\n\x0c\n\x05\
|
||||
\x06\0\x02\x04\x04\x12\x03^\x04]\n\x10\n\t\x06\0\x02\x04\x04\xb0\xca\xbc\
|
||||
\"\x12\x03^\x04]\n\xc0\x05\n\x04\x06\0\x02\x05\x12\x04m\x02o\x03\x1a\xb1\
|
||||
\x05\x20Marks\x20a\x20cluster\x20and\x20all\x20of\x20its\x20tables\x20fo\
|
||||
r\x20permanent\x20deletion\x20in\x207\x20days.\n\x20Immediately\x20upon\
|
||||
\x20completion\x20of\x20the\x20request:\n\x20\x20*\x20Billing\x20will\
|
||||
\x20cease\x20for\x20all\x20of\x20the\x20cluster's\x20reserved\x20resourc\
|
||||
es.\n\x20\x20*\x20The\x20cluster's\x20\"delete_time\"\x20field\x20will\
|
||||
\x20be\x20set\x207\x20days\x20in\x20the\x20future.\n\x20Soon\x20afterwar\
|
||||
d:\n\x20\x20*\x20All\x20tables\x20within\x20the\x20cluster\x20will\x20be\
|
||||
come\x20unavailable.\n\x20Prior\x20to\x20the\x20cluster's\x20\"delete_ti\
|
||||
me\":\n\x20\x20*\x20The\x20cluster\x20can\x20be\x20recovered\x20with\x20\
|
||||
a\x20call\x20to\x20UndeleteCluster.\n\x20\x20*\x20All\x20other\x20attemp\
|
||||
ts\x20to\x20modify\x20or\x20delete\x20the\x20cluster\x20will\x20be\x20re\
|
||||
jected.\n\x20At\x20the\x20cluster's\x20\"delete_time\":\n\x20\x20*\x20Th\
|
||||
e\x20cluster\x20and\x20*all\x20of\x20its\x20tables*\x20will\x20immediate\
|
||||
ly\x20and\x20irrevocably\n\x20\x20\x20\x20disappear\x20from\x20the\x20AP\
|
||||
I,\x20and\x20their\x20data\x20will\x20be\x20permanently\x20deleted.\n\n\
|
||||
\x0c\n\x05\x06\0\x02\x05\x01\x12\x03m\x06\x13\n\x0c\n\x05\x06\0\x02\x05\
|
||||
\x02\x12\x03m\x14(\n\x0c\n\x05\x06\0\x02\x05\x03\x12\x03m3H\n\x0c\n\x05\
|
||||
\x06\0\x02\x05\x04\x12\x03n\x04V\n\x10\n\t\x06\0\x02\x05\x04\xb0\xca\xbc\
|
||||
\"\x12\x03n\x04V\n\x82\x06\n\x04\x06\0\x02\x06\x12\x05~\x02\x80\x01\x03\
|
||||
\x1a\xf2\x05\x20Cancels\x20the\x20scheduled\x20deletion\x20of\x20an\x20c\
|
||||
luster\x20and\x20begins\x20preparing\x20it\x20to\n\x20resume\x20serving.\
|
||||
\x20The\x20returned\x20operation\x20will\x20also\x20be\x20embedded\x20as\
|
||||
\x20the\n\x20cluster's\x20\"current_operation\".\n\x20Immediately\x20upo\
|
||||
n\x20completion\x20of\x20this\x20request:\n\x20\x20*\x20The\x20cluster's\
|
||||
\x20\"delete_time\"\x20field\x20will\x20be\x20unset,\x20protecting\x20it\
|
||||
\x20from\n\x20\x20\x20\x20automatic\x20deletion.\n\x20Until\x20completio\
|
||||
n\x20of\x20the\x20returned\x20operation:\n\x20\x20*\x20The\x20operation\
|
||||
\x20cannot\x20be\x20cancelled.\n\x20Upon\x20completion\x20of\x20the\x20r\
|
||||
eturned\x20operation:\n\x20\x20*\x20Billing\x20for\x20the\x20cluster's\
|
||||
\x20resources\x20will\x20resume.\n\x20\x20*\x20All\x20tables\x20within\
|
||||
\x20the\x20cluster\x20will\x20be\x20available.\n\x20[UndeleteClusterMeta\
|
||||
data][google.bigtable.admin.cluster.v1.UndeleteClusterMetadata]\x20The\
|
||||
\x20embedded\x20operation's\x20\"response\"\x20field\x20type\x20is\n\x20\
|
||||
[Cluster][google.bigtable.admin.cluster.v1.Cluster],\x20if\x20successful\
|
||||
.\n\n\x0c\n\x05\x06\0\x02\x06\x01\x12\x03~\x06\x15\n\x0c\n\x05\x06\0\x02\
|
||||
\x06\x02\x12\x03~\x16,\n\x0c\n\x05\x06\0\x02\x06\x03\x12\x03~7S\n\x0c\n\
|
||||
\x05\x06\0\x02\x06\x04\x12\x03\x7f\x04f\n\x10\n\t\x06\0\x02\x06\x04\xb0\
|
||||
\xca\xbc\"\x12\x03\x7f\x04fb\x06proto3\
|
||||
";
|
||||
|
||||
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
|
||||
};
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
unsafe {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,239 @@
|
||||
// This file is generated. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
|
||||
const METHOD_BIGTABLE_CLUSTER_SERVICE_LIST_ZONES: ::grpcio::Method<super::bigtable_cluster_service_messages::ListZonesRequest, super::bigtable_cluster_service_messages::ListZonesResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.cluster.v1.BigtableClusterService/ListZones",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_CLUSTER_SERVICE_GET_CLUSTER: ::grpcio::Method<super::bigtable_cluster_service_messages::GetClusterRequest, super::bigtable_cluster_data::Cluster> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.cluster.v1.BigtableClusterService/GetCluster",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_CLUSTER_SERVICE_LIST_CLUSTERS: ::grpcio::Method<super::bigtable_cluster_service_messages::ListClustersRequest, super::bigtable_cluster_service_messages::ListClustersResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.cluster.v1.BigtableClusterService/ListClusters",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_CLUSTER_SERVICE_CREATE_CLUSTER: ::grpcio::Method<super::bigtable_cluster_service_messages::CreateClusterRequest, super::bigtable_cluster_data::Cluster> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.cluster.v1.BigtableClusterService/CreateCluster",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_CLUSTER_SERVICE_UPDATE_CLUSTER: ::grpcio::Method<super::bigtable_cluster_data::Cluster, super::bigtable_cluster_data::Cluster> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.cluster.v1.BigtableClusterService/UpdateCluster",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_CLUSTER_SERVICE_DELETE_CLUSTER: ::grpcio::Method<super::bigtable_cluster_service_messages::DeleteClusterRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.cluster.v1.BigtableClusterService/DeleteCluster",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_CLUSTER_SERVICE_UNDELETE_CLUSTER: ::grpcio::Method<super::bigtable_cluster_service_messages::UndeleteClusterRequest, super::operations::Operation> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.cluster.v1.BigtableClusterService/UndeleteCluster",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct BigtableClusterServiceClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl BigtableClusterServiceClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
BigtableClusterServiceClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn list_zones_opt(&self, req: &super::bigtable_cluster_service_messages::ListZonesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_cluster_service_messages::ListZonesResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_CLUSTER_SERVICE_LIST_ZONES, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_zones(&self, req: &super::bigtable_cluster_service_messages::ListZonesRequest) -> ::grpcio::Result<super::bigtable_cluster_service_messages::ListZonesResponse> {
|
||||
self.list_zones_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_zones_async_opt(&self, req: &super::bigtable_cluster_service_messages::ListZonesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_cluster_service_messages::ListZonesResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_CLUSTER_SERVICE_LIST_ZONES, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_zones_async(&self, req: &super::bigtable_cluster_service_messages::ListZonesRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_cluster_service_messages::ListZonesResponse>> {
|
||||
self.list_zones_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_cluster_opt(&self, req: &super::bigtable_cluster_service_messages::GetClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_cluster_data::Cluster> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_CLUSTER_SERVICE_GET_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_cluster(&self, req: &super::bigtable_cluster_service_messages::GetClusterRequest) -> ::grpcio::Result<super::bigtable_cluster_data::Cluster> {
|
||||
self.get_cluster_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_cluster_async_opt(&self, req: &super::bigtable_cluster_service_messages::GetClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_cluster_data::Cluster>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_CLUSTER_SERVICE_GET_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_cluster_async(&self, req: &super::bigtable_cluster_service_messages::GetClusterRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_cluster_data::Cluster>> {
|
||||
self.get_cluster_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_clusters_opt(&self, req: &super::bigtable_cluster_service_messages::ListClustersRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_cluster_service_messages::ListClustersResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_CLUSTER_SERVICE_LIST_CLUSTERS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_clusters(&self, req: &super::bigtable_cluster_service_messages::ListClustersRequest) -> ::grpcio::Result<super::bigtable_cluster_service_messages::ListClustersResponse> {
|
||||
self.list_clusters_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_clusters_async_opt(&self, req: &super::bigtable_cluster_service_messages::ListClustersRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_cluster_service_messages::ListClustersResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_CLUSTER_SERVICE_LIST_CLUSTERS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_clusters_async(&self, req: &super::bigtable_cluster_service_messages::ListClustersRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_cluster_service_messages::ListClustersResponse>> {
|
||||
self.list_clusters_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_cluster_opt(&self, req: &super::bigtable_cluster_service_messages::CreateClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_cluster_data::Cluster> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_CLUSTER_SERVICE_CREATE_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_cluster(&self, req: &super::bigtable_cluster_service_messages::CreateClusterRequest) -> ::grpcio::Result<super::bigtable_cluster_data::Cluster> {
|
||||
self.create_cluster_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_cluster_async_opt(&self, req: &super::bigtable_cluster_service_messages::CreateClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_cluster_data::Cluster>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_CLUSTER_SERVICE_CREATE_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_cluster_async(&self, req: &super::bigtable_cluster_service_messages::CreateClusterRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_cluster_data::Cluster>> {
|
||||
self.create_cluster_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_cluster_opt(&self, req: &super::bigtable_cluster_data::Cluster, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_cluster_data::Cluster> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_CLUSTER_SERVICE_UPDATE_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_cluster(&self, req: &super::bigtable_cluster_data::Cluster) -> ::grpcio::Result<super::bigtable_cluster_data::Cluster> {
|
||||
self.update_cluster_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_cluster_async_opt(&self, req: &super::bigtable_cluster_data::Cluster, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_cluster_data::Cluster>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_CLUSTER_SERVICE_UPDATE_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_cluster_async(&self, req: &super::bigtable_cluster_data::Cluster) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_cluster_data::Cluster>> {
|
||||
self.update_cluster_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_cluster_opt(&self, req: &super::bigtable_cluster_service_messages::DeleteClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_CLUSTER_SERVICE_DELETE_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_cluster(&self, req: &super::bigtable_cluster_service_messages::DeleteClusterRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_cluster_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_cluster_async_opt(&self, req: &super::bigtable_cluster_service_messages::DeleteClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_CLUSTER_SERVICE_DELETE_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_cluster_async(&self, req: &super::bigtable_cluster_service_messages::DeleteClusterRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_cluster_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn undelete_cluster_opt(&self, req: &super::bigtable_cluster_service_messages::UndeleteClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_CLUSTER_SERVICE_UNDELETE_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn undelete_cluster(&self, req: &super::bigtable_cluster_service_messages::UndeleteClusterRequest) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.undelete_cluster_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn undelete_cluster_async_opt(&self, req: &super::bigtable_cluster_service_messages::UndeleteClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_CLUSTER_SERVICE_UNDELETE_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn undelete_cluster_async(&self, req: &super::bigtable_cluster_service_messages::UndeleteClusterRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.undelete_cluster_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait BigtableClusterService {
|
||||
fn list_zones(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_cluster_service_messages::ListZonesRequest, sink: ::grpcio::UnarySink<super::bigtable_cluster_service_messages::ListZonesResponse>);
|
||||
fn get_cluster(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_cluster_service_messages::GetClusterRequest, sink: ::grpcio::UnarySink<super::bigtable_cluster_data::Cluster>);
|
||||
fn list_clusters(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_cluster_service_messages::ListClustersRequest, sink: ::grpcio::UnarySink<super::bigtable_cluster_service_messages::ListClustersResponse>);
|
||||
fn create_cluster(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_cluster_service_messages::CreateClusterRequest, sink: ::grpcio::UnarySink<super::bigtable_cluster_data::Cluster>);
|
||||
fn update_cluster(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_cluster_data::Cluster, sink: ::grpcio::UnarySink<super::bigtable_cluster_data::Cluster>);
|
||||
fn delete_cluster(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_cluster_service_messages::DeleteClusterRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn undelete_cluster(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_cluster_service_messages::UndeleteClusterRequest, sink: ::grpcio::UnarySink<super::operations::Operation>);
|
||||
}
|
||||
|
||||
pub fn create_bigtable_cluster_service<S: BigtableClusterService + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_CLUSTER_SERVICE_LIST_ZONES, move |ctx, req, resp| {
|
||||
instance.list_zones(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_CLUSTER_SERVICE_GET_CLUSTER, move |ctx, req, resp| {
|
||||
instance.get_cluster(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_CLUSTER_SERVICE_LIST_CLUSTERS, move |ctx, req, resp| {
|
||||
instance.list_clusters(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_CLUSTER_SERVICE_CREATE_CLUSTER, move |ctx, req, resp| {
|
||||
instance.create_cluster(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_CLUSTER_SERVICE_UPDATE_CLUSTER, move |ctx, req, resp| {
|
||||
instance.update_cluster(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_CLUSTER_SERVICE_DELETE_CLUSTER, move |ctx, req, resp| {
|
||||
instance.delete_cluster(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_CLUSTER_SERVICE_UNDELETE_CLUSTER, move |ctx, req, resp| {
|
||||
instance.undelete_cluster(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
7
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/cluster/v1/mod.rs
vendored
Normal file
7
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/cluster/v1/mod.rs
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
pub mod bigtable_cluster_data;
|
||||
pub mod bigtable_cluster_service;
|
||||
pub mod bigtable_cluster_service_grpc;
|
||||
pub mod bigtable_cluster_service_messages;
|
||||
|
||||
pub(crate) use crate::empty;
|
||||
pub(crate) use crate::longrunning::operations;
|
||||
3
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/mod.rs
vendored
Normal file
3
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/mod.rs
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
pub mod cluster;
|
||||
pub mod table;
|
||||
pub mod v2;
|
||||
1
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/table/mod.rs
vendored
Normal file
1
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/table/mod.rs
vendored
Normal file
@ -0,0 +1 @@
|
||||
pub mod v1;
|
||||
1589
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/table/v1/bigtable_table_data.rs
vendored
Normal file
1589
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/table/v1/bigtable_table_data.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
155
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/table/v1/bigtable_table_service.rs
vendored
Normal file
155
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/table/v1/bigtable_table_service.rs
vendored
Normal file
@ -0,0 +1,155 @@
|
||||
// This file is generated by rust-protobuf 2.7.0. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! Generated file from `google/bigtable/admin/table/v1/bigtable_table_service.proto`
|
||||
|
||||
use protobuf::Message as Message_imported_for_functions;
|
||||
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n;google/bigtable/admin/table/v1/bigtable_table_service.proto\x12\x1ego\
|
||||
ogle.bigtable.admin.table.v1\x1a\x1cgoogle/api/annotations.proto\x1a8goo\
|
||||
gle/bigtable/admin/table/v1/bigtable_table_data.proto\x1aDgoogle/bigtabl\
|
||||
e/admin/table/v1/bigtable_table_service_messages.proto\x1a\x1bgoogle/pro\
|
||||
tobuf/empty.proto2\xbe\x0c\n\x14BigtableTableService\x12\xa4\x01\n\x0bCr\
|
||||
eateTable\x122.google.bigtable.admin.table.v1.CreateTableRequest\x1a%.go\
|
||||
ogle.bigtable.admin.table.v1.Table\":\x82\xd3\xe4\x93\x024\"//v1/{name=p\
|
||||
rojects/*/zones/*/clusters/*}/tables:\x01*\x12\xac\x01\n\nListTables\x12\
|
||||
1.google.bigtable.admin.table.v1.ListTablesRequest\x1a2.google.bigtable.\
|
||||
admin.table.v1.ListTablesResponse\"7\x82\xd3\xe4\x93\x021\x12//v1/{name=\
|
||||
projects/*/zones/*/clusters/*}/tables\x12\x9d\x01\n\x08GetTable\x12/.goo\
|
||||
gle.bigtable.admin.table.v1.GetTableRequest\x1a%.google.bigtable.admin.t\
|
||||
able.v1.Table\"9\x82\xd3\xe4\x93\x023\x121/v1/{name=projects/*/zones/*/c\
|
||||
lusters/*/tables/*}\x12\x94\x01\n\x0bDeleteTable\x122.google.bigtable.ad\
|
||||
min.table.v1.DeleteTableRequest\x1a\x16.google.protobuf.Empty\"9\x82\xd3\
|
||||
\xe4\x93\x023*1/v1/{name=projects/*/zones/*/clusters/*/tables/*}\x12\x9e\
|
||||
\x01\n\x0bRenameTable\x122.google.bigtable.admin.table.v1.RenameTableReq\
|
||||
uest\x1a\x16.google.protobuf.Empty\"C\x82\xd3\xe4\x93\x02=\"8/v1/{name=p\
|
||||
rojects/*/zones/*/clusters/*/tables/*}:rename:\x01*\x12\xca\x01\n\x12Cre\
|
||||
ateColumnFamily\x129.google.bigtable.admin.table.v1.CreateColumnFamilyRe\
|
||||
quest\x1a,.google.bigtable.admin.table.v1.ColumnFamily\"K\x82\xd3\xe4\
|
||||
\x93\x02E\"@/v1/{name=projects/*/zones/*/clusters/*/tables/*}/columnFami\
|
||||
lies:\x01*\x12\xbf\x01\n\x12UpdateColumnFamily\x12,.google.bigtable.admi\
|
||||
n.table.v1.ColumnFamily\x1a,.google.bigtable.admin.table.v1.ColumnFamily\
|
||||
\"M\x82\xd3\xe4\x93\x02G\x1aB/v1/{name=projects/*/zones/*/clusters/*/tab\
|
||||
les/*/columnFamilies/*}:\x01*\x12\xb3\x01\n\x12DeleteColumnFamily\x129.g\
|
||||
oogle.bigtable.admin.table.v1.DeleteColumnFamilyRequest\x1a\x16.google.p\
|
||||
rotobuf.Empty\"J\x82\xd3\xe4\x93\x02D*B/v1/{name=projects/*/zones/*/clus\
|
||||
ters/*/tables/*/columnFamilies/*}\x12\xb2\x01\n\x0eBulkDeleteRows\x125.g\
|
||||
oogle.bigtable.admin.table.v1.BulkDeleteRowsRequest\x1a\x16.google.proto\
|
||||
buf.Empty\"Q\x82\xd3\xe4\x93\x02K\"F/v1/{table_name=projects/*/zones/*/c\
|
||||
lusters/*/tables/*}:bulkDeleteRows:\x01*B\x87\x01\n\"com.google.bigtable\
|
||||
.admin.table.v1B\x1aBigtableTableServicesProtoP\x01ZCgoogle.golang.org/g\
|
||||
enproto/googleapis/bigtable/admin/table/v1;tableJ\xf9\x12\n\x06\x12\x04\
|
||||
\x0e\0O\x01\n\xbd\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb2\x04\x20Copyright\
|
||||
\x202017\x20Google\x20Inc.\n\n\x20Licensed\x20under\x20the\x20Apache\x20\
|
||||
License,\x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20n\
|
||||
ot\x20use\x20this\x20file\x20except\x20in\x20compliance\x20with\x20the\
|
||||
\x20License.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20Lice\
|
||||
nse\x20at\n\n\x20\x20\x20\x20\x20http://www.apache.org/licenses/LICENSE-\
|
||||
2.0\n\n\x20Unless\x20required\x20by\x20applicable\x20law\x20or\x20agreed\
|
||||
\x20to\x20in\x20writing,\x20software\n\x20distributed\x20under\x20the\
|
||||
\x20License\x20is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\
|
||||
\x20WITHOUT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20e\
|
||||
ither\x20express\x20or\x20implied.\n\x20See\x20the\x20License\x20for\x20\
|
||||
the\x20specific\x20language\x20governing\x20permissions\x20and\n\x20limi\
|
||||
tations\x20under\x20the\x20License.\n\n\x08\n\x01\x02\x12\x03\x10\0'\n\t\
|
||||
\n\x02\x03\0\x12\x03\x12\0&\n\t\n\x02\x03\x01\x12\x03\x13\0B\n\t\n\x02\
|
||||
\x03\x02\x12\x03\x14\0N\n\t\n\x02\x03\x03\x12\x03\x15\0%\n\x08\n\x01\x08\
|
||||
\x12\x03\x17\0Z\n\t\n\x02\x08\x0b\x12\x03\x17\0Z\n\x08\n\x01\x08\x12\x03\
|
||||
\x18\0\"\n\t\n\x02\x08\n\x12\x03\x18\0\"\n\x08\n\x01\x08\x12\x03\x19\0;\
|
||||
\n\t\n\x02\x08\x08\x12\x03\x19\0;\n\x08\n\x01\x08\x12\x03\x1a\0;\n\t\n\
|
||||
\x02\x08\x01\x12\x03\x1a\0;\n\xa8\x01\n\x02\x06\0\x12\x04\x1f\0O\x01\x1a\
|
||||
\x9b\x01\x20Service\x20for\x20creating,\x20configuring,\x20and\x20deleti\
|
||||
ng\x20Cloud\x20Bigtable\x20tables.\n\x20Provides\x20access\x20to\x20the\
|
||||
\x20table\x20schemas\x20only,\x20not\x20the\x20data\x20stored\x20within\
|
||||
\x20the\x20tables.\n\n\n\n\x03\x06\0\x01\x12\x03\x1f\x08\x1c\n\xad\x01\n\
|
||||
\x04\x06\0\x02\0\x12\x04#\x02%\x03\x1a\x9e\x01\x20Creates\x20a\x20new\
|
||||
\x20table,\x20to\x20be\x20served\x20from\x20a\x20specified\x20cluster.\n\
|
||||
\x20The\x20table\x20can\x20be\x20created\x20with\x20a\x20full\x20set\x20\
|
||||
of\x20initial\x20column\x20families,\n\x20specified\x20in\x20the\x20requ\
|
||||
est.\n\n\x0c\n\x05\x06\0\x02\0\x01\x12\x03#\x06\x11\n\x0c\n\x05\x06\0\
|
||||
\x02\0\x02\x12\x03#\x12$\n\x0c\n\x05\x06\0\x02\0\x03\x12\x03#/4\n\x0c\n\
|
||||
\x05\x06\0\x02\0\x04\x12\x03$\x04e\n\x10\n\t\x06\0\x02\0\x04\xb0\xca\xbc\
|
||||
\"\x12\x03$\x04e\nN\n\x04\x06\0\x02\x01\x12\x04(\x02*\x03\x1a@\x20Lists\
|
||||
\x20the\x20names\x20of\x20all\x20tables\x20served\x20from\x20a\x20specif\
|
||||
ied\x20cluster.\n\n\x0c\n\x05\x06\0\x02\x01\x01\x12\x03(\x06\x10\n\x0c\n\
|
||||
\x05\x06\0\x02\x01\x02\x12\x03(\x11\"\n\x0c\n\x05\x06\0\x02\x01\x03\x12\
|
||||
\x03(-?\n\x0c\n\x05\x06\0\x02\x01\x04\x12\x03)\x04Z\n\x10\n\t\x06\0\x02\
|
||||
\x01\x04\xb0\xca\xbc\"\x12\x03)\x04Z\nV\n\x04\x06\0\x02\x02\x12\x04-\x02\
|
||||
/\x03\x1aH\x20Gets\x20the\x20schema\x20of\x20the\x20specified\x20table,\
|
||||
\x20including\x20its\x20column\x20families.\n\n\x0c\n\x05\x06\0\x02\x02\
|
||||
\x01\x12\x03-\x06\x0e\n\x0c\n\x05\x06\0\x02\x02\x02\x12\x03-\x0f\x1e\n\
|
||||
\x0c\n\x05\x06\0\x02\x02\x03\x12\x03-).\n\x0c\n\x05\x06\0\x02\x02\x04\
|
||||
\x12\x03.\x04\\\n\x10\n\t\x06\0\x02\x02\x04\xb0\xca\xbc\"\x12\x03.\x04\\\
|
||||
\nJ\n\x04\x06\0\x02\x03\x12\x042\x024\x03\x1a<\x20Permanently\x20deletes\
|
||||
\x20a\x20specified\x20table\x20and\x20all\x20of\x20its\x20data.\n\n\x0c\
|
||||
\n\x05\x06\0\x02\x03\x01\x12\x032\x06\x11\n\x0c\n\x05\x06\0\x02\x03\x02\
|
||||
\x12\x032\x12$\n\x0c\n\x05\x06\0\x02\x03\x03\x12\x032/D\n\x0c\n\x05\x06\
|
||||
\0\x02\x03\x04\x12\x033\x04_\n\x10\n\t\x06\0\x02\x03\x04\xb0\xca\xbc\"\
|
||||
\x12\x033\x04_\n{\n\x04\x06\0\x02\x04\x12\x048\x02:\x03\x1am\x20Changes\
|
||||
\x20the\x20name\x20of\x20a\x20specified\x20table.\n\x20Cannot\x20be\x20u\
|
||||
sed\x20to\x20move\x20tables\x20between\x20clusters,\x20zones,\x20or\x20p\
|
||||
rojects.\n\n\x0c\n\x05\x06\0\x02\x04\x01\x12\x038\x06\x11\n\x0c\n\x05\
|
||||
\x06\0\x02\x04\x02\x12\x038\x12$\n\x0c\n\x05\x06\0\x02\x04\x03\x12\x038/\
|
||||
D\n\x0c\n\x05\x06\0\x02\x04\x04\x12\x039\x04n\n\x10\n\t\x06\0\x02\x04\
|
||||
\x04\xb0\xca\xbc\"\x12\x039\x04n\nE\n\x04\x06\0\x02\x05\x12\x04=\x02?\
|
||||
\x03\x1a7\x20Creates\x20a\x20new\x20column\x20family\x20within\x20a\x20s\
|
||||
pecified\x20table.\n\n\x0c\n\x05\x06\0\x02\x05\x01\x12\x03=\x06\x18\n\
|
||||
\x0c\n\x05\x06\0\x02\x05\x02\x12\x03=\x192\n\x0c\n\x05\x06\0\x02\x05\x03\
|
||||
\x12\x03==I\n\x0c\n\x05\x06\0\x02\x05\x04\x12\x03>\x04v\n\x10\n\t\x06\0\
|
||||
\x02\x05\x04\xb0\xca\xbc\"\x12\x03>\x04v\nG\n\x04\x06\0\x02\x06\x12\x04B\
|
||||
\x02D\x03\x1a9\x20Changes\x20the\x20configuration\x20of\x20a\x20specifie\
|
||||
d\x20column\x20family.\n\n\x0c\n\x05\x06\0\x02\x06\x01\x12\x03B\x06\x18\
|
||||
\n\x0c\n\x05\x06\0\x02\x06\x02\x12\x03B\x19%\n\x0c\n\x05\x06\0\x02\x06\
|
||||
\x03\x12\x03B0<\n\x0c\n\x05\x06\0\x02\x06\x04\x12\x03C\x04w\n\x10\n\t\
|
||||
\x06\0\x02\x06\x04\xb0\xca\xbc\"\x12\x03C\x04w\nR\n\x04\x06\0\x02\x07\
|
||||
\x12\x04G\x02I\x03\x1aD\x20Permanently\x20deletes\x20a\x20specified\x20c\
|
||||
olumn\x20family\x20and\x20all\x20of\x20its\x20data.\n\n\x0c\n\x05\x06\0\
|
||||
\x02\x07\x01\x12\x03G\x06\x18\n\x0c\n\x05\x06\0\x02\x07\x02\x12\x03G\x19\
|
||||
2\n\x0c\n\x05\x06\0\x02\x07\x03\x12\x03G=R\n\x0c\n\x05\x06\0\x02\x07\x04\
|
||||
\x12\x03H\x04p\n\x10\n\t\x06\0\x02\x07\x04\xb0\xca\xbc\"\x12\x03H\x04p\n\
|
||||
O\n\x04\x06\0\x02\x08\x12\x04L\x02N\x03\x1aA\x20Delete\x20all\x20rows\
|
||||
\x20in\x20a\x20table\x20corresponding\x20to\x20a\x20particular\x20prefix\
|
||||
\n\n\x0c\n\x05\x06\0\x02\x08\x01\x12\x03L\x06\x14\n\x0c\n\x05\x06\0\x02\
|
||||
\x08\x02\x12\x03L\x15*\n\x0c\n\x05\x06\0\x02\x08\x03\x12\x03L5J\n\x0c\n\
|
||||
\x05\x06\0\x02\x08\x04\x12\x03M\x04|\n\x10\n\t\x06\0\x02\x08\x04\xb0\xca\
|
||||
\xbc\"\x12\x03M\x04|b\x06proto3\
|
||||
";
|
||||
|
||||
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
|
||||
};
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
unsafe {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
}
|
||||
295
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/table/v1/bigtable_table_service_grpc.rs
vendored
Normal file
295
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/table/v1/bigtable_table_service_grpc.rs
vendored
Normal file
@ -0,0 +1,295 @@
|
||||
// This file is generated. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_SERVICE_CREATE_TABLE: ::grpcio::Method<super::bigtable_table_service_messages::CreateTableRequest, super::bigtable_table_data::Table> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.table.v1.BigtableTableService/CreateTable",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_SERVICE_LIST_TABLES: ::grpcio::Method<super::bigtable_table_service_messages::ListTablesRequest, super::bigtable_table_service_messages::ListTablesResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.table.v1.BigtableTableService/ListTables",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_SERVICE_GET_TABLE: ::grpcio::Method<super::bigtable_table_service_messages::GetTableRequest, super::bigtable_table_data::Table> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.table.v1.BigtableTableService/GetTable",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_SERVICE_DELETE_TABLE: ::grpcio::Method<super::bigtable_table_service_messages::DeleteTableRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.table.v1.BigtableTableService/DeleteTable",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_SERVICE_RENAME_TABLE: ::grpcio::Method<super::bigtable_table_service_messages::RenameTableRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.table.v1.BigtableTableService/RenameTable",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_SERVICE_CREATE_COLUMN_FAMILY: ::grpcio::Method<super::bigtable_table_service_messages::CreateColumnFamilyRequest, super::bigtable_table_data::ColumnFamily> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.table.v1.BigtableTableService/CreateColumnFamily",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_SERVICE_UPDATE_COLUMN_FAMILY: ::grpcio::Method<super::bigtable_table_data::ColumnFamily, super::bigtable_table_data::ColumnFamily> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.table.v1.BigtableTableService/UpdateColumnFamily",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_SERVICE_DELETE_COLUMN_FAMILY: ::grpcio::Method<super::bigtable_table_service_messages::DeleteColumnFamilyRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.table.v1.BigtableTableService/DeleteColumnFamily",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_SERVICE_BULK_DELETE_ROWS: ::grpcio::Method<super::bigtable_table_service_messages::BulkDeleteRowsRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.table.v1.BigtableTableService/BulkDeleteRows",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct BigtableTableServiceClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl BigtableTableServiceClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
BigtableTableServiceClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create_table_opt(&self, req: &super::bigtable_table_service_messages::CreateTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_table_data::Table> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_SERVICE_CREATE_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_table(&self, req: &super::bigtable_table_service_messages::CreateTableRequest) -> ::grpcio::Result<super::bigtable_table_data::Table> {
|
||||
self.create_table_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_table_async_opt(&self, req: &super::bigtable_table_service_messages::CreateTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_data::Table>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_SERVICE_CREATE_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_table_async(&self, req: &super::bigtable_table_service_messages::CreateTableRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_data::Table>> {
|
||||
self.create_table_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_tables_opt(&self, req: &super::bigtable_table_service_messages::ListTablesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_table_service_messages::ListTablesResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_SERVICE_LIST_TABLES, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_tables(&self, req: &super::bigtable_table_service_messages::ListTablesRequest) -> ::grpcio::Result<super::bigtable_table_service_messages::ListTablesResponse> {
|
||||
self.list_tables_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_tables_async_opt(&self, req: &super::bigtable_table_service_messages::ListTablesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_service_messages::ListTablesResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_SERVICE_LIST_TABLES, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_tables_async(&self, req: &super::bigtable_table_service_messages::ListTablesRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_service_messages::ListTablesResponse>> {
|
||||
self.list_tables_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_table_opt(&self, req: &super::bigtable_table_service_messages::GetTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_table_data::Table> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_SERVICE_GET_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_table(&self, req: &super::bigtable_table_service_messages::GetTableRequest) -> ::grpcio::Result<super::bigtable_table_data::Table> {
|
||||
self.get_table_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_table_async_opt(&self, req: &super::bigtable_table_service_messages::GetTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_data::Table>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_SERVICE_GET_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_table_async(&self, req: &super::bigtable_table_service_messages::GetTableRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_data::Table>> {
|
||||
self.get_table_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_table_opt(&self, req: &super::bigtable_table_service_messages::DeleteTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_SERVICE_DELETE_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_table(&self, req: &super::bigtable_table_service_messages::DeleteTableRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_table_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_table_async_opt(&self, req: &super::bigtable_table_service_messages::DeleteTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_SERVICE_DELETE_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_table_async(&self, req: &super::bigtable_table_service_messages::DeleteTableRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_table_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn rename_table_opt(&self, req: &super::bigtable_table_service_messages::RenameTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_SERVICE_RENAME_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn rename_table(&self, req: &super::bigtable_table_service_messages::RenameTableRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.rename_table_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn rename_table_async_opt(&self, req: &super::bigtable_table_service_messages::RenameTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_SERVICE_RENAME_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn rename_table_async(&self, req: &super::bigtable_table_service_messages::RenameTableRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.rename_table_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_column_family_opt(&self, req: &super::bigtable_table_service_messages::CreateColumnFamilyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_table_data::ColumnFamily> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_SERVICE_CREATE_COLUMN_FAMILY, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_column_family(&self, req: &super::bigtable_table_service_messages::CreateColumnFamilyRequest) -> ::grpcio::Result<super::bigtable_table_data::ColumnFamily> {
|
||||
self.create_column_family_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_column_family_async_opt(&self, req: &super::bigtable_table_service_messages::CreateColumnFamilyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_data::ColumnFamily>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_SERVICE_CREATE_COLUMN_FAMILY, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_column_family_async(&self, req: &super::bigtable_table_service_messages::CreateColumnFamilyRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_data::ColumnFamily>> {
|
||||
self.create_column_family_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_column_family_opt(&self, req: &super::bigtable_table_data::ColumnFamily, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_table_data::ColumnFamily> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_SERVICE_UPDATE_COLUMN_FAMILY, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_column_family(&self, req: &super::bigtable_table_data::ColumnFamily) -> ::grpcio::Result<super::bigtable_table_data::ColumnFamily> {
|
||||
self.update_column_family_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_column_family_async_opt(&self, req: &super::bigtable_table_data::ColumnFamily, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_data::ColumnFamily>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_SERVICE_UPDATE_COLUMN_FAMILY, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_column_family_async(&self, req: &super::bigtable_table_data::ColumnFamily) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_data::ColumnFamily>> {
|
||||
self.update_column_family_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_column_family_opt(&self, req: &super::bigtable_table_service_messages::DeleteColumnFamilyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_SERVICE_DELETE_COLUMN_FAMILY, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_column_family(&self, req: &super::bigtable_table_service_messages::DeleteColumnFamilyRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_column_family_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_column_family_async_opt(&self, req: &super::bigtable_table_service_messages::DeleteColumnFamilyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_SERVICE_DELETE_COLUMN_FAMILY, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_column_family_async(&self, req: &super::bigtable_table_service_messages::DeleteColumnFamilyRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_column_family_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn bulk_delete_rows_opt(&self, req: &super::bigtable_table_service_messages::BulkDeleteRowsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_SERVICE_BULK_DELETE_ROWS, req, opt)
|
||||
}
|
||||
|
||||
pub fn bulk_delete_rows(&self, req: &super::bigtable_table_service_messages::BulkDeleteRowsRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.bulk_delete_rows_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn bulk_delete_rows_async_opt(&self, req: &super::bigtable_table_service_messages::BulkDeleteRowsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_SERVICE_BULK_DELETE_ROWS, req, opt)
|
||||
}
|
||||
|
||||
pub fn bulk_delete_rows_async(&self, req: &super::bigtable_table_service_messages::BulkDeleteRowsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.bulk_delete_rows_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait BigtableTableService {
|
||||
fn create_table(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_service_messages::CreateTableRequest, sink: ::grpcio::UnarySink<super::bigtable_table_data::Table>);
|
||||
fn list_tables(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_service_messages::ListTablesRequest, sink: ::grpcio::UnarySink<super::bigtable_table_service_messages::ListTablesResponse>);
|
||||
fn get_table(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_service_messages::GetTableRequest, sink: ::grpcio::UnarySink<super::bigtable_table_data::Table>);
|
||||
fn delete_table(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_service_messages::DeleteTableRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn rename_table(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_service_messages::RenameTableRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn create_column_family(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_service_messages::CreateColumnFamilyRequest, sink: ::grpcio::UnarySink<super::bigtable_table_data::ColumnFamily>);
|
||||
fn update_column_family(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_data::ColumnFamily, sink: ::grpcio::UnarySink<super::bigtable_table_data::ColumnFamily>);
|
||||
fn delete_column_family(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_service_messages::DeleteColumnFamilyRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn bulk_delete_rows(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_service_messages::BulkDeleteRowsRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
}
|
||||
|
||||
pub fn create_bigtable_table_service<S: BigtableTableService + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_SERVICE_CREATE_TABLE, move |ctx, req, resp| {
|
||||
instance.create_table(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_SERVICE_LIST_TABLES, move |ctx, req, resp| {
|
||||
instance.list_tables(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_SERVICE_GET_TABLE, move |ctx, req, resp| {
|
||||
instance.get_table(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_SERVICE_DELETE_TABLE, move |ctx, req, resp| {
|
||||
instance.delete_table(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_SERVICE_RENAME_TABLE, move |ctx, req, resp| {
|
||||
instance.rename_table(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_SERVICE_CREATE_COLUMN_FAMILY, move |ctx, req, resp| {
|
||||
instance.create_column_family(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_SERVICE_UPDATE_COLUMN_FAMILY, move |ctx, req, resp| {
|
||||
instance.update_column_family(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_SERVICE_DELETE_COLUMN_FAMILY, move |ctx, req, resp| {
|
||||
instance.delete_column_family(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_SERVICE_BULK_DELETE_ROWS, move |ctx, req, resp| {
|
||||
instance.bulk_delete_rows(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
2137
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/table/v1/bigtable_table_service_messages.rs
vendored
Normal file
2137
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/table/v1/bigtable_table_service_messages.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/table/v1/mod.rs
vendored
Normal file
7
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/table/v1/mod.rs
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
pub mod bigtable_table_data;
|
||||
pub mod bigtable_table_service;
|
||||
pub mod bigtable_table_service_grpc;
|
||||
pub mod bigtable_table_service_messages;
|
||||
|
||||
pub(crate) use crate::empty;
|
||||
pub(crate) use crate::longrunning::operations;
|
||||
5872
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/bigtable_instance_admin.rs
vendored
Normal file
5872
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/bigtable_instance_admin.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
575
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/bigtable_instance_admin_grpc.rs
vendored
Normal file
575
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/bigtable_instance_admin_grpc.rs
vendored
Normal file
@ -0,0 +1,575 @@
|
||||
// This file is generated. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_CREATE_INSTANCE: ::grpcio::Method<super::bigtable_instance_admin::CreateInstanceRequest, super::operations::Operation> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateInstance",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_GET_INSTANCE: ::grpcio::Method<super::bigtable_instance_admin::GetInstanceRequest, super::instance::Instance> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetInstance",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_LIST_INSTANCES: ::grpcio::Method<super::bigtable_instance_admin::ListInstancesRequest, super::bigtable_instance_admin::ListInstancesResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListInstances",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_UPDATE_INSTANCE: ::grpcio::Method<super::instance::Instance, super::instance::Instance> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateInstance",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_PARTIAL_UPDATE_INSTANCE: ::grpcio::Method<super::bigtable_instance_admin::PartialUpdateInstanceRequest, super::operations::Operation> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateInstance",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_DELETE_INSTANCE: ::grpcio::Method<super::bigtable_instance_admin::DeleteInstanceRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteInstance",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_CREATE_CLUSTER: ::grpcio::Method<super::bigtable_instance_admin::CreateClusterRequest, super::operations::Operation> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateCluster",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_GET_CLUSTER: ::grpcio::Method<super::bigtable_instance_admin::GetClusterRequest, super::instance::Cluster> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetCluster",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_LIST_CLUSTERS: ::grpcio::Method<super::bigtable_instance_admin::ListClustersRequest, super::bigtable_instance_admin::ListClustersResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListClusters",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_UPDATE_CLUSTER: ::grpcio::Method<super::instance::Cluster, super::operations::Operation> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateCluster",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_DELETE_CLUSTER: ::grpcio::Method<super::bigtable_instance_admin::DeleteClusterRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteCluster",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_CREATE_APP_PROFILE: ::grpcio::Method<super::bigtable_instance_admin::CreateAppProfileRequest, super::instance::AppProfile> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateAppProfile",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_GET_APP_PROFILE: ::grpcio::Method<super::bigtable_instance_admin::GetAppProfileRequest, super::instance::AppProfile> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetAppProfile",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_LIST_APP_PROFILES: ::grpcio::Method<super::bigtable_instance_admin::ListAppProfilesRequest, super::bigtable_instance_admin::ListAppProfilesResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListAppProfiles",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_UPDATE_APP_PROFILE: ::grpcio::Method<super::bigtable_instance_admin::UpdateAppProfileRequest, super::operations::Operation> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateAppProfile",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_DELETE_APP_PROFILE: ::grpcio::Method<super::bigtable_instance_admin::DeleteAppProfileRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteAppProfile",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_GET_IAM_POLICY: ::grpcio::Method<super::iam_policy::GetIamPolicyRequest, super::policy::Policy> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetIamPolicy",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_SET_IAM_POLICY: ::grpcio::Method<super::iam_policy::SetIamPolicyRequest, super::policy::Policy> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/SetIamPolicy",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_INSTANCE_ADMIN_TEST_IAM_PERMISSIONS: ::grpcio::Method<super::iam_policy::TestIamPermissionsRequest, super::iam_policy::TestIamPermissionsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableInstanceAdmin/TestIamPermissions",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct BigtableInstanceAdminClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl BigtableInstanceAdminClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
BigtableInstanceAdminClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create_instance_opt(&self, req: &super::bigtable_instance_admin::CreateInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_CREATE_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_instance(&self, req: &super::bigtable_instance_admin::CreateInstanceRequest) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.create_instance_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_instance_async_opt(&self, req: &super::bigtable_instance_admin::CreateInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_CREATE_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_instance_async(&self, req: &super::bigtable_instance_admin::CreateInstanceRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.create_instance_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_instance_opt(&self, req: &super::bigtable_instance_admin::GetInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::instance::Instance> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_GET_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_instance(&self, req: &super::bigtable_instance_admin::GetInstanceRequest) -> ::grpcio::Result<super::instance::Instance> {
|
||||
self.get_instance_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_instance_async_opt(&self, req: &super::bigtable_instance_admin::GetInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::instance::Instance>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_GET_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_instance_async(&self, req: &super::bigtable_instance_admin::GetInstanceRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::instance::Instance>> {
|
||||
self.get_instance_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_instances_opt(&self, req: &super::bigtable_instance_admin::ListInstancesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_instance_admin::ListInstancesResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_LIST_INSTANCES, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_instances(&self, req: &super::bigtable_instance_admin::ListInstancesRequest) -> ::grpcio::Result<super::bigtable_instance_admin::ListInstancesResponse> {
|
||||
self.list_instances_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_instances_async_opt(&self, req: &super::bigtable_instance_admin::ListInstancesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_instance_admin::ListInstancesResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_LIST_INSTANCES, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_instances_async(&self, req: &super::bigtable_instance_admin::ListInstancesRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_instance_admin::ListInstancesResponse>> {
|
||||
self.list_instances_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_instance_opt(&self, req: &super::instance::Instance, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::instance::Instance> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_UPDATE_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_instance(&self, req: &super::instance::Instance) -> ::grpcio::Result<super::instance::Instance> {
|
||||
self.update_instance_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_instance_async_opt(&self, req: &super::instance::Instance, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::instance::Instance>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_UPDATE_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_instance_async(&self, req: &super::instance::Instance) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::instance::Instance>> {
|
||||
self.update_instance_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn partial_update_instance_opt(&self, req: &super::bigtable_instance_admin::PartialUpdateInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_PARTIAL_UPDATE_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn partial_update_instance(&self, req: &super::bigtable_instance_admin::PartialUpdateInstanceRequest) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.partial_update_instance_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn partial_update_instance_async_opt(&self, req: &super::bigtable_instance_admin::PartialUpdateInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_PARTIAL_UPDATE_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn partial_update_instance_async(&self, req: &super::bigtable_instance_admin::PartialUpdateInstanceRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.partial_update_instance_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_instance_opt(&self, req: &super::bigtable_instance_admin::DeleteInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_DELETE_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_instance(&self, req: &super::bigtable_instance_admin::DeleteInstanceRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_instance_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_instance_async_opt(&self, req: &super::bigtable_instance_admin::DeleteInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_DELETE_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_instance_async(&self, req: &super::bigtable_instance_admin::DeleteInstanceRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_instance_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_cluster_opt(&self, req: &super::bigtable_instance_admin::CreateClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_CREATE_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_cluster(&self, req: &super::bigtable_instance_admin::CreateClusterRequest) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.create_cluster_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_cluster_async_opt(&self, req: &super::bigtable_instance_admin::CreateClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_CREATE_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_cluster_async(&self, req: &super::bigtable_instance_admin::CreateClusterRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.create_cluster_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_cluster_opt(&self, req: &super::bigtable_instance_admin::GetClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::instance::Cluster> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_GET_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_cluster(&self, req: &super::bigtable_instance_admin::GetClusterRequest) -> ::grpcio::Result<super::instance::Cluster> {
|
||||
self.get_cluster_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_cluster_async_opt(&self, req: &super::bigtable_instance_admin::GetClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::instance::Cluster>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_GET_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_cluster_async(&self, req: &super::bigtable_instance_admin::GetClusterRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::instance::Cluster>> {
|
||||
self.get_cluster_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_clusters_opt(&self, req: &super::bigtable_instance_admin::ListClustersRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_instance_admin::ListClustersResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_LIST_CLUSTERS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_clusters(&self, req: &super::bigtable_instance_admin::ListClustersRequest) -> ::grpcio::Result<super::bigtable_instance_admin::ListClustersResponse> {
|
||||
self.list_clusters_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_clusters_async_opt(&self, req: &super::bigtable_instance_admin::ListClustersRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_instance_admin::ListClustersResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_LIST_CLUSTERS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_clusters_async(&self, req: &super::bigtable_instance_admin::ListClustersRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_instance_admin::ListClustersResponse>> {
|
||||
self.list_clusters_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_cluster_opt(&self, req: &super::instance::Cluster, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_UPDATE_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_cluster(&self, req: &super::instance::Cluster) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.update_cluster_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_cluster_async_opt(&self, req: &super::instance::Cluster, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_UPDATE_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_cluster_async(&self, req: &super::instance::Cluster) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.update_cluster_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_cluster_opt(&self, req: &super::bigtable_instance_admin::DeleteClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_DELETE_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_cluster(&self, req: &super::bigtable_instance_admin::DeleteClusterRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_cluster_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_cluster_async_opt(&self, req: &super::bigtable_instance_admin::DeleteClusterRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_DELETE_CLUSTER, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_cluster_async(&self, req: &super::bigtable_instance_admin::DeleteClusterRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_cluster_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_app_profile_opt(&self, req: &super::bigtable_instance_admin::CreateAppProfileRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::instance::AppProfile> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_CREATE_APP_PROFILE, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_app_profile(&self, req: &super::bigtable_instance_admin::CreateAppProfileRequest) -> ::grpcio::Result<super::instance::AppProfile> {
|
||||
self.create_app_profile_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_app_profile_async_opt(&self, req: &super::bigtable_instance_admin::CreateAppProfileRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::instance::AppProfile>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_CREATE_APP_PROFILE, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_app_profile_async(&self, req: &super::bigtable_instance_admin::CreateAppProfileRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::instance::AppProfile>> {
|
||||
self.create_app_profile_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_app_profile_opt(&self, req: &super::bigtable_instance_admin::GetAppProfileRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::instance::AppProfile> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_GET_APP_PROFILE, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_app_profile(&self, req: &super::bigtable_instance_admin::GetAppProfileRequest) -> ::grpcio::Result<super::instance::AppProfile> {
|
||||
self.get_app_profile_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_app_profile_async_opt(&self, req: &super::bigtable_instance_admin::GetAppProfileRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::instance::AppProfile>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_GET_APP_PROFILE, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_app_profile_async(&self, req: &super::bigtable_instance_admin::GetAppProfileRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::instance::AppProfile>> {
|
||||
self.get_app_profile_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_app_profiles_opt(&self, req: &super::bigtable_instance_admin::ListAppProfilesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_instance_admin::ListAppProfilesResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_LIST_APP_PROFILES, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_app_profiles(&self, req: &super::bigtable_instance_admin::ListAppProfilesRequest) -> ::grpcio::Result<super::bigtable_instance_admin::ListAppProfilesResponse> {
|
||||
self.list_app_profiles_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_app_profiles_async_opt(&self, req: &super::bigtable_instance_admin::ListAppProfilesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_instance_admin::ListAppProfilesResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_LIST_APP_PROFILES, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_app_profiles_async(&self, req: &super::bigtable_instance_admin::ListAppProfilesRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_instance_admin::ListAppProfilesResponse>> {
|
||||
self.list_app_profiles_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_app_profile_opt(&self, req: &super::bigtable_instance_admin::UpdateAppProfileRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_UPDATE_APP_PROFILE, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_app_profile(&self, req: &super::bigtable_instance_admin::UpdateAppProfileRequest) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.update_app_profile_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_app_profile_async_opt(&self, req: &super::bigtable_instance_admin::UpdateAppProfileRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_UPDATE_APP_PROFILE, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_app_profile_async(&self, req: &super::bigtable_instance_admin::UpdateAppProfileRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.update_app_profile_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_app_profile_opt(&self, req: &super::bigtable_instance_admin::DeleteAppProfileRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_DELETE_APP_PROFILE, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_app_profile(&self, req: &super::bigtable_instance_admin::DeleteAppProfileRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_app_profile_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_app_profile_async_opt(&self, req: &super::bigtable_instance_admin::DeleteAppProfileRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_DELETE_APP_PROFILE, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_app_profile_async(&self, req: &super::bigtable_instance_admin::DeleteAppProfileRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_app_profile_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_iam_policy_opt(&self, req: &super::iam_policy::GetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_GET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_iam_policy(&self, req: &super::iam_policy::GetIamPolicyRequest) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.get_iam_policy_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_iam_policy_async_opt(&self, req: &super::iam_policy::GetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_GET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_iam_policy_async(&self, req: &super::iam_policy::GetIamPolicyRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.get_iam_policy_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn set_iam_policy_opt(&self, req: &super::iam_policy::SetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_SET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn set_iam_policy(&self, req: &super::iam_policy::SetIamPolicyRequest) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.set_iam_policy_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn set_iam_policy_async_opt(&self, req: &super::iam_policy::SetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_SET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn set_iam_policy_async(&self, req: &super::iam_policy::SetIamPolicyRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.set_iam_policy_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions_opt(&self, req: &super::iam_policy::TestIamPermissionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::iam_policy::TestIamPermissionsResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_INSTANCE_ADMIN_TEST_IAM_PERMISSIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions(&self, req: &super::iam_policy::TestIamPermissionsRequest) -> ::grpcio::Result<super::iam_policy::TestIamPermissionsResponse> {
|
||||
self.test_iam_permissions_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions_async_opt(&self, req: &super::iam_policy::TestIamPermissionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::iam_policy::TestIamPermissionsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_INSTANCE_ADMIN_TEST_IAM_PERMISSIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions_async(&self, req: &super::iam_policy::TestIamPermissionsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::iam_policy::TestIamPermissionsResponse>> {
|
||||
self.test_iam_permissions_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait BigtableInstanceAdmin {
|
||||
fn create_instance(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_instance_admin::CreateInstanceRequest, sink: ::grpcio::UnarySink<super::operations::Operation>);
|
||||
fn get_instance(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_instance_admin::GetInstanceRequest, sink: ::grpcio::UnarySink<super::instance::Instance>);
|
||||
fn list_instances(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_instance_admin::ListInstancesRequest, sink: ::grpcio::UnarySink<super::bigtable_instance_admin::ListInstancesResponse>);
|
||||
fn update_instance(&mut self, ctx: ::grpcio::RpcContext, req: super::instance::Instance, sink: ::grpcio::UnarySink<super::instance::Instance>);
|
||||
fn partial_update_instance(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_instance_admin::PartialUpdateInstanceRequest, sink: ::grpcio::UnarySink<super::operations::Operation>);
|
||||
fn delete_instance(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_instance_admin::DeleteInstanceRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn create_cluster(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_instance_admin::CreateClusterRequest, sink: ::grpcio::UnarySink<super::operations::Operation>);
|
||||
fn get_cluster(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_instance_admin::GetClusterRequest, sink: ::grpcio::UnarySink<super::instance::Cluster>);
|
||||
fn list_clusters(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_instance_admin::ListClustersRequest, sink: ::grpcio::UnarySink<super::bigtable_instance_admin::ListClustersResponse>);
|
||||
fn update_cluster(&mut self, ctx: ::grpcio::RpcContext, req: super::instance::Cluster, sink: ::grpcio::UnarySink<super::operations::Operation>);
|
||||
fn delete_cluster(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_instance_admin::DeleteClusterRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn create_app_profile(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_instance_admin::CreateAppProfileRequest, sink: ::grpcio::UnarySink<super::instance::AppProfile>);
|
||||
fn get_app_profile(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_instance_admin::GetAppProfileRequest, sink: ::grpcio::UnarySink<super::instance::AppProfile>);
|
||||
fn list_app_profiles(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_instance_admin::ListAppProfilesRequest, sink: ::grpcio::UnarySink<super::bigtable_instance_admin::ListAppProfilesResponse>);
|
||||
fn update_app_profile(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_instance_admin::UpdateAppProfileRequest, sink: ::grpcio::UnarySink<super::operations::Operation>);
|
||||
fn delete_app_profile(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_instance_admin::DeleteAppProfileRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn get_iam_policy(&mut self, ctx: ::grpcio::RpcContext, req: super::iam_policy::GetIamPolicyRequest, sink: ::grpcio::UnarySink<super::policy::Policy>);
|
||||
fn set_iam_policy(&mut self, ctx: ::grpcio::RpcContext, req: super::iam_policy::SetIamPolicyRequest, sink: ::grpcio::UnarySink<super::policy::Policy>);
|
||||
fn test_iam_permissions(&mut self, ctx: ::grpcio::RpcContext, req: super::iam_policy::TestIamPermissionsRequest, sink: ::grpcio::UnarySink<super::iam_policy::TestIamPermissionsResponse>);
|
||||
}
|
||||
|
||||
pub fn create_bigtable_instance_admin<S: BigtableInstanceAdmin + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_CREATE_INSTANCE, move |ctx, req, resp| {
|
||||
instance.create_instance(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_GET_INSTANCE, move |ctx, req, resp| {
|
||||
instance.get_instance(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_LIST_INSTANCES, move |ctx, req, resp| {
|
||||
instance.list_instances(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_UPDATE_INSTANCE, move |ctx, req, resp| {
|
||||
instance.update_instance(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_PARTIAL_UPDATE_INSTANCE, move |ctx, req, resp| {
|
||||
instance.partial_update_instance(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_DELETE_INSTANCE, move |ctx, req, resp| {
|
||||
instance.delete_instance(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_CREATE_CLUSTER, move |ctx, req, resp| {
|
||||
instance.create_cluster(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_GET_CLUSTER, move |ctx, req, resp| {
|
||||
instance.get_cluster(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_LIST_CLUSTERS, move |ctx, req, resp| {
|
||||
instance.list_clusters(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_UPDATE_CLUSTER, move |ctx, req, resp| {
|
||||
instance.update_cluster(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_DELETE_CLUSTER, move |ctx, req, resp| {
|
||||
instance.delete_cluster(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_CREATE_APP_PROFILE, move |ctx, req, resp| {
|
||||
instance.create_app_profile(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_GET_APP_PROFILE, move |ctx, req, resp| {
|
||||
instance.get_app_profile(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_LIST_APP_PROFILES, move |ctx, req, resp| {
|
||||
instance.list_app_profiles(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_UPDATE_APP_PROFILE, move |ctx, req, resp| {
|
||||
instance.update_app_profile(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_DELETE_APP_PROFILE, move |ctx, req, resp| {
|
||||
instance.delete_app_profile(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_GET_IAM_POLICY, move |ctx, req, resp| {
|
||||
instance.get_iam_policy(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_SET_IAM_POLICY, move |ctx, req, resp| {
|
||||
instance.set_iam_policy(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_INSTANCE_ADMIN_TEST_IAM_PERMISSIONS, move |ctx, req, resp| {
|
||||
instance.test_iam_permissions(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
5704
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/bigtable_table_admin.rs
vendored
Normal file
5704
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/bigtable_table_admin.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
407
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/bigtable_table_admin_grpc.rs
vendored
Normal file
407
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/bigtable_table_admin_grpc.rs
vendored
Normal file
@ -0,0 +1,407 @@
|
||||
// This file is generated. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_ADMIN_CREATE_TABLE: ::grpcio::Method<super::bigtable_table_admin::CreateTableRequest, super::table::Table> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableTableAdmin/CreateTable",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_ADMIN_CREATE_TABLE_FROM_SNAPSHOT: ::grpcio::Method<super::bigtable_table_admin::CreateTableFromSnapshotRequest, super::operations::Operation> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableTableAdmin/CreateTableFromSnapshot",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_ADMIN_LIST_TABLES: ::grpcio::Method<super::bigtable_table_admin::ListTablesRequest, super::bigtable_table_admin::ListTablesResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableTableAdmin/ListTables",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_ADMIN_GET_TABLE: ::grpcio::Method<super::bigtable_table_admin::GetTableRequest, super::table::Table> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableTableAdmin/GetTable",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_ADMIN_DELETE_TABLE: ::grpcio::Method<super::bigtable_table_admin::DeleteTableRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableTableAdmin/DeleteTable",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_ADMIN_MODIFY_COLUMN_FAMILIES: ::grpcio::Method<super::bigtable_table_admin::ModifyColumnFamiliesRequest, super::table::Table> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableTableAdmin/ModifyColumnFamilies",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_ADMIN_DROP_ROW_RANGE: ::grpcio::Method<super::bigtable_table_admin::DropRowRangeRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableTableAdmin/DropRowRange",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_ADMIN_GENERATE_CONSISTENCY_TOKEN: ::grpcio::Method<super::bigtable_table_admin::GenerateConsistencyTokenRequest, super::bigtable_table_admin::GenerateConsistencyTokenResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableTableAdmin/GenerateConsistencyToken",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_ADMIN_CHECK_CONSISTENCY: ::grpcio::Method<super::bigtable_table_admin::CheckConsistencyRequest, super::bigtable_table_admin::CheckConsistencyResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableTableAdmin/CheckConsistency",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_ADMIN_SNAPSHOT_TABLE: ::grpcio::Method<super::bigtable_table_admin::SnapshotTableRequest, super::operations::Operation> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableTableAdmin/SnapshotTable",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_ADMIN_GET_SNAPSHOT: ::grpcio::Method<super::bigtable_table_admin::GetSnapshotRequest, super::table::Snapshot> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableTableAdmin/GetSnapshot",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_ADMIN_LIST_SNAPSHOTS: ::grpcio::Method<super::bigtable_table_admin::ListSnapshotsRequest, super::bigtable_table_admin::ListSnapshotsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableTableAdmin/ListSnapshots",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_TABLE_ADMIN_DELETE_SNAPSHOT: ::grpcio::Method<super::bigtable_table_admin::DeleteSnapshotRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.admin.v2.BigtableTableAdmin/DeleteSnapshot",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct BigtableTableAdminClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl BigtableTableAdminClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
BigtableTableAdminClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create_table_opt(&self, req: &super::bigtable_table_admin::CreateTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::table::Table> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_ADMIN_CREATE_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_table(&self, req: &super::bigtable_table_admin::CreateTableRequest) -> ::grpcio::Result<super::table::Table> {
|
||||
self.create_table_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_table_async_opt(&self, req: &super::bigtable_table_admin::CreateTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::table::Table>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_ADMIN_CREATE_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_table_async(&self, req: &super::bigtable_table_admin::CreateTableRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::table::Table>> {
|
||||
self.create_table_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_table_from_snapshot_opt(&self, req: &super::bigtable_table_admin::CreateTableFromSnapshotRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_ADMIN_CREATE_TABLE_FROM_SNAPSHOT, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_table_from_snapshot(&self, req: &super::bigtable_table_admin::CreateTableFromSnapshotRequest) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.create_table_from_snapshot_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_table_from_snapshot_async_opt(&self, req: &super::bigtable_table_admin::CreateTableFromSnapshotRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_ADMIN_CREATE_TABLE_FROM_SNAPSHOT, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_table_from_snapshot_async(&self, req: &super::bigtable_table_admin::CreateTableFromSnapshotRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.create_table_from_snapshot_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_tables_opt(&self, req: &super::bigtable_table_admin::ListTablesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_table_admin::ListTablesResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_ADMIN_LIST_TABLES, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_tables(&self, req: &super::bigtable_table_admin::ListTablesRequest) -> ::grpcio::Result<super::bigtable_table_admin::ListTablesResponse> {
|
||||
self.list_tables_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_tables_async_opt(&self, req: &super::bigtable_table_admin::ListTablesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_admin::ListTablesResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_ADMIN_LIST_TABLES, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_tables_async(&self, req: &super::bigtable_table_admin::ListTablesRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_admin::ListTablesResponse>> {
|
||||
self.list_tables_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_table_opt(&self, req: &super::bigtable_table_admin::GetTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::table::Table> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_ADMIN_GET_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_table(&self, req: &super::bigtable_table_admin::GetTableRequest) -> ::grpcio::Result<super::table::Table> {
|
||||
self.get_table_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_table_async_opt(&self, req: &super::bigtable_table_admin::GetTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::table::Table>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_ADMIN_GET_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_table_async(&self, req: &super::bigtable_table_admin::GetTableRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::table::Table>> {
|
||||
self.get_table_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_table_opt(&self, req: &super::bigtable_table_admin::DeleteTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_ADMIN_DELETE_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_table(&self, req: &super::bigtable_table_admin::DeleteTableRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_table_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_table_async_opt(&self, req: &super::bigtable_table_admin::DeleteTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_ADMIN_DELETE_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_table_async(&self, req: &super::bigtable_table_admin::DeleteTableRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_table_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn modify_column_families_opt(&self, req: &super::bigtable_table_admin::ModifyColumnFamiliesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::table::Table> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_ADMIN_MODIFY_COLUMN_FAMILIES, req, opt)
|
||||
}
|
||||
|
||||
pub fn modify_column_families(&self, req: &super::bigtable_table_admin::ModifyColumnFamiliesRequest) -> ::grpcio::Result<super::table::Table> {
|
||||
self.modify_column_families_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn modify_column_families_async_opt(&self, req: &super::bigtable_table_admin::ModifyColumnFamiliesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::table::Table>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_ADMIN_MODIFY_COLUMN_FAMILIES, req, opt)
|
||||
}
|
||||
|
||||
pub fn modify_column_families_async(&self, req: &super::bigtable_table_admin::ModifyColumnFamiliesRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::table::Table>> {
|
||||
self.modify_column_families_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn drop_row_range_opt(&self, req: &super::bigtable_table_admin::DropRowRangeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_ADMIN_DROP_ROW_RANGE, req, opt)
|
||||
}
|
||||
|
||||
pub fn drop_row_range(&self, req: &super::bigtable_table_admin::DropRowRangeRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.drop_row_range_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn drop_row_range_async_opt(&self, req: &super::bigtable_table_admin::DropRowRangeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_ADMIN_DROP_ROW_RANGE, req, opt)
|
||||
}
|
||||
|
||||
pub fn drop_row_range_async(&self, req: &super::bigtable_table_admin::DropRowRangeRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.drop_row_range_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn generate_consistency_token_opt(&self, req: &super::bigtable_table_admin::GenerateConsistencyTokenRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_table_admin::GenerateConsistencyTokenResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_ADMIN_GENERATE_CONSISTENCY_TOKEN, req, opt)
|
||||
}
|
||||
|
||||
pub fn generate_consistency_token(&self, req: &super::bigtable_table_admin::GenerateConsistencyTokenRequest) -> ::grpcio::Result<super::bigtable_table_admin::GenerateConsistencyTokenResponse> {
|
||||
self.generate_consistency_token_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn generate_consistency_token_async_opt(&self, req: &super::bigtable_table_admin::GenerateConsistencyTokenRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_admin::GenerateConsistencyTokenResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_ADMIN_GENERATE_CONSISTENCY_TOKEN, req, opt)
|
||||
}
|
||||
|
||||
pub fn generate_consistency_token_async(&self, req: &super::bigtable_table_admin::GenerateConsistencyTokenRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_admin::GenerateConsistencyTokenResponse>> {
|
||||
self.generate_consistency_token_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn check_consistency_opt(&self, req: &super::bigtable_table_admin::CheckConsistencyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_table_admin::CheckConsistencyResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_ADMIN_CHECK_CONSISTENCY, req, opt)
|
||||
}
|
||||
|
||||
pub fn check_consistency(&self, req: &super::bigtable_table_admin::CheckConsistencyRequest) -> ::grpcio::Result<super::bigtable_table_admin::CheckConsistencyResponse> {
|
||||
self.check_consistency_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn check_consistency_async_opt(&self, req: &super::bigtable_table_admin::CheckConsistencyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_admin::CheckConsistencyResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_ADMIN_CHECK_CONSISTENCY, req, opt)
|
||||
}
|
||||
|
||||
pub fn check_consistency_async(&self, req: &super::bigtable_table_admin::CheckConsistencyRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_admin::CheckConsistencyResponse>> {
|
||||
self.check_consistency_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn snapshot_table_opt(&self, req: &super::bigtable_table_admin::SnapshotTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_ADMIN_SNAPSHOT_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn snapshot_table(&self, req: &super::bigtable_table_admin::SnapshotTableRequest) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.snapshot_table_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn snapshot_table_async_opt(&self, req: &super::bigtable_table_admin::SnapshotTableRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_ADMIN_SNAPSHOT_TABLE, req, opt)
|
||||
}
|
||||
|
||||
pub fn snapshot_table_async(&self, req: &super::bigtable_table_admin::SnapshotTableRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.snapshot_table_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_snapshot_opt(&self, req: &super::bigtable_table_admin::GetSnapshotRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::table::Snapshot> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_ADMIN_GET_SNAPSHOT, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_snapshot(&self, req: &super::bigtable_table_admin::GetSnapshotRequest) -> ::grpcio::Result<super::table::Snapshot> {
|
||||
self.get_snapshot_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_snapshot_async_opt(&self, req: &super::bigtable_table_admin::GetSnapshotRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::table::Snapshot>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_ADMIN_GET_SNAPSHOT, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_snapshot_async(&self, req: &super::bigtable_table_admin::GetSnapshotRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::table::Snapshot>> {
|
||||
self.get_snapshot_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_snapshots_opt(&self, req: &super::bigtable_table_admin::ListSnapshotsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_table_admin::ListSnapshotsResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_ADMIN_LIST_SNAPSHOTS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_snapshots(&self, req: &super::bigtable_table_admin::ListSnapshotsRequest) -> ::grpcio::Result<super::bigtable_table_admin::ListSnapshotsResponse> {
|
||||
self.list_snapshots_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_snapshots_async_opt(&self, req: &super::bigtable_table_admin::ListSnapshotsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_admin::ListSnapshotsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_ADMIN_LIST_SNAPSHOTS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_snapshots_async(&self, req: &super::bigtable_table_admin::ListSnapshotsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_table_admin::ListSnapshotsResponse>> {
|
||||
self.list_snapshots_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_snapshot_opt(&self, req: &super::bigtable_table_admin::DeleteSnapshotRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_TABLE_ADMIN_DELETE_SNAPSHOT, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_snapshot(&self, req: &super::bigtable_table_admin::DeleteSnapshotRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_snapshot_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_snapshot_async_opt(&self, req: &super::bigtable_table_admin::DeleteSnapshotRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_TABLE_ADMIN_DELETE_SNAPSHOT, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_snapshot_async(&self, req: &super::bigtable_table_admin::DeleteSnapshotRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_snapshot_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait BigtableTableAdmin {
|
||||
fn create_table(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_admin::CreateTableRequest, sink: ::grpcio::UnarySink<super::table::Table>);
|
||||
fn create_table_from_snapshot(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_admin::CreateTableFromSnapshotRequest, sink: ::grpcio::UnarySink<super::operations::Operation>);
|
||||
fn list_tables(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_admin::ListTablesRequest, sink: ::grpcio::UnarySink<super::bigtable_table_admin::ListTablesResponse>);
|
||||
fn get_table(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_admin::GetTableRequest, sink: ::grpcio::UnarySink<super::table::Table>);
|
||||
fn delete_table(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_admin::DeleteTableRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn modify_column_families(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_admin::ModifyColumnFamiliesRequest, sink: ::grpcio::UnarySink<super::table::Table>);
|
||||
fn drop_row_range(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_admin::DropRowRangeRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn generate_consistency_token(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_admin::GenerateConsistencyTokenRequest, sink: ::grpcio::UnarySink<super::bigtable_table_admin::GenerateConsistencyTokenResponse>);
|
||||
fn check_consistency(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_admin::CheckConsistencyRequest, sink: ::grpcio::UnarySink<super::bigtable_table_admin::CheckConsistencyResponse>);
|
||||
fn snapshot_table(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_admin::SnapshotTableRequest, sink: ::grpcio::UnarySink<super::operations::Operation>);
|
||||
fn get_snapshot(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_admin::GetSnapshotRequest, sink: ::grpcio::UnarySink<super::table::Snapshot>);
|
||||
fn list_snapshots(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_admin::ListSnapshotsRequest, sink: ::grpcio::UnarySink<super::bigtable_table_admin::ListSnapshotsResponse>);
|
||||
fn delete_snapshot(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_table_admin::DeleteSnapshotRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
}
|
||||
|
||||
pub fn create_bigtable_table_admin<S: BigtableTableAdmin + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_ADMIN_CREATE_TABLE, move |ctx, req, resp| {
|
||||
instance.create_table(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_ADMIN_CREATE_TABLE_FROM_SNAPSHOT, move |ctx, req, resp| {
|
||||
instance.create_table_from_snapshot(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_ADMIN_LIST_TABLES, move |ctx, req, resp| {
|
||||
instance.list_tables(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_ADMIN_GET_TABLE, move |ctx, req, resp| {
|
||||
instance.get_table(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_ADMIN_DELETE_TABLE, move |ctx, req, resp| {
|
||||
instance.delete_table(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_ADMIN_MODIFY_COLUMN_FAMILIES, move |ctx, req, resp| {
|
||||
instance.modify_column_families(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_ADMIN_DROP_ROW_RANGE, move |ctx, req, resp| {
|
||||
instance.drop_row_range(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_ADMIN_GENERATE_CONSISTENCY_TOKEN, move |ctx, req, resp| {
|
||||
instance.generate_consistency_token(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_ADMIN_CHECK_CONSISTENCY, move |ctx, req, resp| {
|
||||
instance.check_consistency(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_ADMIN_SNAPSHOT_TABLE, move |ctx, req, resp| {
|
||||
instance.snapshot_table(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_ADMIN_GET_SNAPSHOT, move |ctx, req, resp| {
|
||||
instance.get_snapshot(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_ADMIN_LIST_SNAPSHOTS, move |ctx, req, resp| {
|
||||
instance.list_snapshots(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_TABLE_ADMIN_DELETE_SNAPSHOT, move |ctx, req, resp| {
|
||||
instance.delete_snapshot(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
142
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/common.rs
vendored
Normal file
142
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/common.rs
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
// This file is generated by rust-protobuf 2.7.0. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! Generated file from `google/bigtable/admin/v2/common.proto`
|
||||
|
||||
use protobuf::Message as Message_imported_for_functions;
|
||||
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
|
||||
|
||||
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
|
||||
pub enum StorageType {
|
||||
STORAGE_TYPE_UNSPECIFIED = 0,
|
||||
SSD = 1,
|
||||
HDD = 2,
|
||||
}
|
||||
|
||||
impl ::protobuf::ProtobufEnum for StorageType {
|
||||
fn value(&self) -> i32 {
|
||||
*self as i32
|
||||
}
|
||||
|
||||
fn from_i32(value: i32) -> ::std::option::Option<StorageType> {
|
||||
match value {
|
||||
0 => ::std::option::Option::Some(StorageType::STORAGE_TYPE_UNSPECIFIED),
|
||||
1 => ::std::option::Option::Some(StorageType::SSD),
|
||||
2 => ::std::option::Option::Some(StorageType::HDD),
|
||||
_ => ::std::option::Option::None
|
||||
}
|
||||
}
|
||||
|
||||
fn values() -> &'static [Self] {
|
||||
static values: &'static [StorageType] = &[
|
||||
StorageType::STORAGE_TYPE_UNSPECIFIED,
|
||||
StorageType::SSD,
|
||||
StorageType::HDD,
|
||||
];
|
||||
values
|
||||
}
|
||||
|
||||
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
::protobuf::reflect::EnumDescriptor::new("StorageType", file_descriptor_proto())
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::marker::Copy for StorageType {
|
||||
}
|
||||
|
||||
impl ::std::default::Default for StorageType {
|
||||
fn default() -> Self {
|
||||
StorageType::STORAGE_TYPE_UNSPECIFIED
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for StorageType {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
|
||||
}
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n%google/bigtable/admin/v2/common.proto\x12\x18google.bigtable.admin.v2\
|
||||
\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.pr\
|
||||
oto*=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\0\x12\
|
||||
\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02B\xae\x01\n\x1ccom.google.\
|
||||
bigtable.admin.v2B\x0bCommonProtoP\x01Z=google.golang.org/genproto/googl\
|
||||
eapis/bigtable/admin/v2;admin\xaa\x02\x1eGoogle.Cloud.Bigtable.Admin.V2\
|
||||
\xca\x02\x1eGoogle\\Cloud\\Bigtable\\Admin\\V2J\xb2\x08\n\x06\x12\x04\
|
||||
\x0f\0(\x01\n\xbe\x04\n\x01\x0c\x12\x03\x0f\0\x122\xb3\x04\x20Copyright\
|
||||
\x202018\x20Google\x20LLC.\n\n\x20Licensed\x20under\x20the\x20Apache\x20\
|
||||
License,\x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20n\
|
||||
ot\x20use\x20this\x20file\x20except\x20in\x20compliance\x20with\x20the\
|
||||
\x20License.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20Lice\
|
||||
nse\x20at\n\n\x20\x20\x20\x20\x20http://www.apache.org/licenses/LICENSE-\
|
||||
2.0\n\n\x20Unless\x20required\x20by\x20applicable\x20law\x20or\x20agreed\
|
||||
\x20to\x20in\x20writing,\x20software\n\x20distributed\x20under\x20the\
|
||||
\x20License\x20is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\
|
||||
\x20WITHOUT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20e\
|
||||
ither\x20express\x20or\x20implied.\n\x20See\x20the\x20License\x20for\x20\
|
||||
the\x20specific\x20language\x20governing\x20permissions\x20and\n\x20limi\
|
||||
tations\x20under\x20the\x20License.\n\n\n\x08\n\x01\x02\x12\x03\x11\0!\n\
|
||||
\t\n\x02\x03\0\x12\x03\x13\0&\n\t\n\x02\x03\x01\x12\x03\x14\0)\n\x08\n\
|
||||
\x01\x08\x12\x03\x16\0;\n\t\n\x02\x08%\x12\x03\x16\0;\n\x08\n\x01\x08\
|
||||
\x12\x03\x17\0T\n\t\n\x02\x08\x0b\x12\x03\x17\0T\n\x08\n\x01\x08\x12\x03\
|
||||
\x18\0\"\n\t\n\x02\x08\n\x12\x03\x18\0\"\n\x08\n\x01\x08\x12\x03\x19\0,\
|
||||
\n\t\n\x02\x08\x08\x12\x03\x19\0,\n\x08\n\x01\x08\x12\x03\x1a\05\n\t\n\
|
||||
\x02\x08\x01\x12\x03\x1a\05\n\x08\n\x01\x08\x12\x03\x1b\0<\n\t\n\x02\x08\
|
||||
)\x12\x03\x1b\0<\n?\n\x02\x05\0\x12\x04\x1f\0(\x01\x1a3\x20Storage\x20me\
|
||||
dia\x20types\x20for\x20persisting\x20Bigtable\x20data.\n\n\n\n\x03\x05\0\
|
||||
\x01\x12\x03\x1f\x05\x10\n7\n\x04\x05\0\x02\0\x12\x03!\x02\x1f\x1a*\x20T\
|
||||
he\x20user\x20did\x20not\x20specify\x20a\x20storage\x20type.\n\n\x0c\n\
|
||||
\x05\x05\0\x02\0\x01\x12\x03!\x02\x1a\n\x0c\n\x05\x05\0\x02\0\x02\x12\
|
||||
\x03!\x1d\x1e\n2\n\x04\x05\0\x02\x01\x12\x03$\x02\n\x1a%\x20Flash\x20(SS\
|
||||
D)\x20storage\x20should\x20be\x20used.\n\n\x0c\n\x05\x05\0\x02\x01\x01\
|
||||
\x12\x03$\x02\x05\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03$\x08\t\n;\n\x04\
|
||||
\x05\0\x02\x02\x12\x03'\x02\n\x1a.\x20Magnetic\x20drive\x20(HDD)\x20stor\
|
||||
age\x20should\x20be\x20used.\n\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03'\
|
||||
\x02\x05\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03'\x08\tb\x06proto3\
|
||||
";
|
||||
|
||||
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
|
||||
};
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
unsafe {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
}
|
||||
1862
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/instance.rs
vendored
Normal file
1862
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/instance.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/mod.rs
vendored
Normal file
11
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/mod.rs
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
pub mod bigtable_instance_admin;
|
||||
pub mod bigtable_instance_admin_grpc;
|
||||
pub mod bigtable_table_admin;
|
||||
pub mod bigtable_table_admin_grpc;
|
||||
pub mod common;
|
||||
pub mod instance;
|
||||
pub mod table;
|
||||
|
||||
pub(crate) use crate::empty;
|
||||
pub(crate) use crate::iam::v1::{iam_policy, policy};
|
||||
pub(crate) use crate::longrunning::operations;
|
||||
2408
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/table.rs
vendored
Normal file
2408
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/admin/v2/table.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/mod.rs
vendored
Normal file
3
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/mod.rs
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
pub mod admin;
|
||||
pub mod v1;
|
||||
pub mod v2;
|
||||
6797
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v1/bigtable_data.rs
vendored
Normal file
6797
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v1/bigtable_data.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
142
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v1/bigtable_service.rs
vendored
Normal file
142
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v1/bigtable_service.rs
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
// This file is generated by rust-protobuf 2.7.0. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! Generated file from `google/bigtable/v1/bigtable_service.proto`
|
||||
|
||||
use protobuf::Message as Message_imported_for_functions;
|
||||
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n)google/bigtable/v1/bigtable_service.proto\x12\x12google.bigtable.v1\
|
||||
\x1a\x1cgoogle/api/annotations.proto\x1a&google/bigtable/v1/bigtable_dat\
|
||||
a.proto\x1a2google/bigtable/v1/bigtable_service_messages.proto\x1a\x1bgo\
|
||||
ogle/protobuf/empty.proto2\xdd\x08\n\x0fBigtableService\x12\xa5\x01\n\
|
||||
\x08ReadRows\x12#.google.bigtable.v1.ReadRowsRequest\x1a$.google.bigtabl\
|
||||
e.v1.ReadRowsResponse\"L\x82\xd3\xe4\x93\x02F\"A/v1/{table_name=projects\
|
||||
/*/zones/*/clusters/*/tables/*}/rows:read:\x01*0\x01\x12\xb7\x01\n\rSamp\
|
||||
leRowKeys\x12(.google.bigtable.v1.SampleRowKeysRequest\x1a).google.bigta\
|
||||
ble.v1.SampleRowKeysResponse\"O\x82\xd3\xe4\x93\x02I\x12G/v1/{table_name\
|
||||
=projects/*/zones/*/clusters/*/tables/*}/rows:sampleKeys0\x01\x12\xa3\
|
||||
\x01\n\tMutateRow\x12$.google.bigtable.v1.MutateRowRequest\x1a\x16.googl\
|
||||
e.protobuf.Empty\"X\x82\xd3\xe4\x93\x02R\"M/v1/{table_name=projects/*/zo\
|
||||
nes/*/clusters/*/tables/*}/rows/{row_key}:mutate:\x01*\x12\xaa\x01\n\nMu\
|
||||
tateRows\x12%.google.bigtable.v1.MutateRowsRequest\x1a&.google.bigtable.\
|
||||
v1.MutateRowsResponse\"M\x82\xd3\xe4\x93\x02G\"B/v1/{table_name=projects\
|
||||
/*/zones/*/clusters/*/tables/*}:mutateRows:\x01*\x12\xd2\x01\n\x11CheckA\
|
||||
ndMutateRow\x12,.google.bigtable.v1.CheckAndMutateRowRequest\x1a-.google\
|
||||
.bigtable.v1.CheckAndMutateRowResponse\"`\x82\xd3\xe4\x93\x02Z\"U/v1/{ta\
|
||||
ble_name=projects/*/zones/*/clusters/*/tables/*}/rows/{row_key}:checkAnd\
|
||||
Mutate:\x01*\x12\xbf\x01\n\x12ReadModifyWriteRow\x12-.google.bigtable.v1\
|
||||
.ReadModifyWriteRowRequest\x1a\x17.google.bigtable.v1.Row\"a\x82\xd3\xe4\
|
||||
\x93\x02[\"V/v1/{table_name=projects/*/zones/*/clusters/*/tables/*}/rows\
|
||||
/{row_key}:readModifyWrite:\x01*Bp\n\x16com.google.bigtable.v1B\x15Bigta\
|
||||
bleServicesProtoP\x01Z:google.golang.org/genproto/googleapis/bigtable/v1\
|
||||
;bigtable\x88\x01\x01J\xb1\x13\n\x06\x12\x04\x0e\0Z\x01\n\xbd\x04\n\x01\
|
||||
\x0c\x12\x03\x0e\0\x122\xb2\x04\x20Copyright\x202018\x20Google\x20Inc.\n\
|
||||
\n\x20Licensed\x20under\x20the\x20Apache\x20License,\x20Version\x202.0\
|
||||
\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20use\x20this\x20file\
|
||||
\x20except\x20in\x20compliance\x20with\x20the\x20License.\n\x20You\x20ma\
|
||||
y\x20obtain\x20a\x20copy\x20of\x20the\x20License\x20at\n\n\x20\x20\x20\
|
||||
\x20\x20http://www.apache.org/licenses/LICENSE-2.0\n\n\x20Unless\x20requ\
|
||||
ired\x20by\x20applicable\x20law\x20or\x20agreed\x20to\x20in\x20writing,\
|
||||
\x20software\n\x20distributed\x20under\x20the\x20License\x20is\x20distri\
|
||||
buted\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\x20WITHOUT\x20WARRANTIES\
|
||||
\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20either\x20express\x20or\
|
||||
\x20implied.\n\x20See\x20the\x20License\x20for\x20the\x20specific\x20lan\
|
||||
guage\x20governing\x20permissions\x20and\n\x20limitations\x20under\x20th\
|
||||
e\x20License.\n\n\x08\n\x01\x02\x12\x03\x10\0\x1b\n\t\n\x02\x03\0\x12\
|
||||
\x03\x12\0&\n\t\n\x02\x03\x01\x12\x03\x13\00\n\t\n\x02\x03\x02\x12\x03\
|
||||
\x14\0<\n\t\n\x02\x03\x03\x12\x03\x15\0%\n\x08\n\x01\x08\x12\x03\x17\0Q\
|
||||
\n\t\n\x02\x08\x0b\x12\x03\x17\0Q\n\x08\n\x01\x08\x12\x03\x18\0$\n\t\n\
|
||||
\x02\x08\x11\x12\x03\x18\0$\n\x08\n\x01\x08\x12\x03\x19\0\"\n\t\n\x02\
|
||||
\x08\n\x12\x03\x19\0\"\n\x08\n\x01\x08\x12\x03\x1a\06\n\t\n\x02\x08\x08\
|
||||
\x12\x03\x1a\06\n\x08\n\x01\x08\x12\x03\x1b\0/\n\t\n\x02\x08\x01\x12\x03\
|
||||
\x1b\0/\nI\n\x02\x06\0\x12\x04\x1f\0Z\x01\x1a=\x20Service\x20for\x20read\
|
||||
ing\x20from\x20and\x20writing\x20to\x20existing\x20Bigtables.\n\n\n\n\
|
||||
\x03\x06\0\x01\x12\x03\x1f\x08\x17\n\xf5\x01\n\x04\x06\0\x02\0\x12\x04$\
|
||||
\x02)\x03\x1a\xe6\x01\x20Streams\x20back\x20the\x20contents\x20of\x20all\
|
||||
\x20requested\x20rows,\x20optionally\x20applying\n\x20the\x20same\x20Rea\
|
||||
der\x20filter\x20to\x20each.\x20Depending\x20on\x20their\x20size,\x20row\
|
||||
s\x20may\x20be\n\x20broken\x20up\x20across\x20multiple\x20responses,\x20\
|
||||
but\x20atomicity\x20of\x20each\x20row\x20will\x20still\n\x20be\x20preser\
|
||||
ved.\n\n\x0c\n\x05\x06\0\x02\0\x01\x12\x03$\x06\x0e\n\x0c\n\x05\x06\0\
|
||||
\x02\0\x02\x12\x03$\x0f\x1e\n\x0c\n\x05\x06\0\x02\0\x06\x12\x03$)/\n\x0c\
|
||||
\n\x05\x06\0\x02\0\x03\x12\x03$0@\n\r\n\x05\x06\0\x02\0\x04\x12\x04%\x04\
|
||||
(\x06\n\x11\n\t\x06\0\x02\0\x04\xb0\xca\xbc\"\x12\x04%\x04(\x06\n\xed\
|
||||
\x01\n\x04\x06\0\x02\x01\x12\x04/\x023\x03\x1a\xde\x01\x20Returns\x20a\
|
||||
\x20sample\x20of\x20row\x20keys\x20in\x20the\x20table.\x20The\x20returne\
|
||||
d\x20row\x20keys\x20will\n\x20delimit\x20contiguous\x20sections\x20of\
|
||||
\x20the\x20table\x20of\x20approximately\x20equal\x20size,\n\x20which\x20\
|
||||
can\x20be\x20used\x20to\x20break\x20up\x20the\x20data\x20for\x20distribu\
|
||||
ted\x20tasks\x20like\n\x20mapreduces.\n\n\x0c\n\x05\x06\0\x02\x01\x01\
|
||||
\x12\x03/\x06\x13\n\x0c\n\x05\x06\0\x02\x01\x02\x12\x03/\x14(\n\x0c\n\
|
||||
\x05\x06\0\x02\x01\x06\x12\x03/39\n\x0c\n\x05\x06\0\x02\x01\x03\x12\x03/\
|
||||
:O\n\r\n\x05\x06\0\x02\x01\x04\x12\x040\x042\x06\n\x11\n\t\x06\0\x02\x01\
|
||||
\x04\xb0\xca\xbc\"\x12\x040\x042\x06\n\x87\x01\n\x04\x06\0\x02\x02\x12\
|
||||
\x047\x02<\x03\x1ay\x20Mutates\x20a\x20row\x20atomically.\x20Cells\x20al\
|
||||
ready\x20present\x20in\x20the\x20row\x20are\x20left\n\x20unchanged\x20un\
|
||||
less\x20explicitly\x20changed\x20by\x20'mutation'.\n\n\x0c\n\x05\x06\0\
|
||||
\x02\x02\x01\x12\x037\x06\x0f\n\x0c\n\x05\x06\0\x02\x02\x02\x12\x037\x10\
|
||||
\x20\n\x0c\n\x05\x06\0\x02\x02\x03\x12\x037+@\n\r\n\x05\x06\0\x02\x02\
|
||||
\x04\x12\x048\x04;\x06\n\x11\n\t\x06\0\x02\x02\x04\xb0\xca\xbc\"\x12\x04\
|
||||
8\x04;\x06\n\xa0\x01\n\x04\x06\0\x02\x03\x12\x04A\x02F\x03\x1a\x91\x01\
|
||||
\x20Mutates\x20multiple\x20rows\x20in\x20a\x20batch.\x20Each\x20individu\
|
||||
al\x20row\x20is\x20mutated\n\x20atomically\x20as\x20in\x20MutateRow,\x20\
|
||||
but\x20the\x20entire\x20batch\x20is\x20not\x20executed\n\x20atomically.\
|
||||
\n\n\x0c\n\x05\x06\0\x02\x03\x01\x12\x03A\x06\x10\n\x0c\n\x05\x06\0\x02\
|
||||
\x03\x02\x12\x03A\x11\"\n\x0c\n\x05\x06\0\x02\x03\x03\x12\x03A-?\n\r\n\
|
||||
\x05\x06\0\x02\x03\x04\x12\x04B\x04E\x06\n\x11\n\t\x06\0\x02\x03\x04\xb0\
|
||||
\xca\xbc\"\x12\x04B\x04E\x06\nZ\n\x04\x06\0\x02\x04\x12\x04I\x02N\x03\
|
||||
\x1aL\x20Mutates\x20a\x20row\x20atomically\x20based\x20on\x20the\x20outp\
|
||||
ut\x20of\x20a\x20predicate\x20Reader\x20filter.\n\n\x0c\n\x05\x06\0\x02\
|
||||
\x04\x01\x12\x03I\x06\x17\n\x0c\n\x05\x06\0\x02\x04\x02\x12\x03I\x180\n\
|
||||
\x0c\n\x05\x06\0\x02\x04\x03\x12\x03I;T\n\r\n\x05\x06\0\x02\x04\x04\x12\
|
||||
\x04J\x04M\x06\n\x11\n\t\x06\0\x02\x04\x04\xb0\xca\xbc\"\x12\x04J\x04M\
|
||||
\x06\n\x9b\x02\n\x04\x06\0\x02\x05\x12\x04T\x02Y\x03\x1a\x8c\x02\x20Modi\
|
||||
fies\x20a\x20row\x20atomically,\x20reading\x20the\x20latest\x20existing\
|
||||
\x20timestamp/value\x20from\n\x20the\x20specified\x20columns\x20and\x20w\
|
||||
riting\x20a\x20new\x20value\x20at\n\x20max(existing\x20timestamp,\x20cur\
|
||||
rent\x20server\x20time)\x20based\x20on\x20pre-defined\n\x20read/modify/w\
|
||||
rite\x20rules.\x20Returns\x20the\x20new\x20contents\x20of\x20all\x20modi\
|
||||
fied\x20cells.\n\n\x0c\n\x05\x06\0\x02\x05\x01\x12\x03T\x06\x18\n\x0c\n\
|
||||
\x05\x06\0\x02\x05\x02\x12\x03T\x192\n\x0c\n\x05\x06\0\x02\x05\x03\x12\
|
||||
\x03T=@\n\r\n\x05\x06\0\x02\x05\x04\x12\x04U\x04X\x06\n\x11\n\t\x06\0\
|
||||
\x02\x05\x04\xb0\xca\xbc\"\x12\x04U\x04X\x06b\x06proto3\
|
||||
";
|
||||
|
||||
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
|
||||
};
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
unsafe {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
}
|
||||
195
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v1/bigtable_service_grpc.rs
vendored
Normal file
195
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v1/bigtable_service_grpc.rs
vendored
Normal file
@ -0,0 +1,195 @@
|
||||
// This file is generated. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
|
||||
const METHOD_BIGTABLE_SERVICE_READ_ROWS: ::grpcio::Method<super::bigtable_service_messages::ReadRowsRequest, super::bigtable_service_messages::ReadRowsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::ServerStreaming,
|
||||
name: "/google.bigtable.v1.BigtableService/ReadRows",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_SERVICE_SAMPLE_ROW_KEYS: ::grpcio::Method<super::bigtable_service_messages::SampleRowKeysRequest, super::bigtable_service_messages::SampleRowKeysResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::ServerStreaming,
|
||||
name: "/google.bigtable.v1.BigtableService/SampleRowKeys",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_SERVICE_MUTATE_ROW: ::grpcio::Method<super::bigtable_service_messages::MutateRowRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.v1.BigtableService/MutateRow",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_SERVICE_MUTATE_ROWS: ::grpcio::Method<super::bigtable_service_messages::MutateRowsRequest, super::bigtable_service_messages::MutateRowsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.v1.BigtableService/MutateRows",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_SERVICE_CHECK_AND_MUTATE_ROW: ::grpcio::Method<super::bigtable_service_messages::CheckAndMutateRowRequest, super::bigtable_service_messages::CheckAndMutateRowResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.v1.BigtableService/CheckAndMutateRow",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_SERVICE_READ_MODIFY_WRITE_ROW: ::grpcio::Method<super::bigtable_service_messages::ReadModifyWriteRowRequest, super::bigtable_data::Row> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.v1.BigtableService/ReadModifyWriteRow",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct BigtableServiceClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl BigtableServiceClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
BigtableServiceClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn read_rows_opt(&self, req: &super::bigtable_service_messages::ReadRowsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::bigtable_service_messages::ReadRowsResponse>> {
|
||||
self.client.server_streaming(&METHOD_BIGTABLE_SERVICE_READ_ROWS, req, opt)
|
||||
}
|
||||
|
||||
pub fn read_rows(&self, req: &super::bigtable_service_messages::ReadRowsRequest) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::bigtable_service_messages::ReadRowsResponse>> {
|
||||
self.read_rows_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn sample_row_keys_opt(&self, req: &super::bigtable_service_messages::SampleRowKeysRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::bigtable_service_messages::SampleRowKeysResponse>> {
|
||||
self.client.server_streaming(&METHOD_BIGTABLE_SERVICE_SAMPLE_ROW_KEYS, req, opt)
|
||||
}
|
||||
|
||||
pub fn sample_row_keys(&self, req: &super::bigtable_service_messages::SampleRowKeysRequest) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::bigtable_service_messages::SampleRowKeysResponse>> {
|
||||
self.sample_row_keys_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn mutate_row_opt(&self, req: &super::bigtable_service_messages::MutateRowRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_SERVICE_MUTATE_ROW, req, opt)
|
||||
}
|
||||
|
||||
pub fn mutate_row(&self, req: &super::bigtable_service_messages::MutateRowRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.mutate_row_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn mutate_row_async_opt(&self, req: &super::bigtable_service_messages::MutateRowRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_SERVICE_MUTATE_ROW, req, opt)
|
||||
}
|
||||
|
||||
pub fn mutate_row_async(&self, req: &super::bigtable_service_messages::MutateRowRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.mutate_row_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn mutate_rows_opt(&self, req: &super::bigtable_service_messages::MutateRowsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_service_messages::MutateRowsResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_SERVICE_MUTATE_ROWS, req, opt)
|
||||
}
|
||||
|
||||
pub fn mutate_rows(&self, req: &super::bigtable_service_messages::MutateRowsRequest) -> ::grpcio::Result<super::bigtable_service_messages::MutateRowsResponse> {
|
||||
self.mutate_rows_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn mutate_rows_async_opt(&self, req: &super::bigtable_service_messages::MutateRowsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_service_messages::MutateRowsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_SERVICE_MUTATE_ROWS, req, opt)
|
||||
}
|
||||
|
||||
pub fn mutate_rows_async(&self, req: &super::bigtable_service_messages::MutateRowsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_service_messages::MutateRowsResponse>> {
|
||||
self.mutate_rows_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn check_and_mutate_row_opt(&self, req: &super::bigtable_service_messages::CheckAndMutateRowRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_service_messages::CheckAndMutateRowResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_SERVICE_CHECK_AND_MUTATE_ROW, req, opt)
|
||||
}
|
||||
|
||||
pub fn check_and_mutate_row(&self, req: &super::bigtable_service_messages::CheckAndMutateRowRequest) -> ::grpcio::Result<super::bigtable_service_messages::CheckAndMutateRowResponse> {
|
||||
self.check_and_mutate_row_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn check_and_mutate_row_async_opt(&self, req: &super::bigtable_service_messages::CheckAndMutateRowRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_service_messages::CheckAndMutateRowResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_SERVICE_CHECK_AND_MUTATE_ROW, req, opt)
|
||||
}
|
||||
|
||||
pub fn check_and_mutate_row_async(&self, req: &super::bigtable_service_messages::CheckAndMutateRowRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_service_messages::CheckAndMutateRowResponse>> {
|
||||
self.check_and_mutate_row_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn read_modify_write_row_opt(&self, req: &super::bigtable_service_messages::ReadModifyWriteRowRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable_data::Row> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_SERVICE_READ_MODIFY_WRITE_ROW, req, opt)
|
||||
}
|
||||
|
||||
pub fn read_modify_write_row(&self, req: &super::bigtable_service_messages::ReadModifyWriteRowRequest) -> ::grpcio::Result<super::bigtable_data::Row> {
|
||||
self.read_modify_write_row_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn read_modify_write_row_async_opt(&self, req: &super::bigtable_service_messages::ReadModifyWriteRowRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_data::Row>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_SERVICE_READ_MODIFY_WRITE_ROW, req, opt)
|
||||
}
|
||||
|
||||
pub fn read_modify_write_row_async(&self, req: &super::bigtable_service_messages::ReadModifyWriteRowRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable_data::Row>> {
|
||||
self.read_modify_write_row_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait BigtableService {
|
||||
fn read_rows(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_service_messages::ReadRowsRequest, sink: ::grpcio::ServerStreamingSink<super::bigtable_service_messages::ReadRowsResponse>);
|
||||
fn sample_row_keys(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_service_messages::SampleRowKeysRequest, sink: ::grpcio::ServerStreamingSink<super::bigtable_service_messages::SampleRowKeysResponse>);
|
||||
fn mutate_row(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_service_messages::MutateRowRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn mutate_rows(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_service_messages::MutateRowsRequest, sink: ::grpcio::UnarySink<super::bigtable_service_messages::MutateRowsResponse>);
|
||||
fn check_and_mutate_row(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_service_messages::CheckAndMutateRowRequest, sink: ::grpcio::UnarySink<super::bigtable_service_messages::CheckAndMutateRowResponse>);
|
||||
fn read_modify_write_row(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable_service_messages::ReadModifyWriteRowRequest, sink: ::grpcio::UnarySink<super::bigtable_data::Row>);
|
||||
}
|
||||
|
||||
pub fn create_bigtable_service<S: BigtableService + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_server_streaming_handler(&METHOD_BIGTABLE_SERVICE_READ_ROWS, move |ctx, req, resp| {
|
||||
instance.read_rows(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_server_streaming_handler(&METHOD_BIGTABLE_SERVICE_SAMPLE_ROW_KEYS, move |ctx, req, resp| {
|
||||
instance.sample_row_keys(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_SERVICE_MUTATE_ROW, move |ctx, req, resp| {
|
||||
instance.mutate_row(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_SERVICE_MUTATE_ROWS, move |ctx, req, resp| {
|
||||
instance.mutate_rows(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_SERVICE_CHECK_AND_MUTATE_ROW, move |ctx, req, resp| {
|
||||
instance.check_and_mutate_row(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_SERVICE_READ_MODIFY_WRITE_ROW, move |ctx, req, resp| {
|
||||
instance.read_modify_write_row(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
3447
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v1/bigtable_service_messages.rs
vendored
Normal file
3447
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v1/bigtable_service_messages.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v1/mod.rs
vendored
Normal file
7
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v1/mod.rs
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
pub mod bigtable_data;
|
||||
pub mod bigtable_service;
|
||||
pub mod bigtable_service_grpc;
|
||||
pub mod bigtable_service_messages;
|
||||
|
||||
pub(crate) use crate::empty;
|
||||
pub(crate) use crate::rpc::status;
|
||||
4457
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v2/bigtable.rs
vendored
Normal file
4457
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v2/bigtable.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
187
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v2/bigtable_grpc.rs
vendored
Normal file
187
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v2/bigtable_grpc.rs
vendored
Normal file
@ -0,0 +1,187 @@
|
||||
// This file is generated. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
|
||||
const METHOD_BIGTABLE_READ_ROWS: ::grpcio::Method<super::bigtable::ReadRowsRequest, super::bigtable::ReadRowsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::ServerStreaming,
|
||||
name: "/google.bigtable.v2.Bigtable/ReadRows",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_SAMPLE_ROW_KEYS: ::grpcio::Method<super::bigtable::SampleRowKeysRequest, super::bigtable::SampleRowKeysResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::ServerStreaming,
|
||||
name: "/google.bigtable.v2.Bigtable/SampleRowKeys",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_MUTATE_ROW: ::grpcio::Method<super::bigtable::MutateRowRequest, super::bigtable::MutateRowResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.v2.Bigtable/MutateRow",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_MUTATE_ROWS: ::grpcio::Method<super::bigtable::MutateRowsRequest, super::bigtable::MutateRowsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::ServerStreaming,
|
||||
name: "/google.bigtable.v2.Bigtable/MutateRows",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_CHECK_AND_MUTATE_ROW: ::grpcio::Method<super::bigtable::CheckAndMutateRowRequest, super::bigtable::CheckAndMutateRowResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.v2.Bigtable/CheckAndMutateRow",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_BIGTABLE_READ_MODIFY_WRITE_ROW: ::grpcio::Method<super::bigtable::ReadModifyWriteRowRequest, super::bigtable::ReadModifyWriteRowResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.bigtable.v2.Bigtable/ReadModifyWriteRow",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct BigtableClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl BigtableClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
BigtableClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn read_rows_opt(&self, req: &super::bigtable::ReadRowsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::bigtable::ReadRowsResponse>> {
|
||||
self.client.server_streaming(&METHOD_BIGTABLE_READ_ROWS, req, opt)
|
||||
}
|
||||
|
||||
pub fn read_rows(&self, req: &super::bigtable::ReadRowsRequest) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::bigtable::ReadRowsResponse>> {
|
||||
self.read_rows_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn sample_row_keys_opt(&self, req: &super::bigtable::SampleRowKeysRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::bigtable::SampleRowKeysResponse>> {
|
||||
self.client.server_streaming(&METHOD_BIGTABLE_SAMPLE_ROW_KEYS, req, opt)
|
||||
}
|
||||
|
||||
pub fn sample_row_keys(&self, req: &super::bigtable::SampleRowKeysRequest) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::bigtable::SampleRowKeysResponse>> {
|
||||
self.sample_row_keys_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn mutate_row_opt(&self, req: &super::bigtable::MutateRowRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable::MutateRowResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_MUTATE_ROW, req, opt)
|
||||
}
|
||||
|
||||
pub fn mutate_row(&self, req: &super::bigtable::MutateRowRequest) -> ::grpcio::Result<super::bigtable::MutateRowResponse> {
|
||||
self.mutate_row_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn mutate_row_async_opt(&self, req: &super::bigtable::MutateRowRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable::MutateRowResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_MUTATE_ROW, req, opt)
|
||||
}
|
||||
|
||||
pub fn mutate_row_async(&self, req: &super::bigtable::MutateRowRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable::MutateRowResponse>> {
|
||||
self.mutate_row_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn mutate_rows_opt(&self, req: &super::bigtable::MutateRowsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::bigtable::MutateRowsResponse>> {
|
||||
self.client.server_streaming(&METHOD_BIGTABLE_MUTATE_ROWS, req, opt)
|
||||
}
|
||||
|
||||
pub fn mutate_rows(&self, req: &super::bigtable::MutateRowsRequest) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::bigtable::MutateRowsResponse>> {
|
||||
self.mutate_rows_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn check_and_mutate_row_opt(&self, req: &super::bigtable::CheckAndMutateRowRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable::CheckAndMutateRowResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_CHECK_AND_MUTATE_ROW, req, opt)
|
||||
}
|
||||
|
||||
pub fn check_and_mutate_row(&self, req: &super::bigtable::CheckAndMutateRowRequest) -> ::grpcio::Result<super::bigtable::CheckAndMutateRowResponse> {
|
||||
self.check_and_mutate_row_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn check_and_mutate_row_async_opt(&self, req: &super::bigtable::CheckAndMutateRowRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable::CheckAndMutateRowResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_CHECK_AND_MUTATE_ROW, req, opt)
|
||||
}
|
||||
|
||||
pub fn check_and_mutate_row_async(&self, req: &super::bigtable::CheckAndMutateRowRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable::CheckAndMutateRowResponse>> {
|
||||
self.check_and_mutate_row_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn read_modify_write_row_opt(&self, req: &super::bigtable::ReadModifyWriteRowRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::bigtable::ReadModifyWriteRowResponse> {
|
||||
self.client.unary_call(&METHOD_BIGTABLE_READ_MODIFY_WRITE_ROW, req, opt)
|
||||
}
|
||||
|
||||
pub fn read_modify_write_row(&self, req: &super::bigtable::ReadModifyWriteRowRequest) -> ::grpcio::Result<super::bigtable::ReadModifyWriteRowResponse> {
|
||||
self.read_modify_write_row_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn read_modify_write_row_async_opt(&self, req: &super::bigtable::ReadModifyWriteRowRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable::ReadModifyWriteRowResponse>> {
|
||||
self.client.unary_call_async(&METHOD_BIGTABLE_READ_MODIFY_WRITE_ROW, req, opt)
|
||||
}
|
||||
|
||||
pub fn read_modify_write_row_async(&self, req: &super::bigtable::ReadModifyWriteRowRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::bigtable::ReadModifyWriteRowResponse>> {
|
||||
self.read_modify_write_row_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Bigtable {
|
||||
fn read_rows(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable::ReadRowsRequest, sink: ::grpcio::ServerStreamingSink<super::bigtable::ReadRowsResponse>);
|
||||
fn sample_row_keys(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable::SampleRowKeysRequest, sink: ::grpcio::ServerStreamingSink<super::bigtable::SampleRowKeysResponse>);
|
||||
fn mutate_row(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable::MutateRowRequest, sink: ::grpcio::UnarySink<super::bigtable::MutateRowResponse>);
|
||||
fn mutate_rows(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable::MutateRowsRequest, sink: ::grpcio::ServerStreamingSink<super::bigtable::MutateRowsResponse>);
|
||||
fn check_and_mutate_row(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable::CheckAndMutateRowRequest, sink: ::grpcio::UnarySink<super::bigtable::CheckAndMutateRowResponse>);
|
||||
fn read_modify_write_row(&mut self, ctx: ::grpcio::RpcContext, req: super::bigtable::ReadModifyWriteRowRequest, sink: ::grpcio::UnarySink<super::bigtable::ReadModifyWriteRowResponse>);
|
||||
}
|
||||
|
||||
pub fn create_bigtable<S: Bigtable + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_server_streaming_handler(&METHOD_BIGTABLE_READ_ROWS, move |ctx, req, resp| {
|
||||
instance.read_rows(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_server_streaming_handler(&METHOD_BIGTABLE_SAMPLE_ROW_KEYS, move |ctx, req, resp| {
|
||||
instance.sample_row_keys(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_MUTATE_ROW, move |ctx, req, resp| {
|
||||
instance.mutate_row(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_server_streaming_handler(&METHOD_BIGTABLE_MUTATE_ROWS, move |ctx, req, resp| {
|
||||
instance.mutate_rows(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_CHECK_AND_MUTATE_ROW, move |ctx, req, resp| {
|
||||
instance.check_and_mutate_row(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_BIGTABLE_READ_MODIFY_WRITE_ROW, move |ctx, req, resp| {
|
||||
instance.read_modify_write_row(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
7037
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v2/data.rs
vendored
Normal file
7037
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v2/data.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v2/mod.rs
vendored
Normal file
5
vendor/mozilla-rust-sdk/googleapis-raw/src/bigtable/v2/mod.rs
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
pub mod bigtable;
|
||||
pub mod bigtable_grpc;
|
||||
pub mod data;
|
||||
|
||||
pub(crate) use crate::rpc::status;
|
||||
196
vendor/mozilla-rust-sdk/googleapis-raw/src/empty.rs
vendored
Normal file
196
vendor/mozilla-rust-sdk/googleapis-raw/src/empty.rs
vendored
Normal file
@ -0,0 +1,196 @@
|
||||
// This file is generated by rust-protobuf 2.7.0. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! Generated file from `empty.proto`
|
||||
|
||||
use protobuf::Message as Message_imported_for_functions;
|
||||
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct Empty {
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a Empty {
|
||||
fn default() -> &'a Empty {
|
||||
<Empty as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl Empty {
|
||||
pub fn new() -> Empty {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for Empty {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &::std::any::Any {
|
||||
self as &::std::any::Any
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
|
||||
self as &mut ::std::any::Any
|
||||
}
|
||||
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> Empty {
|
||||
Empty::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
let fields = ::std::vec::Vec::new();
|
||||
::protobuf::reflect::MessageDescriptor::new::<Empty>(
|
||||
"Empty",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static Empty {
|
||||
static mut instance: ::protobuf::lazy::Lazy<Empty> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const Empty,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(Empty::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for Empty {
|
||||
fn clear(&mut self) {
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for Empty {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for Empty {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x0bempty.proto\x12\x0cgrpc.testing\"\x07\n\x05EmptyJ\x90\x07\n\x06\
|
||||
\x12\x04\x0f\0\x1b\x10\n\xbf\x04\n\x01\x0c\x12\x03\x0f\0\x122\xb4\x04\
|
||||
\x20Copyright\x202015\x20gRPC\x20authors.\n\n\x20Licensed\x20under\x20th\
|
||||
e\x20Apache\x20License,\x20Version\x202.0\x20(the\x20\"License\");\n\x20\
|
||||
you\x20may\x20not\x20use\x20this\x20file\x20except\x20in\x20compliance\
|
||||
\x20with\x20the\x20License.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\
|
||||
\x20the\x20License\x20at\n\n\x20\x20\x20\x20\x20http://www.apache.org/li\
|
||||
censes/LICENSE-2.0\n\n\x20Unless\x20required\x20by\x20applicable\x20law\
|
||||
\x20or\x20agreed\x20to\x20in\x20writing,\x20software\n\x20distributed\
|
||||
\x20under\x20the\x20License\x20is\x20distributed\x20on\x20an\x20\"AS\x20\
|
||||
IS\"\x20BASIS,\n\x20WITHOUT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20A\
|
||||
NY\x20KIND,\x20either\x20express\x20or\x20implied.\n\x20See\x20the\x20Li\
|
||||
cense\x20for\x20the\x20specific\x20language\x20governing\x20permissions\
|
||||
\x20and\n\x20limitations\x20under\x20the\x20License.\n\n\x08\n\x01\x02\
|
||||
\x12\x03\x11\0\x15\n\xad\x02\n\x02\x04\0\x12\x03\x1b\0\x10\x1a\xa1\x02\
|
||||
\x20An\x20empty\x20message\x20that\x20you\x20can\x20re-use\x20to\x20avoi\
|
||||
d\x20defining\x20duplicated\x20empty\n\x20messages\x20in\x20your\x20proj\
|
||||
ect.\x20A\x20typical\x20example\x20is\x20to\x20use\x20it\x20as\x20argume\
|
||||
nt\x20or\x20the\n\x20return\x20value\x20of\x20a\x20service\x20API.\x20Fo\
|
||||
r\x20instance:\n\n\x20\x20\x20service\x20Foo\x20{\n\x20\x20\x20\x20\x20r\
|
||||
pc\x20Bar\x20(grpc.testing.Empty)\x20returns\x20(grpc.testing.Empty)\x20\
|
||||
{\x20};\n\x20\x20\x20};\n\n\n\n\n\x03\x04\0\x01\x12\x03\x1b\x08\rb\x06pr\
|
||||
oto3\
|
||||
";
|
||||
|
||||
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
|
||||
};
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
unsafe {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
}
|
||||
1
vendor/mozilla-rust-sdk/googleapis-raw/src/iam/mod.rs
vendored
Normal file
1
vendor/mozilla-rust-sdk/googleapis-raw/src/iam/mod.rs
vendored
Normal file
@ -0,0 +1 @@
|
||||
pub mod v1;
|
||||
951
vendor/mozilla-rust-sdk/googleapis-raw/src/iam/v1/iam_policy.rs
vendored
Normal file
951
vendor/mozilla-rust-sdk/googleapis-raw/src/iam/v1/iam_policy.rs
vendored
Normal file
@ -0,0 +1,951 @@
|
||||
// This file is generated by rust-protobuf 2.7.0. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! Generated file from `google/iam/v1/iam_policy.proto`
|
||||
|
||||
use protobuf::Message as Message_imported_for_functions;
|
||||
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct SetIamPolicyRequest {
|
||||
// message fields
|
||||
pub resource: ::std::string::String,
|
||||
pub policy: ::protobuf::SingularPtrField<super::policy::Policy>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a SetIamPolicyRequest {
|
||||
fn default() -> &'a SetIamPolicyRequest {
|
||||
<SetIamPolicyRequest as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl SetIamPolicyRequest {
|
||||
pub fn new() -> SetIamPolicyRequest {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string resource = 1;
|
||||
|
||||
|
||||
pub fn get_resource(&self) -> &str {
|
||||
&self.resource
|
||||
}
|
||||
pub fn clear_resource(&mut self) {
|
||||
self.resource.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_resource(&mut self, v: ::std::string::String) {
|
||||
self.resource = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_resource(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.resource
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_resource(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.resource, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// .google.iam.v1.Policy policy = 2;
|
||||
|
||||
|
||||
pub fn get_policy(&self) -> &super::policy::Policy {
|
||||
self.policy.as_ref().unwrap_or_else(|| super::policy::Policy::default_instance())
|
||||
}
|
||||
pub fn clear_policy(&mut self) {
|
||||
self.policy.clear();
|
||||
}
|
||||
|
||||
pub fn has_policy(&self) -> bool {
|
||||
self.policy.is_some()
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_policy(&mut self, v: super::policy::Policy) {
|
||||
self.policy = ::protobuf::SingularPtrField::some(v);
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_policy(&mut self) -> &mut super::policy::Policy {
|
||||
if self.policy.is_none() {
|
||||
self.policy.set_default();
|
||||
}
|
||||
self.policy.as_mut().unwrap()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_policy(&mut self) -> super::policy::Policy {
|
||||
self.policy.take().unwrap_or_else(|| super::policy::Policy::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for SetIamPolicyRequest {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.policy {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.resource)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.policy)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.resource.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.resource);
|
||||
}
|
||||
if let Some(ref v) = self.policy.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.resource.is_empty() {
|
||||
os.write_string(1, &self.resource)?;
|
||||
}
|
||||
if let Some(ref v) = self.policy.as_ref() {
|
||||
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &::std::any::Any {
|
||||
self as &::std::any::Any
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
|
||||
self as &mut ::std::any::Any
|
||||
}
|
||||
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> SetIamPolicyRequest {
|
||||
SetIamPolicyRequest::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"resource",
|
||||
|m: &SetIamPolicyRequest| { &m.resource },
|
||||
|m: &mut SetIamPolicyRequest| { &mut m.resource },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::policy::Policy>>(
|
||||
"policy",
|
||||
|m: &SetIamPolicyRequest| { &m.policy },
|
||||
|m: &mut SetIamPolicyRequest| { &mut m.policy },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<SetIamPolicyRequest>(
|
||||
"SetIamPolicyRequest",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static SetIamPolicyRequest {
|
||||
static mut instance: ::protobuf::lazy::Lazy<SetIamPolicyRequest> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const SetIamPolicyRequest,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(SetIamPolicyRequest::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for SetIamPolicyRequest {
|
||||
fn clear(&mut self) {
|
||||
self.resource.clear();
|
||||
self.policy.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for SetIamPolicyRequest {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for SetIamPolicyRequest {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct GetIamPolicyRequest {
|
||||
// message fields
|
||||
pub resource: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a GetIamPolicyRequest {
|
||||
fn default() -> &'a GetIamPolicyRequest {
|
||||
<GetIamPolicyRequest as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl GetIamPolicyRequest {
|
||||
pub fn new() -> GetIamPolicyRequest {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string resource = 1;
|
||||
|
||||
|
||||
pub fn get_resource(&self) -> &str {
|
||||
&self.resource
|
||||
}
|
||||
pub fn clear_resource(&mut self) {
|
||||
self.resource.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_resource(&mut self, v: ::std::string::String) {
|
||||
self.resource = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_resource(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.resource
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_resource(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.resource, ::std::string::String::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for GetIamPolicyRequest {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.resource)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.resource.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.resource);
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.resource.is_empty() {
|
||||
os.write_string(1, &self.resource)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &::std::any::Any {
|
||||
self as &::std::any::Any
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
|
||||
self as &mut ::std::any::Any
|
||||
}
|
||||
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> GetIamPolicyRequest {
|
||||
GetIamPolicyRequest::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"resource",
|
||||
|m: &GetIamPolicyRequest| { &m.resource },
|
||||
|m: &mut GetIamPolicyRequest| { &mut m.resource },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<GetIamPolicyRequest>(
|
||||
"GetIamPolicyRequest",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static GetIamPolicyRequest {
|
||||
static mut instance: ::protobuf::lazy::Lazy<GetIamPolicyRequest> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const GetIamPolicyRequest,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(GetIamPolicyRequest::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for GetIamPolicyRequest {
|
||||
fn clear(&mut self) {
|
||||
self.resource.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for GetIamPolicyRequest {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for GetIamPolicyRequest {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct TestIamPermissionsRequest {
|
||||
// message fields
|
||||
pub resource: ::std::string::String,
|
||||
pub permissions: ::protobuf::RepeatedField<::std::string::String>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a TestIamPermissionsRequest {
|
||||
fn default() -> &'a TestIamPermissionsRequest {
|
||||
<TestIamPermissionsRequest as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl TestIamPermissionsRequest {
|
||||
pub fn new() -> TestIamPermissionsRequest {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string resource = 1;
|
||||
|
||||
|
||||
pub fn get_resource(&self) -> &str {
|
||||
&self.resource
|
||||
}
|
||||
pub fn clear_resource(&mut self) {
|
||||
self.resource.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_resource(&mut self, v: ::std::string::String) {
|
||||
self.resource = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_resource(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.resource
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_resource(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.resource, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// repeated string permissions = 2;
|
||||
|
||||
|
||||
pub fn get_permissions(&self) -> &[::std::string::String] {
|
||||
&self.permissions
|
||||
}
|
||||
pub fn clear_permissions(&mut self) {
|
||||
self.permissions.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_permissions(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
|
||||
self.permissions = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_permissions(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
|
||||
&mut self.permissions
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_permissions(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
|
||||
::std::mem::replace(&mut self.permissions, ::protobuf::RepeatedField::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for TestIamPermissionsRequest {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.resource)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.permissions)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.resource.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.resource);
|
||||
}
|
||||
for value in &self.permissions {
|
||||
my_size += ::protobuf::rt::string_size(2, &value);
|
||||
};
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.resource.is_empty() {
|
||||
os.write_string(1, &self.resource)?;
|
||||
}
|
||||
for v in &self.permissions {
|
||||
os.write_string(2, &v)?;
|
||||
};
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &::std::any::Any {
|
||||
self as &::std::any::Any
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
|
||||
self as &mut ::std::any::Any
|
||||
}
|
||||
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> TestIamPermissionsRequest {
|
||||
TestIamPermissionsRequest::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"resource",
|
||||
|m: &TestIamPermissionsRequest| { &m.resource },
|
||||
|m: &mut TestIamPermissionsRequest| { &mut m.resource },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"permissions",
|
||||
|m: &TestIamPermissionsRequest| { &m.permissions },
|
||||
|m: &mut TestIamPermissionsRequest| { &mut m.permissions },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<TestIamPermissionsRequest>(
|
||||
"TestIamPermissionsRequest",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static TestIamPermissionsRequest {
|
||||
static mut instance: ::protobuf::lazy::Lazy<TestIamPermissionsRequest> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const TestIamPermissionsRequest,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(TestIamPermissionsRequest::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for TestIamPermissionsRequest {
|
||||
fn clear(&mut self) {
|
||||
self.resource.clear();
|
||||
self.permissions.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for TestIamPermissionsRequest {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for TestIamPermissionsRequest {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct TestIamPermissionsResponse {
|
||||
// message fields
|
||||
pub permissions: ::protobuf::RepeatedField<::std::string::String>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a TestIamPermissionsResponse {
|
||||
fn default() -> &'a TestIamPermissionsResponse {
|
||||
<TestIamPermissionsResponse as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl TestIamPermissionsResponse {
|
||||
pub fn new() -> TestIamPermissionsResponse {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// repeated string permissions = 1;
|
||||
|
||||
|
||||
pub fn get_permissions(&self) -> &[::std::string::String] {
|
||||
&self.permissions
|
||||
}
|
||||
pub fn clear_permissions(&mut self) {
|
||||
self.permissions.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_permissions(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
|
||||
self.permissions = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_permissions(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
|
||||
&mut self.permissions
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_permissions(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
|
||||
::std::mem::replace(&mut self.permissions, ::protobuf::RepeatedField::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for TestIamPermissionsResponse {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.permissions)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
for value in &self.permissions {
|
||||
my_size += ::protobuf::rt::string_size(1, &value);
|
||||
};
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
for v in &self.permissions {
|
||||
os.write_string(1, &v)?;
|
||||
};
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &::std::any::Any {
|
||||
self as &::std::any::Any
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
|
||||
self as &mut ::std::any::Any
|
||||
}
|
||||
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> TestIamPermissionsResponse {
|
||||
TestIamPermissionsResponse::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"permissions",
|
||||
|m: &TestIamPermissionsResponse| { &m.permissions },
|
||||
|m: &mut TestIamPermissionsResponse| { &mut m.permissions },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<TestIamPermissionsResponse>(
|
||||
"TestIamPermissionsResponse",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static TestIamPermissionsResponse {
|
||||
static mut instance: ::protobuf::lazy::Lazy<TestIamPermissionsResponse> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const TestIamPermissionsResponse,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(TestIamPermissionsResponse::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for TestIamPermissionsResponse {
|
||||
fn clear(&mut self) {
|
||||
self.permissions.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for TestIamPermissionsResponse {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for TestIamPermissionsResponse {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x1egoogle/iam/v1/iam_policy.proto\x12\rgoogle.iam.v1\x1a\x1cgoogle/ap\
|
||||
i/annotations.proto\x1a\x1agoogle/iam/v1/policy.proto\"`\n\x13SetIamPoli\
|
||||
cyRequest\x12\x1a\n\x08resource\x18\x01\x20\x01(\tR\x08resource\x12-\n\
|
||||
\x06policy\x18\x02\x20\x01(\x0b2\x15.google.iam.v1.PolicyR\x06policy\"1\
|
||||
\n\x13GetIamPolicyRequest\x12\x1a\n\x08resource\x18\x01\x20\x01(\tR\x08r\
|
||||
esource\"Y\n\x19TestIamPermissionsRequest\x12\x1a\n\x08resource\x18\x01\
|
||||
\x20\x01(\tR\x08resource\x12\x20\n\x0bpermissions\x18\x02\x20\x03(\tR\
|
||||
\x0bpermissions\">\n\x1aTestIamPermissionsResponse\x12\x20\n\x0bpermissi\
|
||||
ons\x18\x01\x20\x03(\tR\x0bpermissions2\x94\x03\n\tIAMPolicy\x12t\n\x0cS\
|
||||
etIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v\
|
||||
1.Policy\")\x82\xd3\xe4\x93\x02#\"\x1e/v1/{resource=**}:setIamPolicy:\
|
||||
\x01*\x12t\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\
|
||||
\x15.google.iam.v1.Policy\")\x82\xd3\xe4\x93\x02#\"\x1e/v1/{resource=**}\
|
||||
:getIamPolicy:\x01*\x12\x9a\x01\n\x12TestIamPermissions\x12(.google.iam.\
|
||||
v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsRespon\
|
||||
se\"/\x82\xd3\xe4\x93\x02)\"$/v1/{resource=**}:testIamPermissions:\x01*B\
|
||||
\x86\x01\n\x11com.google.iam.v1B\x0eIamPolicyProtoP\x01Z0google.golang.o\
|
||||
rg/genproto/googleapis/iam/v1;iam\xf8\x01\x01\xaa\x02\x13Google.Cloud.Ia\
|
||||
m.V1\xca\x02\x13Google\\Cloud\\Iam\\V1J\xf1\x20\n\x06\x12\x04\x0e\0v\x01\
|
||||
\n\xbd\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb2\x04\x20Copyright\x202016\x20\
|
||||
Google\x20Inc.\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\x20\
|
||||
Version\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20use\
|
||||
\x20this\x20file\x20except\x20in\x20compliance\x20with\x20the\x20License\
|
||||
.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20License\x20at\n\
|
||||
\n\x20\x20\x20\x20\x20http://www.apache.org/licenses/LICENSE-2.0\n\n\x20\
|
||||
Unless\x20required\x20by\x20applicable\x20law\x20or\x20agreed\x20to\x20i\
|
||||
n\x20writing,\x20software\n\x20distributed\x20under\x20the\x20License\
|
||||
\x20is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\x20WITHOUT\
|
||||
\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20either\x20ex\
|
||||
press\x20or\x20implied.\n\x20See\x20the\x20License\x20for\x20the\x20spec\
|
||||
ific\x20language\x20governing\x20permissions\x20and\n\x20limitations\x20\
|
||||
under\x20the\x20License.\n\n\x08\n\x01\x02\x12\x03\x10\0\x16\n\t\n\x02\
|
||||
\x03\0\x12\x03\x12\0&\n\t\n\x02\x03\x01\x12\x03\x13\0$\n\x08\n\x01\x08\
|
||||
\x12\x03\x15\0\x1f\n\t\n\x02\x08\x1f\x12\x03\x15\0\x1f\n\x08\n\x01\x08\
|
||||
\x12\x03\x16\00\n\t\n\x02\x08%\x12\x03\x16\00\n\x08\n\x01\x08\x12\x03\
|
||||
\x17\0G\n\t\n\x02\x08\x0b\x12\x03\x17\0G\n\x08\n\x01\x08\x12\x03\x18\0\"\
|
||||
\n\t\n\x02\x08\n\x12\x03\x18\0\"\n\x08\n\x01\x08\x12\x03\x19\0/\n\t\n\
|
||||
\x02\x08\x08\x12\x03\x19\0/\n\x08\n\x01\x08\x12\x03\x1a\0*\n\t\n\x02\x08\
|
||||
\x01\x12\x03\x1a\0*\n\x08\n\x01\x08\x12\x03\x1b\00\n\t\n\x02\x08)\x12\
|
||||
\x03\x1b\00\n\xbb\x07\n\x02\x06\0\x12\x047\0K\x01\x1a\xae\x07\x20##\x20A\
|
||||
PI\x20Overview\n\n\x20Manages\x20Identity\x20and\x20Access\x20Management\
|
||||
\x20(IAM)\x20policies.\n\n\x20Any\x20implementation\x20of\x20an\x20API\
|
||||
\x20that\x20offers\x20access\x20control\x20features\n\x20implements\x20t\
|
||||
he\x20google.iam.v1.IAMPolicy\x20interface.\n\n\x20##\x20Data\x20model\n\
|
||||
\n\x20Access\x20control\x20is\x20applied\x20when\x20a\x20principal\x20(u\
|
||||
ser\x20or\x20service\x20account),\x20takes\n\x20some\x20action\x20on\x20\
|
||||
a\x20resource\x20exposed\x20by\x20a\x20service.\x20Resources,\x20identif\
|
||||
ied\x20by\n\x20URI-like\x20names,\x20are\x20the\x20unit\x20of\x20access\
|
||||
\x20control\x20specification.\x20Service\n\x20implementations\x20can\x20\
|
||||
choose\x20the\x20granularity\x20of\x20access\x20control\x20and\x20the\n\
|
||||
\x20supported\x20permissions\x20for\x20their\x20resources.\n\x20For\x20e\
|
||||
xample\x20one\x20database\x20service\x20may\x20allow\x20access\x20contro\
|
||||
l\x20to\x20be\n\x20specified\x20only\x20at\x20the\x20Table\x20level,\x20\
|
||||
whereas\x20another\x20might\x20allow\x20access\x20control\n\x20to\x20als\
|
||||
o\x20be\x20specified\x20at\x20the\x20Column\x20level.\n\n\x20##\x20Polic\
|
||||
y\x20Structure\n\n\x20See\x20google.iam.v1.Policy\n\n\x20This\x20is\x20i\
|
||||
ntentionally\x20not\x20a\x20CRUD\x20style\x20API\x20because\x20access\
|
||||
\x20control\x20policies\n\x20are\x20created\x20and\x20deleted\x20implici\
|
||||
tly\x20with\x20the\x20resources\x20to\x20which\x20they\x20are\n\x20attac\
|
||||
hed.\n\n\n\n\x03\x06\0\x01\x12\x037\x08\x11\nh\n\x04\x06\0\x02\0\x12\x04\
|
||||
:\x02<\x03\x1aZ\x20Sets\x20the\x20access\x20control\x20policy\x20on\x20t\
|
||||
he\x20specified\x20resource.\x20Replaces\x20any\n\x20existing\x20policy.\
|
||||
\n\n\x0c\n\x05\x06\0\x02\0\x01\x12\x03:\x06\x12\n\x0c\n\x05\x06\0\x02\0\
|
||||
\x02\x12\x03:\x13&\n\x0c\n\x05\x06\0\x02\0\x03\x12\x03:17\n\x0c\n\x05\
|
||||
\x06\0\x02\0\x04\x12\x03;\x04T\n\x10\n\t\x06\0\x02\0\x04\xb0\xca\xbc\"\
|
||||
\x12\x03;\x04T\n\x90\x01\n\x04\x06\0\x02\x01\x12\x04A\x02C\x03\x1a\x81\
|
||||
\x01\x20Gets\x20the\x20access\x20control\x20policy\x20for\x20a\x20resour\
|
||||
ce.\n\x20Returns\x20an\x20empty\x20policy\x20if\x20the\x20resource\x20ex\
|
||||
ists\x20and\x20does\x20not\x20have\x20a\x20policy\n\x20set.\n\n\x0c\n\
|
||||
\x05\x06\0\x02\x01\x01\x12\x03A\x06\x12\n\x0c\n\x05\x06\0\x02\x01\x02\
|
||||
\x12\x03A\x13&\n\x0c\n\x05\x06\0\x02\x01\x03\x12\x03A17\n\x0c\n\x05\x06\
|
||||
\0\x02\x01\x04\x12\x03B\x04T\n\x10\n\t\x06\0\x02\x01\x04\xb0\xca\xbc\"\
|
||||
\x12\x03B\x04T\n\xb8\x01\n\x04\x06\0\x02\x02\x12\x04H\x02J\x03\x1a\xa9\
|
||||
\x01\x20Returns\x20permissions\x20that\x20a\x20caller\x20has\x20on\x20th\
|
||||
e\x20specified\x20resource.\n\x20If\x20the\x20resource\x20does\x20not\
|
||||
\x20exist,\x20this\x20will\x20return\x20an\x20empty\x20set\x20of\n\x20pe\
|
||||
rmissions,\x20not\x20a\x20NOT_FOUND\x20error.\n\n\x0c\n\x05\x06\0\x02\
|
||||
\x02\x01\x12\x03H\x06\x18\n\x0c\n\x05\x06\0\x02\x02\x02\x12\x03H\x192\n\
|
||||
\x0c\n\x05\x06\0\x02\x02\x03\x12\x03H=W\n\x0c\n\x05\x06\0\x02\x02\x04\
|
||||
\x12\x03I\x04Z\n\x10\n\t\x06\0\x02\x02\x04\xb0\xca\xbc\"\x12\x03I\x04Z\n\
|
||||
8\n\x02\x04\0\x12\x04N\0Y\x01\x1a,\x20Request\x20message\x20for\x20`SetI\
|
||||
amPolicy`\x20method.\n\n\n\n\x03\x04\0\x01\x12\x03N\x08\x1b\n\xc2\x01\n\
|
||||
\x04\x04\0\x02\0\x12\x03R\x02\x16\x1a\xb4\x01\x20REQUIRED:\x20The\x20res\
|
||||
ource\x20for\x20which\x20the\x20policy\x20is\x20being\x20specified.\n\
|
||||
\x20`resource`\x20is\x20usually\x20specified\x20as\x20a\x20path.\x20For\
|
||||
\x20example,\x20a\x20Project\n\x20resource\x20is\x20specified\x20as\x20`\
|
||||
projects/{project}`.\n\n\r\n\x05\x04\0\x02\0\x04\x12\x04R\x02N\x1d\n\x0c\
|
||||
\n\x05\x04\0\x02\0\x05\x12\x03R\x02\x08\n\x0c\n\x05\x04\0\x02\0\x01\x12\
|
||||
\x03R\t\x11\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03R\x14\x15\n\xf3\x01\n\x04\
|
||||
\x04\0\x02\x01\x12\x03X\x02\x14\x1a\xe5\x01\x20REQUIRED:\x20The\x20compl\
|
||||
ete\x20policy\x20to\x20be\x20applied\x20to\x20the\x20`resource`.\x20The\
|
||||
\x20size\x20of\n\x20the\x20policy\x20is\x20limited\x20to\x20a\x20few\x20\
|
||||
10s\x20of\x20KB.\x20An\x20empty\x20policy\x20is\x20a\n\x20valid\x20polic\
|
||||
y\x20but\x20certain\x20Cloud\x20Platform\x20services\x20(such\x20as\x20P\
|
||||
rojects)\n\x20might\x20reject\x20them.\n\n\r\n\x05\x04\0\x02\x01\x04\x12\
|
||||
\x04X\x02R\x16\n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03X\x02\x08\n\x0c\n\
|
||||
\x05\x04\0\x02\x01\x01\x12\x03X\t\x0f\n\x0c\n\x05\x04\0\x02\x01\x03\x12\
|
||||
\x03X\x12\x13\n8\n\x02\x04\x01\x12\x04\\\0a\x01\x1a,\x20Request\x20messa\
|
||||
ge\x20for\x20`GetIamPolicy`\x20method.\n\n\n\n\x03\x04\x01\x01\x12\x03\\\
|
||||
\x08\x1b\n\xc2\x01\n\x04\x04\x01\x02\0\x12\x03`\x02\x16\x1a\xb4\x01\x20R\
|
||||
EQUIRED:\x20The\x20resource\x20for\x20which\x20the\x20policy\x20is\x20be\
|
||||
ing\x20requested.\n\x20`resource`\x20is\x20usually\x20specified\x20as\
|
||||
\x20a\x20path.\x20For\x20example,\x20a\x20Project\n\x20resource\x20is\
|
||||
\x20specified\x20as\x20`projects/{project}`.\n\n\r\n\x05\x04\x01\x02\0\
|
||||
\x04\x12\x04`\x02\\\x1d\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03`\x02\x08\n\
|
||||
\x0c\n\x05\x04\x01\x02\0\x01\x12\x03`\t\x11\n\x0c\n\x05\x04\x01\x02\0\
|
||||
\x03\x12\x03`\x14\x15\n>\n\x02\x04\x02\x12\x04d\0o\x01\x1a2\x20Request\
|
||||
\x20message\x20for\x20`TestIamPermissions`\x20method.\n\n\n\n\x03\x04\
|
||||
\x02\x01\x12\x03d\x08!\n\xc9\x01\n\x04\x04\x02\x02\0\x12\x03h\x02\x16\
|
||||
\x1a\xbb\x01\x20REQUIRED:\x20The\x20resource\x20for\x20which\x20the\x20p\
|
||||
olicy\x20detail\x20is\x20being\x20requested.\n\x20`resource`\x20is\x20us\
|
||||
ually\x20specified\x20as\x20a\x20path.\x20For\x20example,\x20a\x20Projec\
|
||||
t\n\x20resource\x20is\x20specified\x20as\x20`projects/{project}`.\n\n\r\
|
||||
\n\x05\x04\x02\x02\0\x04\x12\x04h\x02d#\n\x0c\n\x05\x04\x02\x02\0\x05\
|
||||
\x12\x03h\x02\x08\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03h\t\x11\n\x0c\n\
|
||||
\x05\x04\x02\x02\0\x03\x12\x03h\x14\x15\n\xf0\x01\n\x04\x04\x02\x02\x01\
|
||||
\x12\x03n\x02\"\x1a\xe2\x01\x20The\x20set\x20of\x20permissions\x20to\x20\
|
||||
check\x20for\x20the\x20`resource`.\x20Permissions\x20with\n\x20wildcards\
|
||||
\x20(such\x20as\x20'*'\x20or\x20'storage.*')\x20are\x20not\x20allowed.\
|
||||
\x20For\x20more\n\x20information\x20see\n\x20[IAM\x20Overview](https://c\
|
||||
loud.google.com/iam/docs/overview#permissions).\n\n\x0c\n\x05\x04\x02\
|
||||
\x02\x01\x04\x12\x03n\x02\n\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03n\x0b\
|
||||
\x11\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03n\x12\x1d\n\x0c\n\x05\x04\
|
||||
\x02\x02\x01\x03\x12\x03n\x20!\n?\n\x02\x04\x03\x12\x04r\0v\x01\x1a3\x20\
|
||||
Response\x20message\x20for\x20`TestIamPermissions`\x20method.\n\n\n\n\
|
||||
\x03\x04\x03\x01\x12\x03r\x08\"\n\\\n\x04\x04\x03\x02\0\x12\x03u\x02\"\
|
||||
\x1aO\x20A\x20subset\x20of\x20`TestPermissionsRequest.permissions`\x20th\
|
||||
at\x20the\x20caller\x20is\n\x20allowed.\n\n\x0c\n\x05\x04\x03\x02\0\x04\
|
||||
\x12\x03u\x02\n\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03u\x0b\x11\n\x0c\n\
|
||||
\x05\x04\x03\x02\0\x01\x12\x03u\x12\x1d\n\x0c\n\x05\x04\x03\x02\0\x03\
|
||||
\x12\x03u\x20!b\x06proto3\
|
||||
";
|
||||
|
||||
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
|
||||
};
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
unsafe {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
}
|
||||
127
vendor/mozilla-rust-sdk/googleapis-raw/src/iam/v1/iam_policy_grpc.rs
vendored
Normal file
127
vendor/mozilla-rust-sdk/googleapis-raw/src/iam/v1/iam_policy_grpc.rs
vendored
Normal file
@ -0,0 +1,127 @@
|
||||
// This file is generated. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
|
||||
const METHOD_IAM_POLICY_SET_IAM_POLICY: ::grpcio::Method<super::iam_policy::SetIamPolicyRequest, super::policy::Policy> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.iam.v1.IAMPolicy/SetIamPolicy",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_IAM_POLICY_GET_IAM_POLICY: ::grpcio::Method<super::iam_policy::GetIamPolicyRequest, super::policy::Policy> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.iam.v1.IAMPolicy/GetIamPolicy",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_IAM_POLICY_TEST_IAM_PERMISSIONS: ::grpcio::Method<super::iam_policy::TestIamPermissionsRequest, super::iam_policy::TestIamPermissionsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.iam.v1.IAMPolicy/TestIamPermissions",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct IamPolicyClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl IamPolicyClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
IamPolicyClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_iam_policy_opt(&self, req: &super::iam_policy::SetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.client.unary_call(&METHOD_IAM_POLICY_SET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn set_iam_policy(&self, req: &super::iam_policy::SetIamPolicyRequest) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.set_iam_policy_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn set_iam_policy_async_opt(&self, req: &super::iam_policy::SetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.client.unary_call_async(&METHOD_IAM_POLICY_SET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn set_iam_policy_async(&self, req: &super::iam_policy::SetIamPolicyRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.set_iam_policy_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_iam_policy_opt(&self, req: &super::iam_policy::GetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.client.unary_call(&METHOD_IAM_POLICY_GET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_iam_policy(&self, req: &super::iam_policy::GetIamPolicyRequest) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.get_iam_policy_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_iam_policy_async_opt(&self, req: &super::iam_policy::GetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.client.unary_call_async(&METHOD_IAM_POLICY_GET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_iam_policy_async(&self, req: &super::iam_policy::GetIamPolicyRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.get_iam_policy_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions_opt(&self, req: &super::iam_policy::TestIamPermissionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::iam_policy::TestIamPermissionsResponse> {
|
||||
self.client.unary_call(&METHOD_IAM_POLICY_TEST_IAM_PERMISSIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions(&self, req: &super::iam_policy::TestIamPermissionsRequest) -> ::grpcio::Result<super::iam_policy::TestIamPermissionsResponse> {
|
||||
self.test_iam_permissions_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions_async_opt(&self, req: &super::iam_policy::TestIamPermissionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::iam_policy::TestIamPermissionsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_IAM_POLICY_TEST_IAM_PERMISSIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions_async(&self, req: &super::iam_policy::TestIamPermissionsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::iam_policy::TestIamPermissionsResponse>> {
|
||||
self.test_iam_permissions_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait IamPolicy {
|
||||
fn set_iam_policy(&mut self, ctx: ::grpcio::RpcContext, req: super::iam_policy::SetIamPolicyRequest, sink: ::grpcio::UnarySink<super::policy::Policy>);
|
||||
fn get_iam_policy(&mut self, ctx: ::grpcio::RpcContext, req: super::iam_policy::GetIamPolicyRequest, sink: ::grpcio::UnarySink<super::policy::Policy>);
|
||||
fn test_iam_permissions(&mut self, ctx: ::grpcio::RpcContext, req: super::iam_policy::TestIamPermissionsRequest, sink: ::grpcio::UnarySink<super::iam_policy::TestIamPermissionsResponse>);
|
||||
}
|
||||
|
||||
pub fn create_iam_policy<S: IamPolicy + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_IAM_POLICY_SET_IAM_POLICY, move |ctx, req, resp| {
|
||||
instance.set_iam_policy(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_IAM_POLICY_GET_IAM_POLICY, move |ctx, req, resp| {
|
||||
instance.get_iam_policy(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_IAM_POLICY_TEST_IAM_PERMISSIONS, move |ctx, req, resp| {
|
||||
instance.test_iam_permissions(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
3
vendor/mozilla-rust-sdk/googleapis-raw/src/iam/v1/mod.rs
vendored
Normal file
3
vendor/mozilla-rust-sdk/googleapis-raw/src/iam/v1/mod.rs
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
pub mod iam_policy;
|
||||
pub mod iam_policy_grpc;
|
||||
pub mod policy;
|
||||
1143
vendor/mozilla-rust-sdk/googleapis-raw/src/iam/v1/policy.rs
vendored
Normal file
1143
vendor/mozilla-rust-sdk/googleapis-raw/src/iam/v1/policy.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
vendor/mozilla-rust-sdk/googleapis-raw/src/lib.rs
vendored
Normal file
10
vendor/mozilla-rust-sdk/googleapis-raw/src/lib.rs
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
#![allow(bare_trait_objects)]
|
||||
|
||||
pub mod bigtable;
|
||||
pub mod pubsub;
|
||||
pub mod spanner;
|
||||
|
||||
pub mod empty;
|
||||
pub(crate) mod iam;
|
||||
pub mod longrunning;
|
||||
pub(crate) mod rpc;
|
||||
4
vendor/mozilla-rust-sdk/googleapis-raw/src/longrunning/mod.rs
vendored
Normal file
4
vendor/mozilla-rust-sdk/googleapis-raw/src/longrunning/mod.rs
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
pub mod operations;
|
||||
pub mod operations_grpc;
|
||||
|
||||
pub(crate) use crate::{empty, rpc::status};
|
||||
1700
vendor/mozilla-rust-sdk/googleapis-raw/src/longrunning/operations.rs
vendored
Normal file
1700
vendor/mozilla-rust-sdk/googleapis-raw/src/longrunning/operations.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
155
vendor/mozilla-rust-sdk/googleapis-raw/src/longrunning/operations_grpc.rs
vendored
Normal file
155
vendor/mozilla-rust-sdk/googleapis-raw/src/longrunning/operations_grpc.rs
vendored
Normal file
@ -0,0 +1,155 @@
|
||||
// This file is generated. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
|
||||
const METHOD_OPERATIONS_LIST_OPERATIONS: ::grpcio::Method<super::operations::ListOperationsRequest, super::operations::ListOperationsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.longrunning.Operations/ListOperations",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_OPERATIONS_GET_OPERATION: ::grpcio::Method<super::operations::GetOperationRequest, super::operations::Operation> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.longrunning.Operations/GetOperation",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_OPERATIONS_DELETE_OPERATION: ::grpcio::Method<super::operations::DeleteOperationRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.longrunning.Operations/DeleteOperation",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_OPERATIONS_CANCEL_OPERATION: ::grpcio::Method<super::operations::CancelOperationRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.longrunning.Operations/CancelOperation",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct OperationsClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl OperationsClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
OperationsClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn list_operations_opt(&self, req: &super::operations::ListOperationsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::operations::ListOperationsResponse> {
|
||||
self.client.unary_call(&METHOD_OPERATIONS_LIST_OPERATIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_operations(&self, req: &super::operations::ListOperationsRequest) -> ::grpcio::Result<super::operations::ListOperationsResponse> {
|
||||
self.list_operations_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_operations_async_opt(&self, req: &super::operations::ListOperationsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::ListOperationsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_OPERATIONS_LIST_OPERATIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_operations_async(&self, req: &super::operations::ListOperationsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::ListOperationsResponse>> {
|
||||
self.list_operations_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_operation_opt(&self, req: &super::operations::GetOperationRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.client.unary_call(&METHOD_OPERATIONS_GET_OPERATION, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_operation(&self, req: &super::operations::GetOperationRequest) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.get_operation_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_operation_async_opt(&self, req: &super::operations::GetOperationRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.client.unary_call_async(&METHOD_OPERATIONS_GET_OPERATION, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_operation_async(&self, req: &super::operations::GetOperationRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.get_operation_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_operation_opt(&self, req: &super::operations::DeleteOperationRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_OPERATIONS_DELETE_OPERATION, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_operation(&self, req: &super::operations::DeleteOperationRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_operation_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_operation_async_opt(&self, req: &super::operations::DeleteOperationRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_OPERATIONS_DELETE_OPERATION, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_operation_async(&self, req: &super::operations::DeleteOperationRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_operation_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn cancel_operation_opt(&self, req: &super::operations::CancelOperationRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_OPERATIONS_CANCEL_OPERATION, req, opt)
|
||||
}
|
||||
|
||||
pub fn cancel_operation(&self, req: &super::operations::CancelOperationRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.cancel_operation_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn cancel_operation_async_opt(&self, req: &super::operations::CancelOperationRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_OPERATIONS_CANCEL_OPERATION, req, opt)
|
||||
}
|
||||
|
||||
pub fn cancel_operation_async(&self, req: &super::operations::CancelOperationRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.cancel_operation_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Operations {
|
||||
fn list_operations(&mut self, ctx: ::grpcio::RpcContext, req: super::operations::ListOperationsRequest, sink: ::grpcio::UnarySink<super::operations::ListOperationsResponse>);
|
||||
fn get_operation(&mut self, ctx: ::grpcio::RpcContext, req: super::operations::GetOperationRequest, sink: ::grpcio::UnarySink<super::operations::Operation>);
|
||||
fn delete_operation(&mut self, ctx: ::grpcio::RpcContext, req: super::operations::DeleteOperationRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn cancel_operation(&mut self, ctx: ::grpcio::RpcContext, req: super::operations::CancelOperationRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
}
|
||||
|
||||
pub fn create_operations<S: Operations + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_OPERATIONS_LIST_OPERATIONS, move |ctx, req, resp| {
|
||||
instance.list_operations(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_OPERATIONS_GET_OPERATION, move |ctx, req, resp| {
|
||||
instance.get_operation(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_OPERATIONS_DELETE_OPERATION, move |ctx, req, resp| {
|
||||
instance.delete_operation(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_OPERATIONS_CANCEL_OPERATION, move |ctx, req, resp| {
|
||||
instance.cancel_operation(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
2
vendor/mozilla-rust-sdk/googleapis-raw/src/pubsub/mod.rs
vendored
Normal file
2
vendor/mozilla-rust-sdk/googleapis-raw/src/pubsub/mod.rs
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
pub mod v1;
|
||||
pub mod v1beta2;
|
||||
4
vendor/mozilla-rust-sdk/googleapis-raw/src/pubsub/v1/mod.rs
vendored
Normal file
4
vendor/mozilla-rust-sdk/googleapis-raw/src/pubsub/v1/mod.rs
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
pub mod pubsub;
|
||||
pub mod pubsub_grpc;
|
||||
|
||||
pub(crate) use crate::empty;
|
||||
10230
vendor/mozilla-rust-sdk/googleapis-raw/src/pubsub/v1/pubsub.rs
vendored
Normal file
10230
vendor/mozilla-rust-sdk/googleapis-raw/src/pubsub/v1/pubsub.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
731
vendor/mozilla-rust-sdk/googleapis-raw/src/pubsub/v1/pubsub_grpc.rs
vendored
Normal file
731
vendor/mozilla-rust-sdk/googleapis-raw/src/pubsub/v1/pubsub_grpc.rs
vendored
Normal file
@ -0,0 +1,731 @@
|
||||
// This file is generated. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
|
||||
const METHOD_PUBLISHER_CREATE_TOPIC: ::grpcio::Method<super::pubsub::Topic, super::pubsub::Topic> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Publisher/CreateTopic",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_PUBLISHER_UPDATE_TOPIC: ::grpcio::Method<super::pubsub::UpdateTopicRequest, super::pubsub::Topic> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Publisher/UpdateTopic",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_PUBLISHER_PUBLISH: ::grpcio::Method<super::pubsub::PublishRequest, super::pubsub::PublishResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Publisher/Publish",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_PUBLISHER_GET_TOPIC: ::grpcio::Method<super::pubsub::GetTopicRequest, super::pubsub::Topic> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Publisher/GetTopic",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_PUBLISHER_LIST_TOPICS: ::grpcio::Method<super::pubsub::ListTopicsRequest, super::pubsub::ListTopicsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Publisher/ListTopics",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_PUBLISHER_LIST_TOPIC_SUBSCRIPTIONS: ::grpcio::Method<super::pubsub::ListTopicSubscriptionsRequest, super::pubsub::ListTopicSubscriptionsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Publisher/ListTopicSubscriptions",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_PUBLISHER_LIST_TOPIC_SNAPSHOTS: ::grpcio::Method<super::pubsub::ListTopicSnapshotsRequest, super::pubsub::ListTopicSnapshotsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Publisher/ListTopicSnapshots",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_PUBLISHER_DELETE_TOPIC: ::grpcio::Method<super::pubsub::DeleteTopicRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Publisher/DeleteTopic",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct PublisherClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl PublisherClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
PublisherClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create_topic_opt(&self, req: &super::pubsub::Topic, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::Topic> {
|
||||
self.client.unary_call(&METHOD_PUBLISHER_CREATE_TOPIC, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_topic(&self, req: &super::pubsub::Topic) -> ::grpcio::Result<super::pubsub::Topic> {
|
||||
self.create_topic_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_topic_async_opt(&self, req: &super::pubsub::Topic, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Topic>> {
|
||||
self.client.unary_call_async(&METHOD_PUBLISHER_CREATE_TOPIC, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_topic_async(&self, req: &super::pubsub::Topic) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Topic>> {
|
||||
self.create_topic_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_topic_opt(&self, req: &super::pubsub::UpdateTopicRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::Topic> {
|
||||
self.client.unary_call(&METHOD_PUBLISHER_UPDATE_TOPIC, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_topic(&self, req: &super::pubsub::UpdateTopicRequest) -> ::grpcio::Result<super::pubsub::Topic> {
|
||||
self.update_topic_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_topic_async_opt(&self, req: &super::pubsub::UpdateTopicRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Topic>> {
|
||||
self.client.unary_call_async(&METHOD_PUBLISHER_UPDATE_TOPIC, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_topic_async(&self, req: &super::pubsub::UpdateTopicRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Topic>> {
|
||||
self.update_topic_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn publish_opt(&self, req: &super::pubsub::PublishRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::PublishResponse> {
|
||||
self.client.unary_call(&METHOD_PUBLISHER_PUBLISH, req, opt)
|
||||
}
|
||||
|
||||
pub fn publish(&self, req: &super::pubsub::PublishRequest) -> ::grpcio::Result<super::pubsub::PublishResponse> {
|
||||
self.publish_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn publish_async_opt(&self, req: &super::pubsub::PublishRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::PublishResponse>> {
|
||||
self.client.unary_call_async(&METHOD_PUBLISHER_PUBLISH, req, opt)
|
||||
}
|
||||
|
||||
pub fn publish_async(&self, req: &super::pubsub::PublishRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::PublishResponse>> {
|
||||
self.publish_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_topic_opt(&self, req: &super::pubsub::GetTopicRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::Topic> {
|
||||
self.client.unary_call(&METHOD_PUBLISHER_GET_TOPIC, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_topic(&self, req: &super::pubsub::GetTopicRequest) -> ::grpcio::Result<super::pubsub::Topic> {
|
||||
self.get_topic_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_topic_async_opt(&self, req: &super::pubsub::GetTopicRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Topic>> {
|
||||
self.client.unary_call_async(&METHOD_PUBLISHER_GET_TOPIC, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_topic_async(&self, req: &super::pubsub::GetTopicRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Topic>> {
|
||||
self.get_topic_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_topics_opt(&self, req: &super::pubsub::ListTopicsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::ListTopicsResponse> {
|
||||
self.client.unary_call(&METHOD_PUBLISHER_LIST_TOPICS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_topics(&self, req: &super::pubsub::ListTopicsRequest) -> ::grpcio::Result<super::pubsub::ListTopicsResponse> {
|
||||
self.list_topics_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_topics_async_opt(&self, req: &super::pubsub::ListTopicsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListTopicsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_PUBLISHER_LIST_TOPICS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_topics_async(&self, req: &super::pubsub::ListTopicsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListTopicsResponse>> {
|
||||
self.list_topics_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_topic_subscriptions_opt(&self, req: &super::pubsub::ListTopicSubscriptionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::ListTopicSubscriptionsResponse> {
|
||||
self.client.unary_call(&METHOD_PUBLISHER_LIST_TOPIC_SUBSCRIPTIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_topic_subscriptions(&self, req: &super::pubsub::ListTopicSubscriptionsRequest) -> ::grpcio::Result<super::pubsub::ListTopicSubscriptionsResponse> {
|
||||
self.list_topic_subscriptions_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_topic_subscriptions_async_opt(&self, req: &super::pubsub::ListTopicSubscriptionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListTopicSubscriptionsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_PUBLISHER_LIST_TOPIC_SUBSCRIPTIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_topic_subscriptions_async(&self, req: &super::pubsub::ListTopicSubscriptionsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListTopicSubscriptionsResponse>> {
|
||||
self.list_topic_subscriptions_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_topic_snapshots_opt(&self, req: &super::pubsub::ListTopicSnapshotsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::ListTopicSnapshotsResponse> {
|
||||
self.client.unary_call(&METHOD_PUBLISHER_LIST_TOPIC_SNAPSHOTS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_topic_snapshots(&self, req: &super::pubsub::ListTopicSnapshotsRequest) -> ::grpcio::Result<super::pubsub::ListTopicSnapshotsResponse> {
|
||||
self.list_topic_snapshots_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_topic_snapshots_async_opt(&self, req: &super::pubsub::ListTopicSnapshotsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListTopicSnapshotsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_PUBLISHER_LIST_TOPIC_SNAPSHOTS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_topic_snapshots_async(&self, req: &super::pubsub::ListTopicSnapshotsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListTopicSnapshotsResponse>> {
|
||||
self.list_topic_snapshots_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_topic_opt(&self, req: &super::pubsub::DeleteTopicRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_PUBLISHER_DELETE_TOPIC, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_topic(&self, req: &super::pubsub::DeleteTopicRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_topic_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_topic_async_opt(&self, req: &super::pubsub::DeleteTopicRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_PUBLISHER_DELETE_TOPIC, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_topic_async(&self, req: &super::pubsub::DeleteTopicRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_topic_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Publisher {
|
||||
fn create_topic(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::Topic, sink: ::grpcio::UnarySink<super::pubsub::Topic>);
|
||||
fn update_topic(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::UpdateTopicRequest, sink: ::grpcio::UnarySink<super::pubsub::Topic>);
|
||||
fn publish(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::PublishRequest, sink: ::grpcio::UnarySink<super::pubsub::PublishResponse>);
|
||||
fn get_topic(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::GetTopicRequest, sink: ::grpcio::UnarySink<super::pubsub::Topic>);
|
||||
fn list_topics(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::ListTopicsRequest, sink: ::grpcio::UnarySink<super::pubsub::ListTopicsResponse>);
|
||||
fn list_topic_subscriptions(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::ListTopicSubscriptionsRequest, sink: ::grpcio::UnarySink<super::pubsub::ListTopicSubscriptionsResponse>);
|
||||
fn list_topic_snapshots(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::ListTopicSnapshotsRequest, sink: ::grpcio::UnarySink<super::pubsub::ListTopicSnapshotsResponse>);
|
||||
fn delete_topic(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::DeleteTopicRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
}
|
||||
|
||||
pub fn create_publisher<S: Publisher + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_PUBLISHER_CREATE_TOPIC, move |ctx, req, resp| {
|
||||
instance.create_topic(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_PUBLISHER_UPDATE_TOPIC, move |ctx, req, resp| {
|
||||
instance.update_topic(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_PUBLISHER_PUBLISH, move |ctx, req, resp| {
|
||||
instance.publish(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_PUBLISHER_GET_TOPIC, move |ctx, req, resp| {
|
||||
instance.get_topic(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_PUBLISHER_LIST_TOPICS, move |ctx, req, resp| {
|
||||
instance.list_topics(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_PUBLISHER_LIST_TOPIC_SUBSCRIPTIONS, move |ctx, req, resp| {
|
||||
instance.list_topic_subscriptions(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_PUBLISHER_LIST_TOPIC_SNAPSHOTS, move |ctx, req, resp| {
|
||||
instance.list_topic_snapshots(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_PUBLISHER_DELETE_TOPIC, move |ctx, req, resp| {
|
||||
instance.delete_topic(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
|
||||
const METHOD_SUBSCRIBER_CREATE_SUBSCRIPTION: ::grpcio::Method<super::pubsub::Subscription, super::pubsub::Subscription> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/CreateSubscription",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_GET_SUBSCRIPTION: ::grpcio::Method<super::pubsub::GetSubscriptionRequest, super::pubsub::Subscription> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/GetSubscription",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_UPDATE_SUBSCRIPTION: ::grpcio::Method<super::pubsub::UpdateSubscriptionRequest, super::pubsub::Subscription> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/UpdateSubscription",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_LIST_SUBSCRIPTIONS: ::grpcio::Method<super::pubsub::ListSubscriptionsRequest, super::pubsub::ListSubscriptionsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/ListSubscriptions",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_DELETE_SUBSCRIPTION: ::grpcio::Method<super::pubsub::DeleteSubscriptionRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/DeleteSubscription",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_MODIFY_ACK_DEADLINE: ::grpcio::Method<super::pubsub::ModifyAckDeadlineRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/ModifyAckDeadline",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_ACKNOWLEDGE: ::grpcio::Method<super::pubsub::AcknowledgeRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/Acknowledge",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_PULL: ::grpcio::Method<super::pubsub::PullRequest, super::pubsub::PullResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/Pull",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_STREAMING_PULL: ::grpcio::Method<super::pubsub::StreamingPullRequest, super::pubsub::StreamingPullResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Duplex,
|
||||
name: "/google.pubsub.v1.Subscriber/StreamingPull",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_MODIFY_PUSH_CONFIG: ::grpcio::Method<super::pubsub::ModifyPushConfigRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/ModifyPushConfig",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_GET_SNAPSHOT: ::grpcio::Method<super::pubsub::GetSnapshotRequest, super::pubsub::Snapshot> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/GetSnapshot",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_LIST_SNAPSHOTS: ::grpcio::Method<super::pubsub::ListSnapshotsRequest, super::pubsub::ListSnapshotsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/ListSnapshots",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_CREATE_SNAPSHOT: ::grpcio::Method<super::pubsub::CreateSnapshotRequest, super::pubsub::Snapshot> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/CreateSnapshot",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_UPDATE_SNAPSHOT: ::grpcio::Method<super::pubsub::UpdateSnapshotRequest, super::pubsub::Snapshot> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/UpdateSnapshot",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_DELETE_SNAPSHOT: ::grpcio::Method<super::pubsub::DeleteSnapshotRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/DeleteSnapshot",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_SEEK: ::grpcio::Method<super::pubsub::SeekRequest, super::pubsub::SeekResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1.Subscriber/Seek",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct SubscriberClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl SubscriberClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
SubscriberClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create_subscription_opt(&self, req: &super::pubsub::Subscription, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::Subscription> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_CREATE_SUBSCRIPTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_subscription(&self, req: &super::pubsub::Subscription) -> ::grpcio::Result<super::pubsub::Subscription> {
|
||||
self.create_subscription_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_subscription_async_opt(&self, req: &super::pubsub::Subscription, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Subscription>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_CREATE_SUBSCRIPTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_subscription_async(&self, req: &super::pubsub::Subscription) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Subscription>> {
|
||||
self.create_subscription_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_subscription_opt(&self, req: &super::pubsub::GetSubscriptionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::Subscription> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_GET_SUBSCRIPTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_subscription(&self, req: &super::pubsub::GetSubscriptionRequest) -> ::grpcio::Result<super::pubsub::Subscription> {
|
||||
self.get_subscription_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_subscription_async_opt(&self, req: &super::pubsub::GetSubscriptionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Subscription>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_GET_SUBSCRIPTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_subscription_async(&self, req: &super::pubsub::GetSubscriptionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Subscription>> {
|
||||
self.get_subscription_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_subscription_opt(&self, req: &super::pubsub::UpdateSubscriptionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::Subscription> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_UPDATE_SUBSCRIPTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_subscription(&self, req: &super::pubsub::UpdateSubscriptionRequest) -> ::grpcio::Result<super::pubsub::Subscription> {
|
||||
self.update_subscription_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_subscription_async_opt(&self, req: &super::pubsub::UpdateSubscriptionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Subscription>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_UPDATE_SUBSCRIPTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_subscription_async(&self, req: &super::pubsub::UpdateSubscriptionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Subscription>> {
|
||||
self.update_subscription_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_subscriptions_opt(&self, req: &super::pubsub::ListSubscriptionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::ListSubscriptionsResponse> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_LIST_SUBSCRIPTIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_subscriptions(&self, req: &super::pubsub::ListSubscriptionsRequest) -> ::grpcio::Result<super::pubsub::ListSubscriptionsResponse> {
|
||||
self.list_subscriptions_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_subscriptions_async_opt(&self, req: &super::pubsub::ListSubscriptionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListSubscriptionsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_LIST_SUBSCRIPTIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_subscriptions_async(&self, req: &super::pubsub::ListSubscriptionsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListSubscriptionsResponse>> {
|
||||
self.list_subscriptions_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_subscription_opt(&self, req: &super::pubsub::DeleteSubscriptionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_DELETE_SUBSCRIPTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_subscription(&self, req: &super::pubsub::DeleteSubscriptionRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_subscription_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_subscription_async_opt(&self, req: &super::pubsub::DeleteSubscriptionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_DELETE_SUBSCRIPTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_subscription_async(&self, req: &super::pubsub::DeleteSubscriptionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_subscription_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn modify_ack_deadline_opt(&self, req: &super::pubsub::ModifyAckDeadlineRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_MODIFY_ACK_DEADLINE, req, opt)
|
||||
}
|
||||
|
||||
pub fn modify_ack_deadline(&self, req: &super::pubsub::ModifyAckDeadlineRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.modify_ack_deadline_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn modify_ack_deadline_async_opt(&self, req: &super::pubsub::ModifyAckDeadlineRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_MODIFY_ACK_DEADLINE, req, opt)
|
||||
}
|
||||
|
||||
pub fn modify_ack_deadline_async(&self, req: &super::pubsub::ModifyAckDeadlineRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.modify_ack_deadline_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn acknowledge_opt(&self, req: &super::pubsub::AcknowledgeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_ACKNOWLEDGE, req, opt)
|
||||
}
|
||||
|
||||
pub fn acknowledge(&self, req: &super::pubsub::AcknowledgeRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.acknowledge_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn acknowledge_async_opt(&self, req: &super::pubsub::AcknowledgeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_ACKNOWLEDGE, req, opt)
|
||||
}
|
||||
|
||||
pub fn acknowledge_async(&self, req: &super::pubsub::AcknowledgeRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.acknowledge_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn pull_opt(&self, req: &super::pubsub::PullRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::PullResponse> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_PULL, req, opt)
|
||||
}
|
||||
|
||||
pub fn pull(&self, req: &super::pubsub::PullRequest) -> ::grpcio::Result<super::pubsub::PullResponse> {
|
||||
self.pull_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn pull_async_opt(&self, req: &super::pubsub::PullRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::PullResponse>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_PULL, req, opt)
|
||||
}
|
||||
|
||||
pub fn pull_async(&self, req: &super::pubsub::PullRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::PullResponse>> {
|
||||
self.pull_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn streaming_pull_opt(&self, opt: ::grpcio::CallOption) -> ::grpcio::Result<(::grpcio::ClientDuplexSender<super::pubsub::StreamingPullRequest>, ::grpcio::ClientDuplexReceiver<super::pubsub::StreamingPullResponse>)> {
|
||||
self.client.duplex_streaming(&METHOD_SUBSCRIBER_STREAMING_PULL, opt)
|
||||
}
|
||||
|
||||
pub fn streaming_pull(&self) -> ::grpcio::Result<(::grpcio::ClientDuplexSender<super::pubsub::StreamingPullRequest>, ::grpcio::ClientDuplexReceiver<super::pubsub::StreamingPullResponse>)> {
|
||||
self.streaming_pull_opt(::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn modify_push_config_opt(&self, req: &super::pubsub::ModifyPushConfigRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_MODIFY_PUSH_CONFIG, req, opt)
|
||||
}
|
||||
|
||||
pub fn modify_push_config(&self, req: &super::pubsub::ModifyPushConfigRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.modify_push_config_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn modify_push_config_async_opt(&self, req: &super::pubsub::ModifyPushConfigRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_MODIFY_PUSH_CONFIG, req, opt)
|
||||
}
|
||||
|
||||
pub fn modify_push_config_async(&self, req: &super::pubsub::ModifyPushConfigRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.modify_push_config_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_snapshot_opt(&self, req: &super::pubsub::GetSnapshotRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::Snapshot> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_GET_SNAPSHOT, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_snapshot(&self, req: &super::pubsub::GetSnapshotRequest) -> ::grpcio::Result<super::pubsub::Snapshot> {
|
||||
self.get_snapshot_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_snapshot_async_opt(&self, req: &super::pubsub::GetSnapshotRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Snapshot>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_GET_SNAPSHOT, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_snapshot_async(&self, req: &super::pubsub::GetSnapshotRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Snapshot>> {
|
||||
self.get_snapshot_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_snapshots_opt(&self, req: &super::pubsub::ListSnapshotsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::ListSnapshotsResponse> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_LIST_SNAPSHOTS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_snapshots(&self, req: &super::pubsub::ListSnapshotsRequest) -> ::grpcio::Result<super::pubsub::ListSnapshotsResponse> {
|
||||
self.list_snapshots_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_snapshots_async_opt(&self, req: &super::pubsub::ListSnapshotsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListSnapshotsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_LIST_SNAPSHOTS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_snapshots_async(&self, req: &super::pubsub::ListSnapshotsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListSnapshotsResponse>> {
|
||||
self.list_snapshots_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_snapshot_opt(&self, req: &super::pubsub::CreateSnapshotRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::Snapshot> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_CREATE_SNAPSHOT, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_snapshot(&self, req: &super::pubsub::CreateSnapshotRequest) -> ::grpcio::Result<super::pubsub::Snapshot> {
|
||||
self.create_snapshot_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_snapshot_async_opt(&self, req: &super::pubsub::CreateSnapshotRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Snapshot>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_CREATE_SNAPSHOT, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_snapshot_async(&self, req: &super::pubsub::CreateSnapshotRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Snapshot>> {
|
||||
self.create_snapshot_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_snapshot_opt(&self, req: &super::pubsub::UpdateSnapshotRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::Snapshot> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_UPDATE_SNAPSHOT, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_snapshot(&self, req: &super::pubsub::UpdateSnapshotRequest) -> ::grpcio::Result<super::pubsub::Snapshot> {
|
||||
self.update_snapshot_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_snapshot_async_opt(&self, req: &super::pubsub::UpdateSnapshotRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Snapshot>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_UPDATE_SNAPSHOT, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_snapshot_async(&self, req: &super::pubsub::UpdateSnapshotRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Snapshot>> {
|
||||
self.update_snapshot_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_snapshot_opt(&self, req: &super::pubsub::DeleteSnapshotRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_DELETE_SNAPSHOT, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_snapshot(&self, req: &super::pubsub::DeleteSnapshotRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_snapshot_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_snapshot_async_opt(&self, req: &super::pubsub::DeleteSnapshotRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_DELETE_SNAPSHOT, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_snapshot_async(&self, req: &super::pubsub::DeleteSnapshotRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_snapshot_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn seek_opt(&self, req: &super::pubsub::SeekRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::SeekResponse> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_SEEK, req, opt)
|
||||
}
|
||||
|
||||
pub fn seek(&self, req: &super::pubsub::SeekRequest) -> ::grpcio::Result<super::pubsub::SeekResponse> {
|
||||
self.seek_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn seek_async_opt(&self, req: &super::pubsub::SeekRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::SeekResponse>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_SEEK, req, opt)
|
||||
}
|
||||
|
||||
pub fn seek_async(&self, req: &super::pubsub::SeekRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::SeekResponse>> {
|
||||
self.seek_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Subscriber {
|
||||
fn create_subscription(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::Subscription, sink: ::grpcio::UnarySink<super::pubsub::Subscription>);
|
||||
fn get_subscription(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::GetSubscriptionRequest, sink: ::grpcio::UnarySink<super::pubsub::Subscription>);
|
||||
fn update_subscription(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::UpdateSubscriptionRequest, sink: ::grpcio::UnarySink<super::pubsub::Subscription>);
|
||||
fn list_subscriptions(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::ListSubscriptionsRequest, sink: ::grpcio::UnarySink<super::pubsub::ListSubscriptionsResponse>);
|
||||
fn delete_subscription(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::DeleteSubscriptionRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn modify_ack_deadline(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::ModifyAckDeadlineRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn acknowledge(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::AcknowledgeRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn pull(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::PullRequest, sink: ::grpcio::UnarySink<super::pubsub::PullResponse>);
|
||||
fn streaming_pull(&mut self, ctx: ::grpcio::RpcContext, stream: ::grpcio::RequestStream<super::pubsub::StreamingPullRequest>, sink: ::grpcio::DuplexSink<super::pubsub::StreamingPullResponse>);
|
||||
fn modify_push_config(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::ModifyPushConfigRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn get_snapshot(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::GetSnapshotRequest, sink: ::grpcio::UnarySink<super::pubsub::Snapshot>);
|
||||
fn list_snapshots(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::ListSnapshotsRequest, sink: ::grpcio::UnarySink<super::pubsub::ListSnapshotsResponse>);
|
||||
fn create_snapshot(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::CreateSnapshotRequest, sink: ::grpcio::UnarySink<super::pubsub::Snapshot>);
|
||||
fn update_snapshot(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::UpdateSnapshotRequest, sink: ::grpcio::UnarySink<super::pubsub::Snapshot>);
|
||||
fn delete_snapshot(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::DeleteSnapshotRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn seek(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::SeekRequest, sink: ::grpcio::UnarySink<super::pubsub::SeekResponse>);
|
||||
}
|
||||
|
||||
pub fn create_subscriber<S: Subscriber + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_CREATE_SUBSCRIPTION, move |ctx, req, resp| {
|
||||
instance.create_subscription(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_GET_SUBSCRIPTION, move |ctx, req, resp| {
|
||||
instance.get_subscription(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_UPDATE_SUBSCRIPTION, move |ctx, req, resp| {
|
||||
instance.update_subscription(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_LIST_SUBSCRIPTIONS, move |ctx, req, resp| {
|
||||
instance.list_subscriptions(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_DELETE_SUBSCRIPTION, move |ctx, req, resp| {
|
||||
instance.delete_subscription(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_MODIFY_ACK_DEADLINE, move |ctx, req, resp| {
|
||||
instance.modify_ack_deadline(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_ACKNOWLEDGE, move |ctx, req, resp| {
|
||||
instance.acknowledge(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_PULL, move |ctx, req, resp| {
|
||||
instance.pull(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_duplex_streaming_handler(&METHOD_SUBSCRIBER_STREAMING_PULL, move |ctx, req, resp| {
|
||||
instance.streaming_pull(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_MODIFY_PUSH_CONFIG, move |ctx, req, resp| {
|
||||
instance.modify_push_config(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_GET_SNAPSHOT, move |ctx, req, resp| {
|
||||
instance.get_snapshot(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_LIST_SNAPSHOTS, move |ctx, req, resp| {
|
||||
instance.list_snapshots(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_CREATE_SNAPSHOT, move |ctx, req, resp| {
|
||||
instance.create_snapshot(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_UPDATE_SNAPSHOT, move |ctx, req, resp| {
|
||||
instance.update_snapshot(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_DELETE_SNAPSHOT, move |ctx, req, resp| {
|
||||
instance.delete_snapshot(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_SEEK, move |ctx, req, resp| {
|
||||
instance.seek(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
4
vendor/mozilla-rust-sdk/googleapis-raw/src/pubsub/v1beta2/mod.rs
vendored
Normal file
4
vendor/mozilla-rust-sdk/googleapis-raw/src/pubsub/v1beta2/mod.rs
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
pub mod pubsub;
|
||||
pub mod pubsub_grpc;
|
||||
|
||||
pub(crate) use crate::empty;
|
||||
5284
vendor/mozilla-rust-sdk/googleapis-raw/src/pubsub/v1beta2/pubsub.rs
vendored
Normal file
5284
vendor/mozilla-rust-sdk/googleapis-raw/src/pubsub/v1beta2/pubsub.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
459
vendor/mozilla-rust-sdk/googleapis-raw/src/pubsub/v1beta2/pubsub_grpc.rs
vendored
Normal file
459
vendor/mozilla-rust-sdk/googleapis-raw/src/pubsub/v1beta2/pubsub_grpc.rs
vendored
Normal file
@ -0,0 +1,459 @@
|
||||
// This file is generated. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
|
||||
const METHOD_SUBSCRIBER_CREATE_SUBSCRIPTION: ::grpcio::Method<super::pubsub::Subscription, super::pubsub::Subscription> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1beta2.Subscriber/CreateSubscription",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_GET_SUBSCRIPTION: ::grpcio::Method<super::pubsub::GetSubscriptionRequest, super::pubsub::Subscription> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1beta2.Subscriber/GetSubscription",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_LIST_SUBSCRIPTIONS: ::grpcio::Method<super::pubsub::ListSubscriptionsRequest, super::pubsub::ListSubscriptionsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1beta2.Subscriber/ListSubscriptions",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_DELETE_SUBSCRIPTION: ::grpcio::Method<super::pubsub::DeleteSubscriptionRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1beta2.Subscriber/DeleteSubscription",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_MODIFY_ACK_DEADLINE: ::grpcio::Method<super::pubsub::ModifyAckDeadlineRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1beta2.Subscriber/ModifyAckDeadline",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_ACKNOWLEDGE: ::grpcio::Method<super::pubsub::AcknowledgeRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1beta2.Subscriber/Acknowledge",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_PULL: ::grpcio::Method<super::pubsub::PullRequest, super::pubsub::PullResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1beta2.Subscriber/Pull",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SUBSCRIBER_MODIFY_PUSH_CONFIG: ::grpcio::Method<super::pubsub::ModifyPushConfigRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1beta2.Subscriber/ModifyPushConfig",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct SubscriberClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl SubscriberClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
SubscriberClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create_subscription_opt(&self, req: &super::pubsub::Subscription, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::Subscription> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_CREATE_SUBSCRIPTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_subscription(&self, req: &super::pubsub::Subscription) -> ::grpcio::Result<super::pubsub::Subscription> {
|
||||
self.create_subscription_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_subscription_async_opt(&self, req: &super::pubsub::Subscription, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Subscription>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_CREATE_SUBSCRIPTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_subscription_async(&self, req: &super::pubsub::Subscription) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Subscription>> {
|
||||
self.create_subscription_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_subscription_opt(&self, req: &super::pubsub::GetSubscriptionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::Subscription> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_GET_SUBSCRIPTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_subscription(&self, req: &super::pubsub::GetSubscriptionRequest) -> ::grpcio::Result<super::pubsub::Subscription> {
|
||||
self.get_subscription_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_subscription_async_opt(&self, req: &super::pubsub::GetSubscriptionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Subscription>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_GET_SUBSCRIPTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_subscription_async(&self, req: &super::pubsub::GetSubscriptionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Subscription>> {
|
||||
self.get_subscription_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_subscriptions_opt(&self, req: &super::pubsub::ListSubscriptionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::ListSubscriptionsResponse> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_LIST_SUBSCRIPTIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_subscriptions(&self, req: &super::pubsub::ListSubscriptionsRequest) -> ::grpcio::Result<super::pubsub::ListSubscriptionsResponse> {
|
||||
self.list_subscriptions_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_subscriptions_async_opt(&self, req: &super::pubsub::ListSubscriptionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListSubscriptionsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_LIST_SUBSCRIPTIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_subscriptions_async(&self, req: &super::pubsub::ListSubscriptionsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListSubscriptionsResponse>> {
|
||||
self.list_subscriptions_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_subscription_opt(&self, req: &super::pubsub::DeleteSubscriptionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_DELETE_SUBSCRIPTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_subscription(&self, req: &super::pubsub::DeleteSubscriptionRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_subscription_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_subscription_async_opt(&self, req: &super::pubsub::DeleteSubscriptionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_DELETE_SUBSCRIPTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_subscription_async(&self, req: &super::pubsub::DeleteSubscriptionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_subscription_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn modify_ack_deadline_opt(&self, req: &super::pubsub::ModifyAckDeadlineRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_MODIFY_ACK_DEADLINE, req, opt)
|
||||
}
|
||||
|
||||
pub fn modify_ack_deadline(&self, req: &super::pubsub::ModifyAckDeadlineRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.modify_ack_deadline_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn modify_ack_deadline_async_opt(&self, req: &super::pubsub::ModifyAckDeadlineRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_MODIFY_ACK_DEADLINE, req, opt)
|
||||
}
|
||||
|
||||
pub fn modify_ack_deadline_async(&self, req: &super::pubsub::ModifyAckDeadlineRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.modify_ack_deadline_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn acknowledge_opt(&self, req: &super::pubsub::AcknowledgeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_ACKNOWLEDGE, req, opt)
|
||||
}
|
||||
|
||||
pub fn acknowledge(&self, req: &super::pubsub::AcknowledgeRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.acknowledge_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn acknowledge_async_opt(&self, req: &super::pubsub::AcknowledgeRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_ACKNOWLEDGE, req, opt)
|
||||
}
|
||||
|
||||
pub fn acknowledge_async(&self, req: &super::pubsub::AcknowledgeRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.acknowledge_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn pull_opt(&self, req: &super::pubsub::PullRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::PullResponse> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_PULL, req, opt)
|
||||
}
|
||||
|
||||
pub fn pull(&self, req: &super::pubsub::PullRequest) -> ::grpcio::Result<super::pubsub::PullResponse> {
|
||||
self.pull_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn pull_async_opt(&self, req: &super::pubsub::PullRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::PullResponse>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_PULL, req, opt)
|
||||
}
|
||||
|
||||
pub fn pull_async(&self, req: &super::pubsub::PullRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::PullResponse>> {
|
||||
self.pull_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn modify_push_config_opt(&self, req: &super::pubsub::ModifyPushConfigRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_SUBSCRIBER_MODIFY_PUSH_CONFIG, req, opt)
|
||||
}
|
||||
|
||||
pub fn modify_push_config(&self, req: &super::pubsub::ModifyPushConfigRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.modify_push_config_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn modify_push_config_async_opt(&self, req: &super::pubsub::ModifyPushConfigRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_SUBSCRIBER_MODIFY_PUSH_CONFIG, req, opt)
|
||||
}
|
||||
|
||||
pub fn modify_push_config_async(&self, req: &super::pubsub::ModifyPushConfigRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.modify_push_config_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Subscriber {
|
||||
fn create_subscription(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::Subscription, sink: ::grpcio::UnarySink<super::pubsub::Subscription>);
|
||||
fn get_subscription(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::GetSubscriptionRequest, sink: ::grpcio::UnarySink<super::pubsub::Subscription>);
|
||||
fn list_subscriptions(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::ListSubscriptionsRequest, sink: ::grpcio::UnarySink<super::pubsub::ListSubscriptionsResponse>);
|
||||
fn delete_subscription(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::DeleteSubscriptionRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn modify_ack_deadline(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::ModifyAckDeadlineRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn acknowledge(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::AcknowledgeRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn pull(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::PullRequest, sink: ::grpcio::UnarySink<super::pubsub::PullResponse>);
|
||||
fn modify_push_config(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::ModifyPushConfigRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
}
|
||||
|
||||
pub fn create_subscriber<S: Subscriber + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_CREATE_SUBSCRIPTION, move |ctx, req, resp| {
|
||||
instance.create_subscription(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_GET_SUBSCRIPTION, move |ctx, req, resp| {
|
||||
instance.get_subscription(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_LIST_SUBSCRIPTIONS, move |ctx, req, resp| {
|
||||
instance.list_subscriptions(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_DELETE_SUBSCRIPTION, move |ctx, req, resp| {
|
||||
instance.delete_subscription(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_MODIFY_ACK_DEADLINE, move |ctx, req, resp| {
|
||||
instance.modify_ack_deadline(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_ACKNOWLEDGE, move |ctx, req, resp| {
|
||||
instance.acknowledge(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_PULL, move |ctx, req, resp| {
|
||||
instance.pull(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_MODIFY_PUSH_CONFIG, move |ctx, req, resp| {
|
||||
instance.modify_push_config(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
|
||||
const METHOD_PUBLISHER_CREATE_TOPIC: ::grpcio::Method<super::pubsub::Topic, super::pubsub::Topic> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1beta2.Publisher/CreateTopic",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_PUBLISHER_PUBLISH: ::grpcio::Method<super::pubsub::PublishRequest, super::pubsub::PublishResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1beta2.Publisher/Publish",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_PUBLISHER_GET_TOPIC: ::grpcio::Method<super::pubsub::GetTopicRequest, super::pubsub::Topic> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1beta2.Publisher/GetTopic",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_PUBLISHER_LIST_TOPICS: ::grpcio::Method<super::pubsub::ListTopicsRequest, super::pubsub::ListTopicsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1beta2.Publisher/ListTopics",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_PUBLISHER_LIST_TOPIC_SUBSCRIPTIONS: ::grpcio::Method<super::pubsub::ListTopicSubscriptionsRequest, super::pubsub::ListTopicSubscriptionsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1beta2.Publisher/ListTopicSubscriptions",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_PUBLISHER_DELETE_TOPIC: ::grpcio::Method<super::pubsub::DeleteTopicRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.pubsub.v1beta2.Publisher/DeleteTopic",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct PublisherClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl PublisherClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
PublisherClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create_topic_opt(&self, req: &super::pubsub::Topic, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::Topic> {
|
||||
self.client.unary_call(&METHOD_PUBLISHER_CREATE_TOPIC, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_topic(&self, req: &super::pubsub::Topic) -> ::grpcio::Result<super::pubsub::Topic> {
|
||||
self.create_topic_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_topic_async_opt(&self, req: &super::pubsub::Topic, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Topic>> {
|
||||
self.client.unary_call_async(&METHOD_PUBLISHER_CREATE_TOPIC, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_topic_async(&self, req: &super::pubsub::Topic) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Topic>> {
|
||||
self.create_topic_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn publish_opt(&self, req: &super::pubsub::PublishRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::PublishResponse> {
|
||||
self.client.unary_call(&METHOD_PUBLISHER_PUBLISH, req, opt)
|
||||
}
|
||||
|
||||
pub fn publish(&self, req: &super::pubsub::PublishRequest) -> ::grpcio::Result<super::pubsub::PublishResponse> {
|
||||
self.publish_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn publish_async_opt(&self, req: &super::pubsub::PublishRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::PublishResponse>> {
|
||||
self.client.unary_call_async(&METHOD_PUBLISHER_PUBLISH, req, opt)
|
||||
}
|
||||
|
||||
pub fn publish_async(&self, req: &super::pubsub::PublishRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::PublishResponse>> {
|
||||
self.publish_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_topic_opt(&self, req: &super::pubsub::GetTopicRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::Topic> {
|
||||
self.client.unary_call(&METHOD_PUBLISHER_GET_TOPIC, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_topic(&self, req: &super::pubsub::GetTopicRequest) -> ::grpcio::Result<super::pubsub::Topic> {
|
||||
self.get_topic_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_topic_async_opt(&self, req: &super::pubsub::GetTopicRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Topic>> {
|
||||
self.client.unary_call_async(&METHOD_PUBLISHER_GET_TOPIC, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_topic_async(&self, req: &super::pubsub::GetTopicRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::Topic>> {
|
||||
self.get_topic_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_topics_opt(&self, req: &super::pubsub::ListTopicsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::ListTopicsResponse> {
|
||||
self.client.unary_call(&METHOD_PUBLISHER_LIST_TOPICS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_topics(&self, req: &super::pubsub::ListTopicsRequest) -> ::grpcio::Result<super::pubsub::ListTopicsResponse> {
|
||||
self.list_topics_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_topics_async_opt(&self, req: &super::pubsub::ListTopicsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListTopicsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_PUBLISHER_LIST_TOPICS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_topics_async(&self, req: &super::pubsub::ListTopicsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListTopicsResponse>> {
|
||||
self.list_topics_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_topic_subscriptions_opt(&self, req: &super::pubsub::ListTopicSubscriptionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::pubsub::ListTopicSubscriptionsResponse> {
|
||||
self.client.unary_call(&METHOD_PUBLISHER_LIST_TOPIC_SUBSCRIPTIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_topic_subscriptions(&self, req: &super::pubsub::ListTopicSubscriptionsRequest) -> ::grpcio::Result<super::pubsub::ListTopicSubscriptionsResponse> {
|
||||
self.list_topic_subscriptions_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_topic_subscriptions_async_opt(&self, req: &super::pubsub::ListTopicSubscriptionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListTopicSubscriptionsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_PUBLISHER_LIST_TOPIC_SUBSCRIPTIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_topic_subscriptions_async(&self, req: &super::pubsub::ListTopicSubscriptionsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::pubsub::ListTopicSubscriptionsResponse>> {
|
||||
self.list_topic_subscriptions_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_topic_opt(&self, req: &super::pubsub::DeleteTopicRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_PUBLISHER_DELETE_TOPIC, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_topic(&self, req: &super::pubsub::DeleteTopicRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_topic_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_topic_async_opt(&self, req: &super::pubsub::DeleteTopicRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_PUBLISHER_DELETE_TOPIC, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_topic_async(&self, req: &super::pubsub::DeleteTopicRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_topic_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Publisher {
|
||||
fn create_topic(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::Topic, sink: ::grpcio::UnarySink<super::pubsub::Topic>);
|
||||
fn publish(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::PublishRequest, sink: ::grpcio::UnarySink<super::pubsub::PublishResponse>);
|
||||
fn get_topic(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::GetTopicRequest, sink: ::grpcio::UnarySink<super::pubsub::Topic>);
|
||||
fn list_topics(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::ListTopicsRequest, sink: ::grpcio::UnarySink<super::pubsub::ListTopicsResponse>);
|
||||
fn list_topic_subscriptions(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::ListTopicSubscriptionsRequest, sink: ::grpcio::UnarySink<super::pubsub::ListTopicSubscriptionsResponse>);
|
||||
fn delete_topic(&mut self, ctx: ::grpcio::RpcContext, req: super::pubsub::DeleteTopicRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
}
|
||||
|
||||
pub fn create_publisher<S: Publisher + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_PUBLISHER_CREATE_TOPIC, move |ctx, req, resp| {
|
||||
instance.create_topic(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_PUBLISHER_PUBLISH, move |ctx, req, resp| {
|
||||
instance.publish(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_PUBLISHER_GET_TOPIC, move |ctx, req, resp| {
|
||||
instance.get_topic(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_PUBLISHER_LIST_TOPICS, move |ctx, req, resp| {
|
||||
instance.list_topics(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_PUBLISHER_LIST_TOPIC_SUBSCRIPTIONS, move |ctx, req, resp| {
|
||||
instance.list_topic_subscriptions(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_PUBLISHER_DELETE_TOPIC, move |ctx, req, resp| {
|
||||
instance.delete_topic(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
325
vendor/mozilla-rust-sdk/googleapis-raw/src/rpc/code.rs
vendored
Normal file
325
vendor/mozilla-rust-sdk/googleapis-raw/src/rpc/code.rs
vendored
Normal file
@ -0,0 +1,325 @@
|
||||
// This file is generated by rust-protobuf 2.7.0. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! Generated file from `google/rpc/code.proto`
|
||||
|
||||
use protobuf::Message as Message_imported_for_functions;
|
||||
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
|
||||
|
||||
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
|
||||
pub enum Code {
|
||||
OK = 0,
|
||||
CANCELLED = 1,
|
||||
UNKNOWN = 2,
|
||||
INVALID_ARGUMENT = 3,
|
||||
DEADLINE_EXCEEDED = 4,
|
||||
NOT_FOUND = 5,
|
||||
ALREADY_EXISTS = 6,
|
||||
PERMISSION_DENIED = 7,
|
||||
UNAUTHENTICATED = 16,
|
||||
RESOURCE_EXHAUSTED = 8,
|
||||
FAILED_PRECONDITION = 9,
|
||||
ABORTED = 10,
|
||||
OUT_OF_RANGE = 11,
|
||||
UNIMPLEMENTED = 12,
|
||||
INTERNAL = 13,
|
||||
UNAVAILABLE = 14,
|
||||
DATA_LOSS = 15,
|
||||
}
|
||||
|
||||
impl ::protobuf::ProtobufEnum for Code {
|
||||
fn value(&self) -> i32 {
|
||||
*self as i32
|
||||
}
|
||||
|
||||
fn from_i32(value: i32) -> ::std::option::Option<Code> {
|
||||
match value {
|
||||
0 => ::std::option::Option::Some(Code::OK),
|
||||
1 => ::std::option::Option::Some(Code::CANCELLED),
|
||||
2 => ::std::option::Option::Some(Code::UNKNOWN),
|
||||
3 => ::std::option::Option::Some(Code::INVALID_ARGUMENT),
|
||||
4 => ::std::option::Option::Some(Code::DEADLINE_EXCEEDED),
|
||||
5 => ::std::option::Option::Some(Code::NOT_FOUND),
|
||||
6 => ::std::option::Option::Some(Code::ALREADY_EXISTS),
|
||||
7 => ::std::option::Option::Some(Code::PERMISSION_DENIED),
|
||||
16 => ::std::option::Option::Some(Code::UNAUTHENTICATED),
|
||||
8 => ::std::option::Option::Some(Code::RESOURCE_EXHAUSTED),
|
||||
9 => ::std::option::Option::Some(Code::FAILED_PRECONDITION),
|
||||
10 => ::std::option::Option::Some(Code::ABORTED),
|
||||
11 => ::std::option::Option::Some(Code::OUT_OF_RANGE),
|
||||
12 => ::std::option::Option::Some(Code::UNIMPLEMENTED),
|
||||
13 => ::std::option::Option::Some(Code::INTERNAL),
|
||||
14 => ::std::option::Option::Some(Code::UNAVAILABLE),
|
||||
15 => ::std::option::Option::Some(Code::DATA_LOSS),
|
||||
_ => ::std::option::Option::None
|
||||
}
|
||||
}
|
||||
|
||||
fn values() -> &'static [Self] {
|
||||
static values: &'static [Code] = &[
|
||||
Code::OK,
|
||||
Code::CANCELLED,
|
||||
Code::UNKNOWN,
|
||||
Code::INVALID_ARGUMENT,
|
||||
Code::DEADLINE_EXCEEDED,
|
||||
Code::NOT_FOUND,
|
||||
Code::ALREADY_EXISTS,
|
||||
Code::PERMISSION_DENIED,
|
||||
Code::UNAUTHENTICATED,
|
||||
Code::RESOURCE_EXHAUSTED,
|
||||
Code::FAILED_PRECONDITION,
|
||||
Code::ABORTED,
|
||||
Code::OUT_OF_RANGE,
|
||||
Code::UNIMPLEMENTED,
|
||||
Code::INTERNAL,
|
||||
Code::UNAVAILABLE,
|
||||
Code::DATA_LOSS,
|
||||
];
|
||||
values
|
||||
}
|
||||
|
||||
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
::protobuf::reflect::EnumDescriptor::new("Code", file_descriptor_proto())
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::marker::Copy for Code {
|
||||
}
|
||||
|
||||
impl ::std::default::Default for Code {
|
||||
fn default() -> Self {
|
||||
Code::OK
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for Code {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
|
||||
}
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x15google/rpc/code.proto\x12\ngoogle.rpc*\xb7\x02\n\x04Code\x12\x06\n\
|
||||
\x02OK\x10\0\x12\r\n\tCANCELLED\x10\x01\x12\x0b\n\x07UNKNOWN\x10\x02\x12\
|
||||
\x14\n\x10INVALID_ARGUMENT\x10\x03\x12\x15\n\x11DEADLINE_EXCEEDED\x10\
|
||||
\x04\x12\r\n\tNOT_FOUND\x10\x05\x12\x12\n\x0eALREADY_EXISTS\x10\x06\x12\
|
||||
\x15\n\x11PERMISSION_DENIED\x10\x07\x12\x13\n\x0fUNAUTHENTICATED\x10\x10\
|
||||
\x12\x16\n\x12RESOURCE_EXHAUSTED\x10\x08\x12\x17\n\x13FAILED_PRECONDITIO\
|
||||
N\x10\t\x12\x0b\n\x07ABORTED\x10\n\x12\x10\n\x0cOUT_OF_RANGE\x10\x0b\x12\
|
||||
\x11\n\rUNIMPLEMENTED\x10\x0c\x12\x0c\n\x08INTERNAL\x10\r\x12\x0f\n\x0bU\
|
||||
NAVAILABLE\x10\x0e\x12\r\n\tDATA_LOSS\x10\x0fBX\n\x0ecom.google.rpcB\tCo\
|
||||
deProtoP\x01Z3google.golang.org/genproto/googleapis/rpc/code;code\xa2\
|
||||
\x02\x03RPCJ\xb45\n\x07\x12\x05\x0e\0\xb9\x01\x01\n\xbd\x04\n\x01\x0c\
|
||||
\x12\x03\x0e\0\x122\xb2\x04\x20Copyright\x202017\x20Google\x20Inc.\n\n\
|
||||
\x20Licensed\x20under\x20the\x20Apache\x20License,\x20Version\x202.0\x20\
|
||||
(the\x20\"License\");\n\x20you\x20may\x20not\x20use\x20this\x20file\x20e\
|
||||
xcept\x20in\x20compliance\x20with\x20the\x20License.\n\x20You\x20may\x20\
|
||||
obtain\x20a\x20copy\x20of\x20the\x20License\x20at\n\n\x20\x20\x20\x20\
|
||||
\x20http://www.apache.org/licenses/LICENSE-2.0\n\n\x20Unless\x20required\
|
||||
\x20by\x20applicable\x20law\x20or\x20agreed\x20to\x20in\x20writing,\x20s\
|
||||
oftware\n\x20distributed\x20under\x20the\x20License\x20is\x20distributed\
|
||||
\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\x20WITHOUT\x20WARRANTIES\x20OR\
|
||||
\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20either\x20express\x20or\x20impli\
|
||||
ed.\n\x20See\x20the\x20License\x20for\x20the\x20specific\x20language\x20\
|
||||
governing\x20permissions\x20and\n\x20limitations\x20under\x20the\x20Lice\
|
||||
nse.\n\n\x08\n\x01\x02\x12\x03\x10\0\x13\n\x08\n\x01\x08\x12\x03\x12\0J\
|
||||
\n\t\n\x02\x08\x0b\x12\x03\x12\0J\n\x08\n\x01\x08\x12\x03\x13\0\"\n\t\n\
|
||||
\x02\x08\n\x12\x03\x13\0\"\n\x08\n\x01\x08\x12\x03\x14\0*\n\t\n\x02\x08\
|
||||
\x08\x12\x03\x14\0*\n\x08\n\x01\x08\x12\x03\x15\0'\n\t\n\x02\x08\x01\x12\
|
||||
\x03\x15\0'\n\x08\n\x01\x08\x12\x03\x16\0!\n\t\n\x02\x08$\x12\x03\x16\0!\
|
||||
\n\xce\x02\n\x02\x05\0\x12\x05\x20\0\xb9\x01\x01\x1a\xc0\x02\x20The\x20c\
|
||||
anonical\x20error\x20codes\x20for\x20Google\x20APIs.\n\n\n\x20Sometimes\
|
||||
\x20multiple\x20error\x20codes\x20may\x20apply.\x20\x20Services\x20shoul\
|
||||
d\x20return\n\x20the\x20most\x20specific\x20error\x20code\x20that\x20app\
|
||||
lies.\x20\x20For\x20example,\x20prefer\n\x20`OUT_OF_RANGE`\x20over\x20`F\
|
||||
AILED_PRECONDITION`\x20if\x20both\x20codes\x20apply.\n\x20Similarly\x20p\
|
||||
refer\x20`NOT_FOUND`\x20or\x20`ALREADY_EXISTS`\x20over\x20`FAILED_PRECON\
|
||||
DITION`.\n\n\n\n\x03\x05\0\x01\x12\x03\x20\x05\t\nG\n\x04\x05\0\x02\0\
|
||||
\x12\x03$\x02\t\x1a:\x20Not\x20an\x20error;\x20returned\x20on\x20success\
|
||||
\n\n\x20HTTP\x20Mapping:\x20200\x20OK\n\n\x0c\n\x05\x05\0\x02\0\x01\x12\
|
||||
\x03$\x02\x04\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03$\x07\x08\nn\n\x04\x05\
|
||||
\0\x02\x01\x12\x03)\x02\x10\x1aa\x20The\x20operation\x20was\x20cancelled\
|
||||
,\x20typically\x20by\x20the\x20caller.\n\n\x20HTTP\x20Mapping:\x20499\
|
||||
\x20Client\x20Closed\x20Request\n\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03)\
|
||||
\x02\x0b\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03)\x0e\x0f\n\xda\x02\n\x04\
|
||||
\x05\0\x02\x02\x12\x032\x02\x0e\x1a\xcc\x02\x20Unknown\x20error.\x20\x20\
|
||||
For\x20example,\x20this\x20error\x20may\x20be\x20returned\x20when\n\x20a\
|
||||
\x20`Status`\x20value\x20received\x20from\x20another\x20address\x20space\
|
||||
\x20belongs\x20to\n\x20an\x20error\x20space\x20that\x20is\x20not\x20know\
|
||||
n\x20in\x20this\x20address\x20space.\x20\x20Also\n\x20errors\x20raised\
|
||||
\x20by\x20APIs\x20that\x20do\x20not\x20return\x20enough\x20error\x20info\
|
||||
rmation\n\x20may\x20be\x20converted\x20to\x20this\x20error.\n\n\x20HTTP\
|
||||
\x20Mapping:\x20500\x20Internal\x20Server\x20Error\n\n\x0c\n\x05\x05\0\
|
||||
\x02\x02\x01\x12\x032\x02\t\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x032\x0c\r\
|
||||
\n\x92\x02\n\x04\x05\0\x02\x03\x12\x03:\x02\x17\x1a\x84\x02\x20The\x20cl\
|
||||
ient\x20specified\x20an\x20invalid\x20argument.\x20\x20Note\x20that\x20t\
|
||||
his\x20differs\n\x20from\x20`FAILED_PRECONDITION`.\x20\x20`INVALID_ARGUM\
|
||||
ENT`\x20indicates\x20arguments\n\x20that\x20are\x20problematic\x20regard\
|
||||
less\x20of\x20the\x20state\x20of\x20the\x20system\n\x20(e.g.,\x20a\x20ma\
|
||||
lformed\x20file\x20name).\n\n\x20HTTP\x20Mapping:\x20400\x20Bad\x20Reque\
|
||||
st\n\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03:\x02\x12\n\x0c\n\x05\x05\0\
|
||||
\x02\x03\x02\x12\x03:\x15\x16\n\xe4\x02\n\x04\x05\0\x02\x04\x12\x03C\x02\
|
||||
\x18\x1a\xd6\x02\x20The\x20deadline\x20expired\x20before\x20the\x20opera\
|
||||
tion\x20could\x20complete.\x20For\x20operations\n\x20that\x20change\x20t\
|
||||
he\x20state\x20of\x20the\x20system,\x20this\x20error\x20may\x20be\x20ret\
|
||||
urned\n\x20even\x20if\x20the\x20operation\x20has\x20completed\x20success\
|
||||
fully.\x20\x20For\x20example,\x20a\n\x20successful\x20response\x20from\
|
||||
\x20a\x20server\x20could\x20have\x20been\x20delayed\x20long\n\x20enough\
|
||||
\x20for\x20the\x20deadline\x20to\x20expire.\n\n\x20HTTP\x20Mapping:\x205\
|
||||
04\x20Gateway\x20Timeout\n\n\x0c\n\x05\x05\0\x02\x04\x01\x12\x03C\x02\
|
||||
\x13\n\x0c\n\x05\x05\0\x02\x04\x02\x12\x03C\x16\x17\n\x9a\x03\n\x04\x05\
|
||||
\0\x02\x05\x12\x03N\x02\x10\x1a\x8c\x03\x20Some\x20requested\x20entity\
|
||||
\x20(e.g.,\x20file\x20or\x20directory)\x20was\x20not\x20found.\n\n\x20No\
|
||||
te\x20to\x20server\x20developers:\x20if\x20a\x20request\x20is\x20denied\
|
||||
\x20for\x20an\x20entire\x20class\n\x20of\x20users,\x20such\x20as\x20grad\
|
||||
ual\x20feature\x20rollout\x20or\x20undocumented\x20whitelist,\n\x20`NOT_\
|
||||
FOUND`\x20may\x20be\x20used.\x20If\x20a\x20request\x20is\x20denied\x20fo\
|
||||
r\x20some\x20users\x20within\n\x20a\x20class\x20of\x20users,\x20such\x20\
|
||||
as\x20user-based\x20access\x20control,\x20`PERMISSION_DENIED`\n\x20must\
|
||||
\x20be\x20used.\n\n\x20HTTP\x20Mapping:\x20404\x20Not\x20Found\n\n\x0c\n\
|
||||
\x05\x05\0\x02\x05\x01\x12\x03N\x02\x0b\n\x0c\n\x05\x05\0\x02\x05\x02\
|
||||
\x12\x03N\x0e\x0f\n\x83\x01\n\x04\x05\0\x02\x06\x12\x03T\x02\x15\x1av\
|
||||
\x20The\x20entity\x20that\x20a\x20client\x20attempted\x20to\x20create\
|
||||
\x20(e.g.,\x20file\x20or\x20directory)\n\x20already\x20exists.\n\n\x20HT\
|
||||
TP\x20Mapping:\x20409\x20Conflict\n\n\x0c\n\x05\x05\0\x02\x06\x01\x12\
|
||||
\x03T\x02\x10\n\x0c\n\x05\x05\0\x02\x06\x02\x12\x03T\x13\x14\n\xf9\x03\n\
|
||||
\x04\x05\0\x02\x07\x12\x03`\x02\x18\x1a\xeb\x03\x20The\x20caller\x20does\
|
||||
\x20not\x20have\x20permission\x20to\x20execute\x20the\x20specified\n\x20\
|
||||
operation.\x20`PERMISSION_DENIED`\x20must\x20not\x20be\x20used\x20for\
|
||||
\x20rejections\n\x20caused\x20by\x20exhausting\x20some\x20resource\x20(u\
|
||||
se\x20`RESOURCE_EXHAUSTED`\n\x20instead\x20for\x20those\x20errors).\x20`\
|
||||
PERMISSION_DENIED`\x20must\x20not\x20be\n\x20used\x20if\x20the\x20caller\
|
||||
\x20can\x20not\x20be\x20identified\x20(use\x20`UNAUTHENTICATED`\n\x20ins\
|
||||
tead\x20for\x20those\x20errors).\x20This\x20error\x20code\x20does\x20not\
|
||||
\x20imply\x20the\n\x20request\x20is\x20valid\x20or\x20the\x20requested\
|
||||
\x20entity\x20exists\x20or\x20satisfies\n\x20other\x20pre-conditions.\n\
|
||||
\n\x20HTTP\x20Mapping:\x20403\x20Forbidden\n\n\x0c\n\x05\x05\0\x02\x07\
|
||||
\x01\x12\x03`\x02\x13\n\x0c\n\x05\x05\0\x02\x07\x02\x12\x03`\x16\x17\n~\
|
||||
\n\x04\x05\0\x02\x08\x12\x03f\x02\x17\x1aq\x20The\x20request\x20does\x20\
|
||||
not\x20have\x20valid\x20authentication\x20credentials\x20for\x20the\n\
|
||||
\x20operation.\n\n\x20HTTP\x20Mapping:\x20401\x20Unauthorized\n\n\x0c\n\
|
||||
\x05\x05\0\x02\x08\x01\x12\x03f\x02\x11\n\x0c\n\x05\x05\0\x02\x08\x02\
|
||||
\x12\x03f\x14\x16\n\xa5\x01\n\x04\x05\0\x02\t\x12\x03l\x02\x19\x1a\x97\
|
||||
\x01\x20Some\x20resource\x20has\x20been\x20exhausted,\x20perhaps\x20a\
|
||||
\x20per-user\x20quota,\x20or\n\x20perhaps\x20the\x20entire\x20file\x20sy\
|
||||
stem\x20is\x20out\x20of\x20space.\n\n\x20HTTP\x20Mapping:\x20429\x20Too\
|
||||
\x20Many\x20Requests\n\n\x0c\n\x05\x05\0\x02\t\x01\x12\x03l\x02\x14\n\
|
||||
\x0c\n\x05\x05\0\x02\t\x02\x12\x03l\x17\x18\n\xd9\x07\n\x04\x05\0\x02\n\
|
||||
\x12\x04\x80\x01\x02\x1a\x1a\xca\x07\x20The\x20operation\x20was\x20rejec\
|
||||
ted\x20because\x20the\x20system\x20is\x20not\x20in\x20a\x20state\n\x20re\
|
||||
quired\x20for\x20the\x20operation's\x20execution.\x20\x20For\x20example,\
|
||||
\x20the\x20directory\n\x20to\x20be\x20deleted\x20is\x20non-empty,\x20an\
|
||||
\x20rmdir\x20operation\x20is\x20applied\x20to\n\x20a\x20non-directory,\
|
||||
\x20etc.\n\n\x20Service\x20implementors\x20can\x20use\x20the\x20followin\
|
||||
g\x20guidelines\x20to\x20decide\n\x20between\x20`FAILED_PRECONDITION`,\
|
||||
\x20`ABORTED`,\x20and\x20`UNAVAILABLE`:\n\x20\x20(a)\x20Use\x20`UNAVAILA\
|
||||
BLE`\x20if\x20the\x20client\x20can\x20retry\x20just\x20the\x20failing\
|
||||
\x20call.\n\x20\x20(b)\x20Use\x20`ABORTED`\x20if\x20the\x20client\x20sho\
|
||||
uld\x20retry\x20at\x20a\x20higher\x20level\n\x20\x20\x20\x20\x20\x20(e.g\
|
||||
.,\x20when\x20a\x20client-specified\x20test-and-set\x20fails,\x20indicat\
|
||||
ing\x20the\n\x20\x20\x20\x20\x20\x20client\x20should\x20restart\x20a\x20\
|
||||
read-modify-write\x20sequence).\n\x20\x20(c)\x20Use\x20`FAILED_PRECONDIT\
|
||||
ION`\x20if\x20the\x20client\x20should\x20not\x20retry\x20until\n\x20\x20\
|
||||
\x20\x20\x20\x20the\x20system\x20state\x20has\x20been\x20explicitly\x20f\
|
||||
ixed.\x20\x20E.g.,\x20if\x20an\x20\"rmdir\"\n\x20\x20\x20\x20\x20\x20fai\
|
||||
ls\x20because\x20the\x20directory\x20is\x20non-empty,\x20`FAILED_PRECOND\
|
||||
ITION`\n\x20\x20\x20\x20\x20\x20should\x20be\x20returned\x20since\x20the\
|
||||
\x20client\x20should\x20not\x20retry\x20unless\n\x20\x20\x20\x20\x20\x20\
|
||||
the\x20files\x20are\x20deleted\x20from\x20the\x20directory.\n\n\x20HTTP\
|
||||
\x20Mapping:\x20400\x20Bad\x20Request\n\n\r\n\x05\x05\0\x02\n\x01\x12\
|
||||
\x04\x80\x01\x02\x15\n\r\n\x05\x05\0\x02\n\x02\x12\x04\x80\x01\x18\x19\n\
|
||||
\x8c\x02\n\x04\x05\0\x02\x0b\x12\x04\x89\x01\x02\x0f\x1a\xfd\x01\x20The\
|
||||
\x20operation\x20was\x20aborted,\x20typically\x20due\x20to\x20a\x20concu\
|
||||
rrency\x20issue\x20such\x20as\n\x20a\x20sequencer\x20check\x20failure\
|
||||
\x20or\x20transaction\x20abort.\n\n\x20See\x20the\x20guidelines\x20above\
|
||||
\x20for\x20deciding\x20between\x20`FAILED_PRECONDITION`,\n\x20`ABORTED`,\
|
||||
\x20and\x20`UNAVAILABLE`.\n\n\x20HTTP\x20Mapping:\x20409\x20Conflict\n\n\
|
||||
\r\n\x05\x05\0\x02\x0b\x01\x12\x04\x89\x01\x02\t\n\r\n\x05\x05\0\x02\x0b\
|
||||
\x02\x12\x04\x89\x01\x0c\x0e\n\x85\x06\n\x04\x05\0\x02\x0c\x12\x04\x9c\
|
||||
\x01\x02\x14\x1a\xf6\x05\x20The\x20operation\x20was\x20attempted\x20past\
|
||||
\x20the\x20valid\x20range.\x20\x20E.g.,\x20seeking\x20or\n\x20reading\
|
||||
\x20past\x20end-of-file.\n\n\x20Unlike\x20`INVALID_ARGUMENT`,\x20this\
|
||||
\x20error\x20indicates\x20a\x20problem\x20that\x20may\n\x20be\x20fixed\
|
||||
\x20if\x20the\x20system\x20state\x20changes.\x20For\x20example,\x20a\x20\
|
||||
32-bit\x20file\n\x20system\x20will\x20generate\x20`INVALID_ARGUMENT`\x20\
|
||||
if\x20asked\x20to\x20read\x20at\x20an\n\x20offset\x20that\x20is\x20not\
|
||||
\x20in\x20the\x20range\x20[0,2^32-1],\x20but\x20it\x20will\x20generate\n\
|
||||
\x20`OUT_OF_RANGE`\x20if\x20asked\x20to\x20read\x20from\x20an\x20offset\
|
||||
\x20past\x20the\x20current\n\x20file\x20size.\n\n\x20There\x20is\x20a\
|
||||
\x20fair\x20bit\x20of\x20overlap\x20between\x20`FAILED_PRECONDITION`\x20\
|
||||
and\n\x20`OUT_OF_RANGE`.\x20\x20We\x20recommend\x20using\x20`OUT_OF_RANG\
|
||||
E`\x20(the\x20more\x20specific\n\x20error)\x20when\x20it\x20applies\x20s\
|
||||
o\x20that\x20callers\x20who\x20are\x20iterating\x20through\n\x20a\x20spa\
|
||||
ce\x20can\x20easily\x20look\x20for\x20an\x20`OUT_OF_RANGE`\x20error\x20t\
|
||||
o\x20detect\x20when\n\x20they\x20are\x20done.\n\n\x20HTTP\x20Mapping:\
|
||||
\x20400\x20Bad\x20Request\n\n\r\n\x05\x05\0\x02\x0c\x01\x12\x04\x9c\x01\
|
||||
\x02\x0e\n\r\n\x05\x05\0\x02\x0c\x02\x12\x04\x9c\x01\x11\x13\n\x82\x01\n\
|
||||
\x04\x05\0\x02\r\x12\x04\xa2\x01\x02\x15\x1at\x20The\x20operation\x20is\
|
||||
\x20not\x20implemented\x20or\x20is\x20not\x20supported/enabled\x20in\x20\
|
||||
this\n\x20service.\n\n\x20HTTP\x20Mapping:\x20501\x20Not\x20Implemented\
|
||||
\n\n\r\n\x05\x05\0\x02\r\x01\x12\x04\xa2\x01\x02\x0f\n\r\n\x05\x05\0\x02\
|
||||
\r\x02\x12\x04\xa2\x01\x12\x14\n\xd3\x01\n\x04\x05\0\x02\x0e\x12\x04\xa9\
|
||||
\x01\x02\x10\x1a\xc4\x01\x20Internal\x20errors.\x20\x20This\x20means\x20\
|
||||
that\x20some\x20invariants\x20expected\x20by\x20the\n\x20underlying\x20s\
|
||||
ystem\x20have\x20been\x20broken.\x20\x20This\x20error\x20code\x20is\x20r\
|
||||
eserved\n\x20for\x20serious\x20errors.\n\n\x20HTTP\x20Mapping:\x20500\
|
||||
\x20Internal\x20Server\x20Error\n\n\r\n\x05\x05\0\x02\x0e\x01\x12\x04\
|
||||
\xa9\x01\x02\n\n\r\n\x05\x05\0\x02\x0e\x02\x12\x04\xa9\x01\r\x0f\n\xa5\
|
||||
\x02\n\x04\x05\0\x02\x0f\x12\x04\xb3\x01\x02\x13\x1a\x96\x02\x20The\x20s\
|
||||
ervice\x20is\x20currently\x20unavailable.\x20\x20This\x20is\x20most\x20l\
|
||||
ikely\x20a\n\x20transient\x20condition,\x20which\x20can\x20be\x20correct\
|
||||
ed\x20by\x20retrying\x20with\n\x20a\x20backoff.\n\n\x20See\x20the\x20gui\
|
||||
delines\x20above\x20for\x20deciding\x20between\x20`FAILED_PRECONDITION`,\
|
||||
\n\x20`ABORTED`,\x20and\x20`UNAVAILABLE`.\n\n\x20HTTP\x20Mapping:\x20503\
|
||||
\x20Service\x20Unavailable\n\n\r\n\x05\x05\0\x02\x0f\x01\x12\x04\xb3\x01\
|
||||
\x02\r\n\r\n\x05\x05\0\x02\x0f\x02\x12\x04\xb3\x01\x10\x12\n`\n\x04\x05\
|
||||
\0\x02\x10\x12\x04\xb8\x01\x02\x11\x1aR\x20Unrecoverable\x20data\x20loss\
|
||||
\x20or\x20corruption.\n\n\x20HTTP\x20Mapping:\x20500\x20Internal\x20Serv\
|
||||
er\x20Error\n\n\r\n\x05\x05\0\x02\x10\x01\x12\x04\xb8\x01\x02\x0b\n\r\n\
|
||||
\x05\x05\0\x02\x10\x02\x12\x04\xb8\x01\x0e\x10b\x06proto3\
|
||||
";
|
||||
|
||||
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
|
||||
};
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
unsafe {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
}
|
||||
3013
vendor/mozilla-rust-sdk/googleapis-raw/src/rpc/error_details.rs
vendored
Normal file
3013
vendor/mozilla-rust-sdk/googleapis-raw/src/rpc/error_details.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
vendor/mozilla-rust-sdk/googleapis-raw/src/rpc/mod.rs
vendored
Normal file
3
vendor/mozilla-rust-sdk/googleapis-raw/src/rpc/mod.rs
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
pub mod code;
|
||||
pub mod error_details;
|
||||
pub mod status;
|
||||
397
vendor/mozilla-rust-sdk/googleapis-raw/src/rpc/status.rs
vendored
Normal file
397
vendor/mozilla-rust-sdk/googleapis-raw/src/rpc/status.rs
vendored
Normal file
@ -0,0 +1,397 @@
|
||||
// This file is generated by rust-protobuf 2.7.0. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! Generated file from `google/rpc/status.proto`
|
||||
|
||||
use protobuf::Message as Message_imported_for_functions;
|
||||
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct Status {
|
||||
// message fields
|
||||
pub code: i32,
|
||||
pub message: ::std::string::String,
|
||||
pub details: ::protobuf::RepeatedField<::protobuf::well_known_types::Any>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a Status {
|
||||
fn default() -> &'a Status {
|
||||
<Status as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl Status {
|
||||
pub fn new() -> Status {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// int32 code = 1;
|
||||
|
||||
|
||||
pub fn get_code(&self) -> i32 {
|
||||
self.code
|
||||
}
|
||||
pub fn clear_code(&mut self) {
|
||||
self.code = 0;
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_code(&mut self, v: i32) {
|
||||
self.code = v;
|
||||
}
|
||||
|
||||
// string message = 2;
|
||||
|
||||
|
||||
pub fn get_message(&self) -> &str {
|
||||
&self.message
|
||||
}
|
||||
pub fn clear_message(&mut self) {
|
||||
self.message.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_message(&mut self, v: ::std::string::String) {
|
||||
self.message = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_message(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.message
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_message(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.message, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// repeated .google.protobuf.Any details = 3;
|
||||
|
||||
|
||||
pub fn get_details(&self) -> &[::protobuf::well_known_types::Any] {
|
||||
&self.details
|
||||
}
|
||||
pub fn clear_details(&mut self) {
|
||||
self.details.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_details(&mut self, v: ::protobuf::RepeatedField<::protobuf::well_known_types::Any>) {
|
||||
self.details = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_details(&mut self) -> &mut ::protobuf::RepeatedField<::protobuf::well_known_types::Any> {
|
||||
&mut self.details
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_details(&mut self) -> ::protobuf::RepeatedField<::protobuf::well_known_types::Any> {
|
||||
::std::mem::replace(&mut self.details, ::protobuf::RepeatedField::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for Status {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.details {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeVarint {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
let tmp = is.read_int32()?;
|
||||
self.code = tmp;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.message)?;
|
||||
},
|
||||
3 => {
|
||||
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.details)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if self.code != 0 {
|
||||
my_size += ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint);
|
||||
}
|
||||
if !self.message.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(2, &self.message);
|
||||
}
|
||||
for value in &self.details {
|
||||
let len = value.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
};
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
if self.code != 0 {
|
||||
os.write_int32(1, self.code)?;
|
||||
}
|
||||
if !self.message.is_empty() {
|
||||
os.write_string(2, &self.message)?;
|
||||
}
|
||||
for v in &self.details {
|
||||
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
};
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &::std::any::Any {
|
||||
self as &::std::any::Any
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
|
||||
self as &mut ::std::any::Any
|
||||
}
|
||||
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> Status {
|
||||
Status::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
|
||||
"code",
|
||||
|m: &Status| { &m.code },
|
||||
|m: &mut Status| { &mut m.code },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"message",
|
||||
|m: &Status| { &m.message },
|
||||
|m: &mut Status| { &mut m.message },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Any>>(
|
||||
"details",
|
||||
|m: &Status| { &m.details },
|
||||
|m: &mut Status| { &mut m.details },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<Status>(
|
||||
"Status",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static Status {
|
||||
static mut instance: ::protobuf::lazy::Lazy<Status> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const Status,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(Status::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for Status {
|
||||
fn clear(&mut self) {
|
||||
self.code = 0;
|
||||
self.message.clear();
|
||||
self.details.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for Status {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for Status {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x17google/rpc/status.proto\x12\ngoogle.rpc\x1a\x19google/protobuf/any\
|
||||
.proto\"f\n\x06Status\x12\x12\n\x04code\x18\x01\x20\x01(\x05R\x04code\
|
||||
\x12\x18\n\x07message\x18\x02\x20\x01(\tR\x07message\x12.\n\x07details\
|
||||
\x18\x03\x20\x03(\x0b2\x14.google.protobuf.AnyR\x07detailsB^\n\x0ecom.go\
|
||||
ogle.rpcB\x0bStatusProtoP\x01Z7google.golang.org/genproto/googleapis/rpc\
|
||||
/status;status\xa2\x02\x03RPCJ\x9b\x1e\n\x06\x12\x04\x0e\0[\x01\n\xbd\
|
||||
\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb2\x04\x20Copyright\x202017\x20Google\
|
||||
\x20Inc.\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\x20Versio\
|
||||
n\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20use\x20this\
|
||||
\x20file\x20except\x20in\x20compliance\x20with\x20the\x20License.\n\x20Y\
|
||||
ou\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20License\x20at\n\n\x20\
|
||||
\x20\x20\x20\x20http://www.apache.org/licenses/LICENSE-2.0\n\n\x20Unless\
|
||||
\x20required\x20by\x20applicable\x20law\x20or\x20agreed\x20to\x20in\x20w\
|
||||
riting,\x20software\n\x20distributed\x20under\x20the\x20License\x20is\
|
||||
\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\x20WITHOUT\x20WA\
|
||||
RRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20either\x20express\
|
||||
\x20or\x20implied.\n\x20See\x20the\x20License\x20for\x20the\x20specific\
|
||||
\x20language\x20governing\x20permissions\x20and\n\x20limitations\x20unde\
|
||||
r\x20the\x20License.\n\n\x08\n\x01\x02\x12\x03\x10\0\x13\n\t\n\x02\x03\0\
|
||||
\x12\x03\x12\0#\n\x08\n\x01\x08\x12\x03\x14\0N\n\t\n\x02\x08\x0b\x12\x03\
|
||||
\x14\0N\n\x08\n\x01\x08\x12\x03\x15\0\"\n\t\n\x02\x08\n\x12\x03\x15\0\"\
|
||||
\n\x08\n\x01\x08\x12\x03\x16\0,\n\t\n\x02\x08\x08\x12\x03\x16\0,\n\x08\n\
|
||||
\x01\x08\x12\x03\x17\0'\n\t\n\x02\x08\x01\x12\x03\x17\0'\n\x08\n\x01\x08\
|
||||
\x12\x03\x18\0!\n\t\n\x02\x08$\x12\x03\x18\0!\n\xcd\x13\n\x02\x04\0\x12\
|
||||
\x04O\0[\x01\x1a\xc0\x13\x20The\x20`Status`\x20type\x20defines\x20a\x20l\
|
||||
ogical\x20error\x20model\x20that\x20is\x20suitable\x20for\x20different\n\
|
||||
\x20programming\x20environments,\x20including\x20REST\x20APIs\x20and\x20\
|
||||
RPC\x20APIs.\x20It\x20is\x20used\x20by\n\x20[gRPC](https://github.com/gr\
|
||||
pc).\x20The\x20error\x20model\x20is\x20designed\x20to\x20be:\n\n\x20-\
|
||||
\x20Simple\x20to\x20use\x20and\x20understand\x20for\x20most\x20users\n\
|
||||
\x20-\x20Flexible\x20enough\x20to\x20meet\x20unexpected\x20needs\n\n\x20\
|
||||
#\x20Overview\n\n\x20The\x20`Status`\x20message\x20contains\x20three\x20\
|
||||
pieces\x20of\x20data:\x20error\x20code,\x20error\x20message,\n\x20and\
|
||||
\x20error\x20details.\x20The\x20error\x20code\x20should\x20be\x20an\x20e\
|
||||
num\x20value\x20of\n\x20[google.rpc.Code][google.rpc.Code],\x20but\x20it\
|
||||
\x20may\x20accept\x20additional\x20error\x20codes\x20if\x20needed.\x20\
|
||||
\x20The\n\x20error\x20message\x20should\x20be\x20a\x20developer-facing\
|
||||
\x20English\x20message\x20that\x20helps\n\x20developers\x20*understand*\
|
||||
\x20and\x20*resolve*\x20the\x20error.\x20If\x20a\x20localized\x20user-fa\
|
||||
cing\n\x20error\x20message\x20is\x20needed,\x20put\x20the\x20localized\
|
||||
\x20message\x20in\x20the\x20error\x20details\x20or\n\x20localize\x20it\
|
||||
\x20in\x20the\x20client.\x20The\x20optional\x20error\x20details\x20may\
|
||||
\x20contain\x20arbitrary\n\x20information\x20about\x20the\x20error.\x20T\
|
||||
here\x20is\x20a\x20predefined\x20set\x20of\x20error\x20detail\x20types\n\
|
||||
\x20in\x20the\x20package\x20`google.rpc`\x20that\x20can\x20be\x20used\
|
||||
\x20for\x20common\x20error\x20conditions.\n\n\x20#\x20Language\x20mappin\
|
||||
g\n\n\x20The\x20`Status`\x20message\x20is\x20the\x20logical\x20represent\
|
||||
ation\x20of\x20the\x20error\x20model,\x20but\x20it\n\x20is\x20not\x20nec\
|
||||
essarily\x20the\x20actual\x20wire\x20format.\x20When\x20the\x20`Status`\
|
||||
\x20message\x20is\n\x20exposed\x20in\x20different\x20client\x20libraries\
|
||||
\x20and\x20different\x20wire\x20protocols,\x20it\x20can\x20be\n\x20mappe\
|
||||
d\x20differently.\x20For\x20example,\x20it\x20will\x20likely\x20be\x20ma\
|
||||
pped\x20to\x20some\x20exceptions\n\x20in\x20Java,\x20but\x20more\x20like\
|
||||
ly\x20mapped\x20to\x20some\x20error\x20codes\x20in\x20C.\n\n\x20#\x20Oth\
|
||||
er\x20uses\n\n\x20The\x20error\x20model\x20and\x20the\x20`Status`\x20mes\
|
||||
sage\x20can\x20be\x20used\x20in\x20a\x20variety\x20of\n\x20environments,\
|
||||
\x20either\x20with\x20or\x20without\x20APIs,\x20to\x20provide\x20a\n\x20\
|
||||
consistent\x20developer\x20experience\x20across\x20different\x20environm\
|
||||
ents.\n\n\x20Example\x20uses\x20of\x20this\x20error\x20model\x20include:\
|
||||
\n\n\x20-\x20Partial\x20errors.\x20If\x20a\x20service\x20needs\x20to\x20\
|
||||
return\x20partial\x20errors\x20to\x20the\x20client,\n\x20\x20\x20\x20\
|
||||
\x20it\x20may\x20embed\x20the\x20`Status`\x20in\x20the\x20normal\x20resp\
|
||||
onse\x20to\x20indicate\x20the\x20partial\n\x20\x20\x20\x20\x20errors.\n\
|
||||
\n\x20-\x20Workflow\x20errors.\x20A\x20typical\x20workflow\x20has\x20mul\
|
||||
tiple\x20steps.\x20Each\x20step\x20may\n\x20\x20\x20\x20\x20have\x20a\
|
||||
\x20`Status`\x20message\x20for\x20error\x20reporting.\n\n\x20-\x20Batch\
|
||||
\x20operations.\x20If\x20a\x20client\x20uses\x20batch\x20request\x20and\
|
||||
\x20batch\x20response,\x20the\n\x20\x20\x20\x20\x20`Status`\x20message\
|
||||
\x20should\x20be\x20used\x20directly\x20inside\x20batch\x20response,\x20\
|
||||
one\x20for\n\x20\x20\x20\x20\x20each\x20error\x20sub-response.\n\n\x20-\
|
||||
\x20Asynchronous\x20operations.\x20If\x20an\x20API\x20call\x20embeds\x20\
|
||||
asynchronous\x20operation\n\x20\x20\x20\x20\x20results\x20in\x20its\x20r\
|
||||
esponse,\x20the\x20status\x20of\x20those\x20operations\x20should\x20be\n\
|
||||
\x20\x20\x20\x20\x20represented\x20directly\x20using\x20the\x20`Status`\
|
||||
\x20message.\n\n\x20-\x20Logging.\x20If\x20some\x20API\x20errors\x20are\
|
||||
\x20stored\x20in\x20logs,\x20the\x20message\x20`Status`\x20could\n\x20\
|
||||
\x20\x20\x20\x20be\x20used\x20directly\x20after\x20any\x20stripping\x20n\
|
||||
eeded\x20for\x20security/privacy\x20reasons.\n\n\n\n\x03\x04\0\x01\x12\
|
||||
\x03O\x08\x0e\nd\n\x04\x04\0\x02\0\x12\x03Q\x02\x11\x1aW\x20The\x20statu\
|
||||
s\x20code,\x20which\x20should\x20be\x20an\x20enum\x20value\x20of\x20[goo\
|
||||
gle.rpc.Code][google.rpc.Code].\n\n\r\n\x05\x04\0\x02\0\x04\x12\x04Q\x02\
|
||||
O\x10\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03Q\x02\x07\n\x0c\n\x05\x04\0\x02\
|
||||
\0\x01\x12\x03Q\x08\x0c\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03Q\x0f\x10\n\
|
||||
\xeb\x01\n\x04\x04\0\x02\x01\x12\x03V\x02\x15\x1a\xdd\x01\x20A\x20develo\
|
||||
per-facing\x20error\x20message,\x20which\x20should\x20be\x20in\x20Englis\
|
||||
h.\x20Any\n\x20user-facing\x20error\x20message\x20should\x20be\x20locali\
|
||||
zed\x20and\x20sent\x20in\x20the\n\x20[google.rpc.Status.details][google.\
|
||||
rpc.Status.details]\x20field,\x20or\x20localized\x20by\x20the\x20client.\
|
||||
\n\n\r\n\x05\x04\0\x02\x01\x04\x12\x04V\x02Q\x11\n\x0c\n\x05\x04\0\x02\
|
||||
\x01\x05\x12\x03V\x02\x08\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03V\t\x10\n\
|
||||
\x0c\n\x05\x04\0\x02\x01\x03\x12\x03V\x13\x14\ny\n\x04\x04\0\x02\x02\x12\
|
||||
\x03Z\x02+\x1al\x20A\x20list\x20of\x20messages\x20that\x20carry\x20the\
|
||||
\x20error\x20details.\x20\x20There\x20is\x20a\x20common\x20set\x20of\n\
|
||||
\x20message\x20types\x20for\x20APIs\x20to\x20use.\n\n\x0c\n\x05\x04\0\
|
||||
\x02\x02\x04\x12\x03Z\x02\n\n\x0c\n\x05\x04\0\x02\x02\x06\x12\x03Z\x0b\
|
||||
\x1e\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03Z\x1f&\n\x0c\n\x05\x04\0\x02\
|
||||
\x02\x03\x12\x03Z)*b\x06proto3\
|
||||
";
|
||||
|
||||
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
|
||||
};
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
unsafe {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
}
|
||||
1
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/database/mod.rs
vendored
Normal file
1
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/database/mod.rs
vendored
Normal file
@ -0,0 +1 @@
|
||||
pub mod v1;
|
||||
8
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/database/v1/mod.rs
vendored
Normal file
8
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/database/v1/mod.rs
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
pub mod spanner_database_admin;
|
||||
pub mod spanner_database_admin_grpc;
|
||||
|
||||
pub(crate) use crate::{
|
||||
empty,
|
||||
iam::v1::{iam_policy, policy},
|
||||
longrunning::operations,
|
||||
};
|
||||
2757
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/database/v1/spanner_database_admin.rs
vendored
Normal file
2757
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/database/v1/spanner_database_admin.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
295
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/database/v1/spanner_database_admin_grpc.rs
vendored
Normal file
295
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/database/v1/spanner_database_admin_grpc.rs
vendored
Normal file
@ -0,0 +1,295 @@
|
||||
// This file is generated. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
|
||||
const METHOD_DATABASE_ADMIN_LIST_DATABASES: ::grpcio::Method<super::spanner_database_admin::ListDatabasesRequest, super::spanner_database_admin::ListDatabasesResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.database.v1.DatabaseAdmin/ListDatabases",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_DATABASE_ADMIN_CREATE_DATABASE: ::grpcio::Method<super::spanner_database_admin::CreateDatabaseRequest, super::operations::Operation> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.database.v1.DatabaseAdmin/CreateDatabase",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_DATABASE_ADMIN_GET_DATABASE: ::grpcio::Method<super::spanner_database_admin::GetDatabaseRequest, super::spanner_database_admin::Database> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.database.v1.DatabaseAdmin/GetDatabase",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_DATABASE_ADMIN_UPDATE_DATABASE_DDL: ::grpcio::Method<super::spanner_database_admin::UpdateDatabaseDdlRequest, super::operations::Operation> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.database.v1.DatabaseAdmin/UpdateDatabaseDdl",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_DATABASE_ADMIN_DROP_DATABASE: ::grpcio::Method<super::spanner_database_admin::DropDatabaseRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.database.v1.DatabaseAdmin/DropDatabase",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_DATABASE_ADMIN_GET_DATABASE_DDL: ::grpcio::Method<super::spanner_database_admin::GetDatabaseDdlRequest, super::spanner_database_admin::GetDatabaseDdlResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.database.v1.DatabaseAdmin/GetDatabaseDdl",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_DATABASE_ADMIN_SET_IAM_POLICY: ::grpcio::Method<super::iam_policy::SetIamPolicyRequest, super::policy::Policy> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.database.v1.DatabaseAdmin/SetIamPolicy",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_DATABASE_ADMIN_GET_IAM_POLICY: ::grpcio::Method<super::iam_policy::GetIamPolicyRequest, super::policy::Policy> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.database.v1.DatabaseAdmin/GetIamPolicy",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_DATABASE_ADMIN_TEST_IAM_PERMISSIONS: ::grpcio::Method<super::iam_policy::TestIamPermissionsRequest, super::iam_policy::TestIamPermissionsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.database.v1.DatabaseAdmin/TestIamPermissions",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct DatabaseAdminClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl DatabaseAdminClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
DatabaseAdminClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn list_databases_opt(&self, req: &super::spanner_database_admin::ListDatabasesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::spanner_database_admin::ListDatabasesResponse> {
|
||||
self.client.unary_call(&METHOD_DATABASE_ADMIN_LIST_DATABASES, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_databases(&self, req: &super::spanner_database_admin::ListDatabasesRequest) -> ::grpcio::Result<super::spanner_database_admin::ListDatabasesResponse> {
|
||||
self.list_databases_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_databases_async_opt(&self, req: &super::spanner_database_admin::ListDatabasesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner_database_admin::ListDatabasesResponse>> {
|
||||
self.client.unary_call_async(&METHOD_DATABASE_ADMIN_LIST_DATABASES, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_databases_async(&self, req: &super::spanner_database_admin::ListDatabasesRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner_database_admin::ListDatabasesResponse>> {
|
||||
self.list_databases_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_database_opt(&self, req: &super::spanner_database_admin::CreateDatabaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.client.unary_call(&METHOD_DATABASE_ADMIN_CREATE_DATABASE, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_database(&self, req: &super::spanner_database_admin::CreateDatabaseRequest) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.create_database_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_database_async_opt(&self, req: &super::spanner_database_admin::CreateDatabaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.client.unary_call_async(&METHOD_DATABASE_ADMIN_CREATE_DATABASE, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_database_async(&self, req: &super::spanner_database_admin::CreateDatabaseRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.create_database_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_database_opt(&self, req: &super::spanner_database_admin::GetDatabaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::spanner_database_admin::Database> {
|
||||
self.client.unary_call(&METHOD_DATABASE_ADMIN_GET_DATABASE, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_database(&self, req: &super::spanner_database_admin::GetDatabaseRequest) -> ::grpcio::Result<super::spanner_database_admin::Database> {
|
||||
self.get_database_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_database_async_opt(&self, req: &super::spanner_database_admin::GetDatabaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner_database_admin::Database>> {
|
||||
self.client.unary_call_async(&METHOD_DATABASE_ADMIN_GET_DATABASE, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_database_async(&self, req: &super::spanner_database_admin::GetDatabaseRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner_database_admin::Database>> {
|
||||
self.get_database_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_database_ddl_opt(&self, req: &super::spanner_database_admin::UpdateDatabaseDdlRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.client.unary_call(&METHOD_DATABASE_ADMIN_UPDATE_DATABASE_DDL, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_database_ddl(&self, req: &super::spanner_database_admin::UpdateDatabaseDdlRequest) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.update_database_ddl_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_database_ddl_async_opt(&self, req: &super::spanner_database_admin::UpdateDatabaseDdlRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.client.unary_call_async(&METHOD_DATABASE_ADMIN_UPDATE_DATABASE_DDL, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_database_ddl_async(&self, req: &super::spanner_database_admin::UpdateDatabaseDdlRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.update_database_ddl_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn drop_database_opt(&self, req: &super::spanner_database_admin::DropDatabaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_DATABASE_ADMIN_DROP_DATABASE, req, opt)
|
||||
}
|
||||
|
||||
pub fn drop_database(&self, req: &super::spanner_database_admin::DropDatabaseRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.drop_database_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn drop_database_async_opt(&self, req: &super::spanner_database_admin::DropDatabaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_DATABASE_ADMIN_DROP_DATABASE, req, opt)
|
||||
}
|
||||
|
||||
pub fn drop_database_async(&self, req: &super::spanner_database_admin::DropDatabaseRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.drop_database_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_database_ddl_opt(&self, req: &super::spanner_database_admin::GetDatabaseDdlRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::spanner_database_admin::GetDatabaseDdlResponse> {
|
||||
self.client.unary_call(&METHOD_DATABASE_ADMIN_GET_DATABASE_DDL, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_database_ddl(&self, req: &super::spanner_database_admin::GetDatabaseDdlRequest) -> ::grpcio::Result<super::spanner_database_admin::GetDatabaseDdlResponse> {
|
||||
self.get_database_ddl_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_database_ddl_async_opt(&self, req: &super::spanner_database_admin::GetDatabaseDdlRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner_database_admin::GetDatabaseDdlResponse>> {
|
||||
self.client.unary_call_async(&METHOD_DATABASE_ADMIN_GET_DATABASE_DDL, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_database_ddl_async(&self, req: &super::spanner_database_admin::GetDatabaseDdlRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner_database_admin::GetDatabaseDdlResponse>> {
|
||||
self.get_database_ddl_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn set_iam_policy_opt(&self, req: &super::iam_policy::SetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.client.unary_call(&METHOD_DATABASE_ADMIN_SET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn set_iam_policy(&self, req: &super::iam_policy::SetIamPolicyRequest) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.set_iam_policy_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn set_iam_policy_async_opt(&self, req: &super::iam_policy::SetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.client.unary_call_async(&METHOD_DATABASE_ADMIN_SET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn set_iam_policy_async(&self, req: &super::iam_policy::SetIamPolicyRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.set_iam_policy_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_iam_policy_opt(&self, req: &super::iam_policy::GetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.client.unary_call(&METHOD_DATABASE_ADMIN_GET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_iam_policy(&self, req: &super::iam_policy::GetIamPolicyRequest) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.get_iam_policy_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_iam_policy_async_opt(&self, req: &super::iam_policy::GetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.client.unary_call_async(&METHOD_DATABASE_ADMIN_GET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_iam_policy_async(&self, req: &super::iam_policy::GetIamPolicyRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.get_iam_policy_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions_opt(&self, req: &super::iam_policy::TestIamPermissionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::iam_policy::TestIamPermissionsResponse> {
|
||||
self.client.unary_call(&METHOD_DATABASE_ADMIN_TEST_IAM_PERMISSIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions(&self, req: &super::iam_policy::TestIamPermissionsRequest) -> ::grpcio::Result<super::iam_policy::TestIamPermissionsResponse> {
|
||||
self.test_iam_permissions_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions_async_opt(&self, req: &super::iam_policy::TestIamPermissionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::iam_policy::TestIamPermissionsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_DATABASE_ADMIN_TEST_IAM_PERMISSIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions_async(&self, req: &super::iam_policy::TestIamPermissionsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::iam_policy::TestIamPermissionsResponse>> {
|
||||
self.test_iam_permissions_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait DatabaseAdmin {
|
||||
fn list_databases(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner_database_admin::ListDatabasesRequest, sink: ::grpcio::UnarySink<super::spanner_database_admin::ListDatabasesResponse>);
|
||||
fn create_database(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner_database_admin::CreateDatabaseRequest, sink: ::grpcio::UnarySink<super::operations::Operation>);
|
||||
fn get_database(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner_database_admin::GetDatabaseRequest, sink: ::grpcio::UnarySink<super::spanner_database_admin::Database>);
|
||||
fn update_database_ddl(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner_database_admin::UpdateDatabaseDdlRequest, sink: ::grpcio::UnarySink<super::operations::Operation>);
|
||||
fn drop_database(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner_database_admin::DropDatabaseRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn get_database_ddl(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner_database_admin::GetDatabaseDdlRequest, sink: ::grpcio::UnarySink<super::spanner_database_admin::GetDatabaseDdlResponse>);
|
||||
fn set_iam_policy(&mut self, ctx: ::grpcio::RpcContext, req: super::iam_policy::SetIamPolicyRequest, sink: ::grpcio::UnarySink<super::policy::Policy>);
|
||||
fn get_iam_policy(&mut self, ctx: ::grpcio::RpcContext, req: super::iam_policy::GetIamPolicyRequest, sink: ::grpcio::UnarySink<super::policy::Policy>);
|
||||
fn test_iam_permissions(&mut self, ctx: ::grpcio::RpcContext, req: super::iam_policy::TestIamPermissionsRequest, sink: ::grpcio::UnarySink<super::iam_policy::TestIamPermissionsResponse>);
|
||||
}
|
||||
|
||||
pub fn create_database_admin<S: DatabaseAdmin + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_DATABASE_ADMIN_LIST_DATABASES, move |ctx, req, resp| {
|
||||
instance.list_databases(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_DATABASE_ADMIN_CREATE_DATABASE, move |ctx, req, resp| {
|
||||
instance.create_database(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_DATABASE_ADMIN_GET_DATABASE, move |ctx, req, resp| {
|
||||
instance.get_database(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_DATABASE_ADMIN_UPDATE_DATABASE_DDL, move |ctx, req, resp| {
|
||||
instance.update_database_ddl(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_DATABASE_ADMIN_DROP_DATABASE, move |ctx, req, resp| {
|
||||
instance.drop_database(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_DATABASE_ADMIN_GET_DATABASE_DDL, move |ctx, req, resp| {
|
||||
instance.get_database_ddl(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_DATABASE_ADMIN_SET_IAM_POLICY, move |ctx, req, resp| {
|
||||
instance.set_iam_policy(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_DATABASE_ADMIN_GET_IAM_POLICY, move |ctx, req, resp| {
|
||||
instance.get_iam_policy(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_DATABASE_ADMIN_TEST_IAM_PERMISSIONS, move |ctx, req, resp| {
|
||||
instance.test_iam_permissions(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
1
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/instance/mod.rs
vendored
Normal file
1
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/instance/mod.rs
vendored
Normal file
@ -0,0 +1 @@
|
||||
pub mod v1;
|
||||
8
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/instance/v1/mod.rs
vendored
Normal file
8
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/instance/v1/mod.rs
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
pub mod spanner_instance_admin;
|
||||
pub mod spanner_instance_admin_grpc;
|
||||
|
||||
pub(crate) use crate::{
|
||||
empty,
|
||||
iam::v1::{iam_policy, policy},
|
||||
longrunning::operations,
|
||||
};
|
||||
3977
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/instance/v1/spanner_instance_admin.rs
vendored
Normal file
3977
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/instance/v1/spanner_instance_admin.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
323
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/instance/v1/spanner_instance_admin_grpc.rs
vendored
Normal file
323
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/instance/v1/spanner_instance_admin_grpc.rs
vendored
Normal file
@ -0,0 +1,323 @@
|
||||
// This file is generated. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
|
||||
const METHOD_INSTANCE_ADMIN_LIST_INSTANCE_CONFIGS: ::grpcio::Method<super::spanner_instance_admin::ListInstanceConfigsRequest, super::spanner_instance_admin::ListInstanceConfigsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.instance.v1.InstanceAdmin/ListInstanceConfigs",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_INSTANCE_ADMIN_GET_INSTANCE_CONFIG: ::grpcio::Method<super::spanner_instance_admin::GetInstanceConfigRequest, super::spanner_instance_admin::InstanceConfig> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.instance.v1.InstanceAdmin/GetInstanceConfig",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_INSTANCE_ADMIN_LIST_INSTANCES: ::grpcio::Method<super::spanner_instance_admin::ListInstancesRequest, super::spanner_instance_admin::ListInstancesResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.instance.v1.InstanceAdmin/ListInstances",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_INSTANCE_ADMIN_GET_INSTANCE: ::grpcio::Method<super::spanner_instance_admin::GetInstanceRequest, super::spanner_instance_admin::Instance> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.instance.v1.InstanceAdmin/GetInstance",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_INSTANCE_ADMIN_CREATE_INSTANCE: ::grpcio::Method<super::spanner_instance_admin::CreateInstanceRequest, super::operations::Operation> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.instance.v1.InstanceAdmin/CreateInstance",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_INSTANCE_ADMIN_UPDATE_INSTANCE: ::grpcio::Method<super::spanner_instance_admin::UpdateInstanceRequest, super::operations::Operation> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.instance.v1.InstanceAdmin/UpdateInstance",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_INSTANCE_ADMIN_DELETE_INSTANCE: ::grpcio::Method<super::spanner_instance_admin::DeleteInstanceRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.instance.v1.InstanceAdmin/DeleteInstance",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_INSTANCE_ADMIN_SET_IAM_POLICY: ::grpcio::Method<super::iam_policy::SetIamPolicyRequest, super::policy::Policy> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.instance.v1.InstanceAdmin/SetIamPolicy",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_INSTANCE_ADMIN_GET_IAM_POLICY: ::grpcio::Method<super::iam_policy::GetIamPolicyRequest, super::policy::Policy> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.instance.v1.InstanceAdmin/GetIamPolicy",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_INSTANCE_ADMIN_TEST_IAM_PERMISSIONS: ::grpcio::Method<super::iam_policy::TestIamPermissionsRequest, super::iam_policy::TestIamPermissionsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.admin.instance.v1.InstanceAdmin/TestIamPermissions",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct InstanceAdminClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl InstanceAdminClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
InstanceAdminClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn list_instance_configs_opt(&self, req: &super::spanner_instance_admin::ListInstanceConfigsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::spanner_instance_admin::ListInstanceConfigsResponse> {
|
||||
self.client.unary_call(&METHOD_INSTANCE_ADMIN_LIST_INSTANCE_CONFIGS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_instance_configs(&self, req: &super::spanner_instance_admin::ListInstanceConfigsRequest) -> ::grpcio::Result<super::spanner_instance_admin::ListInstanceConfigsResponse> {
|
||||
self.list_instance_configs_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_instance_configs_async_opt(&self, req: &super::spanner_instance_admin::ListInstanceConfigsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner_instance_admin::ListInstanceConfigsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_INSTANCE_ADMIN_LIST_INSTANCE_CONFIGS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_instance_configs_async(&self, req: &super::spanner_instance_admin::ListInstanceConfigsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner_instance_admin::ListInstanceConfigsResponse>> {
|
||||
self.list_instance_configs_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_instance_config_opt(&self, req: &super::spanner_instance_admin::GetInstanceConfigRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::spanner_instance_admin::InstanceConfig> {
|
||||
self.client.unary_call(&METHOD_INSTANCE_ADMIN_GET_INSTANCE_CONFIG, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_instance_config(&self, req: &super::spanner_instance_admin::GetInstanceConfigRequest) -> ::grpcio::Result<super::spanner_instance_admin::InstanceConfig> {
|
||||
self.get_instance_config_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_instance_config_async_opt(&self, req: &super::spanner_instance_admin::GetInstanceConfigRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner_instance_admin::InstanceConfig>> {
|
||||
self.client.unary_call_async(&METHOD_INSTANCE_ADMIN_GET_INSTANCE_CONFIG, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_instance_config_async(&self, req: &super::spanner_instance_admin::GetInstanceConfigRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner_instance_admin::InstanceConfig>> {
|
||||
self.get_instance_config_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_instances_opt(&self, req: &super::spanner_instance_admin::ListInstancesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::spanner_instance_admin::ListInstancesResponse> {
|
||||
self.client.unary_call(&METHOD_INSTANCE_ADMIN_LIST_INSTANCES, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_instances(&self, req: &super::spanner_instance_admin::ListInstancesRequest) -> ::grpcio::Result<super::spanner_instance_admin::ListInstancesResponse> {
|
||||
self.list_instances_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_instances_async_opt(&self, req: &super::spanner_instance_admin::ListInstancesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner_instance_admin::ListInstancesResponse>> {
|
||||
self.client.unary_call_async(&METHOD_INSTANCE_ADMIN_LIST_INSTANCES, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_instances_async(&self, req: &super::spanner_instance_admin::ListInstancesRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner_instance_admin::ListInstancesResponse>> {
|
||||
self.list_instances_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_instance_opt(&self, req: &super::spanner_instance_admin::GetInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::spanner_instance_admin::Instance> {
|
||||
self.client.unary_call(&METHOD_INSTANCE_ADMIN_GET_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_instance(&self, req: &super::spanner_instance_admin::GetInstanceRequest) -> ::grpcio::Result<super::spanner_instance_admin::Instance> {
|
||||
self.get_instance_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_instance_async_opt(&self, req: &super::spanner_instance_admin::GetInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner_instance_admin::Instance>> {
|
||||
self.client.unary_call_async(&METHOD_INSTANCE_ADMIN_GET_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_instance_async(&self, req: &super::spanner_instance_admin::GetInstanceRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner_instance_admin::Instance>> {
|
||||
self.get_instance_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_instance_opt(&self, req: &super::spanner_instance_admin::CreateInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.client.unary_call(&METHOD_INSTANCE_ADMIN_CREATE_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_instance(&self, req: &super::spanner_instance_admin::CreateInstanceRequest) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.create_instance_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_instance_async_opt(&self, req: &super::spanner_instance_admin::CreateInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.client.unary_call_async(&METHOD_INSTANCE_ADMIN_CREATE_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_instance_async(&self, req: &super::spanner_instance_admin::CreateInstanceRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.create_instance_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_instance_opt(&self, req: &super::spanner_instance_admin::UpdateInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.client.unary_call(&METHOD_INSTANCE_ADMIN_UPDATE_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_instance(&self, req: &super::spanner_instance_admin::UpdateInstanceRequest) -> ::grpcio::Result<super::operations::Operation> {
|
||||
self.update_instance_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn update_instance_async_opt(&self, req: &super::spanner_instance_admin::UpdateInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.client.unary_call_async(&METHOD_INSTANCE_ADMIN_UPDATE_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn update_instance_async(&self, req: &super::spanner_instance_admin::UpdateInstanceRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::operations::Operation>> {
|
||||
self.update_instance_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_instance_opt(&self, req: &super::spanner_instance_admin::DeleteInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_INSTANCE_ADMIN_DELETE_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_instance(&self, req: &super::spanner_instance_admin::DeleteInstanceRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_instance_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_instance_async_opt(&self, req: &super::spanner_instance_admin::DeleteInstanceRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_INSTANCE_ADMIN_DELETE_INSTANCE, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_instance_async(&self, req: &super::spanner_instance_admin::DeleteInstanceRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_instance_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn set_iam_policy_opt(&self, req: &super::iam_policy::SetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.client.unary_call(&METHOD_INSTANCE_ADMIN_SET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn set_iam_policy(&self, req: &super::iam_policy::SetIamPolicyRequest) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.set_iam_policy_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn set_iam_policy_async_opt(&self, req: &super::iam_policy::SetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.client.unary_call_async(&METHOD_INSTANCE_ADMIN_SET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn set_iam_policy_async(&self, req: &super::iam_policy::SetIamPolicyRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.set_iam_policy_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_iam_policy_opt(&self, req: &super::iam_policy::GetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.client.unary_call(&METHOD_INSTANCE_ADMIN_GET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_iam_policy(&self, req: &super::iam_policy::GetIamPolicyRequest) -> ::grpcio::Result<super::policy::Policy> {
|
||||
self.get_iam_policy_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_iam_policy_async_opt(&self, req: &super::iam_policy::GetIamPolicyRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.client.unary_call_async(&METHOD_INSTANCE_ADMIN_GET_IAM_POLICY, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_iam_policy_async(&self, req: &super::iam_policy::GetIamPolicyRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::policy::Policy>> {
|
||||
self.get_iam_policy_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions_opt(&self, req: &super::iam_policy::TestIamPermissionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::iam_policy::TestIamPermissionsResponse> {
|
||||
self.client.unary_call(&METHOD_INSTANCE_ADMIN_TEST_IAM_PERMISSIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions(&self, req: &super::iam_policy::TestIamPermissionsRequest) -> ::grpcio::Result<super::iam_policy::TestIamPermissionsResponse> {
|
||||
self.test_iam_permissions_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions_async_opt(&self, req: &super::iam_policy::TestIamPermissionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::iam_policy::TestIamPermissionsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_INSTANCE_ADMIN_TEST_IAM_PERMISSIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn test_iam_permissions_async(&self, req: &super::iam_policy::TestIamPermissionsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::iam_policy::TestIamPermissionsResponse>> {
|
||||
self.test_iam_permissions_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait InstanceAdmin {
|
||||
fn list_instance_configs(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner_instance_admin::ListInstanceConfigsRequest, sink: ::grpcio::UnarySink<super::spanner_instance_admin::ListInstanceConfigsResponse>);
|
||||
fn get_instance_config(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner_instance_admin::GetInstanceConfigRequest, sink: ::grpcio::UnarySink<super::spanner_instance_admin::InstanceConfig>);
|
||||
fn list_instances(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner_instance_admin::ListInstancesRequest, sink: ::grpcio::UnarySink<super::spanner_instance_admin::ListInstancesResponse>);
|
||||
fn get_instance(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner_instance_admin::GetInstanceRequest, sink: ::grpcio::UnarySink<super::spanner_instance_admin::Instance>);
|
||||
fn create_instance(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner_instance_admin::CreateInstanceRequest, sink: ::grpcio::UnarySink<super::operations::Operation>);
|
||||
fn update_instance(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner_instance_admin::UpdateInstanceRequest, sink: ::grpcio::UnarySink<super::operations::Operation>);
|
||||
fn delete_instance(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner_instance_admin::DeleteInstanceRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn set_iam_policy(&mut self, ctx: ::grpcio::RpcContext, req: super::iam_policy::SetIamPolicyRequest, sink: ::grpcio::UnarySink<super::policy::Policy>);
|
||||
fn get_iam_policy(&mut self, ctx: ::grpcio::RpcContext, req: super::iam_policy::GetIamPolicyRequest, sink: ::grpcio::UnarySink<super::policy::Policy>);
|
||||
fn test_iam_permissions(&mut self, ctx: ::grpcio::RpcContext, req: super::iam_policy::TestIamPermissionsRequest, sink: ::grpcio::UnarySink<super::iam_policy::TestIamPermissionsResponse>);
|
||||
}
|
||||
|
||||
pub fn create_instance_admin<S: InstanceAdmin + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_INSTANCE_ADMIN_LIST_INSTANCE_CONFIGS, move |ctx, req, resp| {
|
||||
instance.list_instance_configs(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_INSTANCE_ADMIN_GET_INSTANCE_CONFIG, move |ctx, req, resp| {
|
||||
instance.get_instance_config(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_INSTANCE_ADMIN_LIST_INSTANCES, move |ctx, req, resp| {
|
||||
instance.list_instances(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_INSTANCE_ADMIN_GET_INSTANCE, move |ctx, req, resp| {
|
||||
instance.get_instance(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_INSTANCE_ADMIN_CREATE_INSTANCE, move |ctx, req, resp| {
|
||||
instance.create_instance(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_INSTANCE_ADMIN_UPDATE_INSTANCE, move |ctx, req, resp| {
|
||||
instance.update_instance(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_INSTANCE_ADMIN_DELETE_INSTANCE, move |ctx, req, resp| {
|
||||
instance.delete_instance(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_INSTANCE_ADMIN_SET_IAM_POLICY, move |ctx, req, resp| {
|
||||
instance.set_iam_policy(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_INSTANCE_ADMIN_GET_IAM_POLICY, move |ctx, req, resp| {
|
||||
instance.get_iam_policy(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_INSTANCE_ADMIN_TEST_IAM_PERMISSIONS, move |ctx, req, resp| {
|
||||
instance.test_iam_permissions(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
2
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/mod.rs
vendored
Normal file
2
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/admin/mod.rs
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
pub mod database;
|
||||
pub mod instance;
|
||||
2
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/mod.rs
vendored
Normal file
2
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/mod.rs
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
pub mod admin;
|
||||
pub mod v1;
|
||||
920
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/keys.rs
vendored
Normal file
920
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/keys.rs
vendored
Normal file
@ -0,0 +1,920 @@
|
||||
// This file is generated by rust-protobuf 2.7.0. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! Generated file from `google/spanner/v1/keys.proto`
|
||||
|
||||
use protobuf::Message as Message_imported_for_functions;
|
||||
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct KeyRange {
|
||||
// message oneof groups
|
||||
pub start_key_type: ::std::option::Option<KeyRange_oneof_start_key_type>,
|
||||
pub end_key_type: ::std::option::Option<KeyRange_oneof_end_key_type>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a KeyRange {
|
||||
fn default() -> &'a KeyRange {
|
||||
<KeyRange as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum KeyRange_oneof_start_key_type {
|
||||
start_closed(::protobuf::well_known_types::ListValue),
|
||||
start_open(::protobuf::well_known_types::ListValue),
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum KeyRange_oneof_end_key_type {
|
||||
end_closed(::protobuf::well_known_types::ListValue),
|
||||
end_open(::protobuf::well_known_types::ListValue),
|
||||
}
|
||||
|
||||
impl KeyRange {
|
||||
pub fn new() -> KeyRange {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// .google.protobuf.ListValue start_closed = 1;
|
||||
|
||||
|
||||
pub fn get_start_closed(&self) -> &::protobuf::well_known_types::ListValue {
|
||||
match self.start_key_type {
|
||||
::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(ref v)) => v,
|
||||
_ => ::protobuf::well_known_types::ListValue::default_instance(),
|
||||
}
|
||||
}
|
||||
pub fn clear_start_closed(&mut self) {
|
||||
self.start_key_type = ::std::option::Option::None;
|
||||
}
|
||||
|
||||
pub fn has_start_closed(&self) -> bool {
|
||||
match self.start_key_type {
|
||||
::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(..)) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_start_closed(&mut self, v: ::protobuf::well_known_types::ListValue) {
|
||||
self.start_key_type = ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(v))
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_start_closed(&mut self) -> &mut ::protobuf::well_known_types::ListValue {
|
||||
if let ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(_)) = self.start_key_type {
|
||||
} else {
|
||||
self.start_key_type = ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(::protobuf::well_known_types::ListValue::new()));
|
||||
}
|
||||
match self.start_key_type {
|
||||
::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_start_closed(&mut self) -> ::protobuf::well_known_types::ListValue {
|
||||
if self.has_start_closed() {
|
||||
match self.start_key_type.take() {
|
||||
::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
::protobuf::well_known_types::ListValue::new()
|
||||
}
|
||||
}
|
||||
|
||||
// .google.protobuf.ListValue start_open = 2;
|
||||
|
||||
|
||||
pub fn get_start_open(&self) -> &::protobuf::well_known_types::ListValue {
|
||||
match self.start_key_type {
|
||||
::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(ref v)) => v,
|
||||
_ => ::protobuf::well_known_types::ListValue::default_instance(),
|
||||
}
|
||||
}
|
||||
pub fn clear_start_open(&mut self) {
|
||||
self.start_key_type = ::std::option::Option::None;
|
||||
}
|
||||
|
||||
pub fn has_start_open(&self) -> bool {
|
||||
match self.start_key_type {
|
||||
::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(..)) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_start_open(&mut self, v: ::protobuf::well_known_types::ListValue) {
|
||||
self.start_key_type = ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(v))
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_start_open(&mut self) -> &mut ::protobuf::well_known_types::ListValue {
|
||||
if let ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(_)) = self.start_key_type {
|
||||
} else {
|
||||
self.start_key_type = ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(::protobuf::well_known_types::ListValue::new()));
|
||||
}
|
||||
match self.start_key_type {
|
||||
::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_start_open(&mut self) -> ::protobuf::well_known_types::ListValue {
|
||||
if self.has_start_open() {
|
||||
match self.start_key_type.take() {
|
||||
::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
::protobuf::well_known_types::ListValue::new()
|
||||
}
|
||||
}
|
||||
|
||||
// .google.protobuf.ListValue end_closed = 3;
|
||||
|
||||
|
||||
pub fn get_end_closed(&self) -> &::protobuf::well_known_types::ListValue {
|
||||
match self.end_key_type {
|
||||
::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(ref v)) => v,
|
||||
_ => ::protobuf::well_known_types::ListValue::default_instance(),
|
||||
}
|
||||
}
|
||||
pub fn clear_end_closed(&mut self) {
|
||||
self.end_key_type = ::std::option::Option::None;
|
||||
}
|
||||
|
||||
pub fn has_end_closed(&self) -> bool {
|
||||
match self.end_key_type {
|
||||
::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(..)) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_end_closed(&mut self, v: ::protobuf::well_known_types::ListValue) {
|
||||
self.end_key_type = ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(v))
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_end_closed(&mut self) -> &mut ::protobuf::well_known_types::ListValue {
|
||||
if let ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(_)) = self.end_key_type {
|
||||
} else {
|
||||
self.end_key_type = ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(::protobuf::well_known_types::ListValue::new()));
|
||||
}
|
||||
match self.end_key_type {
|
||||
::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_end_closed(&mut self) -> ::protobuf::well_known_types::ListValue {
|
||||
if self.has_end_closed() {
|
||||
match self.end_key_type.take() {
|
||||
::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
::protobuf::well_known_types::ListValue::new()
|
||||
}
|
||||
}
|
||||
|
||||
// .google.protobuf.ListValue end_open = 4;
|
||||
|
||||
|
||||
pub fn get_end_open(&self) -> &::protobuf::well_known_types::ListValue {
|
||||
match self.end_key_type {
|
||||
::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(ref v)) => v,
|
||||
_ => ::protobuf::well_known_types::ListValue::default_instance(),
|
||||
}
|
||||
}
|
||||
pub fn clear_end_open(&mut self) {
|
||||
self.end_key_type = ::std::option::Option::None;
|
||||
}
|
||||
|
||||
pub fn has_end_open(&self) -> bool {
|
||||
match self.end_key_type {
|
||||
::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(..)) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_end_open(&mut self, v: ::protobuf::well_known_types::ListValue) {
|
||||
self.end_key_type = ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(v))
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_end_open(&mut self) -> &mut ::protobuf::well_known_types::ListValue {
|
||||
if let ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(_)) = self.end_key_type {
|
||||
} else {
|
||||
self.end_key_type = ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(::protobuf::well_known_types::ListValue::new()));
|
||||
}
|
||||
match self.end_key_type {
|
||||
::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_end_open(&mut self) -> ::protobuf::well_known_types::ListValue {
|
||||
if self.has_end_open() {
|
||||
match self.end_key_type.take() {
|
||||
::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
::protobuf::well_known_types::ListValue::new()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for KeyRange {
|
||||
fn is_initialized(&self) -> bool {
|
||||
if let Some(KeyRange_oneof_start_key_type::start_closed(ref v)) = self.start_key_type {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if let Some(KeyRange_oneof_start_key_type::start_open(ref v)) = self.start_key_type {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if let Some(KeyRange_oneof_end_key_type::end_closed(ref v)) = self.end_key_type {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if let Some(KeyRange_oneof_end_key_type::end_open(ref v)) = self.end_key_type {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
self.start_key_type = ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_closed(is.read_message()?));
|
||||
},
|
||||
2 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
self.start_key_type = ::std::option::Option::Some(KeyRange_oneof_start_key_type::start_open(is.read_message()?));
|
||||
},
|
||||
3 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
self.end_key_type = ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_closed(is.read_message()?));
|
||||
},
|
||||
4 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
self.end_key_type = ::std::option::Option::Some(KeyRange_oneof_end_key_type::end_open(is.read_message()?));
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if let ::std::option::Option::Some(ref v) = self.start_key_type {
|
||||
match v {
|
||||
&KeyRange_oneof_start_key_type::start_closed(ref v) => {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
},
|
||||
&KeyRange_oneof_start_key_type::start_open(ref v) => {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
},
|
||||
};
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.end_key_type {
|
||||
match v {
|
||||
&KeyRange_oneof_end_key_type::end_closed(ref v) => {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
},
|
||||
&KeyRange_oneof_end_key_type::end_open(ref v) => {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
},
|
||||
};
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
if let ::std::option::Option::Some(ref v) = self.start_key_type {
|
||||
match v {
|
||||
&KeyRange_oneof_start_key_type::start_closed(ref v) => {
|
||||
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
},
|
||||
&KeyRange_oneof_start_key_type::start_open(ref v) => {
|
||||
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
},
|
||||
};
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.end_key_type {
|
||||
match v {
|
||||
&KeyRange_oneof_end_key_type::end_closed(ref v) => {
|
||||
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
},
|
||||
&KeyRange_oneof_end_key_type::end_open(ref v) => {
|
||||
os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
},
|
||||
};
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &::std::any::Any {
|
||||
self as &::std::any::Any
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
|
||||
self as &mut ::std::any::Any
|
||||
}
|
||||
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> KeyRange {
|
||||
KeyRange::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ::protobuf::well_known_types::ListValue>(
|
||||
"start_closed",
|
||||
KeyRange::has_start_closed,
|
||||
KeyRange::get_start_closed,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ::protobuf::well_known_types::ListValue>(
|
||||
"start_open",
|
||||
KeyRange::has_start_open,
|
||||
KeyRange::get_start_open,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ::protobuf::well_known_types::ListValue>(
|
||||
"end_closed",
|
||||
KeyRange::has_end_closed,
|
||||
KeyRange::get_end_closed,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ::protobuf::well_known_types::ListValue>(
|
||||
"end_open",
|
||||
KeyRange::has_end_open,
|
||||
KeyRange::get_end_open,
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<KeyRange>(
|
||||
"KeyRange",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static KeyRange {
|
||||
static mut instance: ::protobuf::lazy::Lazy<KeyRange> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const KeyRange,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(KeyRange::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for KeyRange {
|
||||
fn clear(&mut self) {
|
||||
self.start_key_type = ::std::option::Option::None;
|
||||
self.start_key_type = ::std::option::Option::None;
|
||||
self.end_key_type = ::std::option::Option::None;
|
||||
self.end_key_type = ::std::option::Option::None;
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for KeyRange {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for KeyRange {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct KeySet {
|
||||
// message fields
|
||||
pub keys: ::protobuf::RepeatedField<::protobuf::well_known_types::ListValue>,
|
||||
pub ranges: ::protobuf::RepeatedField<KeyRange>,
|
||||
pub all: bool,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a KeySet {
|
||||
fn default() -> &'a KeySet {
|
||||
<KeySet as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl KeySet {
|
||||
pub fn new() -> KeySet {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// repeated .google.protobuf.ListValue keys = 1;
|
||||
|
||||
|
||||
pub fn get_keys(&self) -> &[::protobuf::well_known_types::ListValue] {
|
||||
&self.keys
|
||||
}
|
||||
pub fn clear_keys(&mut self) {
|
||||
self.keys.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_keys(&mut self, v: ::protobuf::RepeatedField<::protobuf::well_known_types::ListValue>) {
|
||||
self.keys = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_keys(&mut self) -> &mut ::protobuf::RepeatedField<::protobuf::well_known_types::ListValue> {
|
||||
&mut self.keys
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_keys(&mut self) -> ::protobuf::RepeatedField<::protobuf::well_known_types::ListValue> {
|
||||
::std::mem::replace(&mut self.keys, ::protobuf::RepeatedField::new())
|
||||
}
|
||||
|
||||
// repeated .google.spanner.v1.KeyRange ranges = 2;
|
||||
|
||||
|
||||
pub fn get_ranges(&self) -> &[KeyRange] {
|
||||
&self.ranges
|
||||
}
|
||||
pub fn clear_ranges(&mut self) {
|
||||
self.ranges.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_ranges(&mut self, v: ::protobuf::RepeatedField<KeyRange>) {
|
||||
self.ranges = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_ranges(&mut self) -> &mut ::protobuf::RepeatedField<KeyRange> {
|
||||
&mut self.ranges
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_ranges(&mut self) -> ::protobuf::RepeatedField<KeyRange> {
|
||||
::std::mem::replace(&mut self.ranges, ::protobuf::RepeatedField::new())
|
||||
}
|
||||
|
||||
// bool all = 3;
|
||||
|
||||
|
||||
pub fn get_all(&self) -> bool {
|
||||
self.all
|
||||
}
|
||||
pub fn clear_all(&mut self) {
|
||||
self.all = false;
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_all(&mut self, v: bool) {
|
||||
self.all = v;
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for KeySet {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.keys {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
for v in &self.ranges {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.keys)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.ranges)?;
|
||||
},
|
||||
3 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeVarint {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
let tmp = is.read_bool()?;
|
||||
self.all = tmp;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
for value in &self.keys {
|
||||
let len = value.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
};
|
||||
for value in &self.ranges {
|
||||
let len = value.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
};
|
||||
if self.all != false {
|
||||
my_size += 2;
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
for v in &self.keys {
|
||||
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
};
|
||||
for v in &self.ranges {
|
||||
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
};
|
||||
if self.all != false {
|
||||
os.write_bool(3, self.all)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &::std::any::Any {
|
||||
self as &::std::any::Any
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
|
||||
self as &mut ::std::any::Any
|
||||
}
|
||||
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> KeySet {
|
||||
KeySet::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::ListValue>>(
|
||||
"keys",
|
||||
|m: &KeySet| { &m.keys },
|
||||
|m: &mut KeySet| { &mut m.keys },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<KeyRange>>(
|
||||
"ranges",
|
||||
|m: &KeySet| { &m.ranges },
|
||||
|m: &mut KeySet| { &mut m.ranges },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
|
||||
"all",
|
||||
|m: &KeySet| { &m.all },
|
||||
|m: &mut KeySet| { &mut m.all },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<KeySet>(
|
||||
"KeySet",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static KeySet {
|
||||
static mut instance: ::protobuf::lazy::Lazy<KeySet> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const KeySet,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(KeySet::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for KeySet {
|
||||
fn clear(&mut self) {
|
||||
self.keys.clear();
|
||||
self.ranges.clear();
|
||||
self.all = false;
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for KeySet {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for KeySet {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x1cgoogle/spanner/v1/keys.proto\x12\x11google.spanner.v1\x1a\x1cgoogl\
|
||||
e/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xa0\x02\n\
|
||||
\x08KeyRange\x12?\n\x0cstart_closed\x18\x01\x20\x01(\x0b2\x1a.google.pro\
|
||||
tobuf.ListValueH\0R\x0bstartClosed\x12;\n\nstart_open\x18\x02\x20\x01(\
|
||||
\x0b2\x1a.google.protobuf.ListValueH\0R\tstartOpen\x12;\n\nend_closed\
|
||||
\x18\x03\x20\x01(\x0b2\x1a.google.protobuf.ListValueH\x01R\tendClosed\
|
||||
\x127\n\x08end_open\x18\x04\x20\x01(\x0b2\x1a.google.protobuf.ListValueH\
|
||||
\x01R\x07endOpenB\x10\n\x0estart_key_typeB\x0e\n\x0cend_key_type\"\x7f\n\
|
||||
\x06KeySet\x12.\n\x04keys\x18\x01\x20\x03(\x0b2\x1a.google.protobuf.List\
|
||||
ValueR\x04keys\x123\n\x06ranges\x18\x02\x20\x03(\x0b2\x1b.google.spanner\
|
||||
.v1.KeyRangeR\x06ranges\x12\x10\n\x03all\x18\x03\x20\x01(\x08R\x03allB\
|
||||
\x92\x01\n\x15com.google.spanner.v1B\tKeysProtoP\x01Z8google.golang.org/\
|
||||
genproto/googleapis/spanner/v1;spanner\xaa\x02\x17Google.Cloud.Spanner.V\
|
||||
1\xca\x02\x17Google\\Cloud\\Spanner\\V1J\x82,\n\x07\x12\x05\x0e\0\xa2\
|
||||
\x01\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x20\
|
||||
2018\x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\x20Licen\
|
||||
se,\x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\
|
||||
\x20use\x20this\x20file\x20except\x20in\x20compliance\x20with\x20the\x20\
|
||||
License.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20License\
|
||||
\x20at\n\n\x20\x20\x20\x20\x20http://www.apache.org/licenses/LICENSE-2.0\
|
||||
\n\n\x20Unless\x20required\x20by\x20applicable\x20law\x20or\x20agreed\
|
||||
\x20to\x20in\x20writing,\x20software\n\x20distributed\x20under\x20the\
|
||||
\x20License\x20is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\
|
||||
\x20WITHOUT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20e\
|
||||
ither\x20express\x20or\x20implied.\n\x20See\x20the\x20License\x20for\x20\
|
||||
the\x20specific\x20language\x20governing\x20permissions\x20and\n\x20limi\
|
||||
tations\x20under\x20the\x20License.\n\n\x08\n\x01\x02\x12\x03\x10\0\x1a\
|
||||
\n\t\n\x02\x03\0\x12\x03\x12\0&\n\t\n\x02\x03\x01\x12\x03\x13\0&\n\x08\n\
|
||||
\x01\x08\x12\x03\x15\04\n\t\n\x02\x08%\x12\x03\x15\04\n\x08\n\x01\x08\
|
||||
\x12\x03\x16\0O\n\t\n\x02\x08\x0b\x12\x03\x16\0O\n\x08\n\x01\x08\x12\x03\
|
||||
\x17\0\"\n\t\n\x02\x08\n\x12\x03\x17\0\"\n\x08\n\x01\x08\x12\x03\x18\0*\
|
||||
\n\t\n\x02\x08\x08\x12\x03\x18\0*\n\x08\n\x01\x08\x12\x03\x19\0.\n\t\n\
|
||||
\x02\x08\x01\x12\x03\x19\0.\n\x08\n\x01\x08\x12\x03\x1a\04\n\t\n\x02\x08\
|
||||
)\x12\x03\x1a\04\n\xb4\x15\n\x02\x04\0\x12\x05t\0\x8a\x01\x01\x1a\xa6\
|
||||
\x15\x20KeyRange\x20represents\x20a\x20range\x20of\x20rows\x20in\x20a\
|
||||
\x20table\x20or\x20index.\n\n\x20A\x20range\x20has\x20a\x20start\x20key\
|
||||
\x20and\x20an\x20end\x20key.\x20These\x20keys\x20can\x20be\x20open\x20or\
|
||||
\n\x20closed,\x20indicating\x20if\x20the\x20range\x20includes\x20rows\
|
||||
\x20with\x20that\x20key.\n\n\x20Keys\x20are\x20represented\x20by\x20list\
|
||||
s,\x20where\x20the\x20ith\x20value\x20in\x20the\x20list\n\x20corresponds\
|
||||
\x20to\x20the\x20ith\x20component\x20of\x20the\x20table\x20or\x20index\
|
||||
\x20primary\x20key.\n\x20Individual\x20values\x20are\x20encoded\x20as\
|
||||
\x20described\x20[here][google.spanner.v1.TypeCode].\n\n\x20For\x20examp\
|
||||
le,\x20consider\x20the\x20following\x20table\x20definition:\n\n\x20\x20\
|
||||
\x20\x20\x20CREATE\x20TABLE\x20UserEvents\x20(\n\x20\x20\x20\x20\x20\x20\
|
||||
\x20UserName\x20STRING(MAX),\n\x20\x20\x20\x20\x20\x20\x20EventDate\x20S\
|
||||
TRING(10)\n\x20\x20\x20\x20\x20)\x20PRIMARY\x20KEY(UserName,\x20EventDat\
|
||||
e);\n\n\x20The\x20following\x20keys\x20name\x20rows\x20in\x20this\x20tab\
|
||||
le:\n\n\x20\x20\x20\x20\x20[\"Bob\",\x20\"2014-09-23\"]\n\x20\x20\x20\
|
||||
\x20\x20[\"Alfred\",\x20\"2015-06-12\"]\n\n\x20Since\x20the\x20`UserEven\
|
||||
ts`\x20table's\x20`PRIMARY\x20KEY`\x20clause\x20names\x20two\n\x20column\
|
||||
s,\x20each\x20`UserEvents`\x20key\x20has\x20two\x20elements;\x20the\x20f\
|
||||
irst\x20is\x20the\n\x20`UserName`,\x20and\x20the\x20second\x20is\x20the\
|
||||
\x20`EventDate`.\n\n\x20Key\x20ranges\x20with\x20multiple\x20components\
|
||||
\x20are\x20interpreted\n\x20lexicographically\x20by\x20component\x20usin\
|
||||
g\x20the\x20table\x20or\x20index\x20key's\x20declared\n\x20sort\x20order\
|
||||
.\x20For\x20example,\x20the\x20following\x20range\x20returns\x20all\x20e\
|
||||
vents\x20for\n\x20user\x20`\"Bob\"`\x20that\x20occurred\x20in\x20the\x20\
|
||||
year\x202015:\n\n\x20\x20\x20\x20\x20\"start_closed\":\x20[\"Bob\",\x20\
|
||||
\"2015-01-01\"]\n\x20\x20\x20\x20\x20\"end_closed\":\x20[\"Bob\",\x20\"2\
|
||||
015-12-31\"]\n\n\x20Start\x20and\x20end\x20keys\x20can\x20omit\x20traili\
|
||||
ng\x20key\x20components.\x20This\x20affects\x20the\n\x20inclusion\x20and\
|
||||
\x20exclusion\x20of\x20rows\x20that\x20exactly\x20match\x20the\x20provid\
|
||||
ed\x20key\n\x20components:\x20if\x20the\x20key\x20is\x20closed,\x20then\
|
||||
\x20rows\x20that\x20exactly\x20match\x20the\n\x20provided\x20components\
|
||||
\x20are\x20included;\x20if\x20the\x20key\x20is\x20open,\x20then\x20rows\
|
||||
\n\x20that\x20exactly\x20match\x20are\x20not\x20included.\n\n\x20For\x20\
|
||||
example,\x20the\x20following\x20range\x20includes\x20all\x20events\x20fo\
|
||||
r\x20`\"Bob\"`\x20that\n\x20occurred\x20during\x20and\x20after\x20the\
|
||||
\x20year\x202000:\n\n\x20\x20\x20\x20\x20\"start_closed\":\x20[\"Bob\",\
|
||||
\x20\"2000-01-01\"]\n\x20\x20\x20\x20\x20\"end_closed\":\x20[\"Bob\"]\n\
|
||||
\n\x20The\x20next\x20example\x20retrieves\x20all\x20events\x20for\x20`\"\
|
||||
Bob\"`:\n\n\x20\x20\x20\x20\x20\"start_closed\":\x20[\"Bob\"]\n\x20\x20\
|
||||
\x20\x20\x20\"end_closed\":\x20[\"Bob\"]\n\n\x20To\x20retrieve\x20events\
|
||||
\x20before\x20the\x20year\x202000:\n\n\x20\x20\x20\x20\x20\"start_closed\
|
||||
\":\x20[\"Bob\"]\n\x20\x20\x20\x20\x20\"end_open\":\x20[\"Bob\",\x20\"20\
|
||||
00-01-01\"]\n\n\x20The\x20following\x20range\x20includes\x20all\x20rows\
|
||||
\x20in\x20the\x20table:\n\n\x20\x20\x20\x20\x20\"start_closed\":\x20[]\n\
|
||||
\x20\x20\x20\x20\x20\"end_closed\":\x20[]\n\n\x20This\x20range\x20return\
|
||||
s\x20all\x20users\x20whose\x20`UserName`\x20begins\x20with\x20any\n\x20c\
|
||||
haracter\x20from\x20A\x20to\x20C:\n\n\x20\x20\x20\x20\x20\"start_closed\
|
||||
\":\x20[\"A\"]\n\x20\x20\x20\x20\x20\"end_open\":\x20[\"D\"]\n\n\x20This\
|
||||
\x20range\x20returns\x20all\x20users\x20whose\x20`UserName`\x20begins\
|
||||
\x20with\x20B:\n\n\x20\x20\x20\x20\x20\"start_closed\":\x20[\"B\"]\n\x20\
|
||||
\x20\x20\x20\x20\"end_open\":\x20[\"C\"]\n\n\x20Key\x20ranges\x20honor\
|
||||
\x20column\x20sort\x20order.\x20For\x20example,\x20suppose\x20a\x20table\
|
||||
\x20is\n\x20defined\x20as\x20follows:\n\n\x20\x20\x20\x20\x20CREATE\x20T\
|
||||
ABLE\x20DescendingSortedTable\x20{\n\x20\x20\x20\x20\x20\x20\x20Key\x20I\
|
||||
NT64,\n\x20\x20\x20\x20\x20\x20\x20...\n\x20\x20\x20\x20\x20)\x20PRIMARY\
|
||||
\x20KEY(Key\x20DESC);\n\n\x20The\x20following\x20range\x20retrieves\x20a\
|
||||
ll\x20rows\x20with\x20key\x20values\x20between\x201\n\x20and\x20100\x20i\
|
||||
nclusive:\n\n\x20\x20\x20\x20\x20\"start_closed\":\x20[\"100\"]\n\x20\
|
||||
\x20\x20\x20\x20\"end_closed\":\x20[\"1\"]\n\n\x20Note\x20that\x20100\
|
||||
\x20is\x20passed\x20as\x20the\x20start,\x20and\x201\x20is\x20passed\x20a\
|
||||
s\x20the\x20end,\n\x20because\x20`Key`\x20is\x20a\x20descending\x20colum\
|
||||
n\x20in\x20the\x20schema.\n\n\n\n\x03\x04\0\x01\x12\x03t\x08\x10\nP\n\
|
||||
\x04\x04\0\x08\0\x12\x04v\x02~\x03\x1aB\x20The\x20start\x20key\x20must\
|
||||
\x20be\x20provided.\x20It\x20can\x20be\x20either\x20closed\x20or\x20open\
|
||||
.\n\n\x0c\n\x05\x04\0\x08\0\x01\x12\x03v\x08\x16\n\x93\x01\n\x04\x04\0\
|
||||
\x02\0\x12\x03y\x04/\x1a\x85\x01\x20If\x20the\x20start\x20is\x20closed,\
|
||||
\x20then\x20the\x20range\x20includes\x20all\x20rows\x20whose\n\x20first\
|
||||
\x20`len(start_closed)`\x20key\x20columns\x20exactly\x20match\x20`start_\
|
||||
closed`.\n\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03y\x04\x1d\n\x0c\n\x05\x04\
|
||||
\0\x02\0\x01\x12\x03y\x1e*\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03y-.\n\x88\
|
||||
\x01\n\x04\x04\0\x02\x01\x12\x03}\x04-\x1a{\x20If\x20the\x20start\x20is\
|
||||
\x20open,\x20then\x20the\x20range\x20excludes\x20rows\x20whose\x20first\
|
||||
\n\x20`len(start_open)`\x20key\x20columns\x20exactly\x20match\x20`start_\
|
||||
open`.\n\n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03}\x04\x1d\n\x0c\n\x05\x04\
|
||||
\0\x02\x01\x01\x12\x03}\x1e(\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03}+,\nP\
|
||||
\n\x04\x04\0\x08\x01\x12\x06\x81\x01\x02\x89\x01\x03\x1a@\x20The\x20end\
|
||||
\x20key\x20must\x20be\x20provided.\x20It\x20can\x20be\x20either\x20close\
|
||||
d\x20or\x20open.\n\n\r\n\x05\x04\0\x08\x01\x01\x12\x04\x81\x01\x08\x14\n\
|
||||
\x8d\x01\n\x04\x04\0\x02\x02\x12\x04\x84\x01\x04-\x1a\x7f\x20If\x20the\
|
||||
\x20end\x20is\x20closed,\x20then\x20the\x20range\x20includes\x20all\x20r\
|
||||
ows\x20whose\n\x20first\x20`len(end_closed)`\x20key\x20columns\x20exactl\
|
||||
y\x20match\x20`end_closed`.\n\n\r\n\x05\x04\0\x02\x02\x06\x12\x04\x84\
|
||||
\x01\x04\x1d\n\r\n\x05\x04\0\x02\x02\x01\x12\x04\x84\x01\x1e(\n\r\n\x05\
|
||||
\x04\0\x02\x02\x03\x12\x04\x84\x01+,\n\x83\x01\n\x04\x04\0\x02\x03\x12\
|
||||
\x04\x88\x01\x04+\x1au\x20If\x20the\x20end\x20is\x20open,\x20then\x20the\
|
||||
\x20range\x20excludes\x20rows\x20whose\x20first\n\x20`len(end_open)`\x20\
|
||||
key\x20columns\x20exactly\x20match\x20`end_open`.\n\n\r\n\x05\x04\0\x02\
|
||||
\x03\x06\x12\x04\x88\x01\x04\x1d\n\r\n\x05\x04\0\x02\x03\x01\x12\x04\x88\
|
||||
\x01\x1e&\n\r\n\x05\x04\0\x02\x03\x03\x12\x04\x88\x01)*\n\x86\x03\n\x02\
|
||||
\x04\x01\x12\x06\x93\x01\0\xa2\x01\x01\x1a\xf7\x02\x20`KeySet`\x20define\
|
||||
s\x20a\x20collection\x20of\x20Cloud\x20Spanner\x20keys\x20and/or\x20key\
|
||||
\x20ranges.\x20All\n\x20the\x20keys\x20are\x20expected\x20to\x20be\x20in\
|
||||
\x20the\x20same\x20table\x20or\x20index.\x20The\x20keys\x20need\n\x20not\
|
||||
\x20be\x20sorted\x20in\x20any\x20particular\x20way.\n\n\x20If\x20the\x20\
|
||||
same\x20key\x20is\x20specified\x20multiple\x20times\x20in\x20the\x20set\
|
||||
\x20(for\x20example\n\x20if\x20two\x20ranges,\x20two\x20keys,\x20or\x20a\
|
||||
\x20key\x20and\x20a\x20range\x20overlap),\x20Cloud\x20Spanner\n\x20behav\
|
||||
es\x20as\x20if\x20the\x20key\x20were\x20only\x20specified\x20once.\n\n\
|
||||
\x0b\n\x03\x04\x01\x01\x12\x04\x93\x01\x08\x0e\n\x8a\x02\n\x04\x04\x01\
|
||||
\x02\0\x12\x04\x98\x01\x02.\x1a\xfb\x01\x20A\x20list\x20of\x20specific\
|
||||
\x20keys.\x20Entries\x20in\x20`keys`\x20should\x20have\x20exactly\x20as\
|
||||
\n\x20many\x20elements\x20as\x20there\x20are\x20columns\x20in\x20the\x20\
|
||||
primary\x20or\x20index\x20key\n\x20with\x20which\x20this\x20`KeySet`\x20\
|
||||
is\x20used.\x20\x20Individual\x20key\x20values\x20are\n\x20encoded\x20as\
|
||||
\x20described\x20[here][google.spanner.v1.TypeCode].\n\n\r\n\x05\x04\x01\
|
||||
\x02\0\x04\x12\x04\x98\x01\x02\n\n\r\n\x05\x04\x01\x02\0\x06\x12\x04\x98\
|
||||
\x01\x0b$\n\r\n\x05\x04\x01\x02\0\x01\x12\x04\x98\x01%)\n\r\n\x05\x04\
|
||||
\x01\x02\0\x03\x12\x04\x98\x01,-\n\x86\x01\n\x04\x04\x01\x02\x01\x12\x04\
|
||||
\x9c\x01\x02\x1f\x1ax\x20A\x20list\x20of\x20key\x20ranges.\x20See\x20[Ke\
|
||||
yRange][google.spanner.v1.KeyRange]\x20for\x20more\x20information\x20abo\
|
||||
ut\n\x20key\x20range\x20specifications.\n\n\r\n\x05\x04\x01\x02\x01\x04\
|
||||
\x12\x04\x9c\x01\x02\n\n\r\n\x05\x04\x01\x02\x01\x06\x12\x04\x9c\x01\x0b\
|
||||
\x13\n\r\n\x05\x04\x01\x02\x01\x01\x12\x04\x9c\x01\x14\x1a\n\r\n\x05\x04\
|
||||
\x01\x02\x01\x03\x12\x04\x9c\x01\x1d\x1e\n\xce\x01\n\x04\x04\x01\x02\x02\
|
||||
\x12\x04\xa1\x01\x02\x0f\x1a\xbf\x01\x20For\x20convenience\x20`all`\x20c\
|
||||
an\x20be\x20set\x20to\x20`true`\x20to\x20indicate\x20that\x20this\n\x20`\
|
||||
KeySet`\x20matches\x20all\x20keys\x20in\x20the\x20table\x20or\x20index.\
|
||||
\x20Note\x20that\x20any\x20keys\n\x20specified\x20in\x20`keys`\x20or\x20\
|
||||
`ranges`\x20are\x20only\x20yielded\x20once.\n\n\x0f\n\x05\x04\x01\x02\
|
||||
\x02\x04\x12\x06\xa1\x01\x02\x9c\x01\x1f\n\r\n\x05\x04\x01\x02\x02\x05\
|
||||
\x12\x04\xa1\x01\x02\x06\n\r\n\x05\x04\x01\x02\x02\x01\x12\x04\xa1\x01\
|
||||
\x07\n\n\r\n\x05\x04\x01\x02\x02\x03\x12\x04\xa1\x01\r\x0eb\x06proto3\
|
||||
";
|
||||
|
||||
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
|
||||
};
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
unsafe {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
}
|
||||
10
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/mod.rs
vendored
Normal file
10
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/mod.rs
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
pub mod keys;
|
||||
pub mod mutation;
|
||||
pub mod query_plan;
|
||||
pub mod result_set;
|
||||
pub mod spanner;
|
||||
pub mod spanner_grpc;
|
||||
pub mod transaction;
|
||||
pub mod type_pb;
|
||||
|
||||
pub(crate) use crate::empty;
|
||||
1176
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/mutation.rs
vendored
Normal file
1176
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/mutation.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1360
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/query_plan.rs
vendored
Normal file
1360
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/query_plan.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1528
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/result_set.rs
vendored
Normal file
1528
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/result_set.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5892
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/spanner.rs
vendored
Normal file
5892
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/spanner.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
391
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/spanner_grpc.rs
vendored
Normal file
391
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/spanner_grpc.rs
vendored
Normal file
@ -0,0 +1,391 @@
|
||||
// This file is generated. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
|
||||
const METHOD_SPANNER_CREATE_SESSION: ::grpcio::Method<super::spanner::CreateSessionRequest, super::spanner::Session> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.v1.Spanner/CreateSession",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SPANNER_GET_SESSION: ::grpcio::Method<super::spanner::GetSessionRequest, super::spanner::Session> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.v1.Spanner/GetSession",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SPANNER_LIST_SESSIONS: ::grpcio::Method<super::spanner::ListSessionsRequest, super::spanner::ListSessionsResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.v1.Spanner/ListSessions",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SPANNER_DELETE_SESSION: ::grpcio::Method<super::spanner::DeleteSessionRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.v1.Spanner/DeleteSession",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SPANNER_EXECUTE_SQL: ::grpcio::Method<super::spanner::ExecuteSqlRequest, super::result_set::ResultSet> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.v1.Spanner/ExecuteSql",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SPANNER_EXECUTE_STREAMING_SQL: ::grpcio::Method<super::spanner::ExecuteSqlRequest, super::result_set::PartialResultSet> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::ServerStreaming,
|
||||
name: "/google.spanner.v1.Spanner/ExecuteStreamingSql",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SPANNER_READ: ::grpcio::Method<super::spanner::ReadRequest, super::result_set::ResultSet> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.v1.Spanner/Read",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SPANNER_STREAMING_READ: ::grpcio::Method<super::spanner::ReadRequest, super::result_set::PartialResultSet> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::ServerStreaming,
|
||||
name: "/google.spanner.v1.Spanner/StreamingRead",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SPANNER_BEGIN_TRANSACTION: ::grpcio::Method<super::spanner::BeginTransactionRequest, super::transaction::Transaction> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.v1.Spanner/BeginTransaction",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SPANNER_COMMIT: ::grpcio::Method<super::spanner::CommitRequest, super::spanner::CommitResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.v1.Spanner/Commit",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SPANNER_ROLLBACK: ::grpcio::Method<super::spanner::RollbackRequest, super::empty::Empty> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.v1.Spanner/Rollback",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SPANNER_PARTITION_QUERY: ::grpcio::Method<super::spanner::PartitionQueryRequest, super::spanner::PartitionResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.v1.Spanner/PartitionQuery",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
const METHOD_SPANNER_PARTITION_READ: ::grpcio::Method<super::spanner::PartitionReadRequest, super::spanner::PartitionResponse> = ::grpcio::Method {
|
||||
ty: ::grpcio::MethodType::Unary,
|
||||
name: "/google.spanner.v1.Spanner/PartitionRead",
|
||||
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct SpannerClient {
|
||||
client: ::grpcio::Client,
|
||||
}
|
||||
|
||||
impl SpannerClient {
|
||||
pub fn new(channel: ::grpcio::Channel) -> Self {
|
||||
SpannerClient {
|
||||
client: ::grpcio::Client::new(channel),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create_session_opt(&self, req: &super::spanner::CreateSessionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::spanner::Session> {
|
||||
self.client.unary_call(&METHOD_SPANNER_CREATE_SESSION, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_session(&self, req: &super::spanner::CreateSessionRequest) -> ::grpcio::Result<super::spanner::Session> {
|
||||
self.create_session_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn create_session_async_opt(&self, req: &super::spanner::CreateSessionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner::Session>> {
|
||||
self.client.unary_call_async(&METHOD_SPANNER_CREATE_SESSION, req, opt)
|
||||
}
|
||||
|
||||
pub fn create_session_async(&self, req: &super::spanner::CreateSessionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner::Session>> {
|
||||
self.create_session_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_session_opt(&self, req: &super::spanner::GetSessionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::spanner::Session> {
|
||||
self.client.unary_call(&METHOD_SPANNER_GET_SESSION, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_session(&self, req: &super::spanner::GetSessionRequest) -> ::grpcio::Result<super::spanner::Session> {
|
||||
self.get_session_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn get_session_async_opt(&self, req: &super::spanner::GetSessionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner::Session>> {
|
||||
self.client.unary_call_async(&METHOD_SPANNER_GET_SESSION, req, opt)
|
||||
}
|
||||
|
||||
pub fn get_session_async(&self, req: &super::spanner::GetSessionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner::Session>> {
|
||||
self.get_session_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_sessions_opt(&self, req: &super::spanner::ListSessionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::spanner::ListSessionsResponse> {
|
||||
self.client.unary_call(&METHOD_SPANNER_LIST_SESSIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_sessions(&self, req: &super::spanner::ListSessionsRequest) -> ::grpcio::Result<super::spanner::ListSessionsResponse> {
|
||||
self.list_sessions_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn list_sessions_async_opt(&self, req: &super::spanner::ListSessionsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner::ListSessionsResponse>> {
|
||||
self.client.unary_call_async(&METHOD_SPANNER_LIST_SESSIONS, req, opt)
|
||||
}
|
||||
|
||||
pub fn list_sessions_async(&self, req: &super::spanner::ListSessionsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner::ListSessionsResponse>> {
|
||||
self.list_sessions_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_session_opt(&self, req: &super::spanner::DeleteSessionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_SPANNER_DELETE_SESSION, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_session(&self, req: &super::spanner::DeleteSessionRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.delete_session_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn delete_session_async_opt(&self, req: &super::spanner::DeleteSessionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_SPANNER_DELETE_SESSION, req, opt)
|
||||
}
|
||||
|
||||
pub fn delete_session_async(&self, req: &super::spanner::DeleteSessionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.delete_session_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn execute_sql_opt(&self, req: &super::spanner::ExecuteSqlRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::result_set::ResultSet> {
|
||||
self.client.unary_call(&METHOD_SPANNER_EXECUTE_SQL, req, opt)
|
||||
}
|
||||
|
||||
pub fn execute_sql(&self, req: &super::spanner::ExecuteSqlRequest) -> ::grpcio::Result<super::result_set::ResultSet> {
|
||||
self.execute_sql_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn execute_sql_async_opt(&self, req: &super::spanner::ExecuteSqlRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::result_set::ResultSet>> {
|
||||
self.client.unary_call_async(&METHOD_SPANNER_EXECUTE_SQL, req, opt)
|
||||
}
|
||||
|
||||
pub fn execute_sql_async(&self, req: &super::spanner::ExecuteSqlRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::result_set::ResultSet>> {
|
||||
self.execute_sql_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn execute_streaming_sql_opt(&self, req: &super::spanner::ExecuteSqlRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::result_set::PartialResultSet>> {
|
||||
self.client.server_streaming(&METHOD_SPANNER_EXECUTE_STREAMING_SQL, req, opt)
|
||||
}
|
||||
|
||||
pub fn execute_streaming_sql(&self, req: &super::spanner::ExecuteSqlRequest) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::result_set::PartialResultSet>> {
|
||||
self.execute_streaming_sql_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn read_opt(&self, req: &super::spanner::ReadRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::result_set::ResultSet> {
|
||||
self.client.unary_call(&METHOD_SPANNER_READ, req, opt)
|
||||
}
|
||||
|
||||
pub fn read(&self, req: &super::spanner::ReadRequest) -> ::grpcio::Result<super::result_set::ResultSet> {
|
||||
self.read_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn read_async_opt(&self, req: &super::spanner::ReadRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::result_set::ResultSet>> {
|
||||
self.client.unary_call_async(&METHOD_SPANNER_READ, req, opt)
|
||||
}
|
||||
|
||||
pub fn read_async(&self, req: &super::spanner::ReadRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::result_set::ResultSet>> {
|
||||
self.read_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn streaming_read_opt(&self, req: &super::spanner::ReadRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::result_set::PartialResultSet>> {
|
||||
self.client.server_streaming(&METHOD_SPANNER_STREAMING_READ, req, opt)
|
||||
}
|
||||
|
||||
pub fn streaming_read(&self, req: &super::spanner::ReadRequest) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::result_set::PartialResultSet>> {
|
||||
self.streaming_read_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn begin_transaction_opt(&self, req: &super::spanner::BeginTransactionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::transaction::Transaction> {
|
||||
self.client.unary_call(&METHOD_SPANNER_BEGIN_TRANSACTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn begin_transaction(&self, req: &super::spanner::BeginTransactionRequest) -> ::grpcio::Result<super::transaction::Transaction> {
|
||||
self.begin_transaction_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn begin_transaction_async_opt(&self, req: &super::spanner::BeginTransactionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::transaction::Transaction>> {
|
||||
self.client.unary_call_async(&METHOD_SPANNER_BEGIN_TRANSACTION, req, opt)
|
||||
}
|
||||
|
||||
pub fn begin_transaction_async(&self, req: &super::spanner::BeginTransactionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::transaction::Transaction>> {
|
||||
self.begin_transaction_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn commit_opt(&self, req: &super::spanner::CommitRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::spanner::CommitResponse> {
|
||||
self.client.unary_call(&METHOD_SPANNER_COMMIT, req, opt)
|
||||
}
|
||||
|
||||
pub fn commit(&self, req: &super::spanner::CommitRequest) -> ::grpcio::Result<super::spanner::CommitResponse> {
|
||||
self.commit_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn commit_async_opt(&self, req: &super::spanner::CommitRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner::CommitResponse>> {
|
||||
self.client.unary_call_async(&METHOD_SPANNER_COMMIT, req, opt)
|
||||
}
|
||||
|
||||
pub fn commit_async(&self, req: &super::spanner::CommitRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner::CommitResponse>> {
|
||||
self.commit_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn rollback_opt(&self, req: &super::spanner::RollbackRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.client.unary_call(&METHOD_SPANNER_ROLLBACK, req, opt)
|
||||
}
|
||||
|
||||
pub fn rollback(&self, req: &super::spanner::RollbackRequest) -> ::grpcio::Result<super::empty::Empty> {
|
||||
self.rollback_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn rollback_async_opt(&self, req: &super::spanner::RollbackRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.client.unary_call_async(&METHOD_SPANNER_ROLLBACK, req, opt)
|
||||
}
|
||||
|
||||
pub fn rollback_async(&self, req: &super::spanner::RollbackRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
|
||||
self.rollback_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn partition_query_opt(&self, req: &super::spanner::PartitionQueryRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::spanner::PartitionResponse> {
|
||||
self.client.unary_call(&METHOD_SPANNER_PARTITION_QUERY, req, opt)
|
||||
}
|
||||
|
||||
pub fn partition_query(&self, req: &super::spanner::PartitionQueryRequest) -> ::grpcio::Result<super::spanner::PartitionResponse> {
|
||||
self.partition_query_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn partition_query_async_opt(&self, req: &super::spanner::PartitionQueryRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner::PartitionResponse>> {
|
||||
self.client.unary_call_async(&METHOD_SPANNER_PARTITION_QUERY, req, opt)
|
||||
}
|
||||
|
||||
pub fn partition_query_async(&self, req: &super::spanner::PartitionQueryRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner::PartitionResponse>> {
|
||||
self.partition_query_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn partition_read_opt(&self, req: &super::spanner::PartitionReadRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::spanner::PartitionResponse> {
|
||||
self.client.unary_call(&METHOD_SPANNER_PARTITION_READ, req, opt)
|
||||
}
|
||||
|
||||
pub fn partition_read(&self, req: &super::spanner::PartitionReadRequest) -> ::grpcio::Result<super::spanner::PartitionResponse> {
|
||||
self.partition_read_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
|
||||
pub fn partition_read_async_opt(&self, req: &super::spanner::PartitionReadRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner::PartitionResponse>> {
|
||||
self.client.unary_call_async(&METHOD_SPANNER_PARTITION_READ, req, opt)
|
||||
}
|
||||
|
||||
pub fn partition_read_async(&self, req: &super::spanner::PartitionReadRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::spanner::PartitionResponse>> {
|
||||
self.partition_read_async_opt(req, ::grpcio::CallOption::default())
|
||||
}
|
||||
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
|
||||
self.client.spawn(f)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Spanner {
|
||||
fn create_session(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner::CreateSessionRequest, sink: ::grpcio::UnarySink<super::spanner::Session>);
|
||||
fn get_session(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner::GetSessionRequest, sink: ::grpcio::UnarySink<super::spanner::Session>);
|
||||
fn list_sessions(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner::ListSessionsRequest, sink: ::grpcio::UnarySink<super::spanner::ListSessionsResponse>);
|
||||
fn delete_session(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner::DeleteSessionRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn execute_sql(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner::ExecuteSqlRequest, sink: ::grpcio::UnarySink<super::result_set::ResultSet>);
|
||||
fn execute_streaming_sql(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner::ExecuteSqlRequest, sink: ::grpcio::ServerStreamingSink<super::result_set::PartialResultSet>);
|
||||
fn read(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner::ReadRequest, sink: ::grpcio::UnarySink<super::result_set::ResultSet>);
|
||||
fn streaming_read(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner::ReadRequest, sink: ::grpcio::ServerStreamingSink<super::result_set::PartialResultSet>);
|
||||
fn begin_transaction(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner::BeginTransactionRequest, sink: ::grpcio::UnarySink<super::transaction::Transaction>);
|
||||
fn commit(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner::CommitRequest, sink: ::grpcio::UnarySink<super::spanner::CommitResponse>);
|
||||
fn rollback(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner::RollbackRequest, sink: ::grpcio::UnarySink<super::empty::Empty>);
|
||||
fn partition_query(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner::PartitionQueryRequest, sink: ::grpcio::UnarySink<super::spanner::PartitionResponse>);
|
||||
fn partition_read(&mut self, ctx: ::grpcio::RpcContext, req: super::spanner::PartitionReadRequest, sink: ::grpcio::UnarySink<super::spanner::PartitionResponse>);
|
||||
}
|
||||
|
||||
pub fn create_spanner<S: Spanner + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
|
||||
let mut builder = ::grpcio::ServiceBuilder::new();
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SPANNER_CREATE_SESSION, move |ctx, req, resp| {
|
||||
instance.create_session(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SPANNER_GET_SESSION, move |ctx, req, resp| {
|
||||
instance.get_session(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SPANNER_LIST_SESSIONS, move |ctx, req, resp| {
|
||||
instance.list_sessions(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SPANNER_DELETE_SESSION, move |ctx, req, resp| {
|
||||
instance.delete_session(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SPANNER_EXECUTE_SQL, move |ctx, req, resp| {
|
||||
instance.execute_sql(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_server_streaming_handler(&METHOD_SPANNER_EXECUTE_STREAMING_SQL, move |ctx, req, resp| {
|
||||
instance.execute_streaming_sql(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SPANNER_READ, move |ctx, req, resp| {
|
||||
instance.read(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_server_streaming_handler(&METHOD_SPANNER_STREAMING_READ, move |ctx, req, resp| {
|
||||
instance.streaming_read(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SPANNER_BEGIN_TRANSACTION, move |ctx, req, resp| {
|
||||
instance.begin_transaction(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SPANNER_COMMIT, move |ctx, req, resp| {
|
||||
instance.commit(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SPANNER_ROLLBACK, move |ctx, req, resp| {
|
||||
instance.rollback(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SPANNER_PARTITION_QUERY, move |ctx, req, resp| {
|
||||
instance.partition_query(ctx, req, resp)
|
||||
});
|
||||
let mut instance = s.clone();
|
||||
builder = builder.add_unary_handler(&METHOD_SPANNER_PARTITION_READ, move |ctx, req, resp| {
|
||||
instance.partition_read(ctx, req, resp)
|
||||
});
|
||||
builder.build()
|
||||
}
|
||||
2245
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/transaction.rs
vendored
Normal file
2245
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/transaction.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
936
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/type_pb.rs
vendored
Normal file
936
vendor/mozilla-rust-sdk/googleapis-raw/src/spanner/v1/type_pb.rs
vendored
Normal file
@ -0,0 +1,936 @@
|
||||
// This file is generated by rust-protobuf 2.7.0. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! Generated file from `google/spanner/v1/type.proto`
|
||||
|
||||
use protobuf::Message as Message_imported_for_functions;
|
||||
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct Type {
|
||||
// message fields
|
||||
pub code: TypeCode,
|
||||
pub array_element_type: ::protobuf::SingularPtrField<Type>,
|
||||
pub struct_type: ::protobuf::SingularPtrField<StructType>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a Type {
|
||||
fn default() -> &'a Type {
|
||||
<Type as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl Type {
|
||||
pub fn new() -> Type {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// .google.spanner.v1.TypeCode code = 1;
|
||||
|
||||
|
||||
pub fn get_code(&self) -> TypeCode {
|
||||
self.code
|
||||
}
|
||||
pub fn clear_code(&mut self) {
|
||||
self.code = TypeCode::TYPE_CODE_UNSPECIFIED;
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_code(&mut self, v: TypeCode) {
|
||||
self.code = v;
|
||||
}
|
||||
|
||||
// .google.spanner.v1.Type array_element_type = 2;
|
||||
|
||||
|
||||
pub fn get_array_element_type(&self) -> &Type {
|
||||
self.array_element_type.as_ref().unwrap_or_else(|| Type::default_instance())
|
||||
}
|
||||
pub fn clear_array_element_type(&mut self) {
|
||||
self.array_element_type.clear();
|
||||
}
|
||||
|
||||
pub fn has_array_element_type(&self) -> bool {
|
||||
self.array_element_type.is_some()
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_array_element_type(&mut self, v: Type) {
|
||||
self.array_element_type = ::protobuf::SingularPtrField::some(v);
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_array_element_type(&mut self) -> &mut Type {
|
||||
if self.array_element_type.is_none() {
|
||||
self.array_element_type.set_default();
|
||||
}
|
||||
self.array_element_type.as_mut().unwrap()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_array_element_type(&mut self) -> Type {
|
||||
self.array_element_type.take().unwrap_or_else(|| Type::new())
|
||||
}
|
||||
|
||||
// .google.spanner.v1.StructType struct_type = 3;
|
||||
|
||||
|
||||
pub fn get_struct_type(&self) -> &StructType {
|
||||
self.struct_type.as_ref().unwrap_or_else(|| StructType::default_instance())
|
||||
}
|
||||
pub fn clear_struct_type(&mut self) {
|
||||
self.struct_type.clear();
|
||||
}
|
||||
|
||||
pub fn has_struct_type(&self) -> bool {
|
||||
self.struct_type.is_some()
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_struct_type(&mut self, v: StructType) {
|
||||
self.struct_type = ::protobuf::SingularPtrField::some(v);
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_struct_type(&mut self) -> &mut StructType {
|
||||
if self.struct_type.is_none() {
|
||||
self.struct_type.set_default();
|
||||
}
|
||||
self.struct_type.as_mut().unwrap()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_struct_type(&mut self) -> StructType {
|
||||
self.struct_type.take().unwrap_or_else(|| StructType::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for Type {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.array_element_type {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
for v in &self.struct_type {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.code, 1, &mut self.unknown_fields)?
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.array_element_type)?;
|
||||
},
|
||||
3 => {
|
||||
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.struct_type)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if self.code != TypeCode::TYPE_CODE_UNSPECIFIED {
|
||||
my_size += ::protobuf::rt::enum_size(1, self.code);
|
||||
}
|
||||
if let Some(ref v) = self.array_element_type.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
}
|
||||
if let Some(ref v) = self.struct_type.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
if self.code != TypeCode::TYPE_CODE_UNSPECIFIED {
|
||||
os.write_enum(1, self.code.value())?;
|
||||
}
|
||||
if let Some(ref v) = self.array_element_type.as_ref() {
|
||||
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
}
|
||||
if let Some(ref v) = self.struct_type.as_ref() {
|
||||
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &::std::any::Any {
|
||||
self as &::std::any::Any
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
|
||||
self as &mut ::std::any::Any
|
||||
}
|
||||
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> Type {
|
||||
Type::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<TypeCode>>(
|
||||
"code",
|
||||
|m: &Type| { &m.code },
|
||||
|m: &mut Type| { &mut m.code },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Type>>(
|
||||
"array_element_type",
|
||||
|m: &Type| { &m.array_element_type },
|
||||
|m: &mut Type| { &mut m.array_element_type },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<StructType>>(
|
||||
"struct_type",
|
||||
|m: &Type| { &m.struct_type },
|
||||
|m: &mut Type| { &mut m.struct_type },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<Type>(
|
||||
"Type",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static Type {
|
||||
static mut instance: ::protobuf::lazy::Lazy<Type> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const Type,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(Type::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for Type {
|
||||
fn clear(&mut self) {
|
||||
self.code = TypeCode::TYPE_CODE_UNSPECIFIED;
|
||||
self.array_element_type.clear();
|
||||
self.struct_type.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for Type {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for Type {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct StructType {
|
||||
// message fields
|
||||
pub fields: ::protobuf::RepeatedField<StructType_Field>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a StructType {
|
||||
fn default() -> &'a StructType {
|
||||
<StructType as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl StructType {
|
||||
pub fn new() -> StructType {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// repeated .google.spanner.v1.StructType.Field fields = 1;
|
||||
|
||||
|
||||
pub fn get_fields(&self) -> &[StructType_Field] {
|
||||
&self.fields
|
||||
}
|
||||
pub fn clear_fields(&mut self) {
|
||||
self.fields.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_fields(&mut self, v: ::protobuf::RepeatedField<StructType_Field>) {
|
||||
self.fields = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_fields(&mut self) -> &mut ::protobuf::RepeatedField<StructType_Field> {
|
||||
&mut self.fields
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_fields(&mut self) -> ::protobuf::RepeatedField<StructType_Field> {
|
||||
::std::mem::replace(&mut self.fields, ::protobuf::RepeatedField::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for StructType {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.fields {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.fields)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
for value in &self.fields {
|
||||
let len = value.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
};
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
for v in &self.fields {
|
||||
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
};
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &::std::any::Any {
|
||||
self as &::std::any::Any
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
|
||||
self as &mut ::std::any::Any
|
||||
}
|
||||
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> StructType {
|
||||
StructType::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<StructType_Field>>(
|
||||
"fields",
|
||||
|m: &StructType| { &m.fields },
|
||||
|m: &mut StructType| { &mut m.fields },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<StructType>(
|
||||
"StructType",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static StructType {
|
||||
static mut instance: ::protobuf::lazy::Lazy<StructType> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const StructType,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(StructType::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for StructType {
|
||||
fn clear(&mut self) {
|
||||
self.fields.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for StructType {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for StructType {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct StructType_Field {
|
||||
// message fields
|
||||
pub name: ::std::string::String,
|
||||
pub field_type: ::protobuf::SingularPtrField<Type>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a StructType_Field {
|
||||
fn default() -> &'a StructType_Field {
|
||||
<StructType_Field as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl StructType_Field {
|
||||
pub fn new() -> StructType_Field {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
pub fn clear_name(&mut self) {
|
||||
self.name.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_name(&mut self, v: ::std::string::String) {
|
||||
self.name = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_name(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.name
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_name(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.name, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// .google.spanner.v1.Type type = 2;
|
||||
|
||||
|
||||
pub fn get_field_type(&self) -> &Type {
|
||||
self.field_type.as_ref().unwrap_or_else(|| Type::default_instance())
|
||||
}
|
||||
pub fn clear_field_type(&mut self) {
|
||||
self.field_type.clear();
|
||||
}
|
||||
|
||||
pub fn has_field_type(&self) -> bool {
|
||||
self.field_type.is_some()
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_field_type(&mut self, v: Type) {
|
||||
self.field_type = ::protobuf::SingularPtrField::some(v);
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_field_type(&mut self) -> &mut Type {
|
||||
if self.field_type.is_none() {
|
||||
self.field_type.set_default();
|
||||
}
|
||||
self.field_type.as_mut().unwrap()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_field_type(&mut self) -> Type {
|
||||
self.field_type.take().unwrap_or_else(|| Type::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for StructType_Field {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.field_type {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.field_type)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.name);
|
||||
}
|
||||
if let Some(ref v) = self.field_type.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.name.is_empty() {
|
||||
os.write_string(1, &self.name)?;
|
||||
}
|
||||
if let Some(ref v) = self.field_type.as_ref() {
|
||||
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &::std::any::Any {
|
||||
self as &::std::any::Any
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut ::std::any::Any {
|
||||
self as &mut ::std::any::Any
|
||||
}
|
||||
fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> StructType_Field {
|
||||
StructType_Field::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &StructType_Field| { &m.name },
|
||||
|m: &mut StructType_Field| { &mut m.name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Type>>(
|
||||
"type",
|
||||
|m: &StructType_Field| { &m.field_type },
|
||||
|m: &mut StructType_Field| { &mut m.field_type },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new::<StructType_Field>(
|
||||
"StructType_Field",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static StructType_Field {
|
||||
static mut instance: ::protobuf::lazy::Lazy<StructType_Field> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const StructType_Field,
|
||||
};
|
||||
unsafe {
|
||||
instance.get(StructType_Field::new)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for StructType_Field {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.field_type.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for StructType_Field {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for StructType_Field {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
|
||||
pub enum TypeCode {
|
||||
TYPE_CODE_UNSPECIFIED = 0,
|
||||
BOOL = 1,
|
||||
INT64 = 2,
|
||||
FLOAT64 = 3,
|
||||
TIMESTAMP = 4,
|
||||
DATE = 5,
|
||||
STRING = 6,
|
||||
BYTES = 7,
|
||||
ARRAY = 8,
|
||||
STRUCT = 9,
|
||||
}
|
||||
|
||||
impl ::protobuf::ProtobufEnum for TypeCode {
|
||||
fn value(&self) -> i32 {
|
||||
*self as i32
|
||||
}
|
||||
|
||||
fn from_i32(value: i32) -> ::std::option::Option<TypeCode> {
|
||||
match value {
|
||||
0 => ::std::option::Option::Some(TypeCode::TYPE_CODE_UNSPECIFIED),
|
||||
1 => ::std::option::Option::Some(TypeCode::BOOL),
|
||||
2 => ::std::option::Option::Some(TypeCode::INT64),
|
||||
3 => ::std::option::Option::Some(TypeCode::FLOAT64),
|
||||
4 => ::std::option::Option::Some(TypeCode::TIMESTAMP),
|
||||
5 => ::std::option::Option::Some(TypeCode::DATE),
|
||||
6 => ::std::option::Option::Some(TypeCode::STRING),
|
||||
7 => ::std::option::Option::Some(TypeCode::BYTES),
|
||||
8 => ::std::option::Option::Some(TypeCode::ARRAY),
|
||||
9 => ::std::option::Option::Some(TypeCode::STRUCT),
|
||||
_ => ::std::option::Option::None
|
||||
}
|
||||
}
|
||||
|
||||
fn values() -> &'static [Self] {
|
||||
static values: &'static [TypeCode] = &[
|
||||
TypeCode::TYPE_CODE_UNSPECIFIED,
|
||||
TypeCode::BOOL,
|
||||
TypeCode::INT64,
|
||||
TypeCode::FLOAT64,
|
||||
TypeCode::TIMESTAMP,
|
||||
TypeCode::DATE,
|
||||
TypeCode::STRING,
|
||||
TypeCode::BYTES,
|
||||
TypeCode::ARRAY,
|
||||
TypeCode::STRUCT,
|
||||
];
|
||||
values
|
||||
}
|
||||
|
||||
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
|
||||
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
|
||||
};
|
||||
unsafe {
|
||||
descriptor.get(|| {
|
||||
::protobuf::reflect::EnumDescriptor::new("TypeCode", file_descriptor_proto())
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::marker::Copy for TypeCode {
|
||||
}
|
||||
|
||||
impl ::std::default::Default for TypeCode {
|
||||
fn default() -> Self {
|
||||
TypeCode::TYPE_CODE_UNSPECIFIED
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for TypeCode {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
|
||||
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
|
||||
}
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x1cgoogle/spanner/v1/type.proto\x12\x11google.spanner.v1\x1a\x1cgoogl\
|
||||
e/api/annotations.proto\"\xbe\x01\n\x04Type\x12/\n\x04code\x18\x01\x20\
|
||||
\x01(\x0e2\x1b.google.spanner.v1.TypeCodeR\x04code\x12E\n\x12array_eleme\
|
||||
nt_type\x18\x02\x20\x01(\x0b2\x17.google.spanner.v1.TypeR\x10arrayElemen\
|
||||
tType\x12>\n\x0bstruct_type\x18\x03\x20\x01(\x0b2\x1d.google.spanner.v1.\
|
||||
StructTypeR\nstructType\"\x93\x01\n\nStructType\x12;\n\x06fields\x18\x01\
|
||||
\x20\x03(\x0b2#.google.spanner.v1.StructType.FieldR\x06fields\x1aH\n\x05\
|
||||
Field\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12+\n\x04type\x18\
|
||||
\x02\x20\x01(\x0b2\x17.google.spanner.v1.TypeR\x04type*\x8e\x01\n\x08Typ\
|
||||
eCode\x12\x19\n\x15TYPE_CODE_UNSPECIFIED\x10\0\x12\x08\n\x04BOOL\x10\x01\
|
||||
\x12\t\n\x05INT64\x10\x02\x12\x0b\n\x07FLOAT64\x10\x03\x12\r\n\tTIMESTAM\
|
||||
P\x10\x04\x12\x08\n\x04DATE\x10\x05\x12\n\n\x06STRING\x10\x06\x12\t\n\
|
||||
\x05BYTES\x10\x07\x12\t\n\x05ARRAY\x10\x08\x12\n\n\x06STRUCT\x10\tB\x92\
|
||||
\x01\n\x15com.google.spanner.v1B\tTypeProtoP\x01Z8google.golang.org/genp\
|
||||
roto/googleapis/spanner/v1;spanner\xaa\x02\x17Google.Cloud.Spanner.V1\
|
||||
\xca\x02\x17Google\\Cloud\\Spanner\\V1J\xc8\"\n\x06\x12\x04\x0e\0u\x01\n\
|
||||
\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202018\x20Go\
|
||||
ogle\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\x20Ver\
|
||||
sion\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20use\x20th\
|
||||
is\x20file\x20except\x20in\x20compliance\x20with\x20the\x20License.\n\
|
||||
\x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20License\x20at\n\n\
|
||||
\x20\x20\x20\x20\x20http://www.apache.org/licenses/LICENSE-2.0\n\n\x20Un\
|
||||
less\x20required\x20by\x20applicable\x20law\x20or\x20agreed\x20to\x20in\
|
||||
\x20writing,\x20software\n\x20distributed\x20under\x20the\x20License\x20\
|
||||
is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20BASIS,\n\x20WITHOUT\x20\
|
||||
WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIND,\x20either\x20expres\
|
||||
s\x20or\x20implied.\n\x20See\x20the\x20License\x20for\x20the\x20specific\
|
||||
\x20language\x20governing\x20permissions\x20and\n\x20limitations\x20unde\
|
||||
r\x20the\x20License.\n\n\x08\n\x01\x02\x12\x03\x10\0\x1a\n\t\n\x02\x03\0\
|
||||
\x12\x03\x12\0&\n\x08\n\x01\x08\x12\x03\x14\04\n\t\n\x02\x08%\x12\x03\
|
||||
\x14\04\n\x08\n\x01\x08\x12\x03\x15\0O\n\t\n\x02\x08\x0b\x12\x03\x15\0O\
|
||||
\n\x08\n\x01\x08\x12\x03\x16\0\"\n\t\n\x02\x08\n\x12\x03\x16\0\"\n\x08\n\
|
||||
\x01\x08\x12\x03\x17\0*\n\t\n\x02\x08\x08\x12\x03\x17\0*\n\x08\n\x01\x08\
|
||||
\x12\x03\x18\0.\n\t\n\x02\x08\x01\x12\x03\x18\0.\n\x08\n\x01\x08\x12\x03\
|
||||
\x19\04\n\t\n\x02\x08)\x12\x03\x19\04\n\x84\x01\n\x02\x04\0\x12\x04\x1e\
|
||||
\0)\x01\x1ax\x20`Type`\x20indicates\x20the\x20type\x20of\x20a\x20Cloud\
|
||||
\x20Spanner\x20value,\x20as\x20might\x20be\x20stored\x20in\x20a\n\x20tab\
|
||||
le\x20cell\x20or\x20returned\x20from\x20an\x20SQL\x20query.\n\n\n\n\x03\
|
||||
\x04\0\x01\x12\x03\x1e\x08\x0c\nR\n\x04\x04\0\x02\0\x12\x03\x20\x02\x14\
|
||||
\x1aE\x20Required.\x20The\x20[TypeCode][google.spanner.v1.TypeCode]\x20f\
|
||||
or\x20this\x20type.\n\n\r\n\x05\x04\0\x02\0\x04\x12\x04\x20\x02\x1e\x0e\
|
||||
\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03\x20\x02\n\n\x0c\n\x05\x04\0\x02\0\
|
||||
\x01\x12\x03\x20\x0b\x0f\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x20\x12\x13\
|
||||
\n\xa2\x01\n\x04\x04\0\x02\x01\x12\x03$\x02\x1e\x1a\x94\x01\x20If\x20[co\
|
||||
de][google.spanner.v1.Type.code]\x20==\x20[ARRAY][google.spanner.v1.Type\
|
||||
Code.ARRAY],\x20then\x20`array_element_type`\n\x20is\x20the\x20type\x20o\
|
||||
f\x20the\x20array\x20elements.\n\n\r\n\x05\x04\0\x02\x01\x04\x12\x04$\
|
||||
\x02\x20\x14\n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03$\x02\x06\n\x0c\n\x05\
|
||||
\x04\0\x02\x01\x01\x12\x03$\x07\x19\n\x0c\n\x05\x04\0\x02\x01\x03\x12\
|
||||
\x03$\x1c\x1d\n\xad\x01\n\x04\x04\0\x02\x02\x12\x03(\x02\x1d\x1a\x9f\x01\
|
||||
\x20If\x20[code][google.spanner.v1.Type.code]\x20==\x20[STRUCT][google.s\
|
||||
panner.v1.TypeCode.STRUCT],\x20then\x20`struct_type`\n\x20provides\x20ty\
|
||||
pe\x20information\x20for\x20the\x20struct's\x20fields.\n\n\r\n\x05\x04\0\
|
||||
\x02\x02\x04\x12\x04(\x02$\x1e\n\x0c\n\x05\x04\0\x02\x02\x06\x12\x03(\
|
||||
\x02\x0c\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03(\r\x18\n\x0c\n\x05\x04\0\
|
||||
\x02\x02\x03\x12\x03(\x1b\x1c\nd\n\x02\x04\x01\x12\x04,\0C\x01\x1aX\x20`\
|
||||
StructType`\x20defines\x20the\x20fields\x20of\x20a\x20[STRUCT][google.sp\
|
||||
anner.v1.TypeCode.STRUCT]\x20type.\n\n\n\n\x03\x04\x01\x01\x12\x03,\x08\
|
||||
\x12\n@\n\x04\x04\x01\x03\0\x12\x04.\x02:\x03\x1a2\x20Message\x20represe\
|
||||
nting\x20a\x20single\x20field\x20of\x20a\x20struct.\n\n\x0c\n\x05\x04\
|
||||
\x01\x03\0\x01\x12\x03.\n\x0f\n\x99\x03\n\x06\x04\x01\x03\0\x02\0\x12\
|
||||
\x036\x04\x14\x1a\x89\x03\x20The\x20name\x20of\x20the\x20field.\x20For\
|
||||
\x20reads,\x20this\x20is\x20the\x20column\x20name.\x20For\n\x20SQL\x20qu\
|
||||
eries,\x20it\x20is\x20the\x20column\x20alias\x20(e.g.,\x20`\"Word\"`\x20\
|
||||
in\x20the\n\x20query\x20`\"SELECT\x20'hello'\x20AS\x20Word\"`),\x20or\
|
||||
\x20the\x20column\x20name\x20(e.g.,\n\x20`\"ColName\"`\x20in\x20the\x20q\
|
||||
uery\x20`\"SELECT\x20ColName\x20FROM\x20Table\"`).\x20Some\n\x20columns\
|
||||
\x20might\x20have\x20an\x20empty\x20name\x20(e.g.,\x20!\"SELECT\n\x20UPP\
|
||||
ER(ColName)\"`).\x20Note\x20that\x20a\x20query\x20result\x20can\x20conta\
|
||||
in\n\x20multiple\x20fields\x20with\x20the\x20same\x20name.\n\n\x0f\n\x07\
|
||||
\x04\x01\x03\0\x02\0\x04\x12\x046\x04.\x11\n\x0e\n\x07\x04\x01\x03\0\x02\
|
||||
\0\x05\x12\x036\x04\n\n\x0e\n\x07\x04\x01\x03\0\x02\0\x01\x12\x036\x0b\
|
||||
\x0f\n\x0e\n\x07\x04\x01\x03\0\x02\0\x03\x12\x036\x12\x13\n'\n\x06\x04\
|
||||
\x01\x03\0\x02\x01\x12\x039\x04\x12\x1a\x18\x20The\x20type\x20of\x20the\
|
||||
\x20field.\n\n\x0f\n\x07\x04\x01\x03\0\x02\x01\x04\x12\x049\x046\x14\n\
|
||||
\x0e\n\x07\x04\x01\x03\0\x02\x01\x06\x12\x039\x04\x08\n\x0e\n\x07\x04\
|
||||
\x01\x03\0\x02\x01\x01\x12\x039\t\r\n\x0e\n\x07\x04\x01\x03\0\x02\x01\
|
||||
\x03\x12\x039\x10\x11\n\x8a\x03\n\x04\x04\x01\x02\0\x12\x03B\x02\x1c\x1a\
|
||||
\xfc\x02\x20The\x20list\x20of\x20fields\x20that\x20make\x20up\x20this\
|
||||
\x20struct.\x20Order\x20is\n\x20significant,\x20because\x20values\x20of\
|
||||
\x20this\x20struct\x20type\x20are\x20represented\x20as\n\x20lists,\x20wh\
|
||||
ere\x20the\x20order\x20of\x20field\x20values\x20matches\x20the\x20order\
|
||||
\x20of\n\x20fields\x20in\x20the\x20[StructType][google.spanner.v1.Struct\
|
||||
Type].\x20In\x20turn,\x20the\x20order\x20of\x20fields\n\x20matches\x20th\
|
||||
e\x20order\x20of\x20columns\x20in\x20a\x20read\x20request,\x20or\x20the\
|
||||
\x20order\x20of\n\x20fields\x20in\x20the\x20`SELECT`\x20clause\x20of\x20\
|
||||
a\x20query.\n\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03B\x02\n\n\x0c\n\x05\
|
||||
\x04\x01\x02\0\x06\x12\x03B\x0b\x10\n\x0c\n\x05\x04\x01\x02\0\x01\x12\
|
||||
\x03B\x11\x17\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03B\x1a\x1b\n\xd9\x02\n\
|
||||
\x02\x05\0\x12\x04L\0u\x01\x1a\xcc\x02\x20`TypeCode`\x20is\x20used\x20as\
|
||||
\x20part\x20of\x20[Type][google.spanner.v1.Type]\x20to\n\x20indicate\x20\
|
||||
the\x20type\x20of\x20a\x20Cloud\x20Spanner\x20value.\n\n\x20Each\x20lega\
|
||||
l\x20value\x20of\x20a\x20type\x20can\x20be\x20encoded\x20to\x20or\x20dec\
|
||||
oded\x20from\x20a\x20JSON\n\x20value,\x20using\x20the\x20encodings\x20de\
|
||||
scribed\x20below.\x20All\x20Cloud\x20Spanner\x20values\x20can\n\x20be\
|
||||
\x20`null`,\x20regardless\x20of\x20type;\x20`null`s\x20are\x20always\x20\
|
||||
encoded\x20as\x20a\x20JSON\n\x20`null`.\n\n\n\n\x03\x05\0\x01\x12\x03L\
|
||||
\x05\r\n\x1d\n\x04\x05\0\x02\0\x12\x03N\x02\x1c\x1a\x10\x20Not\x20specif\
|
||||
ied.\n\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03N\x02\x17\n\x0c\n\x05\x05\0\
|
||||
\x02\0\x02\x12\x03N\x1a\x1b\n1\n\x04\x05\0\x02\x01\x12\x03Q\x02\x0b\x1a$\
|
||||
\x20Encoded\x20as\x20JSON\x20`true`\x20or\x20`false`.\n\n\x0c\n\x05\x05\
|
||||
\0\x02\x01\x01\x12\x03Q\x02\x06\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03Q\t\
|
||||
\n\n6\n\x04\x05\0\x02\x02\x12\x03T\x02\x0c\x1a)\x20Encoded\x20as\x20`str\
|
||||
ing`,\x20in\x20decimal\x20format.\n\n\x0c\n\x05\x05\0\x02\x02\x01\x12\
|
||||
\x03T\x02\x07\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03T\n\x0b\n\\\n\x04\x05\
|
||||
\0\x02\x03\x12\x03X\x02\x0e\x1aO\x20Encoded\x20as\x20`number`,\x20or\x20\
|
||||
the\x20strings\x20`\"NaN\"`,\x20`\"Infinity\"`,\x20or\n\x20`\"-Infinity\
|
||||
\"`.\n\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03X\x02\t\n\x0c\n\x05\x05\0\
|
||||
\x02\x03\x02\x12\x03X\x0c\r\n\xdd\x02\n\x04\x05\0\x02\x04\x12\x03b\x02\
|
||||
\x10\x1a\xcf\x02\x20Encoded\x20as\x20`string`\x20in\x20RFC\x203339\x20ti\
|
||||
mestamp\x20format.\x20The\x20time\x20zone\n\x20must\x20be\x20present,\
|
||||
\x20and\x20must\x20be\x20`\"Z\"`.\n\n\x20If\x20the\x20schema\x20has\x20t\
|
||||
he\x20column\x20option\n\x20`allow_commit_timestamp=true`,\x20the\x20pla\
|
||||
ceholder\x20string\n\x20`\"spanner.commit_timestamp()\"`\x20can\x20be\
|
||||
\x20used\x20to\x20instruct\x20the\x20system\n\x20to\x20insert\x20the\x20\
|
||||
commit\x20timestamp\x20associated\x20with\x20the\x20transaction\n\x20com\
|
||||
mit.\n\n\x0c\n\x05\x05\0\x02\x04\x01\x12\x03b\x02\x0b\n\x0c\n\x05\x05\0\
|
||||
\x02\x04\x02\x12\x03b\x0e\x0f\n;\n\x04\x05\0\x02\x05\x12\x03e\x02\x0b\
|
||||
\x1a.\x20Encoded\x20as\x20`string`\x20in\x20RFC\x203339\x20date\x20forma\
|
||||
t.\n\n\x0c\n\x05\x05\0\x02\x05\x01\x12\x03e\x02\x06\n\x0c\n\x05\x05\0\
|
||||
\x02\x05\x02\x12\x03e\t\n\n#\n\x04\x05\0\x02\x06\x12\x03h\x02\r\x1a\x16\
|
||||
\x20Encoded\x20as\x20`string`.\n\n\x0c\n\x05\x05\0\x02\x06\x01\x12\x03h\
|
||||
\x02\x08\n\x0c\n\x05\x05\0\x02\x06\x02\x12\x03h\x0b\x0c\nZ\n\x04\x05\0\
|
||||
\x02\x07\x12\x03l\x02\x0c\x1aM\x20Encoded\x20as\x20a\x20base64-encoded\
|
||||
\x20`string`,\x20as\x20described\x20in\x20RFC\x204648,\n\x20section\x204\
|
||||
.\n\n\x0c\n\x05\x05\0\x02\x07\x01\x12\x03l\x02\x07\n\x0c\n\x05\x05\0\x02\
|
||||
\x07\x02\x12\x03l\n\x0b\n\x99\x01\n\x04\x05\0\x02\x08\x12\x03p\x02\x0c\
|
||||
\x1a\x8b\x01\x20Encoded\x20as\x20`list`,\x20where\x20the\x20list\x20elem\
|
||||
ents\x20are\x20represented\n\x20according\x20to\x20[array_element_type][\
|
||||
google.spanner.v1.Type.array_element_type].\n\n\x0c\n\x05\x05\0\x02\x08\
|
||||
\x01\x12\x03p\x02\x07\n\x0c\n\x05\x05\0\x02\x08\x02\x12\x03p\n\x0b\n\x94\
|
||||
\x01\n\x04\x05\0\x02\t\x12\x03t\x02\r\x1a\x86\x01\x20Encoded\x20as\x20`l\
|
||||
ist`,\x20where\x20list\x20element\x20`i`\x20is\x20represented\x20accordi\
|
||||
ng\n\x20to\x20[struct_type.fields[i]][google.spanner.v1.StructType.field\
|
||||
s].\n\n\x0c\n\x05\x05\0\x02\t\x01\x12\x03t\x02\x08\n\x0c\n\x05\x05\0\x02\
|
||||
\t\x02\x12\x03t\x0b\x0cb\x06proto3\
|
||||
";
|
||||
|
||||
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
|
||||
lock: ::protobuf::lazy::ONCE_INIT,
|
||||
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
|
||||
};
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
unsafe {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
}
|
||||
13
vendor/mozilla-rust-sdk/googleapis/Cargo.toml
vendored
Normal file
13
vendor/mozilla-rust-sdk/googleapis/Cargo.toml
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "googleapis"
|
||||
version = "0.0.1"
|
||||
authors = ["Ferrous Systems"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
futures = "0.1.28"
|
||||
grpcio = "0.5.0-alpha.1"
|
||||
|
||||
[dependencies.googleapis-raw]
|
||||
version = "0.0.1"
|
||||
path = "../googleapis-raw"
|
||||
5
vendor/mozilla-rust-sdk/googleapis/README.md
vendored
Normal file
5
vendor/mozilla-rust-sdk/googleapis/README.md
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
# googleapis
|
||||
|
||||
These are high-level bindings for Google APIs.
|
||||
|
||||
Work in progress. Use [`googleapis-raw`](../googleapis-raw) for now.
|
||||
13
vendor/mozilla-rust-sdk/googleapis/examples/spanner-client.rs
vendored
Normal file
13
vendor/mozilla-rust-sdk/googleapis/examples/spanner-client.rs
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
use std::error::Error;
|
||||
|
||||
use googleapis::spanner;
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
// An example database inside Mozilla's Spanner instance.
|
||||
let database = "projects/mozilla-rust-sdk-dev/instances/mozilla-spanner-dev/databases/mydb";
|
||||
|
||||
// Create a Spanner client.
|
||||
let client = spanner::Client::new(database)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
23
vendor/mozilla-rust-sdk/googleapis/src/lib.rs
vendored
Normal file
23
vendor/mozilla-rust-sdk/googleapis/src/lib.rs
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
use std::error;
|
||||
use std::fmt;
|
||||
|
||||
pub mod spanner;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Error(grpcio::Error);
|
||||
|
||||
impl fmt::Display for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
fmt::Display::fmt(&self.0, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl error::Error for Error {}
|
||||
|
||||
impl From<grpcio::Error> for Error {
|
||||
fn from(err: grpcio::Error) -> Error {
|
||||
Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, crate::Error>;
|
||||
57
vendor/mozilla-rust-sdk/googleapis/src/spanner.rs
vendored
Normal file
57
vendor/mozilla-rust-sdk/googleapis/src/spanner.rs
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
//! Spanner client.
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use googleapis_raw::spanner::v1::{
|
||||
spanner::{CreateSessionRequest, Session},
|
||||
spanner_grpc::SpannerClient,
|
||||
};
|
||||
use grpcio::{CallOption, ChannelBuilder, ChannelCredentials, EnvBuilder, MetadataBuilder};
|
||||
|
||||
pub struct Client {
|
||||
database: String,
|
||||
client: SpannerClient,
|
||||
session: Session,
|
||||
}
|
||||
|
||||
impl Client {
|
||||
/// Creates a new Spanner client.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// use googleapis::spanner;
|
||||
///
|
||||
/// let db = "projects/my_project/instances/my_instance/databases/my_database";
|
||||
/// let client = spanner::Client::new(db);
|
||||
/// ```
|
||||
pub fn new(database: &str) -> crate::Result<Client> {
|
||||
let database = database.to_string();
|
||||
let endpoint = "spanner.googleapis.com:443";
|
||||
|
||||
// Set up the gRPC environment.
|
||||
let env = Arc::new(EnvBuilder::new().build());
|
||||
let creds = ChannelCredentials::google_default_credentials()?;
|
||||
|
||||
// Create a Spanner client.
|
||||
let chan = ChannelBuilder::new(env.clone())
|
||||
.max_send_message_len(100 << 20)
|
||||
.max_receive_message_len(100 << 20)
|
||||
.secure_connect(&endpoint, creds);
|
||||
let client = SpannerClient::new(chan);
|
||||
|
||||
let mut req = CreateSessionRequest::new();
|
||||
req.set_database(database.to_string());
|
||||
let mut meta = MetadataBuilder::new();
|
||||
meta.add_str("google-cloud-resource-prefix", &database)?;
|
||||
meta.add_str("x-goog-api-client", "googleapis-rs")?;
|
||||
let opt = CallOption::default().headers(meta.build());
|
||||
let session = client.create_session_opt(&req, opt)?;
|
||||
|
||||
Ok(Client {
|
||||
database,
|
||||
client,
|
||||
session,
|
||||
})
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user